OSDN Git Service

Fix a crash when transferring an app.
authorDaniel Nishi <dhnishi@google.com>
Thu, 2 Mar 2017 20:52:40 +0000 (12:52 -0800)
committerDaniel Nishi <dhnishi@google.com>
Wed, 8 Mar 2017 01:53:12 +0000 (17:53 -0800)
commit6a256e77d624967470f60c68dab6d5447e8a24cb
treebcc9a7dc997fb34350832ba9eb79790c67e34a58
parent8e12df9d621fd9f969647d00bdd2bd2ea2aaa3e3
Fix a crash when transferring an app.

This crash occurs because the background loader is loading
the storage for an app which is currently being moved off of
the device. In the native code which is calculating the storage,
it throws an InstallerException which is caught and rethrown as an
IllegalStateException.

We handle this in the view by reporting that we could not calculate
the size of the app.

Change-Id: I109b1be60ae60f8ef31b08cb4392b576261fa806
Fixes: 35922033
Test: Robotest
res/xml/app_storage_settings.xml
src/com/android/settings/applications/AppStorageSettings.java
src/com/android/settings/applications/AppStorageSizesController.java [new file with mode: 0644]
src/com/android/settings/applications/FetchPackageStorageAsyncLoader.java
tests/robotests/src/com/android/settings/applications/AppStorageSizesControllerTest.java [new file with mode: 0644]
tests/robotests/src/com/android/settings/applications/FetchPackageStorageAsyncLoaderTest.java