diff options
author | Dianne Hackborn <hackbod@google.com> | 2012-08-16 10:48:27 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2012-08-16 12:46:38 -0700 |
commit | f02b60aa4f367516f40cf3d60fffae0c6fe3e1b8 (patch) | |
tree | 893430514916fc74f4fd008dbcb457c2dd317989 /core/tests/coretests | |
parent | ca34bcf6746454c561b0c07ca5c6e42bd4a73e9e (diff) | |
download | frameworks_base-f02b60aa4f367516f40cf3d60fffae0c6fe3e1b8.zip frameworks_base-f02b60aa4f367516f40cf3d60fffae0c6fe3e1b8.tar.gz frameworks_base-f02b60aa4f367516f40cf3d60fffae0c6fe3e1b8.tar.bz2 |
Rename UserId to UserHandle.
This is the start of turning this into a formal public API.
Change-Id: I5786d2c320f1de41a06ed5d0f65adb68967287a0
Diffstat (limited to 'core/tests/coretests')
-rwxr-xr-x | core/tests/coretests/src/android/content/pm/AppCacheTest.java | 6 | ||||
-rw-r--r-- | core/tests/coretests/src/android/os/ProcessTest.java | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/core/tests/coretests/src/android/content/pm/AppCacheTest.java b/core/tests/coretests/src/android/content/pm/AppCacheTest.java index 0c31e2d..8d53db9 100755 --- a/core/tests/coretests/src/android/content/pm/AppCacheTest.java +++ b/core/tests/coretests/src/android/content/pm/AppCacheTest.java @@ -24,7 +24,7 @@ import android.content.IntentFilter; import android.os.RemoteException; import android.os.ServiceManager; import android.os.StatFs; -import android.os.UserId; +import android.os.UserHandle; import android.test.AndroidTestCase; import android.test.suitebuilder.annotation.LargeTest; import android.test.suitebuilder.annotation.MediumTest; @@ -719,7 +719,7 @@ public class AppCacheTest extends AndroidTestCase { File getDataDir() { try { ApplicationInfo appInfo = getPm().getApplicationInfo(mContext.getPackageName(), 0, - UserId.myUserId()); + UserHandle.myUserId()); return new File(appInfo.dataDir); } catch (RemoteException e) { throw new RuntimeException("Pacakge manager dead", e); @@ -748,7 +748,7 @@ public class AppCacheTest extends AndroidTestCase { @LargeTest public void testClearApplicationUserDataNoObserver() throws Exception { - getPm().clearApplicationUserData(mContext.getPackageName(), null, UserId.myUserId()); + getPm().clearApplicationUserData(mContext.getPackageName(), null, UserHandle.myUserId()); //sleep for 1 minute Thread.sleep(60*1000); //confirm files dont exist diff --git a/core/tests/coretests/src/android/os/ProcessTest.java b/core/tests/coretests/src/android/os/ProcessTest.java index 598a8d2..1f5b7c8 100644 --- a/core/tests/coretests/src/android/os/ProcessTest.java +++ b/core/tests/coretests/src/android/os/ProcessTest.java @@ -18,7 +18,7 @@ package android.os; import android.os.Process; -import android.os.UserId; +import android.os.UserHandle; import android.test.suitebuilder.annotation.MediumTest; import android.test.suitebuilder.annotation.SmallTest; @@ -32,10 +32,10 @@ public class ProcessTest extends TestCase { assertEquals(android.os.Process.SYSTEM_UID, Process.getUidForName("system")); assertEquals(Process.BLUETOOTH_UID, Process.getUidForName("bluetooth")); assertEquals(Process.FIRST_APPLICATION_UID, Process.getUidForName("u0_a0")); - assertEquals(UserId.getUid(1, Process.SYSTEM_UID), Process.getUidForName("u1_system")); - assertEquals(UserId.getUid(2, Process.FIRST_ISOLATED_UID), + assertEquals(UserHandle.getUid(1, Process.SYSTEM_UID), Process.getUidForName("u1_system")); + assertEquals(UserHandle.getUid(2, Process.FIRST_ISOLATED_UID), Process.getUidForName("u2_i0")); - assertEquals(UserId.getUid(3, Process.FIRST_APPLICATION_UID + 100), + assertEquals(UserHandle.getUid(3, Process.FIRST_APPLICATION_UID + 100), Process.getUidForName("u3_a100")); } |