summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author wilsonshih <wilsonshih@google.com> 2019-07-09 19:25:24 -0700
committer android-build-merger <android-build-merger@google.com> 2019-07-09 19:25:24 -0700
commitc3264b04b7dac2f40e9ac34ef7ac0b6633cbe423 (patch)
treec4c609cc7f9aab145f26e46e4ba2fb5457e8ee0d
parent3dc7b03cfe74b404f5b11867edfba3c538782630 (diff)
parent3c34ea265f864b0454917d7e0baabc1f4d4bcd8f (diff)
Merge "Clear the calling identity in isUsableDisplay." into qt-dev am: 6102c2f7fd
am: 3c34ea265f Change-Id: I540d7987420259f2147a9dac1d28c6cfa36c2099
-rw-r--r--services/core/java/com/android/server/wallpaper/WallpaperManagerService.java12
1 files changed, 10 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
index 9908b3657121..b0f1e5d69be4 100644
--- a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
+++ b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java
@@ -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) {