Home
last modified time | relevance | path

Searched refs:manager (Results 1 – 25 of 85) sorted by relevance

1234

/cts/tests/tests/permission/src/android/permission/cts/
DPowerManagerServicePermissionTest.java26 PowerManager manager = getContext().getSystemService(PowerManager.class); in testSetBatterySaver_requiresPermissions() local
27 boolean batterySaverOn = manager.isPowerSaveMode(); in testSetBatterySaver_requiresPermissions()
30 manager.setPowerSaveModeEnabled(!batterySaverOn); in testSetBatterySaver_requiresPermissions()
39 PowerManager manager = getContext().getSystemService(PowerManager.class); in testSetDynamicPowerSavings_requiresPermissions() local
40 manager.setDynamicPowerSaveHint(true, 0); in testSetDynamicPowerSavings_requiresPermissions()
49 PowerManager manager = getContext().getSystemService(PowerManager.class); in testSetBatteryDischargePrediction_requiresPermissions() local
50 manager.setBatteryDischargePrediction(Duration.ofMillis(1000), false); in testSetBatteryDischargePrediction_requiresPermissions()
DNoActivityRelatedPermissionTest.java53 ActivityManager manager = (ActivityManager) getActivity() in testGetTask() local
55 List<ActivityManager.RunningTaskInfo> runningTasks = manager.getRunningTasks(10); in testGetTask()
63 List<ActivityManager.RecentTaskInfo> recentTasks = manager.getRecentTasks(10, in testGetTask()
/cts/tests/tests/shortcutmanager/throttling/src/android/content/pm/cts/shortcutmanager/throttling/
DThrottledTests.java37 final ShortcutManager manager = context.getSystemService(ShortcutManager.class); in assertThrottled() local
39 assertFalse("Throttling must be reset here", manager.isRateLimitingActive()); in assertThrottled()
59 final ShortcutManager manager = context.getSystemService(ShortcutManager.class); in ensureThrottled() local
61 retryUntil(() -> !manager.setDynamicShortcuts(list()), "Not throttled."); in ensureThrottled()
65 final ShortcutManager manager = context.getSystemService(ShortcutManager.class); in assertCallNotThrottled() local
67 assertFalse(manager.isRateLimitingActive()); in assertCallNotThrottled()
70 assertTrue(manager.setDynamicShortcuts(list())); in assertCallNotThrottled()
71 assertTrue(manager.addDynamicShortcuts(list())); in assertCallNotThrottled()
72 assertTrue(manager.updateShortcuts(list())); in assertCallNotThrottled()
/cts/tests/devicestate/src/android/hardware/devicestate/cts/
DDeviceStateManagerTests.java78 final DeviceStateManager manager = getDeviceStateManager(); in testRequestAllSupportedStates() local
79 manager.registerCallback(Runnable::run, callback); in testRequestAllSupportedStates()
81 final int[] supportedStates = manager.getSupportedStates(); in testRequestAllSupportedStates()
100 final DeviceStateManager manager = getDeviceStateManager(); in testRequestStateTooLarge() local
103 runWithControlDeviceStatePermission(() -> manager.requestState(request, null, null)); in testRequestStateTooLarge()
113 final DeviceStateManager manager = getDeviceStateManager(); in testRequestStateTooSmall() local
116 runWithControlDeviceStatePermission(() -> manager.requestState(request, null, null)); in testRequestStateTooSmall()
126 final DeviceStateManager manager = getDeviceStateManager(); in testRequestStateSucceedsAsTopApp() local
127 final int[] supportedStates = manager.getSupportedStates(); in testRequestStateSucceedsAsTopApp()
134 manager.registerCallback(Runnable::run, callback); in testRequestStateSucceedsAsTopApp()
[all …]
DDeviceStateRequestSession.java38 public DeviceStateRequestSession(@NonNull DeviceStateManager manager, in DeviceStateRequestSession() argument
40 mDeviceStateManager = manager; in DeviceStateRequestSession()
/cts/hostsidetests/media/app/MediaMetricsTest/src/android/media/metrics/cts/
DMediaMetricsAtomHostSideTests.java89 MediaMetricsManager manager = context.getSystemService(MediaMetricsManager.class); in testPlaybackStateEvent_default() local
90 PlaybackSession s = manager.createPlaybackSession(); in testPlaybackStateEvent_default()
102 MediaMetricsManager manager = context.getSystemService(MediaMetricsManager.class); in testPlaybackStateEvent() local
103 PlaybackSession s = manager.createPlaybackSession(); in testPlaybackStateEvent()
118 MediaMetricsManager manager = context.getSystemService(MediaMetricsManager.class); in testPlaybackErrorEvent_default() local
119 PlaybackSession s = manager.createPlaybackSession(); in testPlaybackErrorEvent_default()
132 MediaMetricsManager manager = context.getSystemService(MediaMetricsManager.class); in testPlaybackErrorEvent() local
133 PlaybackSession s = manager.createPlaybackSession(); in testPlaybackErrorEvent()
150 MediaMetricsManager manager = context.getSystemService(MediaMetricsManager.class); in testTrackChangeEvent_default() local
151 PlaybackSession s = manager.createPlaybackSession(); in testTrackChangeEvent_default()
[all …]
/cts/tests/tests/os/src/android/os/cts/
DPowerManagerTest.java106 PowerManager manager = BatteryUtils.getPowerManager(); in testPowerManager_getPowerSaveMode() local
113 manager.getPowerSaveModeTrigger()); in testPowerManager_getPowerSaveMode()
119 manager.getPowerSaveModeTrigger()); in testPowerManager_getPowerSaveMode()
125 PowerManager manager = BatteryUtils.getPowerManager(); in testPowerManager_setDynamicPowerSavings() local
129 manager.setDynamicPowerSaveHint(true, 80); in testPowerManager_setDynamicPowerSavings()
134 manager.setDynamicPowerSaveHint(false, 20); in testPowerManager_setDynamicPowerSavings()
143 final PowerManager manager = BatteryUtils.getPowerManager(); in testPowerManager_batteryDischargePrediction() local
146 assertNull(manager.getBatteryDischargePrediction()); in testPowerManager_batteryDischargePrediction()
162 () -> manager.getBatteryDischargePrediction() == null); in testPowerManager_batteryDischargePrediction()
173 () -> manager.getBatteryDischargePrediction() != null); in testPowerManager_batteryDischargePrediction()
[all …]
/cts/hostsidetests/packagemanager/domainverification/device/multiuser/src/com/android/cts/packagemanager/verify/domain/device/multiuser/
DDomainVerificationWorkProfileCrossProfileIntentTests.kt44 val manager = deviceState.getWorkDevicePolicyManager() in saveAndSetPolicy() constant
45 initialAppLinkPolicy = manager.getAppLinkPolicy(DPC_COMPONENT_NAME) in saveAndSetPolicy()
47 manager.setAppLinkPolicy(DPC_COMPONENT_NAME, false) in saveAndSetPolicy()
57 manager.addCrossProfileIntentFilter( in saveAndSetPolicy()
67 val manager = deviceState.getWorkDevicePolicyManager() in resetPolicy() constant
68 if (initialAppLinkPolicy ?: return != manager.getAppLinkPolicy(DPC_COMPONENT_NAME)) { in resetPolicy()
69 manager.setAppLinkPolicy(DPC_COMPONENT_NAME, initialAppLinkPolicy!!) in resetPolicy()
71 manager.clearCrossProfileIntentFilters(DPC_COMPONENT_NAME) in resetPolicy()
DDomainVerificationWorkProfileAllowParentLinkingTests.kt39 val manager = deviceState.getWorkDevicePolicyManager() in saveAndSetPolicy() constant
40 initialAppLinkPolicy = manager.getAppLinkPolicy(DPC_COMPONENT_NAME) in saveAndSetPolicy()
42 manager.setAppLinkPolicy(DPC_COMPONENT_NAME, true) in saveAndSetPolicy()
48 val manager = deviceState.getWorkDevicePolicyManager() in resetPolicy() constant
49 if (initialAppLinkPolicy ?: return != manager.getAppLinkPolicy(DPC_COMPONENT_NAME)) { in resetPolicy()
50 manager.setAppLinkPolicy(DPC_COMPONENT_NAME, initialAppLinkPolicy!!) in resetPolicy()
/cts/tests/tests/shortcutmanager/src/android/content/pm/cts/shortcutmanager/
DShortcutManagerMiscTest.java35 ShortcutManager manager = getTestContext().getSystemService(ShortcutManager.class); in testMiscApis() local
37 assertEquals(15, manager.getMaxShortcutCountPerActivity()); in testMiscApis()
40 assertFalse(manager.isRateLimitingActive()); in testMiscApis()
43 assertEquals(iconDimension, manager.getIconMaxWidth()); in testMiscApis()
44 assertEquals(iconDimension, manager.getIconMaxHeight()); in testMiscApis()
/cts/tests/contentcaptureservice/src/android/contentcaptureservice/cts/
DDataSharingService.java63 ContentCaptureManager manager = in shareData() local
66 assertThat(manager).isNotNull(); in shareData()
67 assertThat(manager.isContentCaptureEnabled()).isTrue(); in shareData()
69 manager.shareData( in shareData()
105 ContentCaptureManager manager = in attemptConcurrentRequest() local
108 assertThat(manager).isNotNull(); in attemptConcurrentRequest()
109 assertThat(manager.isContentCaptureEnabled()).isTrue(); in attemptConcurrentRequest()
111 manager.shareData( in attemptConcurrentRequest()
DOutOfProcessDataSharingService.java54 ContentCaptureManager manager =
56 return manager != null && manager.isContentCaptureEnabled();
73 ContentCaptureManager manager = in shareData() local
76 assertThat(manager).isNotNull(); in shareData()
77 assertThat(manager.isContentCaptureEnabled()).isTrue(); in shareData()
79 manager.shareData( in shareData()
DDataSharingActivity.java52 ContentCaptureManager manager = in onStart() local
55 assertThat(manager).isNotNull(); in onStart()
56 assertThat(manager.isContentCaptureEnabled()).isTrue(); in onStart()
58 manager.shareData( in onStart()
/cts/tests/tests/wifi/src/android/net/wifi/nl80211/cts/
DWifiNl80211ManagerTest.java113 WifiNl80211Manager manager = mContext.getSystemService(WifiNl80211Manager.class); in testSendMgmtFrame() local
114 manager.sendMgmtFrame("wlan0", new byte[]{}, -1, Runnable::run, in testSendMgmtFrame()
128 WifiNl80211Manager manager = mContext.getSystemService(WifiNl80211Manager.class); in testGetTxPacketCounters() local
129 manager.getTxPacketCounters("wlan0"); in testGetTxPacketCounters()
136 WifiNl80211Manager manager = mContext.getSystemService(WifiNl80211Manager.class); in testSetOnServiceDeadCallback() local
137 manager.setOnServiceDeadCallback(() -> {}); in testSetOnServiceDeadCallback()
150 WifiNl80211Manager manager = mContext.getSystemService(WifiNl80211Manager.class); in testCountryCodeChangeListener() local
155 assertFalse(manager.registerCountryCodeChangedListener(executor, in testCountryCodeChangeListener()
157 manager.unregisterCountryCodeChangedListener(testCountryCodeChangeListener); in testCountryCodeChangeListener()
/cts/tests/camera/utils/src/android/hardware/cts/helpers/
DCameraUtils.java56 CameraManager manager = (CameraManager) context.getSystemService(Context.CAMERA_SERVICE); in isLegacyHAL() local
57 String cameraIdStr = manager.getCameraIdListNoLazy()[cameraId]; in isLegacyHAL()
58 return isLegacyHAL(manager, cameraIdStr); in isLegacyHAL()
69 public static boolean isLegacyHAL(CameraManager manager, String cameraIdStr) throws Exception { in isLegacyHAL() argument
71 manager.getCameraCharacteristics(cameraIdStr); in isLegacyHAL()
165 CameraManager manager = (CameraManager) context.getSystemService(Context.CAMERA_SERVICE); in isExternal() local
180 String [] cameraIdList = manager.getCameraIdList(); in isExternal()
182 manager.getCameraCharacteristics(cameraIdList[cameraId]); in isExternal()
187 characteristics = manager.getCameraCharacteristics(id); in isExternal()
/cts/tests/camera/src/android/hardware/multiprocess/camera/cts/
DCameraEvictionTest.java187 CameraManager manager = mContext.getSystemService(CameraManager.class); in testBasicCamera2ActivityEvictionInternal() local
188 assertNotNull(manager); in testBasicCamera2ActivityEvictionInternal()
189 String[] cameraIds = manager.getCameraIdListNoLazy(); in testBasicCamera2ActivityEvictionInternal()
204 manager.registerAvailabilityCallback(mockAvailCb, cameraHandler); in testBasicCamera2ActivityEvictionInternal()
213 manager.openCamera(chosenCamera, spyStateCb, cameraHandler); in testBasicCamera2ActivityEvictionInternal()
262 manager.openCamera(chosenCamera, spyStateCb, cameraHandler); in testBasicCamera2ActivityEvictionInternal()
268 manager.openCamera(chosenCamera, CACHED_APP_VS_FG_OOM_DELTA, cameraExecutor, in testBasicCamera2ActivityEvictionInternal()
303 CameraManager manager = mContext.getSystemService(CameraManager.class); in testCamera2OomScoreOffsetPermissions() local
304 assertNotNull(manager); in testCamera2OomScoreOffsetPermissions()
305 String[] cameraIds = manager.getCameraIdListNoLazy(); in testCamera2OomScoreOffsetPermissions()
[all …]
DCamera2Activity.java59 CameraManager manager = (CameraManager) getSystemService(Context.CAMERA_SERVICE); in onResume() local
61 if (manager == null) { in onResume()
67 String[] cameraIds = manager.getCameraIdList(); in onResume()
75 manager.registerAvailabilityCallback(new CameraManager.AvailabilityCallback() { in onResume()
111 manager.openCamera(chosen, new CameraDevice.StateCallback() { in onResume()
/cts/tests/accessibility/common/src/android/accessibility/cts/common/
DServiceControlUtils.java47 AccessibilityManager manager = in waitForConditionWithServiceStateChange() local
55 manager.addAccessibilityServicesStateChangeListener(listener, null); in waitForConditionWithServiceStateChange()
59 manager.removeAccessibilityServicesStateChangeListener(listener); in waitForConditionWithServiceStateChange()
/cts/tests/tests/security/src/android/security/cts/CVE_2021_0327/workprofilesetup/
DProvisionedActivity.java27 DevicePolicyManager manager = getSystemService(DevicePolicyManager.class); in onCreate() local
33 manager.addCrossProfileIntentFilter( in onCreate()
38 manager.setProfileEnabled(admin); in onCreate()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/
DUsbMicrophoneTester.java33 UsbManager manager = (UsbManager) context.getSystemService(Context.USB_SERVICE); in getUSBDeviceListString() local
35 HashMap<String, UsbDevice> devicelist = manager.getDeviceList(); in getUSBDeviceListString()
53 UsbManager manager = (UsbManager) context.getSystemService(Context.USB_SERVICE); in getIsMicrophoneConnected() local
55 HashMap<String, UsbDevice> devicelist = manager.getDeviceList(); in getIsMicrophoneConnected()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/sixdof/Utils/TestPhase/
DAccuracyTest.java37 public AccuracyTest(ReferencePath referencePath, TestReport testReport, Manager manager) { in AccuracyTest() argument
38 super(referencePath, testReport, manager, "Accuracy Test"); in AccuracyTest()
/cts/tests/tests/telephony/current/src/android/telephony/ims/cts/
DSipDelegateManagerTest.java125 public final SipDelegateManager manager; field in SipDelegateManagerTest.TransportInterfaces
136 manager = getSipDelegateManager(); in TransportInterfaces()
148 delegate = createSipDelegateConnectionAndVerify(manager, delegateConn, in connect()
290 SipDelegateManager manager = getSipDelegateManager(); in testIncorrectPermissions() local
292 manager.isSupported(); in testIncorrectPermissions()
300 manager, SipDelegateManager::isSupported, ImsException.class, in testIncorrectPermissions()
310 manager, SipDelegateManager::isSupported, ImsException.class, in testIncorrectPermissions()
323 manager.createSipDelegate(d, Runnable::run, c, c); in testIncorrectPermissions()
345 SipDelegateManager manager = getSipDelegateManager(); in testFeatureImsNotSupported() local
351 manager, SipDelegateManager::isSupported, ImsException.class, in testFeatureImsNotSupported()
[all …]
/cts/tests/translation/src/android/translation/cts/
DTranslationManagerTest.java140 final TranslationManager manager = sContext.getSystemService(TranslationManager.class); in testTranslationCapabilityUpdateListener() local
150 manager.addOnDeviceTranslationCapabilityUpdateListener(Executors.newSingleThreadExecutor(), in testTranslationCapabilityUpdateListener()
180 manager.removeOnDeviceTranslationCapabilityUpdateListener(updateListener); in testTranslationCapabilityUpdateListener()
204 final TranslationManager manager = sContext.getSystemService(TranslationManager.class); in testSingleTranslation() local
223 manager.createOnDeviceTranslator(translationContext, r -> r.run(), in testSingleTranslation()
293 final TranslationManager manager = sContext.getSystemService(TranslationManager.class); in testTranslation_partialResponses() local
320 manager.createOnDeviceTranslator(translationContext, r -> r.run(), in testTranslation_partialResponses()
406 final TranslationManager manager = sContext.getSystemService(TranslationManager.class); in testTranslationCancelled() local
426 manager.createOnDeviceTranslator(translationContext, r -> r.run(), in testTranslationCancelled()
481 final TranslationManager manager = sContext.getSystemService(TranslationManager.class); in testGetTranslationCapabilities() local
[all …]
/cts/hostsidetests/packagemanager/domainverification/lib/constants/android/src/com/android/cts/packagemanager/verify/domain/android/
DSharedVerifications.kt59 val manager = context.getSystemService(DomainVerificationManager::class.java)!! in verifyDomains() constant
60 manager.getDomainVerificationUserState(packageName)!!.also { in verifyDomains()
78 manager.getDomainVerificationUserState(packageName)!!.also { in verifyDomains()
95 manager.getDomainVerificationUserState(packageName)!!.also { in verifyDomains()
110 manager.getDomainVerificationUserState(packageName)!!.also { in verifyDomains()
/cts/tests/tests/batterysaving/src/android/os/cts/batterysaving/
DBatterySaverTest.java110 PowerManager manager = BatteryUtils.getPowerManager(); in testSetBatterySaver_powerManager() local
111 assertFalse(manager.isPowerSaveMode()); in testSetBatterySaver_powerManager()
116 manager.setPowerSaveModeEnabled(true); in testSetBatterySaver_powerManager()
117 assertTrue(manager.isPowerSaveMode()); in testSetBatterySaver_powerManager()
119 manager.setPowerSaveModeEnabled(false); in testSetBatterySaver_powerManager()
120 assertFalse(manager.isPowerSaveMode()); in testSetBatterySaver_powerManager()

1234