summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Tracy Zhou <tracyzhou@google.com> 2023-12-05 12:52:58 -0800
committer Tracy Zhou <tracyzhou@google.com> 2023-12-05 12:52:58 -0800
commit34c7631708001bf0b510d918ca204cff4b0470ca (patch)
tree2f1c194c55098a0aeec8a8ef8b6582d9d3c17c8f
parent4ab616bf06537bc8134d57efdfdc23cfbd3a55ec (diff)
Guard creating window context in FloatingRotationButton with enableTaskbarNavbarUnification()
Fixes: 309930089 Test: N/A Change-Id: I3242b6f1caadea31f564a3f1b65d60fd496911b6
-rw-r--r--packages/SystemUI/shared/src/com/android/systemui/shared/rotation/FloatingRotationButton.java5
1 files changed, 1 insertions, 4 deletions
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/rotation/FloatingRotationButton.java b/packages/SystemUI/shared/src/com/android/systemui/shared/rotation/FloatingRotationButton.java
index fec96c675b22..317201d2c2d9 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/rotation/FloatingRotationButton.java
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/rotation/FloatingRotationButton.java
@@ -16,8 +16,6 @@
package com.android.systemui.shared.rotation;
-import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL;
-
import android.annotation.DimenRes;
import android.annotation.IdRes;
import android.annotation.LayoutRes;
@@ -89,8 +87,7 @@ public class FloatingRotationButton implements RotationButton {
@DimenRes int roundedContentPadding, @DimenRes int taskbarLeftMargin,
@DimenRes int taskbarBottomMargin, @DimenRes int buttonDiameter,
@DimenRes int rippleMaxWidth, @BoolRes int floatingRotationBtnPositionLeftResource) {
- mContext = context.createWindowContext(context.getDisplay(), TYPE_NAVIGATION_BAR_PANEL,
- null);
+ mContext = context;
mWindowManager = mContext.getSystemService(WindowManager.class);
mKeyButtonContainer = (ViewGroup) LayoutInflater.from(mContext).inflate(layout, null);
mKeyButtonView = mKeyButtonContainer.findViewById(keyButtonId);