OSDN Git Service

Fix crash when selecting AppInfo for uninstalled app from Recents.
authorDoris Ling <dling@google.com>
Mon, 1 Aug 2016 18:00:04 +0000 (11:00 -0700)
committerDoris Ling <dling@google.com>
Fri, 19 Aug 2016 21:15:38 +0000 (14:15 -0700)
commit7574b6491029f4830de2e1db0962d301b41083f4
treee324095b9f22e4d5d623a592f7f21478c2bcbd57
parente90777710c89155b0c6f7f4d1d34e70094de0700
Fix crash when selecting AppInfo for uninstalled app from Recents.

When an app is uninstalled, the corresponding app info is not removed
fromi the Recents tasks. If user selects that app info entry from the
recents tasks, it will failed to retrieve the app detail as the package
is already removed.

Add the package removed event listener in InstalledAppDetails such
that when the package has been unintalled, its app info task will also
be removed from Recents.

Change-Id: I771507f8f53017f87eda31ddef77a95e30921cbf
Fixes: 28671923

Fix app info crashes when package is uninstalled from terminal.

Move start listening to the package removed intents to onCreate()
and continue listening throughout the whole lifecycle of the activity so
that if user unintall the package in the background, it will still be
notified.

Change-Id: I889b0ea3e1245be83750d73349ed3a0f85a51783
Fixes: 28671923

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
src/com/android/settings/Utils.java
src/com/android/settings/applications/AppInfoBase.java
src/com/android/settings/applications/InstalledAppDetails.java