Fix crash in Storage app info when the corresponding app is uninstalled

in the background.

1. Move the handling for package removal from InstalledAppDetails to
AppInfoBase so that all app info subclass will now finish
correspondingly if the package is uninstalled.
2. In InstalledAppDetails, when handling package removal, will also
finish the app info fragment that it starts earlier.

Change-Id: Id741e7475414045040dd0797ff3bc63ac214f400
Fixes: 27774473
This commit is contained in:
Doris Ling
2016-08-12 15:25:00 -07:00
parent 28e7bc9235
commit 36e953fbe5
3 changed files with 46 additions and 36 deletions

View File

@@ -515,7 +515,7 @@ public final class Utils extends com.android.settingslib.Utils {
if (resultTo == null) {
context.startActivity(intent);
} else {
resultTo.startActivityForResult(intent, resultRequestCode);
resultTo.getActivity().startActivityForResult(intent, resultRequestCode);
}
}