Correct displayId info in log when WMS#addWindow returned ADD_INVALID_DISPLAY
As in WMS#addWindow will check if the application is accessible to add window, if not, will print displayId value that application didn't have access right on it. Since getDisplayContentOrCreate(displayId, token) will return the display of window token when the token exists, if the displayId value is not same as the token display, the error message may confuse the reader. Bug: 163333691 Test: manual Change-Id: Ic887fde9ab2e1f2b57a0c9241809287e193dcf48
This commit is contained in:
@@ -1407,7 +1407,8 @@ public class WindowManagerService extends IWindowManager.Stub
|
||||
if (!displayContent.hasAccess(session.mUid)) {
|
||||
ProtoLog.w(WM_ERROR,
|
||||
"Attempted to add window to a display for which the application "
|
||||
+ "does not have access: %d. Aborting.", displayId);
|
||||
+ "does not have access: %d. Aborting.",
|
||||
displayContent.getDisplayId());
|
||||
return WindowManagerGlobal.ADD_INVALID_DISPLAY;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user