Merge "Clear the calling identity in isUsableDisplay." into qt-dev

am: 6102c2f7fd

Change-Id: Ie8f7ab31e2f55abc0cf46b39f6fd7e0a42928230
This commit is contained in:
wilsonshih
2019-07-09 19:15:01 -07:00
committed by android-build-merger

View File

@@ -1172,8 +1172,16 @@ public class WallpaperManagerService extends IWallpaperManager.Stub
return false;
}
final int displayId = display.getDisplayId();
return displayId == DEFAULT_DISPLAY
|| mWindowManagerInternal.shouldShowSystemDecorOnDisplay(displayId);
if (displayId == DEFAULT_DISPLAY) {
return true;
}
final long ident = Binder.clearCallingIdentity();
try {
return mWindowManagerInternal.shouldShowSystemDecorOnDisplay(displayId);
} finally {
Binder.restoreCallingIdentity(ident);
}
}
void forEachDisplayConnector(Consumer<DisplayConnector> action) {