Cloud sync: IAB info

pull/212/head
M66B 2 years ago
parent 2a62fc33a3
commit 70e1cd40fb

@ -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)) {

@ -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;

@ -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())

Loading…
Cancel
Save