Catch RuntimeException from DisplayManager
Bug: 171714761 Test: build Change-Id: I5bad08dcf49472af16df18418102407be56e67e7
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user