diff options
author | Craig Mautner <cmautner@google.com> | 2014-01-13 05:33:51 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-01-13 05:33:51 +0000 |
commit | cf6e0d686f42036992bdac4f47d37bc8c0775027 (patch) | |
tree | e015d7fa5a19f20f4aee8b7ca5c7b7b2b48924c7 /services | |
parent | bb0a4f20502c27a920b7d874c9a17c178afee5f9 (diff) | |
parent | ad25fa36cb63f134acf636d70696bbf81548802e (diff) | |
download | frameworks_base-cf6e0d686f42036992bdac4f47d37bc8c0775027.zip frameworks_base-cf6e0d686f42036992bdac4f47d37bc8c0775027.tar.gz frameworks_base-cf6e0d686f42036992bdac4f47d37bc8c0775027.tar.bz2 |
Merge "Add display synchronously." into klp-modular-dev
Diffstat (limited to 'services')
-rw-r--r-- | services/core/java/com/android/server/am/ActivityStackSupervisor.java | 3 | ||||
-rw-r--r-- | services/core/java/com/android/server/wm/WindowManagerService.java | 17 |
2 files changed, 9 insertions, 11 deletions
diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java index 67ab580..5d401ed 100644 --- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java +++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java @@ -2986,8 +2986,7 @@ public final class ActivityStackSupervisor implements DisplayListener { final Display display = virtualDisplay.getDisplay(); final int displayId = display.getDisplayId(); - // Do WindowManager operation first so that it is ahead of CREATE_STACK in the H queue. - mWindowManager.onDisplayAdded(displayId); + mWindowManager.handleDisplayAdded(displayId); synchronized (mService) { ActivityDisplay activityDisplay = new ActivityDisplay(display); diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java index 33d3e9f..e02714b 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -4865,7 +4865,6 @@ public class WindowManagerService extends IWindowManager.Stub final TaskStack stack = task.mStack; EventLog.writeEvent(EventLogTags.WM_TASK_REMOVED, taskId, "removeTask"); stack.removeTask(task); - stack.getDisplayContent().layoutNeeded = true; } } @@ -7447,9 +7446,7 @@ public class WindowManagerService extends IWindowManager.Stub } case DO_DISPLAY_ADDED: - synchronized (mWindowMap) { - handleDisplayAddedLocked(msg.arg1); - } + handleDisplayAdded(msg.arg1); break; case DO_DISPLAY_REMOVED: @@ -10786,11 +10783,13 @@ public class WindowManagerService extends IWindowManager.Stub mH.sendMessage(mH.obtainMessage(H.DO_DISPLAY_ADDED, displayId, 0)); } - private void handleDisplayAddedLocked(int displayId) { - final Display display = mDisplayManager.getDisplay(displayId); - if (display != null) { - createDisplayContentLocked(display); - displayReady(displayId); + public void handleDisplayAdded(int displayId) { + synchronized (mWindowMap) { + final Display display = mDisplayManager.getDisplay(displayId); + if (display != null) { + createDisplayContentLocked(display); + displayReady(displayId); + } } } |