Loading core/java/android/content/Intent.java +3 −0 Original line number Original line Diff line number Diff line Loading @@ -2498,6 +2498,9 @@ public class Intent implements Parcelable, Cloneable { * off, not sleeping). Once the broadcast is complete, the final shutdown * off, not sleeping). Once the broadcast is complete, the final shutdown * will proceed and all unsaved data lost. Apps will not normally need * will proceed and all unsaved data lost. Apps will not normally need * to handle this, since the foreground activity will be paused as well. * to handle this, since the foreground activity will be paused as well. * <p>As of {@link Build.VERSION_CODES#P} this broadcast is only sent to receivers registered * through {@link Context#registerReceiver(BroadcastReceiver, IntentFilter) * Context.registerReceiver}. * * * <p class="note">This is a protected intent that can only be sent * <p class="note">This is a protected intent that can only be sent * by the system. * by the system. Loading services/core/java/com/android/server/power/ShutdownThread.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -451,7 +451,7 @@ public final class ShutdownThread extends Thread { // First send the high-level shut down broadcast. // First send the high-level shut down broadcast. mActionDone = false; mActionDone = false; Intent intent = new Intent(Intent.ACTION_SHUTDOWN); Intent intent = new Intent(Intent.ACTION_SHUTDOWN); intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND); intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND | Intent.FLAG_RECEIVER_REGISTERED_ONLY); mContext.sendOrderedBroadcastAsUser(intent, mContext.sendOrderedBroadcastAsUser(intent, UserHandle.ALL, null, br, mHandler, 0, null, null); UserHandle.ALL, null, br, mHandler, 0, null, null); Loading Loading
core/java/android/content/Intent.java +3 −0 Original line number Original line Diff line number Diff line Loading @@ -2498,6 +2498,9 @@ public class Intent implements Parcelable, Cloneable { * off, not sleeping). Once the broadcast is complete, the final shutdown * off, not sleeping). Once the broadcast is complete, the final shutdown * will proceed and all unsaved data lost. Apps will not normally need * will proceed and all unsaved data lost. Apps will not normally need * to handle this, since the foreground activity will be paused as well. * to handle this, since the foreground activity will be paused as well. * <p>As of {@link Build.VERSION_CODES#P} this broadcast is only sent to receivers registered * through {@link Context#registerReceiver(BroadcastReceiver, IntentFilter) * Context.registerReceiver}. * * * <p class="note">This is a protected intent that can only be sent * <p class="note">This is a protected intent that can only be sent * by the system. * by the system. Loading
services/core/java/com/android/server/power/ShutdownThread.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -451,7 +451,7 @@ public final class ShutdownThread extends Thread { // First send the high-level shut down broadcast. // First send the high-level shut down broadcast. mActionDone = false; mActionDone = false; Intent intent = new Intent(Intent.ACTION_SHUTDOWN); Intent intent = new Intent(Intent.ACTION_SHUTDOWN); intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND); intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND | Intent.FLAG_RECEIVER_REGISTERED_ONLY); mContext.sendOrderedBroadcastAsUser(intent, mContext.sendOrderedBroadcastAsUser(intent, UserHandle.ALL, null, br, mHandler, 0, null, null); UserHandle.ALL, null, br, mHandler, 0, null, null); Loading