Guard against exception when getting package installer info.

Bug: 28742227
Change-Id: I8742c882ae6b18cb8f51a9da04170358a20a7d48
This commit is contained in:
Sudheer Shanka
2016-05-13 12:56:34 -07:00
parent 8c3b5fa3cf
commit aed0537aaf

View File

@@ -908,8 +908,13 @@ public class InstalledAppDetails extends AppInfoBase
}
private void addAppInstallerInfoPref(PreferenceScreen screen) {
final String installerPackageName =
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;
}