diff options
author | Amith Yamasani <yamasani@google.com> | 2013-03-26 15:32:29 -0700 |
---|---|---|
committer | Amith Yamasani <yamasani@google.com> | 2013-03-26 15:32:29 -0700 |
commit | 05191053545065c9c71afae173d3ab42a2d947fa (patch) | |
tree | 98baa98585fbfd80ae6b4534f85c20ff019f9e3f /services/tests/servicestests | |
parent | df5e9fe1819099097901641b1267374ca0bbc319 (diff) | |
download | frameworks_base-05191053545065c9c71afae173d3ab42a2d947fa.zip frameworks_base-05191053545065c9c71afae173d3ab42a2d947fa.tar.gz frameworks_base-05191053545065c9c71afae173d3ab42a2d947fa.tar.bz2 |
Match tests to new API.
Change-Id: I9a537a437c721ae64d9307b889b9de5d5429670f
Diffstat (limited to 'services/tests/servicestests')
-rw-r--r-- | services/tests/servicestests/src/com/android/server/pm/UserManagerTest.java | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/services/tests/servicestests/src/com/android/server/pm/UserManagerTest.java b/services/tests/servicestests/src/com/android/server/pm/UserManagerTest.java index 7ef1485..2e309be 100644 --- a/services/tests/servicestests/src/com/android/server/pm/UserManagerTest.java +++ b/services/tests/servicestests/src/com/android/server/pm/UserManagerTest.java @@ -66,8 +66,8 @@ public class UserManagerTest extends AndroidTestCase { && !user.isPrimary()) { found = true; Bundle restrictions = mUserManager.getUserRestrictions(user.getUserHandle()); - assertTrue("New user should have ALLOW_CONFIG_WIFI =true by default", - restrictions.getBoolean(UserManager.ALLOW_CONFIG_WIFI)); + assertFalse("New user should have DISALLOW_CONFIG_WIFI =false by default", + restrictions.getBoolean(UserManager.DISALLOW_CONFIG_WIFI)); } } assertTrue(found); @@ -147,13 +147,13 @@ public class UserManagerTest extends AndroidTestCase { List<UserInfo> users = mUserManager.getUsers(); if (users.size() > 1) { Bundle restrictions = new Bundle(); - restrictions.putBoolean(UserManager.ALLOW_INSTALL_APPS, false); - restrictions.putBoolean(UserManager.ALLOW_CONFIG_WIFI, true); + restrictions.putBoolean(UserManager.DISALLOW_INSTALL_APPS, true); + restrictions.putBoolean(UserManager.DISALLOW_CONFIG_WIFI, false); mUserManager.setUserRestrictions(restrictions, new UserHandle(users.get(1).id)); Bundle stored = mUserManager.getUserRestrictions(new UserHandle(users.get(1).id)); - assertEquals(stored.getBoolean(UserManager.ALLOW_CONFIG_WIFI), true); - assertEquals(stored.getBoolean(UserManager.ALLOW_UNINSTALL_APPS), true); - assertEquals(stored.getBoolean(UserManager.ALLOW_INSTALL_APPS), false); + assertEquals(stored.getBoolean(UserManager.DISALLOW_CONFIG_WIFI), false); + assertEquals(stored.getBoolean(UserManager.DISALLOW_UNINSTALL_APPS), false); + assertEquals(stored.getBoolean(UserManager.DISALLOW_INSTALL_APPS), true); } } |