Merge "Guard against exception when getting package installer info." into nyc-dev
am: 15c1bb48c3
* commit '15c1bb48c3da3404a775c7101e3559772aa37d6e':
Guard against exception when getting package installer info.
Change-Id: Ibe6459ec92ffe90872c3380d865baea6cb257508
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