Searched refs:devicePolicyManager (Results 1 – 7 of 7) sorted by relevance
50 private DevicePolicyManager devicePolicyManager; field in ShadowDevicePolicyManagerTest58 devicePolicyManager = in setUp()76 assertThat(devicePolicyManager.isDeviceOwnerApp(testPackage)).isFalse(); in isDeviceOwnerAppShouldReturnFalseForNonDeviceOwnerApp()84 shadowOf(devicePolicyManager).setProfileOwner(testComponent); in isDeviceOwnerShouldReturnFalseForProfileOwner()88 assertThat(devicePolicyManager.isDeviceOwnerApp(testPackage)).isFalse(); in isDeviceOwnerShouldReturnFalseForProfileOwner()96 shadowOf(devicePolicyManager).setDeviceOwner(testComponent); in isDeviceOwnerShouldReturnTrueForDeviceOwner()100 assertThat(devicePolicyManager.isDeviceOwnerApp(testPackage)).isTrue(); in isDeviceOwnerShouldReturnTrueForDeviceOwner()108 shadowOf(devicePolicyManager).setDeviceOwner(testComponent); in getDeviceOwnerShouldReturnDeviceOwnerPackageName()112 assertThat(devicePolicyManager.getDeviceOwner()).isEqualTo(testPackage); in getDeviceOwnerShouldReturnDeviceOwnerPackageName()120 assertThat(devicePolicyManager.getDeviceOwner()).isNull(); in getDeviceOwnerShouldReturnNullWhenThereIsNoDeviceOwner()[all …]
2544 DevicePolicyManager devicePolicyManager =2548 shadowOf(devicePolicyManager)2565 DevicePolicyManager devicePolicyManager =2569 shadowOf(devicePolicyManager)
49 DevicePolicyManager devicePolicyManager = context.getSystemService(DevicePolicyManager.class); in tryBind() local61 devicePolicyManager.bindDeviceAdminServiceAsUser( in tryBind()78 DevicePolicyManager devicePolicyManager = context.getSystemService(DevicePolicyManager.class); in hasPermissionToBind() local79 return !devicePolicyManager.getBindDeviceAdminTargetUsers(deviceAdminReceiver).isEmpty(); in hasPermissionToBind()85 DevicePolicyManager devicePolicyManager = context.getSystemService(DevicePolicyManager.class); in getRunningBindDeviceAdminTargetUser() local90 devicePolicyManager.getBindDeviceAdminTargetUsers(deviceAdminReceiver), in getRunningBindDeviceAdminTargetUser()
64 DevicePolicyManager devicePolicyManager = context.getSystemService(DevicePolicyManager.class); in calculateIsRunningOnWorkProfile() local69 if (devicePolicyManager.isProfileOwnerApp(pkg.packageName)) { in calculateIsRunningOnWorkProfile()
49 private final DevicePolicyManager devicePolicyManager = field in CrossProfileSenderTest407 shadowOf(devicePolicyManager).setBindDeviceAdminTargetUsers(ImmutableList.of()); in bind_usingDpcBinding_otherProfileDoesNotExist_doesNotBind()418 shadowOf(devicePolicyManager).setBindDeviceAdminTargetUsers(ImmutableList.of()); in bind_usingDpcBinding_otherProfileIsCreated_binds()422 shadowOf(devicePolicyManager) in bind_usingDpcBinding_otherProfileIsCreated_binds()474 shadowOf(devicePolicyManager) in initWithDpcBinding()
70 private final DevicePolicyManager devicePolicyManager; field in RobolectricTestUtilities98 devicePolicyManager = context.getSystemService(DevicePolicyManager.class); in RobolectricTestUtilities()224 shadowOf(devicePolicyManager).setProfileOwner(null); in setRunningOnPersonalProfile()247 shadowOf(devicePolicyManager).setProfileOwner(profileOwnerComponentName); in setHasProfileOwner()
1801 DevicePolicyManager devicePolicyManager = in hasProfileOwnerOrDeviceOwnerOnCurrentUser() local1803 return devicePolicyManager.getProfileOwner() != null in hasProfileOwnerOrDeviceOwnerOnCurrentUser()1805 && devicePolicyManager.getDeviceOwner() != null); in hasProfileOwnerOrDeviceOwnerOnCurrentUser()1821 DevicePolicyManager devicePolicyManager = in isPackageDeviceAdmin() local1825 return packageName.equals(devicePolicyManager.getDeviceOwner()); in isPackageDeviceAdmin()