Home
last modified time | relevance | path

Searched refs:mDevicePolicyManager (Results 1 – 21 of 21) sorted by relevance

/frameworks/base/cmds/dpm/src/com/android/commands/dpm/
DDpm.java54 private IDevicePolicyManager mDevicePolicyManager; field in Dpm
102 mDevicePolicyManager = IDevicePolicyManager.Stub.asInterface( in onRun()
104 if (mDevicePolicyManager == null) { in onRun()
142 final long toWait = mDevicePolicyManager.forceNetworkLogs(); in runForceNetworkLogs()
154 final long toWait = mDevicePolicyManager.forceSecurityLogs(); in runForceSecurityLogs()
193 mDevicePolicyManager.setActiveAdmin(mComponent, true /*refreshing*/, mUserId); in runSetActiveAdmin()
200 mDevicePolicyManager.setActiveAdmin(mComponent, true /*refreshing*/, mUserId); in runSetDeviceOwner()
203 if (!mDevicePolicyManager.setDeviceOwner(mComponent, mName, mUserId)) { in runSetDeviceOwner()
209 mDevicePolicyManager.removeActiveAdmin(mComponent, UserHandle.USER_SYSTEM); in runSetDeviceOwner()
213 mDevicePolicyManager.setUserProvisioningState( in runSetDeviceOwner()
[all …]
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/
DRestrictedLockUtilsTest.java62 private DevicePolicyManager mDevicePolicyManager; field in RestrictedLockUtilsTest
80 .thenReturn(mDevicePolicyManager); in setUp()
158 when(mDevicePolicyManager.getKeyguardDisabledFeatures(mAdmin1, mUserId)) in checkIfKeyguardFeaturesDisabled_oneEnforcedAdminForManagedProfile()
171 when(mDevicePolicyManager.getKeyguardDisabledFeatures(mAdmin1, mUserId)) in checkIfKeyguardFeaturesDisabled_multipleEnforcedAdminForManagedProfile()
173 when(mDevicePolicyManager.getKeyguardDisabledFeatures(mAdmin2, mUserId)) in checkIfKeyguardFeaturesDisabled_multipleEnforcedAdminForManagedProfile()
188 when(mDevicePolicyManager.getKeyguardDisabledFeatures(mAdmin1, mUserId)) in checkIfKeyguardFeaturesAreDisabled_doesMatchAllowedFeature_unifiedManagedProfile()
190 when(mDevicePolicyManager.getKeyguardDisabledFeatures(mAdmin2, mProfileId)) in checkIfKeyguardFeaturesAreDisabled_doesMatchAllowedFeature_unifiedManagedProfile()
216 when(mDevicePolicyManager.getKeyguardDisabledFeatures(mAdmin1, mUserId)) in checkIfKeyguardFeaturesAreDisabled_notMatchOtherFeatures_unifiedManagedProfile()
218 when(mDevicePolicyManager.getKeyguardDisabledFeatures(mAdmin2, mProfileId)) in checkIfKeyguardFeaturesAreDisabled_notMatchOtherFeatures_unifiedManagedProfile()
239 when(mDevicePolicyManager.getKeyguardDisabledFeatures(mAdmin1, mUserId)) in checkIfKeyguardFeaturesAreDisabled_onlyMatchesProfile_separateManagedProfile()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/
DKeyguardIndicationControllerTest.java83 private DevicePolicyManager mDevicePolicyManager; field in KeyguardIndicationControllerTest
122 mContext.addMockSystemService(Context.DEVICE_POLICY_SERVICE, mDevicePolicyManager); in setUp()
152 when(mDevicePolicyManager.isDeviceManaged()).thenReturn(false); in unmanaged()
161 when(mDevicePolicyManager.isDeviceManaged()).thenReturn(true); in managedNoOwnerName()
162 when(mDevicePolicyManager.getDeviceOwnerOrganizationName()).thenReturn(null); in managedNoOwnerName()
172 when(mDevicePolicyManager.isDeviceManaged()).thenReturn(true); in managedOwnerName()
173 when(mDevicePolicyManager.getDeviceOwnerOrganizationName()).thenReturn(ORGANIZATION_NAME); in managedOwnerName()
183 when(mDevicePolicyManager.isDeviceManaged()).thenReturn(false); in updateOnTheFly()
189 when(mDevicePolicyManager.isDeviceManaged()).thenReturn(true); in updateOnTheFly()
190 when(mDevicePolicyManager.getDeviceOwnerOrganizationName()).thenReturn(null); in updateOnTheFly()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/
DMockLockSettingsContext.java33 private DevicePolicyManager mDevicePolicyManager; field in MockLockSettingsContext
45 mDevicePolicyManager = devicePolicyManager; in MockLockSettingsContext()
58 return mDevicePolicyManager; in getSystemService()
DBaseLockSettingsServiceTests.java92 DevicePolicyManager mDevicePolicyManager; field in BaseLockSettingsServiceTests
110 mDevicePolicyManager = mock(DevicePolicyManager.class); in setUp_baseServices()
124 mNotificationManager, mDevicePolicyManager, mock(StorageManager.class), in setUp_baseServices()
178 when(mDevicePolicyManager.getDeviceOwnerComponentOnAnyUser()).thenReturn( in setUp_baseServices()
DSyntheticPasswordTests.java272 verify(mDevicePolicyManager).setActivePasswordState(metric, PRIMARY_USER_ID); in testTokenBasedResetPassword()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DSecurityControllerImpl.java86 private final DevicePolicyManager mDevicePolicyManager; field in SecurityControllerImpl
114 mDevicePolicyManager = (DevicePolicyManager) in SecurityControllerImpl()
153 return mDevicePolicyManager.isDeviceManaged(); in isDeviceManaged()
158 return mDevicePolicyManager.getDeviceOwnerNameOnAnyUser(); in getDeviceOwnerName()
163 return mDevicePolicyManager.getProfileOwnerAsUser(mCurrentUserId) != null; in hasProfileOwner()
169 String name = mDevicePolicyManager.getProfileOwnerNameAsUser(profileId); in getProfileOwnerName()
179 return mDevicePolicyManager.getDeviceOwnerOrganizationName(); in getDeviceOwnerOrganizationName()
186 return mDevicePolicyManager.getOrganizationNameForUser(profileId); in getWorkProfileOrganizationName()
226 return mDevicePolicyManager.isNetworkLoggingEnabled(null); in isNetworkLoggingEnabled()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/
DSecurityControllerTest.java64 private final DevicePolicyManager mDevicePolicyManager = mock(DevicePolicyManager.class); field in SecurityControllerTest
79 mContext.addMockSystemService(Context.DEVICE_POLICY_SERVICE, mDevicePolicyManager); in setUp()
112 when(mDevicePolicyManager.isDeviceManaged()).thenReturn(true); in testIsDeviceManaged()
115 when(mDevicePolicyManager.isDeviceManaged()).thenReturn(false); in testIsDeviceManaged()
121 when(mDevicePolicyManager.getDeviceOwnerOrganizationName()).thenReturn("organization"); in testGetDeviceOwnerOrganizationName()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/keyguard/
DWorkLockActivityTest.java55 private @Mock DevicePolicyManager mDevicePolicyManager; field in WorkLockActivityTest
73 .thenReturn(mDevicePolicyManager); in setUp()
86 when(mDevicePolicyManager.getOrganizationColorForUser(eq(USER_ID))).thenReturn(orgColor); in testBackgroundAlwaysOpaque()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/fuelgauge/
DPowerWhitelistBackendTest.java58 private DevicePolicyManager mDevicePolicyManager; field in PowerWhitelistBackendTest
75 doReturn(mDevicePolicyManager).when(mContext).getSystemService(DevicePolicyManager.class); in setUp()
139 doReturn(true).when(mDevicePolicyManager).packageHasActiveAdmins(PACKAGE_ONE); in isWhitelisted_shouldWhitelistActiveDeviceAdminApp()
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
DActivityStartInterceptorTest.java97 private DevicePolicyManagerInternal mDevicePolicyManager; field in ActivityStartInterceptorTest
128 mDevicePolicyManager); in setUp()
129 when(mDevicePolicyManager.createShowAdminSupportIntent(TEST_USER_ID, true)) in setUp()
DLockTaskControllerTest.java109 @Mock private IDevicePolicyManager mDevicePolicyManager; field in LockTaskControllerTest
142 mLockTaskController.mDevicePolicyManager = mDevicePolicyManager; in setUp()
744 verify(mDevicePolicyManager).notifyLockTaskModeChanged(eq(true), eq(TEST_PACKAGE_NAME), in verifyLockTaskStarted()
757 verify(mDevicePolicyManager, mode).notifyLockTaskModeChanged(eq(false), isNull(), in verifyLockTaskStopped()
/frameworks/base/services/core/java/com/android/server/wm/
DLockTaskController.java139 IDevicePolicyManager mDevicePolicyManager; field in LockTaskController
873 if (mDevicePolicyManager == null) { in getDevicePolicyManager()
874 mDevicePolicyManager = IDevicePolicyManager.Stub.asInterface( in getDevicePolicyManager()
876 if (mDevicePolicyManager == null) { in getDevicePolicyManager()
880 return mDevicePolicyManager; in getDevicePolicyManager()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/
DNotificationLockscreenUserManagerImpl.java81 private final DevicePolicyManager mDevicePolicyManager; field in NotificationLockscreenUserManagerImpl
181 mDevicePolicyManager = (DevicePolicyManager) mContext.getSystemService( in NotificationLockscreenUserManagerImpl()
343 final int dpmFlags = mDevicePolicyManager.getKeyguardDisabledFeatures( in updateLockscreenNotificationSetting()
392 mDevicePolicyManager.getKeyguardDisabledFeatures(null /* admin */, userHandle); in adminAllowsKeyguardFeature()
DKeyguardIndicationController.java126 private final DevicePolicyManager mDevicePolicyManager; field in KeyguardIndicationController
187 mDevicePolicyManager = (DevicePolicyManager) context.getSystemService( in KeyguardIndicationController()
257 if (mDevicePolicyManager == null) { in updateDisclosure()
261 if (!mDozing && mDevicePolicyManager.isDeviceManaged()) { in updateDisclosure()
263 mDevicePolicyManager.getDeviceOwnerOrganizationName(); in updateDisclosure()
/frameworks/base/packages/SystemUI/src/com/android/systemui/biometrics/
DBiometricDialogView.java85 private final DevicePolicyManager mDevicePolicyManager; field in BiometricDialogView
165 mDevicePolicyManager = mContext.getSystemService(DevicePolicyManager.class); in BiometricDialogView()
271 image.setColorFilter(mDevicePolicyManager.getOrganizationColorForUser(mUserId), in onAttachedToWindow()
/frameworks/base/core/java/com/android/internal/widget/
DLockPatternUtils.java177 private DevicePolicyManager mDevicePolicyManager; field in LockPatternUtils
237 if (mDevicePolicyManager == null) { in getDevicePolicyManager()
238 mDevicePolicyManager = in getDevicePolicyManager()
240 if (mDevicePolicyManager == null) { in getDevicePolicyManager()
245 return mDevicePolicyManager; in getDevicePolicyManager()
/frameworks/base/packages/SystemUI/tests/src/com/android/keyguard/
DKeyguardUpdateMonitorTest.java108 private DevicePolicyManager mDevicePolicyManager; field in KeyguardUpdateMonitorTest
139 context.addMockSystemService(DevicePolicyManager.class, mDevicePolicyManager); in setup()
/frameworks/base/packages/SystemUI/src/com/android/systemui/globalactions/
DGlobalActionsDialog.java144 private final DevicePolicyManager mDevicePolicyManager; field in GlobalActionsDialog
180 mDevicePolicyManager = (DevicePolicyManager) mContext.getSystemService( in GlobalActionsDialog()
391 if (mDevicePolicyManager.isLogoutEnabled() in createDialog()
/frameworks/base/packages/SystemUI/src/com/android/keyguard/
DKeyguardUpdateMonitor.java256 private final DevicePolicyManager mDevicePolicyManager; field in KeyguardUpdateMonitor
1621 mDevicePolicyManager = context.getSystemService(DevicePolicyManager.class); in KeyguardUpdateMonitor()
1622 mLogoutEnabled = mDevicePolicyManager.isLogoutEnabled(); in KeyguardUpdateMonitor()
2626 boolean logoutEnabled = mDevicePolicyManager.isLogoutEnabled(); in updateLogoutEnabled()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DStatusBar.java681 mDevicePolicyManager = (DevicePolicyManager) mContext.getSystemService( in start()
3930 if (mDevicePolicyManager.getCameraDisabled(null, in isCameraAllowedByAdmin()
3936 return (mDevicePolicyManager. in isCameraAllowedByAdmin()
4294 protected DevicePolicyManager mDevicePolicyManager;