Home
last modified time | relevance | path

Searched refs:dpms (Results 1 – 6 of 6) sorted by relevance

/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/
DDevicePolicyManagerServiceMigrationTest.java158 final DevicePolicyManagerServiceTestable dpms; in testMigration() local
165 dpms = new DevicePolicyManagerServiceTestable(getServices(), mContext); in testMigration()
167 dpms.systemReady(SystemService.PHASE_LOCK_SETTINGS_READY); in testMigration()
168 dpms.systemReady(SystemService.PHASE_BOOT_COMPLETED); in testMigration()
173 assertThat(dpms.mOwners.hasDeviceOwner()).isTrue(); in testMigration()
174 assertThat(dpms.mOwners.hasProfileOwner(USER_SYSTEM)).isFalse(); in testMigration()
175 assertThat(dpms.mOwners.hasProfileOwner(10)).isTrue(); in testMigration()
176 assertThat(dpms.mOwners.hasProfileOwner(11)).isTrue(); in testMigration()
177 assertThat(dpms.mOwners.hasProfileOwner(12)).isFalse(); in testMigration()
180 assertThat(dpms.mOwners.getDeviceOwnerUserRestrictionsNeedsMigration()).isFalse(); in testMigration()
[all …]
DDevicePolicyManagerTestable.java25 public final DevicePolicyManagerServiceTestable dpms; field in DevicePolicyManagerTestable
28 DevicePolicyManagerServiceTestable dpms) { in DevicePolicyManagerTestable() argument
29 this(context, dpms, /* parentInstance= */ false); in DevicePolicyManagerTestable()
33 DevicePolicyManagerServiceTestable dpms, boolean parentInstance) { in DevicePolicyManagerTestable() argument
34 super(context, dpms, parentInstance); in DevicePolicyManagerTestable()
35 this.dpms = dpms; in DevicePolicyManagerTestable()
40 return UserHandle.getUserId(dpms.context.binder.callingUid); in myUserId()
DDevicePolicyManagerTest.java185 public DevicePolicyManagerServiceTestable dpms; field in DevicePolicyManagerTest
272 return dpms.mTransferOwnershipMetadataManager; in getMockTransferMetadataManager()
277 flushTasks(dpms); in tearDown()
287 dpms = new DevicePolicyManagerServiceTestable(getServices(), mContext); in initializeDpms()
288 dpms.systemReady(SystemService.PHASE_LOCK_SETTINGS_READY); in initializeDpms()
289 dpms.systemReady(SystemService.PHASE_BOOT_COMPLETED); in initializeDpms()
291 dpm = new DevicePolicyManagerTestable(mContext, dpms); in initializeDpms()
293 parentDpm = new DevicePolicyManagerTestable(mServiceContext, dpms, in initializeDpms()
356 runAsCaller(mServiceContext, dpms, dpm -> { in setAsProfileOwner()
647 () -> dpms.removeActiveAdmin(admin1, CALLER_USER_HANDLE + 1)); in testRemoveActiveAdmin_SecurityException()
[all …]
DDpmTestBase.java93 protected void sendBroadcastWithUser(DevicePolicyManagerServiceTestable dpms, String action, in sendBroadcastWithUser() argument
98 flushTasks(dpms); in sendBroadcastWithUser()
101 protected void flushTasks(DevicePolicyManagerServiceTestable dpms) throws Exception { in flushTasks() argument
102 dpms.mHandler.runWithScissors(() -> { }, 0 /*now*/); in flushTasks()
103 dpms.mBackgroundHandler.runWithScissors(() -> { }, 0 /*now*/); in flushTasks()
120 protected void runAsCaller(DpmMockContext caller, DevicePolicyManagerServiceTestable dpms, in runAsCaller() argument
133 action.run(new DevicePolicyManagerTestable(caller, dpms)); in runAsCaller()
/frameworks/base/services/java/com/android/server/
DSystemServer.java1676 final DevicePolicyManagerService.Lifecycle dpms; in startOtherServices() local
1678 dpms = null; in startOtherServices()
1715 dpms = mSystemServiceManager.startService(DevicePolicyManagerService.Lifecycle.class); in startOtherServices()
2723 dpms.setDevicePolicySafetyChecker((DevicePolicySafetyChecker) cshs); in startOtherServices()
/frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/
DDevicePolicyManagerService.java986 DevicePolicyManagerService dpms) { in RestrictionsListener() argument
989 mDpms = dpms; in RestrictionsListener()