From a453a0b6ecd698a9c619245fb6eb718fd6d38ffd Mon Sep 17 00:00:00 2001 From: Vinit Nayak Date: Thu, 13 Oct 2022 16:29:05 -0700 Subject: [PATCH] Add debug logs for navBarController config change Bug: 253294774 Change-Id: Idd185c4fc73a48558b07f133b7275a1b5b6cc617 --- .../systemui/navigationbar/NavigationBarController.java | 9 ++++++++- .../navigationbar/gestural/EdgeBackGestureHandler.java | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarController.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarController.java index 029cf68b243d6..3fd1aa73c0332 100644 --- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarController.java +++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarController.java @@ -21,6 +21,7 @@ import static android.provider.Settings.Secure.ACCESSIBILITY_BUTTON_MODE_GESTURE import static android.provider.Settings.Secure.ACCESSIBILITY_BUTTON_MODE_NAVIGATION_BAR; import static android.view.Display.DEFAULT_DISPLAY; +import static com.android.systemui.navigationbar.gestural.EdgeBackGestureHandler.DEBUG_MISSING_GESTURE_TAG; import static com.android.systemui.shared.recents.utilities.Utilities.isTablet; import android.content.ContentResolver; @@ -141,7 +142,13 @@ public class NavigationBarController implements public void onConfigChanged(Configuration newConfig) { boolean isOldConfigTablet = mIsTablet; mIsTablet = isTablet(mContext); + boolean willApplyConfig = mConfigChanges.applyNewConfig(mContext.getResources()); boolean largeScreenChanged = mIsTablet != isOldConfigTablet; + // TODO(b/243765256): Disable this logging once b/243765256 is fixed. + Log.d(DEBUG_MISSING_GESTURE_TAG, "NavbarController: newConfig=" + newConfig + + " mTaskbarDelegate initialized=" + mTaskbarDelegate.isInitialized() + + " willApplyConfigToNavbars=" + willApplyConfig + + " navBarCount=" + mNavigationBars.size()); if (mTaskbarDelegate.isInitialized()) { mTaskbarDelegate.onConfigurationChanged(newConfig); } @@ -150,7 +157,7 @@ public class NavigationBarController implements return; } - if (mConfigChanges.applyNewConfig(mContext.getResources())) { + if (willApplyConfig) { for (int i = 0; i < mNavigationBars.size(); i++) { recreateNavigationBar(mNavigationBars.keyAt(i)); } diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/gestural/EdgeBackGestureHandler.java b/packages/SystemUI/src/com/android/systemui/navigationbar/gestural/EdgeBackGestureHandler.java index a8799c744656b..709467ffd3b50 100644 --- a/packages/SystemUI/src/com/android/systemui/navigationbar/gestural/EdgeBackGestureHandler.java +++ b/packages/SystemUI/src/com/android/systemui/navigationbar/gestural/EdgeBackGestureHandler.java @@ -113,7 +113,7 @@ public class EdgeBackGestureHandler extends CurrentUserTracker private static final int MAX_NUM_LOGGED_GESTURES = 10; static final boolean DEBUG_MISSING_GESTURE = false; - static final String DEBUG_MISSING_GESTURE_TAG = "NoBackGesture"; + public static final String DEBUG_MISSING_GESTURE_TAG = "NoBackGesture"; private ISystemGestureExclusionListener mGestureExclusionListener = new ISystemGestureExclusionListener.Stub() {