summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
authorKenny Guy <kennyguy@google.com>2014-07-21 14:06:09 +0100
committerKenny Guy <kennyguy@google.com>2014-07-25 10:12:11 +0000
commit237aecd18d0edf56c038761f570758c310c9e6df (patch)
tree8a035545845ab9cde90bed16eb09aacd3dc786c0 /core/java
parent3ae16ddabcf4959607140b233ebc1613442e2f9e (diff)
downloadframeworks_base-237aecd18d0edf56c038761f570758c310c9e6df.zip
frameworks_base-237aecd18d0edf56c038761f570758c310c9e6df.tar.gz
frameworks_base-237aecd18d0edf56c038761f570758c310c9e6df.tar.bz2
Change getBadgedLabelForUser to use CharSequence
Bug: 16401636 Change-Id: I45410a6293007dd789d6770d63397824559b756e
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/os/UserManager.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/core/java/android/os/UserManager.java b/core/java/android/os/UserManager.java
index 45edf28..a506c42 100644
--- a/core/java/android/os/UserManager.java
+++ b/core/java/android/os/UserManager.java
@@ -772,7 +772,7 @@ public class UserManager {
* @return A label that combines the original label and a badge as
* determined by the system.
*/
- public String getBadgedLabelForUser(String label, UserHandle user) {
+ public CharSequence getBadgedLabelForUser(CharSequence label, UserHandle user) {
UserInfo userInfo = getUserIfProfile(user.getIdentifier());
if (userInfo != null && userInfo.isManagedProfile()) {
return Resources.getSystem().getString(
@@ -782,6 +782,15 @@ public class UserManager {
}
/**
+ * Kept during L development to simplify updating unbundled apps.
+ * TODO: Remove after 2014-08-04
+ * @hide
+ */
+ public String getBadgedLabelForUser(String label, UserHandle user) {
+ return (String) getBadgedLabelForUser((CharSequence) label, user);
+ }
+
+ /**
* If the target user is a managed profile of the calling user or the caller
* is itself a managed profile, then this returns a drawable to use as a small
* icon to include in a view to distinguish it from the original icon.