[app] don't auto-show install dialog

the current code is too complex and fragile to do this in a safe fashion without causing multiple stacked install dialogs on top of each other.
This commit is contained in:
Torsten Grote
2023-07-14 16:29:09 -03:00
parent 2858819edf
commit f970a4feb9

View File

@@ -454,6 +454,11 @@ public class AppDetailsActivity extends AppCompatActivity
// clear progress if the state got removed in the meantime (e.g. download canceled)
adapter.clearProgress();
}
if (this.currentStatus == newStatus) {
Utils.debugLog(TAG, "Same app status, not updating.");
return;
}
this.currentStatus = newStatus;
if (this.currentStatus == null) {
return;
@@ -477,15 +482,6 @@ public class AppDetailsActivity extends AppCompatActivity
localBroadcastManager.registerReceiver(installReceiver,
Installer.getInstallIntentFilter(newStatus.getCanonicalUrl()));
} else {
try {
if (newStatus.intent != null) {
localBroadcastManager.registerReceiver(installReceiver,
Installer.getInstallIntentFilter(newStatus.getCanonicalUrl()));
newStatus.intent.send();
}
} catch (PendingIntent.CanceledException e) {
Log.e(TAG, "PI canceled", e);
}
adapter.clearProgress();
}
break;