Merge "Fix crash of PictureInPictureDetailPreferenceController" into sc-v2-dev

This commit is contained in:
Yanting Yang
2021-09-27 03:04:02 +00:00
committed by Android (Google) Code Review

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