Don't crash during app uninstall.
ApplicationsState was not handling the case where the storage query fails and returns a null result. This meant that it NPE when this happened. Fixes: 37726237 Test: Manual (see b/34768986) Change-Id: I3740ac7b1192e1ea3cdad85c61dd3dee2c2251cc
This commit is contained in:
@@ -1040,6 +1040,11 @@ public class ApplicationsState {
|
||||
|
||||
final IPackageStatsObserver.Stub mStatsObserver = new IPackageStatsObserver.Stub() {
|
||||
public void onGetStatsCompleted(PackageStats stats, boolean succeeded) {
|
||||
if (!succeeded) {
|
||||
// There is no meaningful information in stats if the call failed.
|
||||
return;
|
||||
}
|
||||
|
||||
boolean sizeChanged = false;
|
||||
synchronized (mEntriesMap) {
|
||||
if (DEBUG_LOCKING) Log.v(TAG, "onGetStatsCompleted acquired lock");
|
||||
|
||||
Reference in New Issue
Block a user