diff options
| author | 2020-07-08 08:57:32 +0000 | |
|---|---|---|
| committer | 2020-07-08 08:57:32 +0000 | |
| commit | b6b1389d585d69f29aaea671880189e20eb854b3 (patch) | |
| tree | 03b2630e1424b623f779ccb7516e4c1a1b0ecfa4 | |
| parent | bb91011e35f5c57bf93a414f0e991888bd833122 (diff) | |
| parent | 50544552c85fcd77a90e88e6bf7e63d25d3a83e9 (diff) | |
Merge "Remove IntArray usage"
| -rw-r--r-- | services/core/java/com/android/server/media/AudioPlayerStateMonitor.java | 8 | ||||
| -rw-r--r-- | services/core/java/com/android/server/media/MediaSessionStack.java | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/services/core/java/com/android/server/media/AudioPlayerStateMonitor.java b/services/core/java/com/android/server/media/AudioPlayerStateMonitor.java index 55e0795f8b50..b9822fcb096a 100644 --- a/services/core/java/com/android/server/media/AudioPlayerStateMonitor.java +++ b/services/core/java/com/android/server/media/AudioPlayerStateMonitor.java @@ -26,12 +26,12 @@ import android.os.Message; import android.os.UserHandle; import android.util.ArrayMap; import android.util.ArraySet; -import android.util.IntArray; import android.util.Log; import com.android.internal.annotations.GuardedBy; import java.io.PrintWriter; +import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Set; @@ -104,7 +104,7 @@ class AudioPlayerStateMonitor { // TODO(b/35278867): Find and use unique identifier for apps because apps may share the UID. @GuardedBy("mLock") @SuppressWarnings("WeakerAccess") /* synthetic access */ - final IntArray mSortedAudioPlaybackClientUids = new IntArray(); + final List<Integer> mSortedAudioPlaybackClientUids = new ArrayList<>(); static AudioPlayerStateMonitor getInstance(Context context) { synchronized (AudioPlayerStateMonitor.class) { @@ -145,8 +145,8 @@ class AudioPlayerStateMonitor { * audio/video) The UID whose audio is currently playing comes first, then the UID whose audio * playback becomes active at the last comes next. */ - public IntArray getSortedAudioPlaybackClientUids() { - IntArray sortedAudioPlaybackClientUids = new IntArray(); + public List<Integer> getSortedAudioPlaybackClientUids() { + List<Integer> sortedAudioPlaybackClientUids = new ArrayList(); synchronized (mLock) { sortedAudioPlaybackClientUids.addAll(mSortedAudioPlaybackClientUids); } diff --git a/services/core/java/com/android/server/media/MediaSessionStack.java b/services/core/java/com/android/server/media/MediaSessionStack.java index b678c8962a21..953aae44d6a7 100644 --- a/services/core/java/com/android/server/media/MediaSessionStack.java +++ b/services/core/java/com/android/server/media/MediaSessionStack.java @@ -22,7 +22,6 @@ import android.media.Session2Token; import android.media.session.MediaSession; import android.os.Debug; import android.os.UserHandle; -import android.util.IntArray; import android.util.Log; import android.util.SparseArray; @@ -190,7 +189,8 @@ class MediaSessionStack { if (DEBUG) { Log.d(TAG, "updateMediaButtonSessionIfNeeded, callers=" + Debug.getCallers(2)); } - IntArray audioPlaybackUids = mAudioPlayerStateMonitor.getSortedAudioPlaybackClientUids(); + List<Integer> audioPlaybackUids = + mAudioPlayerStateMonitor.getSortedAudioPlaybackClientUids(); for (int i = 0; i < audioPlaybackUids.size(); i++) { int audioPlaybackUid = audioPlaybackUids.get(i); MediaSessionRecordImpl mediaButtonSession = findMediaButtonSession(audioPlaybackUid); |