Merge "Fix crash of PictureInPictureDetailPreferenceController" into sc-v2-dev am: 2129ea5947

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/15895167

Change-Id: I70e9abf03d0985c7e327692a96b66fc731978b1f
This commit is contained in:
Yanting Yang
2021-09-27 03:09:48 +00:00
committed by Automerger Merge Worker

View File

@@ -67,7 +67,9 @@ public class PictureInPictureDetailPreferenceController extends AppInfoPreferenc
try {
packageInfoWithActivities = mPackageManager.getPackageInfoAsUser(mPackageName,
PackageManager.GET_ACTIVITIES, UserHandle.myUserId());
} catch (PackageManager.NameNotFoundException e) {
} catch (Exception e) {
// Catch Exception to avoid DeadObjectException thrown with binder transaction
// failures, since the explicit request of DeadObjectException has compiler errors.
Log.e(TAG, "Exception while retrieving the package info of " + mPackageName, e);
}