From 427cec4fe926734ef86352657d2e0fc306775970 Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Mon, 17 Jul 2017 11:35:39 -0700 Subject: [PATCH] Fix issue with configuration update check. - We can hold a reference to the same configuration since it is updated and re-dispatched. Instead, make a copy of the configuration to store the last configuration state. Fixes: 63755686 Test: Open Recents, rotate, ensure that the display bounds and task bounds are calculated correctly. Change-Id: Ie0d2b5a0fa479428614d9593a2379420ccbd2fb4 --- .../src/com/android/systemui/pip/phone/PipTouchState.java | 2 +- .../src/com/android/systemui/recents/RecentsActivity.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchState.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchState.java index dd3361ba899a9..686b3bb9d127f 100644 --- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchState.java +++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipTouchState.java @@ -29,7 +29,7 @@ import java.io.PrintWriter; */ public class PipTouchState { private static final String TAG = "PipTouchHandler"; - private static final boolean DEBUG = true; + private static final boolean DEBUG = false; private ViewConfiguration mViewConfig; diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java index fa16f8e5bd0ec..f2ea6a683e957 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java +++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java @@ -337,7 +337,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD getWindow().getAttributes().privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_DECOR_VIEW_VISIBILITY; - mLastConfig = Utilities.getAppConfiguration(this); + mLastConfig = new Configuration(Utilities.getAppConfiguration(this)); mFocusTimerDuration = getResources().getInteger(R.integer.recents_auto_advance_duration); mIterateTrigger = new DozeTrigger(mFocusTimerDuration, new Runnable() { @Override