From 40f58d910a45f04f47d6382e8c78c78727944821 Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Wed, 10 Jun 2015 17:39:51 -0700 Subject: [PATCH] Expose Context.getSystemServiceName(). Expose this method so that subclasses can declare new types of services that can be returned by getSystemService(Class). Bug: 21343770 Change-Id: I08bdfa61153d19298645dc495deb2d535e54f9f0 --- api/current.txt | 1 + api/system-current.txt | 1 + core/java/android/content/Context.java | 2 -- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/current.txt b/api/current.txt index f73d56fd24cab..ad5c5964fab6f 100644 --- a/api/current.txt +++ b/api/current.txt @@ -7721,6 +7721,7 @@ package android.content { method public final java.lang.String getString(int, java.lang.Object...); method public abstract java.lang.Object getSystemService(java.lang.String); method public final T getSystemService(java.lang.Class); + method public abstract java.lang.String getSystemServiceName(java.lang.Class); method public final java.lang.CharSequence getText(int); method public abstract android.content.res.Resources.Theme getTheme(); method public abstract deprecated android.graphics.drawable.Drawable getWallpaper(); diff --git a/api/system-current.txt b/api/system-current.txt index e2d89a08f29e7..c4ded7217eb91 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -7944,6 +7944,7 @@ package android.content { method public final java.lang.String getString(int, java.lang.Object...); method public abstract java.lang.Object getSystemService(java.lang.String); method public final T getSystemService(java.lang.Class); + method public abstract java.lang.String getSystemServiceName(java.lang.Class); method public final java.lang.CharSequence getText(int); method public abstract android.content.res.Resources.Theme getTheme(); method public abstract deprecated android.graphics.drawable.Drawable getWallpaper(); diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java index a434c7be1e901..33f38fb664bc7 100644 --- a/core/java/android/content/Context.java +++ b/core/java/android/content/Context.java @@ -2443,8 +2443,6 @@ public abstract class Context { * * @param serviceClass The class of the desired service. * @return The service name or null if the class is not a supported system service. - * - * @hide */ public abstract String getSystemServiceName(Class serviceClass);