Fix test backup screen

This commit is contained in:
max-klaus 2021-04-22 16:54:12 +03:00
parent c1b416448f
commit 603f32df63
2 changed files with 4 additions and 10 deletions

View file

@ -131,10 +131,6 @@ public class BackupHelper {
return token.matches("[0-9]+");
}
public boolean hasOsmLiveUpdates() {
return InAppPurchaseHelper.isSubscribedToLiveUpdates(app);
}
@Nullable
public String getOrderId() {
InAppPurchaseHelper purchaseHelper = app.getInAppPurchaseHelper();
@ -167,7 +163,10 @@ public class BackupHelper {
public void registerUser(@NonNull String email, @Nullable final OnRegisterUserListener listener) {
Map<String, String> params = new HashMap<>();
params.put("email", email);
params.put("orderid", getOrderId());
String orderId = getOrderId();
if (!Algorithms.isEmpty(orderId)) {
params.put("orderid", orderId);
}
params.put("deviceid", app.getUserAndroidId());
AndroidNetworkUtils.sendRequestAsync(app, USER_REGISTER_URL, params, "Register user", true, true, new OnRequestResultListener() {
@Override

View file

@ -89,11 +89,6 @@ public class TestBackupActivity extends OsmandActionBarActivity {
}
});
if (!backupHelper.hasOsmLiveUpdates()) {
findViewById(R.id.main_view).setVisibility(View.GONE);
return;
}
buttonRegister = findViewById(R.id.btn_register);
UiUtilities.setupDialogButton(nightMode, buttonRegister, DialogButtonType.PRIMARY, "Register");
buttonVerify = findViewById(R.id.btn_verify);