Loading core/java/android/app/ContextImpl.java +11 −0 Original line number Diff line number Diff line Loading @@ -3619,6 +3619,17 @@ class ContextImpl extends Context { scheduleFinalCleanup(getClass().getName(), getOuterContext().getClass().getSimpleName()); } @Override public void closeSystemDialogs() { final Intent intent = new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS) .addFlags(Intent.FLAG_RECEIVER_FOREGROUND); final Bundle options = BroadcastOptions.makeBasic() .setDeliveryGroupPolicy(BroadcastOptions.DELIVERY_GROUP_POLICY_MOST_RECENT) .setDeferralPolicy(BroadcastOptions.DEFERRAL_POLICY_UNTIL_ACTIVE) .toBundle(); sendBroadcast(intent, null /* receiverPermission */, options); } // ---------------------------------------------------------------------- // ---------------------------------------------------------------------- // ---------------------------------------------------------------------- Loading core/java/android/content/Context.java +11 −0 Original line number Diff line number Diff line Loading @@ -7873,4 +7873,15 @@ public abstract class Context { public boolean isConfigurationContext() { throw new RuntimeException("Not implemented. Must override in a subclass."); } /** * Closes temporary system dialogs. Some examples of temporary system dialogs are the * notification window-shade and the recent tasks dialog. * * @hide */ @RequiresPermission(android.Manifest.permission.BROADCAST_CLOSE_SYSTEM_DIALOGS) public void closeSystemDialogs() { throw new RuntimeException("Not implemented. Must override in a subclass."); } } core/java/android/content/ContextWrapper.java +11 −0 Original line number Diff line number Diff line Loading @@ -1484,4 +1484,15 @@ public class ContextWrapper extends Context { // Do nothing if the callback hasn't been registered to Application Context by // super.unregisterComponentCallbacks() for Application that is targeting prior to T. } /** * Closes temporary system dialogs. Some examples of temporary system dialogs are the * notification window-shade and the recent tasks dialog. * * @hide */ @RequiresPermission(android.Manifest.permission.BROADCAST_CLOSE_SYSTEM_DIALOGS) public void closeSystemDialogs() { mBase.closeSystemDialogs(); } } packages/DynamicSystemInstallationService/src/com/android/dynsystem/DynamicSystemInstallationService.java +1 −1 Original line number Diff line number Diff line Loading @@ -422,7 +422,7 @@ public class DynamicSystemInstallationService extends Service Log.e(TAG, "Failed to disable DynamicSystem."); // Dismiss status bar and show a toast. sendBroadcast(new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS)); closeSystemDialogs(); Toast.makeText(this, getString(R.string.toast_failed_to_disable_dynsystem), Toast.LENGTH_LONG).show(); Loading packages/Shell/src/com/android/shell/BugreportProgressService.java +1 −1 Original line number Diff line number Diff line Loading @@ -1697,7 +1697,7 @@ public class BugreportProgressService extends Service { } private void collapseNotificationBar() { sendBroadcast(new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS)); closeSystemDialogs(); } private static Looper newLooper(String name) { Loading Loading
core/java/android/app/ContextImpl.java +11 −0 Original line number Diff line number Diff line Loading @@ -3619,6 +3619,17 @@ class ContextImpl extends Context { scheduleFinalCleanup(getClass().getName(), getOuterContext().getClass().getSimpleName()); } @Override public void closeSystemDialogs() { final Intent intent = new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS) .addFlags(Intent.FLAG_RECEIVER_FOREGROUND); final Bundle options = BroadcastOptions.makeBasic() .setDeliveryGroupPolicy(BroadcastOptions.DELIVERY_GROUP_POLICY_MOST_RECENT) .setDeferralPolicy(BroadcastOptions.DEFERRAL_POLICY_UNTIL_ACTIVE) .toBundle(); sendBroadcast(intent, null /* receiverPermission */, options); } // ---------------------------------------------------------------------- // ---------------------------------------------------------------------- // ---------------------------------------------------------------------- Loading
core/java/android/content/Context.java +11 −0 Original line number Diff line number Diff line Loading @@ -7873,4 +7873,15 @@ public abstract class Context { public boolean isConfigurationContext() { throw new RuntimeException("Not implemented. Must override in a subclass."); } /** * Closes temporary system dialogs. Some examples of temporary system dialogs are the * notification window-shade and the recent tasks dialog. * * @hide */ @RequiresPermission(android.Manifest.permission.BROADCAST_CLOSE_SYSTEM_DIALOGS) public void closeSystemDialogs() { throw new RuntimeException("Not implemented. Must override in a subclass."); } }
core/java/android/content/ContextWrapper.java +11 −0 Original line number Diff line number Diff line Loading @@ -1484,4 +1484,15 @@ public class ContextWrapper extends Context { // Do nothing if the callback hasn't been registered to Application Context by // super.unregisterComponentCallbacks() for Application that is targeting prior to T. } /** * Closes temporary system dialogs. Some examples of temporary system dialogs are the * notification window-shade and the recent tasks dialog. * * @hide */ @RequiresPermission(android.Manifest.permission.BROADCAST_CLOSE_SYSTEM_DIALOGS) public void closeSystemDialogs() { mBase.closeSystemDialogs(); } }
packages/DynamicSystemInstallationService/src/com/android/dynsystem/DynamicSystemInstallationService.java +1 −1 Original line number Diff line number Diff line Loading @@ -422,7 +422,7 @@ public class DynamicSystemInstallationService extends Service Log.e(TAG, "Failed to disable DynamicSystem."); // Dismiss status bar and show a toast. sendBroadcast(new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS)); closeSystemDialogs(); Toast.makeText(this, getString(R.string.toast_failed_to_disable_dynsystem), Toast.LENGTH_LONG).show(); Loading
packages/Shell/src/com/android/shell/BugreportProgressService.java +1 −1 Original line number Diff line number Diff line Loading @@ -1697,7 +1697,7 @@ public class BugreportProgressService extends Service { } private void collapseNotificationBar() { sendBroadcast(new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS)); closeSystemDialogs(); } private static Looper newLooper(String name) { Loading