Cloud sync: IAB info

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

@ -84,6 +84,15 @@ public class CloudSync {
return; return;
JSONObject jrequest = new JSONObject(); 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); EntityLog.log(context, EntityLog.Type.Cloud, "Cloud request=" + command);
if ("sync".equals(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() { btnLogin.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
@ -1112,6 +1113,8 @@ public class FragmentOptionsBackup extends FragmentBase implements SharedPrefere
if ("pro".equals(key) && !BuildConfig.DEBUG) if ("pro".equals(key) && !BuildConfig.DEBUG)
continue; continue;
if ("iab_json".equals(key) || "iab_signature".equals(key))
continue;
if ("accept_unsupported".equals(key)) if ("accept_unsupported".equals(key))
continue; continue;

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

Loading…
Cancel
Save