OSDN Git Service

Fixes crash from selecting uninstalled app info from recents.
authorDoris Ling <dling@google.com>
Thu, 1 Feb 2018 22:37:25 +0000 (14:37 -0800)
committerDoris Ling <dling@google.com>
Thu, 1 Feb 2018 22:37:25 +0000 (14:37 -0800)
commite679e9b1b42bb83e43e6a776d756972be965f9dd
tree9f3fefbb3f5cb6789e0522c4f70fa1331321efe1
parentb832f737c3d3d04aa2c1e60e9ce5a71a68e5da30
Fixes crash from selecting uninstalled app info from recents.

- when the package is uninstalled, also remove it from the recent tasks
- move retrieveAppEntry() from onCreate() to getPreferenceControllers()
so that if the package info is invalid, do not create any controllers,
as the activity will be finished anyway.

Change-Id: Ibbfa16e3d1f941a0a200e78ec73a06ca8511f82b
Fixes: 72656345
Test: make RunSettingsRoboTests
src/com/android/settings/applications/appinfo/AppInfoDashboardFragment.java
tests/robotests/src/com/android/settings/applications/appinfo/AppInfoDashboardFragmentTest.java