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);
|
myAppObserver);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onResume() {
|
||||||
|
App newApp = AppProvider.Helper.findHighestPriorityMetadata(getContentResolver(), app.packageName);
|
||||||
|
if (newApp.isInstalled() != app.isInstalled()) {
|
||||||
|
setApp(newApp);
|
||||||
|
}
|
||||||
|
super.onResume();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onResumeFragments() {
|
protected void onResumeFragments() {
|
||||||
// Must be called before super.onResumeFragments(), as the fragments depend on the active
|
// Must be called before super.onResumeFragments(), as the fragments depend on the active
|
||||||
@ -993,7 +1002,7 @@ public class AppDetails extends AppCompatActivity {
|
|||||||
return apk;
|
return apk;
|
||||||
} catch (PackageManager.NameNotFoundException e) {
|
} catch (PackageManager.NameNotFoundException e) {
|
||||||
e.printStackTrace();
|
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