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: I3cf5a62c44b12356b48f841a03874f93b1c23981
This commit is contained in:
Sudheer Shanka
2016-05-13 21:29:02 +00:00
committed by android-build-merger

View File

@@ -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;
}