Merge branch 'investigate-854--uninstall-error' into stable-v0.102.1
Ensure current app state is reflected in AppDetails when resuming. See merge request !429
This commit is contained in:
commit
4090132d84
@ -432,6 +432,15 @@ public class AppDetails extends AppCompatActivity {
|
||||
myAppObserver);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
App newApp = AppProvider.Helper.findHighestPriorityMetadata(getContentResolver(), app.packageName);
|
||||
if (newApp.isInstalled() != app.isInstalled()) {
|
||||
setApp(newApp);
|
||||
}
|
||||
super.onResume();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResumeFragments() {
|
||||
// Must be called before super.onResumeFragments(), as the fragments depend on the active
|
||||
@ -993,7 +1002,7 @@ public class AppDetails extends AppCompatActivity {
|
||||
return apk;
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
throw new IllegalStateException("Couldn't find app while installing");
|
||||
throw new IllegalStateException("Couldn't find installed apk for " + app.packageName, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user