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
This commit is contained in:
Tracy Zhou
2018-05-14 16:58:54 -07:00
parent 82db2614e4
commit 4df16fb106

View File

@@ -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);
}
}
};
}