Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 34c76317 authored by Tracy Zhou's avatar Tracy Zhou
Browse files

Guard creating window context in FloatingRotationButton with enableTaskbarNavbarUnification()

Fixes: 309930089
Test: N/A
Change-Id: I3242b6f1caadea31f564a3f1b65d60fd496911b6
parent 4ab616bf
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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);