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

Commit 4df16fb1 authored by Tracy Zhou's avatar Tracy Zhou
Browse files

Change quickstep onboarding tip window type to

TYPE_NAVIGATION_BAR_PANEL.

Fixes: 73990691
Test: Go through the talkback flow, "settings cannot verify your
response" toast does not show.

Change-Id: I6f4819eb6ace1260a30589dbcc6c01fa4c8e5c35
parent 82db2614
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -28,7 +28,10 @@ import static com.android.systemui.Prefs.Key.OVERVIEW_OPENED_FROM_HOME_COUNT;
import android.annotation.StringRes;
import android.annotation.TargetApi;
import android.app.ActivityManager;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.CornerPathEffect;
@@ -191,6 +194,7 @@ public class RecentsOnboarding {
        @Override
        public void onViewAttachedToWindow(View view) {
            if (view == mLayout) {
                mContext.registerReceiver(mReceiver, new IntentFilter(Intent.ACTION_SCREEN_OFF));
                mLayoutAttachedToWindow = true;
                if (view.getTag().equals(R.string.recents_swipe_up_onboarding)) {
                    mHasDismissedSwipeUpTip = false;
@@ -215,6 +219,7 @@ public class RecentsOnboarding {
                    }
                    mOverviewOpenedCountSinceQuickScrubTipDismiss = 0;
                }
                mContext.unregisterReceiver(mReceiver);
            }
        }
    };
@@ -370,7 +375,7 @@ public class RecentsOnboarding {
                ViewGroup.LayoutParams.MATCH_PARENT,
                ViewGroup.LayoutParams.WRAP_CONTENT,
                0, -mNavBarHeight / 2,
                WindowManager.LayoutParams.TYPE_APPLICATION_OVERLAY,
                WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL,
                flags,
                PixelFormat.TRANSLUCENT);
        lp.privateFlags |= WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS;
@@ -427,4 +432,13 @@ public class RecentsOnboarding {
    private void setOpenedOverviewCount(int openedOverviewCount) {
        Prefs.putInt(mContext, OVERVIEW_OPENED_COUNT, openedOverviewCount);
    }

    private final BroadcastReceiver mReceiver = new BroadcastReceiver() {
        @Override
        public void onReceive(Context context, Intent intent) {
            if (intent.getAction().equals(Intent.ACTION_SCREEN_OFF)) {
                hide(false);
            }
        }
    };
}