Merge "Guard against exception when getting package installer info." into nyc-dev am: 15c1bb48c3
am: 3ad3bd66ad
* commit '3ad3bd66adb2be016654c8655f8bad4ddc0bcd79':
Guard against exception when getting package installer info.
Change-Id: I2de57942f4e844375e6dfe6f4f0a9489f9d6382b
This commit is contained in:
@@ -908,8 +908,13 @@ public class InstalledAppDetails extends AppInfoBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void addAppInstallerInfoPref(PreferenceScreen screen) {
|
private void addAppInstallerInfoPref(PreferenceScreen screen) {
|
||||||
final String installerPackageName =
|
String installerPackageName = null;
|
||||||
getContext().getPackageManager().getInstallerPackageName(mPackageName);
|
try {
|
||||||
|
installerPackageName =
|
||||||
|
getContext().getPackageManager().getInstallerPackageName(mPackageName);
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
Log.e(TAG, "Exception while retrieving the package installer of " + mPackageName, e);
|
||||||
|
}
|
||||||
if (installerPackageName == null) {
|
if (installerPackageName == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user