HomeSort by relevance Sort by last modified time
    Searched refs:mDevicePolicyManager (Results 26 - 50 of 123) sorted by null

12 3 4 5

  /cts/tests/admin/src/android/admin/cts/
DevicePolicyManagerTest.java 47 private DevicePolicyManager mDevicePolicyManager;
75 mDevicePolicyManager = (DevicePolicyManager)
89 List<ComponentName> activeAdmins = mDevicePolicyManager.getActiveAdmins();
92 assertTrue(mDevicePolicyManager.isAdminActive(mComponent));
100 int originalValue = mDevicePolicyManager.getKeyguardDisabledFeatures(mComponent);
104 mDevicePolicyManager.setKeyguardDisabledFeatures(mComponent, which);
105 assertEquals(which, mDevicePolicyManager.getKeyguardDisabledFeatures(mComponent));
108 mDevicePolicyManager.setKeyguardDisabledFeatures(mComponent, originalValue);
118 mDevicePolicyManager.requestBugreport(mComponent);
131 mDevicePolicyManager.setSecurityLoggingEnabled(mComponent, true)
    [all...]
  /cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/
BaseDeviceAdminTest.java 46 protected DevicePolicyManager mDevicePolicyManager;
57 mDevicePolicyManager = mContext.getSystemService(DevicePolicyManager.class);
58 assertNotNull(mDevicePolicyManager);
63 assertTrue(mDevicePolicyManager.isAdminActive(ADMIN_RECEIVER_COMPONENT));
65 mDevicePolicyManager.isProfileOwnerApp(PACKAGE_NAME) ||
66 mDevicePolicyManager.isDeviceOwnerApp(PACKAGE_NAME));
93 && mDevicePolicyManager.isActivePasswordSufficient() != expectPasswordSufficient) {
101 assertEquals(expectPasswordSufficient, mDevicePolicyManager.isActivePasswordSufficient());
AlwaysOnVpnMultiStageTest.java 47 assertEquals(VPN_PACKAGE, mDevicePolicyManager.getAlwaysOnVpnPackage(
63 assertNull(mDevicePolicyManager.getAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT));
68 assertNull(mDevicePolicyManager.getAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT));
72 mDevicePolicyManager.setAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT, VPN_PACKAGE,
79 assertNull(mDevicePolicyManager.getAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT));
83 mDevicePolicyManager.setAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT, null, false);
ScreenCaptureDisabledTest.java 38 mDevicePolicyManager.setScreenCaptureDisabled(ADMIN_RECEIVER_COMPONENT, false);
39 assertFalse(mDevicePolicyManager.getScreenCaptureDisabled(ADMIN_RECEIVER_COMPONENT));
40 assertFalse(mDevicePolicyManager.getScreenCaptureDisabled(null /* any admin */));
44 mDevicePolicyManager.setScreenCaptureDisabled(ADMIN_RECEIVER_COMPONENT, true);
45 assertTrue(mDevicePolicyManager.getScreenCaptureDisabled(ADMIN_RECEIVER_COMPONENT));
46 assertTrue(mDevicePolicyManager.getScreenCaptureDisabled(null /* any admin */));
SupportMessageTest.java 87 mDevicePolicyManager.setShortSupportMessage(ADMIN_RECEIVER_COMPONENT,
93 mDevicePolicyManager.setLongSupportMessage(ADMIN_RECEIVER_COMPONENT, LongMessage.LONG);
115 mDevicePolicyManager.setShortSupportMessage(null, ShortMessage.SIMPLE);
120 CharSequence message = mDevicePolicyManager.getShortSupportMessage(null);
127 mDevicePolicyManager.setLongSupportMessage(null, LongMessage.SIMPLE);
133 CharSequence message = mDevicePolicyManager.getLongSupportMessage(null);
153 mDevicePolicyManager.setShortSupportMessage(ADMIN_RECEIVER_COMPONENT, message);
163 mDevicePolicyManager.setLongSupportMessage(ADMIN_RECEIVER_COMPONENT, message);
168 return mDevicePolicyManager.getShortSupportMessage(ADMIN_RECEIVER_COMPONENT);
172 return mDevicePolicyManager.getLongSupportMessage(ADMIN_RECEIVER_COMPONENT)
    [all...]
ApplicationRestrictionsTest.java 98 mDevicePolicyManager.setApplicationRestrictions(
100 mDevicePolicyManager.setApplicationRestrictions(
102 mDevicePolicyManager.setApplicationRestrictions(
110 mDevicePolicyManager.setApplicationRestrictions(
119 mDevicePolicyManager.getApplicationRestrictions(null, APP_RESTRICTIONS_TARGET_PKG);
130 mDevicePolicyManager.setApplicationRestrictions(
132 mDevicePolicyManager.setApplicationRestrictions(
136 assertBundle0(mDevicePolicyManager.getApplicationRestrictions(
138 assertBundle1(mDevicePolicyManager.getApplicationRestrictions(
145 mDevicePolicyManager.setApplicationRestrictions
    [all...]
AudioRestrictionTest.java 35 return mDevicePolicyManager.isMasterVolumeMuted(ADMIN_RECEIVER_COMPONENT);
56 mDevicePolicyManager.isMasterVolumeMuted(ADMIN_RECEIVER_COMPONENT);
60 mDevicePolicyManager.setMasterVolumeMuted(ADMIN_RECEIVER_COMPONENT, false);
65 mDevicePolicyManager.addUserRestriction(ADMIN_RECEIVER_COMPONENT,
70 mDevicePolicyManager.setMasterVolumeMuted(ADMIN_RECEIVER_COMPONENT, false);
72 assertTrue(mDevicePolicyManager.isMasterVolumeMuted(ADMIN_RECEIVER_COMPONENT));
74 mDevicePolicyManager.clearUserRestriction(ADMIN_RECEIVER_COMPONENT,
76 mDevicePolicyManager.setMasterVolumeMuted(ADMIN_RECEIVER_COMPONENT, initVolumeMuted);
90 mDevicePolicyManager.addUserRestriction(ADMIN_RECEIVER_COMPONENT,
99 mDevicePolicyManager.clearUserRestriction(ADMIN_RECEIVER_COMPONENT
    [all...]
CaCertManagementTest.java 47 List<byte[]> caCerts = mDevicePolicyManager.getInstalledCaCerts(mAdmin);
59 assertTrue(mDevicePolicyManager.installCaCert(mAdmin, FAKE_RSA_1.caCertificate));
63 mDevicePolicyManager.uninstallCaCert(mAdmin, FAKE_RSA_1.caCertificate);
73 assertTrue(mDevicePolicyManager.installCaCert(mAdmin, FAKE_RSA_1.caCertificate));
74 assertTrue(mDevicePolicyManager.installCaCert(mAdmin, FAKE_DSA_1.caCertificate));
76 mDevicePolicyManager.uninstallCaCert(mAdmin, FAKE_DSA_1.caCertificate);
80 mDevicePolicyManager.uninstallCaCert(mAdmin, FAKE_RSA_1.caCertificate);
89 assertTrue(mDevicePolicyManager.installCaCert(mAdmin, FAKE_RSA_1.caCertificate));
90 assertTrue(mDevicePolicyManager.installCaCert(mAdmin, FAKE_DSA_1.caCertificate));
92 mDevicePolicyManager.uninstallAllUserCaCerts(mAdmin)
    [all...]
ApplicationHiddenTest.java 58 mDevicePolicyManager.setApplicationHidden(ADMIN_RECEIVER_COMPONENT, PACKAGE_TO_HIDE, false);
63 assertTrue(mDevicePolicyManager.setApplicationHidden(ADMIN_RECEIVER_COMPONENT,
65 assertTrue(mDevicePolicyManager.isApplicationHidden(ADMIN_RECEIVER_COMPONENT,
68 assertTrue(mDevicePolicyManager.setApplicationHidden(ADMIN_RECEIVER_COMPONENT,
70 assertFalse(mDevicePolicyManager.isApplicationHidden(ADMIN_RECEIVER_COMPONENT,
76 assertFalse(mDevicePolicyManager.setApplicationHidden(ADMIN_RECEIVER_COMPONENT,
81 assertFalse(mDevicePolicyManager.setApplicationHidden(ADMIN_RECEIVER_COMPONENT,
SuspendPackageTest.java 32 mDevicePolicyManager.setPackagesSuspended(ADMIN_RECEIVER_COMPONENT, new String[]
38 mDevicePolicyManager.isPackageSuspended(
44 String[] notHandledPackages = mDevicePolicyManager.setPackagesSuspended(
52 mDevicePolicyManager.isPackageSuspended(
64 String[] notHandledPackages = mDevicePolicyManager.setPackagesSuspended(
  /cts/hostsidetests/devicepolicy/app/ProfileOwner/src/com/android/cts/profileowner/
AdminActionBookkeepingTest.java 63 mDevicePolicyManager.uninstallCaCert(getWho(), TEST_CA.getBytes());
78 assertFalse(mDevicePolicyManager.isCurrentInputMethodSetByOwner());
80 mDevicePolicyManager.setSecureSetting(getWho(), setting, "com.test.2");
82 assertTrue(mDevicePolicyManager.isCurrentInputMethodSetByOwner());
86 assertFalse(mDevicePolicyManager.isCurrentInputMethodSetByOwner());
100 assertTrue(mDevicePolicyManager.installCaCert(getWho(), rawCert));
108 mDevicePolicyManager.uninstallCaCert(getWho(), rawCert);
116 mDevicePolicyManager.getOwnerInstalledCaCerts(Process.myUserHandle());
BaseProfileOwnerTest.java 31 protected DevicePolicyManager mDevicePolicyManager;
37 mDevicePolicyManager = (DevicePolicyManager)
39 assertProfileOwner(mDevicePolicyManager);
  /cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
LockScreenInfoTest.java 25 mDevicePolicyManager.setDeviceOwnerLockScreenInfo(getWho(), null);
41 mDevicePolicyManager.setDeviceOwnerLockScreenInfo(getWho(), message);
42 assertNull(mDevicePolicyManager.getDeviceOwnerLockScreenInfo());
69 mDevicePolicyManager.setDeviceOwnerLockScreenInfo(null, message);
81 mDevicePolicyManager.setDeviceOwnerLockScreenInfo(getWho(), message);
82 assertEquals(message, mDevicePolicyManager.getDeviceOwnerLockScreenInfo());
ForceEphemeralUsersTest.java 40 setForceEphemeralUsersMethod.invoke(mDevicePolicyManager, getWho(), true);
44 assertTrue((boolean) getForceEphemeralUsersMethod.invoke(mDevicePolicyManager, getWho()));
56 setForceEphemeralUsersMethod.invoke(mDevicePolicyManager, getWho(), true);
LockTaskTest.java 136 private DevicePolicyManager mDevicePolicyManager;
142 mDevicePolicyManager = (DevicePolicyManager)
144 mDevicePolicyManager.setLockTaskPackages(ADMIN_COMPONENT, new String[0]);
158 mDevicePolicyManager.setLockTaskPackages(ADMIN_COMPONENT, new String[0]);
166 mDevicePolicyManager.setLockTaskPackages(ADMIN_COMPONENT, packages);
167 assertArrayEquals(packages, mDevicePolicyManager.getLockTaskPackages(ADMIN_COMPONENT));
168 assertTrue(mDevicePolicyManager.isLockTaskPermitted(TEST_PACKAGE));
170 mDevicePolicyManager.setLockTaskPackages(ADMIN_COMPONENT, new String[0]);
171 assertEquals(0, mDevicePolicyManager.getLockTaskPackages(ADMIN_COMPONENT).length);
172 assertFalse(mDevicePolicyManager.isLockTaskPermitted(TEST_PACKAGE))
    [all...]
RemoteBugreportTest.java 36 mDevicePolicyManager.requestBugreport(getWho());
WifiTest.java 30 final String macAddress = mDevicePolicyManager.getWifiMacAddress(getWho());
  /packages/apps/Settings/tests/robotests/src/com/android/settings/enterprise/
EnterprisePrivacyFeatureProviderImplTest.java 77 private @Mock DevicePolicyManagerWrapper mDevicePolicyManager;
96 mProvider = new EnterprisePrivacyFeatureProviderImpl(mContext, mDevicePolicyManager,
102 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()).thenReturn(null);
105 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()).thenReturn(OWNER);
111 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()).thenReturn(OWNER);
120 when(mDevicePolicyManager.getDeviceOwnerOrganizationName()).thenReturn(null);
123 when(mDevicePolicyManager.getDeviceOwnerOrganizationName()).thenReturn(OWNER_ORGANIZATION);
129 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()).thenReturn(null);
137 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()).thenReturn(OWNER);
138 when(mDevicePolicyManager.getDeviceOwnerOrganizationName()).thenReturn(null)
    [all...]
  /frameworks/base/cmds/dpm/src/com/android/commands/dpm/
Dpm.java 49 private IDevicePolicyManager mDevicePolicyManager;
83 mDevicePolicyManager = IDevicePolicyManager.Stub.asInterface(
85 if (mDevicePolicyManager == null) {
138 mDevicePolicyManager.setActiveAdmin(mComponent, true /*refreshing*/, mUserId);
145 mDevicePolicyManager.setActiveAdmin(mComponent, true /*refreshing*/, mUserId);
148 if (!mDevicePolicyManager.setDeviceOwner(mComponent, mName, mUserId)) {
154 mDevicePolicyManager.removeActiveAdmin(mComponent, UserHandle.USER_SYSTEM);
158 mDevicePolicyManager.setUserProvisioningState(
167 mDevicePolicyManager.forceRemoveActiveAdmin(mComponent, mUserId);
173 mDevicePolicyManager.setActiveAdmin(mComponent, true /*refreshing*/, mUserId)
    [all...]
  /cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/userrestrictions/
ProfileGlobalRestrictionsTest.java 29 mDevicePolicyManager.addUserRestriction(ADMIN_RECEIVER_COMPONENT, ENSURE_VERIFY_APPS);
33 mDevicePolicyManager.clearUserRestriction(ADMIN_RECEIVER_COMPONENT, ENSURE_VERIFY_APPS);
  /cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/
ManagedProfileTest.java 38 private DevicePolicyManager mDevicePolicyManager;
52 mDevicePolicyManager = (DevicePolicyManager)
58 mDevicePolicyManager.clearCrossProfileIntentFilters(ADMIN_RECEIVER_COMPONENT);
65 mDevicePolicyManager.addCrossProfileIntentFilter(ADMIN_RECEIVER_COMPONENT,
70 mDevicePolicyManager.clearCrossProfileIntentFilters(ADMIN_RECEIVER_COMPONENT);
84 mDevicePolicyManager.addCrossProfileIntentFilter(ADMIN_RECEIVER_COMPONENT,
99 mDevicePolicyManager.addCrossProfileIntentFilter(ADMIN_RECEIVER_COMPONENT,
114 mDevicePolicyManager.addCrossProfileIntentFilter(ADMIN_RECEIVER_COMPONENT,
LockNowTest.java 30 mDevicePolicyManager.lockNow(DevicePolicyManager.FLAG_EVICT_CREDENTIAL_ENCRYPTION_KEY);
PasswordMinimumRestrictionsTest.java 52 mParentDpm = mDevicePolicyManager.getParentProfileInstance(ADMIN_RECEIVER_COMPONENT);
54 mDevicePolicyManager.getPasswordQuality(ADMIN_RECEIVER_COMPONENT);
56 mDevicePolicyManager.setPasswordQuality(ADMIN_RECEIVER_COMPONENT, PASSWORD_QUALITY_COMPLEX);
60 .add(invokeGetMethod(method, mDevicePolicyManager, ADMIN_RECEIVER_COMPONENT));
69 invokeSetMethod(METHOD_LIST[i], mDevicePolicyManager, ADMIN_RECEIVER_COMPONENT,
74 mDevicePolicyManager.setPasswordQuality(ADMIN_RECEIVER_COMPONENT,
82 invokeSetMethod(METHOD_LIST[i], mDevicePolicyManager, ADMIN_RECEIVER_COMPONENT,
91 + " failed to get expected value on mDevicePolicyManager.",
92 TEST_PASSWORD_LENGTH + i, invokeGetMethod(METHOD_LIST[i], mDevicePolicyManager,
105 // Test with mDevicePolicyManager
    [all...]
  /packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/finalization/
UserProvisioningStateHelperTest.java 52 @Mock private DevicePolicyManager mDevicePolicyManager;
63 when(mContext.getSystemService(DEVICE_POLICY_SERVICE)).thenReturn(mDevicePolicyManager);
84 verify(mDevicePolicyManager).setUserProvisioningState(STATE_USER_SETUP_FINALIZED,
100 verify(mDevicePolicyManager).setUserProvisioningState(STATE_USER_SETUP_COMPLETE,
103 verify(mDevicePolicyManager).setUserProvisioningState(STATE_USER_PROFILE_COMPLETE,
118 verify(mDevicePolicyManager).setUserProvisioningState(STATE_USER_SETUP_COMPLETE,
133 verify(mDevicePolicyManager).setUserProvisioningState(STATE_USER_SETUP_INCOMPLETE,
148 verify(mDevicePolicyManager).setUserProvisioningState(STATE_USER_SETUP_FINALIZED,
151 verify(mDevicePolicyManager).setUserProvisioningState(STATE_USER_UNMANAGED,
165 verify(mDevicePolicyManager).setUserProvisioningState(STATE_USER_SETUP_FINALIZED
    [all...]
  /packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/task/
SetDevicePolicyTask.java 39 private final DevicePolicyManager mDevicePolicyManager;
58 mDevicePolicyManager = (DevicePolicyManager) context.getSystemService(
113 mDevicePolicyManager.setActiveAdmin(component, true, userId);
118 if (!component.equals(mDevicePolicyManager.getDeviceOwnerComponentOnCallingUser())) {
119 return mDevicePolicyManager.setDeviceOwner(component, owner, userId);
126 if (!component.equals(mDevicePolicyManager.getProfileOwnerAsUser(userId))) {
127 return mDevicePolicyManager.setProfileOwner(component, component.getPackageName(),

Completed in 538 milliseconds

12 3 4 5