Merge "Avoid NPE when installing app update." into jb-mr1-dev
This commit is contained in:
@@ -568,14 +568,19 @@ public class InstalledAppDetails extends Fragment
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
mAppEntry = mState.getEntry(packageName);
|
mAppEntry = mState.getEntry(packageName);
|
||||||
// Get application info again to refresh changed properties of application
|
if (mAppEntry != null) {
|
||||||
try {
|
// Get application info again to refresh changed properties of application
|
||||||
mPackageInfo = mPm.getPackageInfo(mAppEntry.info.packageName,
|
try {
|
||||||
PackageManager.GET_DISABLED_COMPONENTS |
|
mPackageInfo = mPm.getPackageInfo(mAppEntry.info.packageName,
|
||||||
PackageManager.GET_UNINSTALLED_PACKAGES |
|
PackageManager.GET_DISABLED_COMPONENTS |
|
||||||
PackageManager.GET_SIGNATURES);
|
PackageManager.GET_UNINSTALLED_PACKAGES |
|
||||||
} catch (NameNotFoundException e) {
|
PackageManager.GET_SIGNATURES);
|
||||||
Log.e(TAG, "Exception when retrieving package:" + mAppEntry.info.packageName, e);
|
} catch (NameNotFoundException e) {
|
||||||
|
Log.e(TAG, "Exception when retrieving package:" + mAppEntry.info.packageName, e);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Log.w(TAG, "Missing AppEntry; maybe reinstalling?");
|
||||||
|
mPackageInfo = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return packageName;
|
return packageName;
|
||||||
|
Reference in New Issue
Block a user