Dismiss system dialog

This fixed the keypad remains ON when switch facet issue.

BUG: 130573446
Test: Manual

Change-Id: Ia449fb41a03bc02498471ded660d573d5b1ad141
(cherry picked from commit 82298783683ebe82a5847dfd35fc8b3528709930)
This commit is contained in:
Lin Guo
2019-06-15 14:19:48 -07:00
committed by Abhijoy Saha
parent b397107edc
commit ebff32a5d6
2 changed files with 7 additions and 0 deletions

View File

@@ -118,6 +118,8 @@ public class CarFacetButton extends LinearLayout {
options.setLaunchDisplayId(mContext.getDisplayId());
intent.putExtra(EXTRA_FACET_LAUNCH_PICKER, mSelected);
mContext.startActivityAsUser(intent, options.toBundle(), UserHandle.CURRENT);
mContext.sendBroadcastAsUser(
new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS), UserHandle.CURRENT);
});
if (longPressIntentString != null) {
@@ -128,6 +130,8 @@ public class CarFacetButton extends LinearLayout {
options.setLaunchDisplayId(mContext.getDisplayId());
mContext.startActivityAsUser(longPressIntent, options.toBundle(),
UserHandle.CURRENT);
mContext.sendBroadcastAsUser(
new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS), UserHandle.CURRENT);
return true;
});
}

View File

@@ -95,6 +95,9 @@ public class CarNavigationButton extends com.android.keyguard.AlphaOptimizedImag
try {
if (mBroadcastIntent) {
mContext.sendBroadcastAsUser(intent, UserHandle.CURRENT);
mContext.sendBroadcastAsUser(
new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS),
UserHandle.CURRENT);
return;
}
ActivityOptions options = ActivityOptions.makeBasic();