Cloud sync: IAB info

This commit is contained in:
M66B 2023-01-28 19:54:16 +01:00
parent 2a62fc33a3
commit 70e1cd40fb
3 changed files with 14 additions and 0 deletions

View File

@ -84,6 +84,15 @@ public class CloudSync {
return;
JSONObject jrequest = new JSONObject();
if ("login".equals(command)) {
String iab_json = prefs.getString("iab_json", null);
String iab_signature = prefs.getString("iab_signature", null);
if (!TextUtils.isEmpty(iab_json) & !TextUtils.isEmpty(iab_signature)) {
Log.i("Cloud IAB " + iab_json);
jrequest.put("iab_json", iab_json);
jrequest.put("iab_signature", iab_signature);
}
}
EntityLog.log(context, EntityLog.Type.Cloud, "Cloud request=" + command);
if ("sync".equals(command)) {

View File

@ -217,6 +217,7 @@ public class FragmentOptionsBackup extends FragmentBase implements SharedPrefere
}
});
btnLogin.setEnabled(!BuildConfig.PLAY_STORE_RELEASE || ActivityBilling.isPro(getContext()));
btnLogin.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
@ -1112,6 +1113,8 @@ public class FragmentOptionsBackup extends FragmentBase implements SharedPrefere
if ("pro".equals(key) && !BuildConfig.DEBUG)
continue;
if ("iab_json".equals(key) || "iab_signature".equals(key))
continue;
if ("accept_unsupported".equals(key))
continue;

View File

@ -485,6 +485,8 @@ public class ActivityBilling extends ActivityBase implements
if (isPurchaseValid(purchase)) {
editor.putBoolean("pro", true);
editor.putLong(sku + ".cached", new Date().getTime());
editor.putString("iab_json", purchase.getOriginalJson());
editor.putString("iab_signature", purchase.getSignature());
}
if (!purchase.isAcknowledged())