diff options
| author | Paul McLean <pmclean@google.com> | 2015-04-15 21:08:23 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-04-15 21:08:27 +0000 |
| commit | 55787399c9fff728e1b475161b6ec8dc93e2eb9c (patch) | |
| tree | db35dab72dfb1385ab00ace4d2182f2b5c818405 /core/java/android | |
| parent | 500c1b81773b903118a31180ec4d89263200bbb8 (diff) | |
| parent | a33be211e768746745a0deeba71f8c6b65e72442 (diff) | |
| download | frameworks_base-55787399c9fff728e1b475161b6ec8dc93e2eb9c.zip frameworks_base-55787399c9fff728e1b475161b6ec8dc93e2eb9c.tar.gz frameworks_base-55787399c9fff728e1b475161b6ec8dc93e2eb9c.tar.bz2 | |
Merge "Audio Devices Enumeration/Notification API"
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/app/SystemServiceRegistry.java | 8 | ||||
| -rw-r--r-- | core/java/android/content/Context.java | 9 |
2 files changed, 17 insertions, 0 deletions
diff --git a/core/java/android/app/SystemServiceRegistry.java b/core/java/android/app/SystemServiceRegistry.java index b3aa6be..4ede5b1 100644 --- a/core/java/android/app/SystemServiceRegistry.java +++ b/core/java/android/app/SystemServiceRegistry.java @@ -55,6 +55,7 @@ import android.location.CountryDetector; import android.location.ICountryDetector; import android.location.ILocationManager; import android.location.LocationManager; +import android.media.AudioDevicesManager; import android.media.AudioManager; import android.media.MediaRouter; import android.media.midi.IMidiManager; @@ -693,6 +694,13 @@ final class SystemServiceRegistry { public RadioManager createService(ContextImpl ctx) { return new RadioManager(ctx); }}); + + registerService(Context.AUDIO_DEVICES_SERVICE, AudioDevicesManager.class, + new CachedServiceFetcher<AudioDevicesManager>() { + @Override + public AudioDevicesManager createService(ContextImpl ctx) { + return new AudioDevicesManager(ctx); + }}); } /** diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java index e5e55d6..0cbf960 100644 --- a/core/java/android/content/Context.java +++ b/core/java/android/content/Context.java @@ -3077,6 +3077,15 @@ public abstract class Context { */ public static final String RADIO_SERVICE = "radio"; + /** + * Use with {@link #getSystemService} to retrieve a + * {@link android.media.AudioDevicesManager} for handling device enumeration & notification. + * + * @see #getSystemService + * @see android.media.AudioDevicesManager + */ + public static final String AUDIO_DEVICES_SERVICE = "audio_devices_manager"; + /** * Determine whether the given permission is allowed for a particular |
