diff options
| author | Louis Chang <louischang@google.com> | 2021-04-22 18:22:10 +0800 |
|---|---|---|
| committer | Louis Chang <louischang@google.com> | 2021-04-22 18:22:10 +0800 |
| commit | a262436fe18ed18179ca24ade5d819e875e44448 (patch) | |
| tree | 2282156bad16edab46b3bdcfa4992dc79884b61e /core/java/android/view/ViewRootImpl.java | |
| parent | a3c90ed8559df0730db795abaec3e07b64189214 (diff) | |
Try fixing the flakiness of TaplTestsQuickstep#testSwitchToOverview
The new configuration did not reported to the NexusLauncher activity
when the device rotated to landscape. It seems that the configuration
object of the ActivityClientRecord was unexpectedly updated somewhere,
so the configuration handling was skipped and not reporting to the
activity.
Copy the configuration from mPendingMergedConfiguration vs. directly
assigning the given configuration object reference.
Bug: 185820525
Test: atest NexusLauncherTests:TaplTestsQuickstep
Change-Id: I6768fe86e5c977c32a975562ec058c82d4f9c2fc
Diffstat (limited to 'core/java/android/view/ViewRootImpl.java')
| -rw-r--r-- | core/java/android/view/ViewRootImpl.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index be8e51980c3c..924ad0b733be 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -2776,8 +2776,8 @@ public final class ViewRootImpl implements ViewParent, if (!mPendingMergedConfiguration.equals(mLastReportedMergedConfiguration)) { if (DEBUG_CONFIGURATION) Log.v(mTag, "Visible with new config: " + mPendingMergedConfiguration.getMergedConfiguration()); - performConfigurationChange(mPendingMergedConfiguration, !mFirst, - INVALID_DISPLAY /* same display */); + performConfigurationChange(new MergedConfiguration(mPendingMergedConfiguration), + !mFirst, INVALID_DISPLAY /* same display */); updatedConfiguration = true; } @@ -5319,8 +5319,8 @@ public final class ViewRootImpl implements ViewParent, mPendingMergedConfiguration.setConfiguration(config, mLastReportedMergedConfiguration.getOverrideConfiguration()); - performConfigurationChange(mPendingMergedConfiguration, false /* force */, - INVALID_DISPLAY /* same display */); + performConfigurationChange(new MergedConfiguration(mPendingMergedConfiguration), + false /* force */, INVALID_DISPLAY /* same display */); } break; case MSG_CLEAR_ACCESSIBILITY_FOCUS_HOST: { setAccessibilityFocus(null, null); |
