Check for updates on resume

pull/153/head
M66B 7 years ago
parent 826c59fcec
commit 26d2e5d1ca

@ -404,8 +404,6 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
checkFirst(); checkFirst();
checkCrash(); checkCrash();
if (!Helper.isPlayStoreInstall(this))
checkUpdate(false);
pgpService = new OpenPgpServiceConnection(this, "org.sufficientlysecure.keychain"); pgpService = new OpenPgpServiceConnection(this, "org.sufficientlysecure.keychain");
pgpService.bindToService(); pgpService.bindToService();
@ -582,6 +580,8 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
if (!pgpService.isBound()) if (!pgpService.isBound())
pgpService.bindToService(); pgpService.bindToService();
checkUpdate(false);
} }
@Override @Override
@ -708,6 +708,9 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
} }
private void checkUpdate(boolean always) { private void checkUpdate(boolean always) {
if (Helper.isPlayStoreInstall(this))
return;
long now = new Date().getTime(); long now = new Date().getTime();
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
if (!always && !prefs.getBoolean("updates", true)) if (!always && !prefs.getBoolean("updates", true))

Loading…
Cancel
Save