diff options
author | Paul McLean <pmclean@google.com> | 2015-06-09 08:53:26 -0700 |
---|---|---|
committer | Paul McLean <pmclean@google.com> | 2015-06-09 08:54:45 -0700 |
commit | 5be68ede1943354371233ed2511e308f83b77932 (patch) | |
tree | e38390ea0b7d3458ebe3190208f840f3ec4c7b2b /media | |
parent | e790c97787dbc05930ad0c4a708fad7cd7d3f2b9 (diff) | |
download | frameworks_base-5be68ede1943354371233ed2511e308f83b77932.zip frameworks_base-5be68ede1943354371233ed2511e308f83b77932.tar.gz frameworks_base-5be68ede1943354371233ed2511e308f83b77932.tar.bz2 |
Adding default handler to (re)Routing callbacks where no handler is provided.
Bug: 21669441
Change-Id: I6481652c8703bca6a7e8356614177fd071e71c0e
Diffstat (limited to 'media')
-rw-r--r-- | media/java/android/media/AudioRecord.java | 3 | ||||
-rw-r--r-- | media/java/android/media/AudioTrack.java | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/media/java/android/media/AudioRecord.java b/media/java/android/media/AudioRecord.java index 7eb1357..3cbc405 100644 --- a/media/java/android/media/AudioRecord.java +++ b/media/java/android/media/AudioRecord.java @@ -1277,7 +1277,8 @@ public class AudioRecord native_enableDeviceCallback(); } mRoutingChangeListeners.put( - listener, new NativeRoutingEventHandlerDelegate(this, listener, handler)); + listener, new NativeRoutingEventHandlerDelegate(this, listener, + handler != null ? handler : new Handler(mInitializationLooper))); } } } diff --git a/media/java/android/media/AudioTrack.java b/media/java/android/media/AudioTrack.java index 7293c6c..f395cb3 100644 --- a/media/java/android/media/AudioTrack.java +++ b/media/java/android/media/AudioTrack.java @@ -2244,7 +2244,8 @@ public class AudioTrack native_enableDeviceCallback(); } mRoutingChangeListeners.put( - listener, new NativeRoutingEventHandlerDelegate(this, listener, handler)); + listener, new NativeRoutingEventHandlerDelegate(this, listener, + handler != null ? handler : new Handler(mInitializationLooper))); } } } |