From 5ac72a29593ab9a20337a2225df52bdf4754be02 Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Wed, 29 Aug 2012 18:32:08 -0700 Subject: Improve multi-user broadcasts. You can now use ALL and CURRENT when sending broadcasts, to specify where the broadcast goes. Sticky broadcasts are now correctly separated per user, and registered receivers are filtered based on the requested target user. New Context APIs for more kinds of sending broadcasts as users. Updating a bunch of system code that sends broadcasts to explicitly specify which user the broadcast goes to. Made a single version of the code for interpreting the requested target user ID that all entries to activity manager (start activity, send broadcast, start service) use. Change-Id: Ie29f02dd5242ef8c8fa56c54593a315cd2574e1c --- .../com/android/systemui/statusbar/policy/AirplaneModeController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'packages/SystemUI/src/com/android/systemui/statusbar/policy/AirplaneModeController.java') diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/AirplaneModeController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/AirplaneModeController.java index 0d2538d..edad370 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/AirplaneModeController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/AirplaneModeController.java @@ -24,6 +24,7 @@ import android.content.IntentFilter; import android.os.AsyncTask; import android.os.RemoteException; import android.os.ServiceManager; +import android.os.UserHandle; import android.provider.Settings; import android.util.Slog; import android.widget.CompoundButton; @@ -88,7 +89,7 @@ public class AirplaneModeController extends BroadcastReceiver Intent intent = new Intent(Intent.ACTION_AIRPLANE_MODE_CHANGED); intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING); intent.putExtra("state", enabled); - mContext.sendBroadcast(intent); + mContext.sendBroadcastAsUser(intent, UserHandle.ALL); } }); } -- cgit v1.1