summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2014-06-16 21:46:41 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-06-16 20:54:41 +0000
commit3e960affb24867d5d2a73e5746535f1701a530df (patch)
tree976c4b1456155f650a4bd034e16bcdb589b5c567 /core/java
parentbd0d2b64a988fbbb75700430e820c2e4b1bbb9b5 (diff)
parentb4ce1432c62a691111f1c355d744998a48b55a93 (diff)
Merge "Add TelecommManager to system services"
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/app/ContextImpl.java9
-rw-r--r--core/java/android/content/Context.java13
2 files changed, 22 insertions, 0 deletions
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index 52d458566faf..ab3bb4966624 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -118,6 +118,7 @@ import android.print.PrintManager;
import android.service.fingerprint.FingerprintManager;
import android.service.fingerprint.FingerprintManagerReceiver;
import android.service.fingerprint.FingerprintService;
+import android.telecomm.TelecommManager;
import android.telephony.TelephonyManager;
import android.content.ClipboardManager;
import android.util.AndroidRuntimeException;
@@ -142,6 +143,7 @@ import com.android.internal.annotations.GuardedBy;
import com.android.internal.app.IAppOpsService;
import com.android.internal.appwidget.IAppWidgetService.Stub;
import com.android.internal.os.IDropBoxManagerService;
+import com.android.internal.telecomm.ITelecommService;
import java.io.File;
import java.io.FileInputStream;
@@ -554,6 +556,13 @@ class ContextImpl extends Context {
return new TelephonyManager(ctx.getOuterContext());
}});
+ registerService(TELECOMM_SERVICE, new ServiceFetcher() {
+ public Object createService(ContextImpl ctx) {
+ IBinder b = ServiceManager.getService(TELECOMM_SERVICE);
+ return new TelecommManager(ctx.getOuterContext(),
+ ITelecommService.Stub.asInterface(b));
+ }});
+
registerService(UI_MODE_SERVICE, new ServiceFetcher() {
public Object createService(ContextImpl ctx) {
return new UiModeManager();
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index ccf84516df1d..fd19b401101c 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -2035,6 +2035,7 @@ public abstract class Context {
AUDIO_SERVICE,
MEDIA_ROUTER_SERVICE,
TELEPHONY_SERVICE,
+ TELECOMM_SERVICE,
CLIPBOARD_SERVICE,
INPUT_METHOD_SERVICE,
TEXT_SERVICES_MANAGER_SERVICE,
@@ -2163,6 +2164,8 @@ public abstract class Context {
* @see android.media.MediaRouter
* @see #TELEPHONY_SERVICE
* @see android.telephony.TelephonyManager
+ * @see #TELECOMM_SERVICE
+ * @see android.telecomm.TelecommManager
* @see #INPUT_METHOD_SERVICE
* @see android.view.inputmethod.InputMethodManager
* @see #UI_MODE_SERVICE
@@ -2494,6 +2497,16 @@ public abstract class Context {
/**
* Use with {@link #getSystemService} to retrieve a
+ * {@link android.telecomm.TelecommManager} to manage telecomm-related features
+ * of the device.
+ *
+ * @see #getSystemService
+ * @see android.telecomm.TelecommManager
+ */
+ public static final String TELECOMM_SERVICE = "telecomm";
+
+ /**
+ * Use with {@link #getSystemService} to retrieve a
* {@link android.text.ClipboardManager} for accessing and modifying
* the contents of the global clipboard.
*