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) {
|
||||
final String installerPackageName =
|
||||
getContext().getPackageManager().getInstallerPackageName(mPackageName);
|
||||
String installerPackageName = null;
|
||||
try {
|
||||
installerPackageName =
|
||||
getContext().getPackageManager().getInstallerPackageName(mPackageName);
|
||||
} catch (IllegalArgumentException e) {
|
||||
Log.e(TAG, "Exception while retrieving the package installer of " + mPackageName, e);
|
||||
}
|
||||
if (installerPackageName == null) {
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user