Catch RuntimeException from DisplayManager am: 1901401be2

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13566538

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I010bfdfff6baa82c1108623daa3403798f9966e9
This commit is contained in:
Sungsoo Lim
2021-02-19 07:06:19 +00:00
committed by Automerger Merge Worker

View File

@@ -384,7 +384,12 @@ public class MediaRouter {
}
public Display[] getAllPresentationDisplays() {
return mDisplayService.getDisplays(DisplayManager.DISPLAY_CATEGORY_PRESENTATION);
try {
return mDisplayService.getDisplays(DisplayManager.DISPLAY_CATEGORY_PRESENTATION);
} catch (RuntimeException ex) {
Log.e(TAG, "Unable to get displays.", ex);
return null;
}
}
private void updatePresentationDisplays(int changedDisplayId) {