Guard against exception when getting package installer info.
Bug: 28742227 Change-Id: I8742c882ae6b18cb8f51a9da04170358a20a7d48
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;
|
||||||
|
try {
|
||||||
|
installerPackageName =
|
||||||
getContext().getPackageManager().getInstallerPackageName(mPackageName);
|
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