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

Commit 65d77e93 authored by Tracy Zhou's avatar Tracy Zhou Committed by Android (Google) Code Review
Browse files

Merge "Alway create window context of TYPE_NAVIGATION_BAR_PANEL for...

Merge "Alway create window context of TYPE_NAVIGATION_BAR_PANEL for FloatingRotationButton" into main
parents 62813f60 0e351e46
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

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;
@@ -87,15 +89,15 @@ public class FloatingRotationButton implements RotationButton {
            @DimenRes int roundedContentPadding, @DimenRes int taskbarLeftMargin,
            @DimenRes int taskbarBottomMargin, @DimenRes int buttonDiameter,
            @DimenRes int rippleMaxWidth, @BoolRes int floatingRotationBtnPositionLeftResource) {
        mWindowManager = context.getSystemService(WindowManager.class);
        mKeyButtonContainer = (ViewGroup) LayoutInflater.from(context).inflate(layout, null);
        mContext = context.createWindowContext(context.getDisplay(), TYPE_NAVIGATION_BAR_PANEL,
                null);
        mWindowManager = mContext.getSystemService(WindowManager.class);
        mKeyButtonContainer = (ViewGroup) LayoutInflater.from(mContext).inflate(layout, null);
        mKeyButtonView = mKeyButtonContainer.findViewById(keyButtonId);
        mKeyButtonView.setVisibility(View.VISIBLE);
        mKeyButtonView.setContentDescription(context.getString(contentDescriptionResource));
        mKeyButtonView.setContentDescription(mContext.getString(contentDescriptionResource));
        mKeyButtonView.setRipple(rippleMaxWidth);

        mContext = context;

        mContentDescriptionResource = contentDescriptionResource;
        mMinMarginResource = minMargin;
        mRoundedContentPaddingResource = roundedContentPadding;