Home
last modified time | relevance | path

Searched refs:devicePolicyManager (Results 1 – 7 of 7) sorted by relevance

/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/shadows/
DShadowDevicePolicyManagerTest.java50 private DevicePolicyManager devicePolicyManager; field in ShadowDevicePolicyManagerTest
58 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 …]
DShadowPackageManagerTest.java2544 DevicePolicyManager devicePolicyManager =
2548 shadowOf(devicePolicyManager)
2565 DevicePolicyManager devicePolicyManager =
2569 shadowOf(devicePolicyManager)
/external/connectedappssdk/sdk/src/main/java/com/google/android/enterprise/connectedapps/
DDpcProfileBinder.java49 DevicePolicyManager devicePolicyManager = context.getSystemService(DevicePolicyManager.class); in tryBind() local
61 devicePolicyManager.bindDeviceAdminServiceAsUser( in tryBind()
78 DevicePolicyManager devicePolicyManager = context.getSystemService(DevicePolicyManager.class); in hasPermissionToBind() local
79 return !devicePolicyManager.getBindDeviceAdminTargetUsers(deviceAdminReceiver).isEmpty(); in hasPermissionToBind()
85 DevicePolicyManager devicePolicyManager = context.getSystemService(DevicePolicyManager.class); in getRunningBindDeviceAdminTargetUser() local
90 devicePolicyManager.getBindDeviceAdminTargetUsers(deviceAdminReceiver), in getRunningBindDeviceAdminTargetUser()
DCrossProfileSDKUtilities.java64 DevicePolicyManager devicePolicyManager = context.getSystemService(DevicePolicyManager.class); in calculateIsRunningOnWorkProfile() local
69 if (devicePolicyManager.isProfileOwnerApp(pkg.packageName)) { in calculateIsRunningOnWorkProfile()
/external/connectedappssdk/tests/robotests/src/test/java/com/google/android/enterprise/connectedapps/
DCrossProfileSenderTest.java49 private final DevicePolicyManager devicePolicyManager = field in CrossProfileSenderTest
407 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()
DRobolectricTestUtilities.java70 private final DevicePolicyManager devicePolicyManager; field in RobolectricTestUtilities
98 devicePolicyManager = context.getSystemService(DevicePolicyManager.class); in RobolectricTestUtilities()
224 shadowOf(devicePolicyManager).setProfileOwner(null); in setRunningOnPersonalProfile()
247 shadowOf(devicePolicyManager).setProfileOwner(profileOwnerComponentName); in setHasProfileOwner()
/external/robolectric-shadows/shadows/framework/src/main/java/org/robolectric/shadows/
DShadowApplicationPackageManager.java1801 DevicePolicyManager devicePolicyManager = in hasProfileOwnerOrDeviceOwnerOnCurrentUser() local
1803 return devicePolicyManager.getProfileOwner() != null in hasProfileOwnerOrDeviceOwnerOnCurrentUser()
1805 && devicePolicyManager.getDeviceOwner() != null); in hasProfileOwnerOrDeviceOwnerOnCurrentUser()
1821 DevicePolicyManager devicePolicyManager = in isPackageDeviceAdmin() local
1825 return packageName.equals(devicePolicyManager.getDeviceOwner()); in isPackageDeviceAdmin()