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

This commit is contained in:
TreeHugger Robot
2019-07-10 01:51:24 +00:00
committed by Android (Google) Code Review

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) {