diff options
| author | 2017-08-02 22:57:53 +0000 | |
|---|---|---|
| committer | 2017-08-02 22:57:53 +0000 | |
| commit | 988a6dd5e312ace695ae4f67732f96d69fc29f32 (patch) | |
| tree | 1a734336750e8d9e10f9907a5d18156ff6af06f9 | |
| parent | 4f4535500e4ca446cebce004ca6eaccf3dd61b67 (diff) | |
| parent | d0e681550c5d7950b31e994cd3ad12afbbd26da1 (diff) | |
Merge "Merge "Ensure that all displays are updated upon any changes to rotation." into oc-dr1-dev am: adec8518af" into oc-mr1-dev
| -rw-r--r-- | services/core/java/com/android/server/wm/RootWindowContainer.java | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/services/core/java/com/android/server/wm/RootWindowContainer.java b/services/core/java/com/android/server/wm/RootWindowContainer.java index 233e75bbfec7..36fa3a733987 100644 --- a/services/core/java/com/android/server/wm/RootWindowContainer.java +++ b/services/core/java/com/android/server/wm/RootWindowContainer.java @@ -747,12 +747,16 @@ class RootWindowContainer extends WindowContainer<DisplayContent> { if (mUpdateRotation) { if (DEBUG_ORIENTATION) Slog.d(TAG, "Performing post-rotate rotation"); - // TODO(multi-display): Update rotation for different displays separately. - final int displayId = defaultDisplay.getDisplayId(); - if (defaultDisplay.updateRotationUnchecked(false /* inTransaction */)) { - mService.mH.obtainMessage(SEND_NEW_CONFIGURATION, displayId).sendToTarget(); - } else { - mUpdateRotation = false; + + for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) { + final DisplayContent displayContent = mChildren.get(displayNdx); + final int displayId = displayContent.getDisplayId(); + if (displayContent.updateRotationUnchecked(false /* inTransaction */)) { + mService.mH.obtainMessage(SEND_NEW_CONFIGURATION, displayId).sendToTarget(); + } else if (displayId == DEFAULT_DISPLAY) { + // TODO(multi-display): Track rotation updates for different displays separately + mUpdateRotation = false; + } } } |