diff options
-rw-r--r-- | services/core/java/com/android/server/audio/AudioService.java | 5 | ||||
-rw-r--r-- | services/core/java/com/android/server/net/NetworkStatsFactory.java | 31 |
2 files changed, 15 insertions, 21 deletions
diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java index e698b841a2fd..2a598774a2e1 100644 --- a/services/core/java/com/android/server/audio/AudioService.java +++ b/services/core/java/com/android/server/audio/AudioService.java @@ -2520,8 +2520,9 @@ public class AudioService extends IAudioService.Stub AudioSystem.muteMicrophone(on); Binder.restoreCallingIdentity(identity); if (on != currentMute) { - mContext.sendBroadcast(new Intent(AudioManager.ACTION_MICROPHONE_MUTE_CHANGED) - .setFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY)); + mContext.sendBroadcastAsUser( + new Intent(AudioManager.ACTION_MICROPHONE_MUTE_CHANGED) + .setFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY), UserHandle.ALL); } } } diff --git a/services/core/java/com/android/server/net/NetworkStatsFactory.java b/services/core/java/com/android/server/net/NetworkStatsFactory.java index 2d3c66d68f21..7687718b0693 100644 --- a/services/core/java/com/android/server/net/NetworkStatsFactory.java +++ b/services/core/java/com/android/server/net/NetworkStatsFactory.java @@ -68,7 +68,7 @@ public class NetworkStatsFactory { /** Path to {@code /proc/net/xt_qtaguid/stats}. */ private final File mStatsXtUid; - private boolean mUseBpfStats; + private final boolean mUseBpfStats; private INetd mNetdService; @@ -302,6 +302,17 @@ public class NetworkStatsFactory { return readNetworkStatsDetail(UID_ALL, INTERFACES_ALL, TAG_ALL); } + @GuardedBy("sPersistentDataLock") + private void requestSwapActiveStatsMapLocked() throws RemoteException { + // Ask netd to do a active map stats swap. When the binder call successfully returns, + // the system server should be able to safely read and clean the inactive map + // without race problem. + if (mNetdService == null) { + mNetdService = NetdService.getInstance(); + } + mNetdService.trafficSwapActiveStatsMap(); + } + /** * Reads the detailed UID stats based on the provided parameters * @@ -312,24 +323,6 @@ public class NetworkStatsFactory { * @return the NetworkStats instance containing network statistics at the present time. */ public NetworkStats readNetworkStatsDetail( - int limitUid, @Nullable String[] limitIfaces, int limitTag) throws IOException { - return readNetworkStatsDetailInternal(limitUid, limitIfaces, limitTag); - } - - @GuardedBy("sPersistentDataLock") - private void requestSwapActiveStatsMapLocked() throws RemoteException { - // Ask netd to do a active map stats swap. When the binder call successfully returns, - // the system server should be able to safely read and clean the inactive map - // without race problem. - if (mUseBpfStats) { - if (mNetdService == null) { - mNetdService = NetdService.getInstance(); - } - mNetdService.trafficSwapActiveStatsMap(); - } - } - - private NetworkStats readNetworkStatsDetailInternal( int limitUid, String[] limitIfaces, int limitTag) throws IOException { // In order to prevent deadlocks, anything protected by this lock MUST NOT call out to other // code that will acquire other locks within the system server. See b/134244752. |