am 73365695: Merge "Improve multi-user broadcasts." into jb-mr1-dev

* commit '73365695e4d169126c6932df8e8e932aefe6aaca':
  Improve multi-user broadcasts.
This commit is contained in:
Dianne Hackborn
2012-08-30 14:58:23 -07:00
committed by Android Git Automerger
2 changed files with 5 additions and 2 deletions

View File

@@ -31,6 +31,7 @@ import android.os.HandlerThread;
import android.os.Message;
import android.os.Messenger;
import android.os.IBinder;
import android.os.UserHandle;
import android.provider.Settings;
import android.util.Slog;
import android.util.SparseArray;
@@ -448,7 +449,7 @@ public class NsdService extends INsdManager.Stub {
} else {
intent.putExtra(NsdManager.EXTRA_NSD_STATE, NsdManager.NSD_STATE_DISABLED);
}
mContext.sendStickyBroadcast(intent);
mContext.sendStickyBroadcastAsUser(intent, UserHandle.ALL);
}
private boolean isNsdEnabled() {

View File

@@ -99,6 +99,7 @@ import android.os.Message;
import android.os.PowerManager;
import android.os.RemoteException;
import android.os.SystemClock;
import android.os.UserHandle;
import android.provider.Settings;
import android.provider.Settings.Secure;
import android.telephony.PhoneStateListener;
@@ -989,7 +990,8 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
// finally, dispatch updated event to any listeners
final Intent updatedIntent = new Intent(ACTION_NETWORK_STATS_UPDATED);
updatedIntent.setFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);
mContext.sendBroadcast(updatedIntent, READ_NETWORK_USAGE_HISTORY);
mContext.sendBroadcastAsUser(updatedIntent, UserHandle.ALL,
READ_NETWORK_USAGE_HISTORY);
}
/**