diff options
author | Dianne Hackborn <hackbod@google.com> | 2012-08-16 16:42:52 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2012-08-17 10:36:08 -0700 |
commit | 79af1dd54c16cde063152922b42c96d72ae9eca8 (patch) | |
tree | 142abf0037d20841712e88d65febcbbd92dd5561 /core/java/android/content/ContextWrapper.java | |
parent | f1b995f9d049cb5c7225b3b17f09369237a83ca2 (diff) | |
download | frameworks_base-79af1dd54c16cde063152922b42c96d72ae9eca8.zip frameworks_base-79af1dd54c16cde063152922b42c96d72ae9eca8.tar.gz frameworks_base-79af1dd54c16cde063152922b42c96d72ae9eca8.tar.bz2 |
Switch public APIs to use new UserHandle class for identifying users.
Gets rid of "yet another integer" confusion.
Change-Id: Id07ea7307aea7c62f0087c6663a1f1c08e2e5dee
Diffstat (limited to 'core/java/android/content/ContextWrapper.java')
-rw-r--r-- | core/java/android/content/ContextWrapper.java | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/core/java/android/content/ContextWrapper.java b/core/java/android/content/ContextWrapper.java index fdf60ab..75842be 100644 --- a/core/java/android/content/ContextWrapper.java +++ b/core/java/android/content/ContextWrapper.java @@ -30,6 +30,7 @@ import android.net.Uri; import android.os.Bundle; import android.os.Handler; import android.os.Looper; +import android.os.UserHandle; import java.io.File; import java.io.FileInputStream; @@ -279,8 +280,8 @@ public class ContextWrapper extends Context { /** @hide */ @Override - public void startActivityAsUser(Intent intent, int userId) { - mBase.startActivityAsUser(intent, userId); + public void startActivityAsUser(Intent intent, UserHandle user) { + mBase.startActivityAsUser(intent, user); } @Override @@ -290,8 +291,8 @@ public class ContextWrapper extends Context { /** @hide */ @Override - public void startActivityAsUser(Intent intent, Bundle options, int userId) { - mBase.startActivityAsUser(intent, options, userId); + public void startActivityAsUser(Intent intent, Bundle options, UserHandle user) { + mBase.startActivityAsUser(intent, options, user); } @Override @@ -347,15 +348,15 @@ public class ContextWrapper extends Context { } @Override - public void sendBroadcastToUser(Intent intent, int userHandle) { - mBase.sendBroadcastToUser(intent, userHandle); + public void sendBroadcastAsUser(Intent intent, UserHandle user) { + mBase.sendBroadcastAsUser(intent, user); } @Override - public void sendOrderedBroadcastToUser(Intent intent, int userHandle, + public void sendOrderedBroadcastAsUser(Intent intent, UserHandle user, BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, String initialData, Bundle initialExtras) { - mBase.sendOrderedBroadcastToUser(intent, userHandle, resultReceiver, + mBase.sendOrderedBroadcastAsUser(intent, user, resultReceiver, scheduler, initialCode, initialData, initialExtras); } |