summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/app/SystemServiceRegistry.java8
-rw-r--r--core/java/android/content/Context.java9
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