Home
last modified time | relevance | path

Searched refs:getSystemService (Results 1 – 25 of 1113) sorted by relevance

12345678910>>...45

/cts/tests/tests/permission/src/android/permission/cts/
DServicesInstantAppsCannotAccessTests.java47 assertNull(InstrumentationRegistry.getTargetContext().getSystemService( in cannotGetDevicePolicyManager()
53 assertNull(InstrumentationRegistry.getTargetContext().getSystemService( in cannotGetFingerprintManager()
59 assertNull(InstrumentationRegistry.getTargetContext().getSystemService( in cannotGetShortcutManager()
65 assertNull(InstrumentationRegistry.getTargetContext().getSystemService( in cannotGetUsbManager()
71 assertNull(InstrumentationRegistry.getTargetContext().getSystemService( in cannotGetWallpaperManager()
77 assertNull(InstrumentationRegistry.getTargetContext().getSystemService( in cannotGetWifiP2pManager()
83 assertNull(InstrumentationRegistry.getTargetContext().getSystemService( in cannotGetWifiManager()
89 assertNull(InstrumentationRegistry.getTargetContext().getSystemService( in cannotGetWifiAwareManager()
DPowerManagerServicePermissionTest.java26 PowerManager manager = getContext().getSystemService(PowerManager.class); in testSetBatterySaver_requiresPermissions()
39 PowerManager manager = getContext().getSystemService(PowerManager.class); in testSetDynamicPowerSavings_requiresPermissions()
49 PowerManager manager = getContext().getSystemService(PowerManager.class); in testSetBatteryDischargePrediction_requiresPermissions()
DNoCaptureVideoPermissionTest.java47 (DisplayManager)mContext.getSystemService(Context.DISPLAY_SERVICE); in testCreatePublicVirtualDisplay()
70 (DisplayManager)mContext.getSystemService(Context.DISPLAY_SERVICE); in testCreateSecureVirtualDisplay()
91 (DisplayManager)mContext.getSystemService(Context.DISPLAY_SERVICE); in testCreatePrivateVirtualDisplay()
DNoSystemFunctionPermissionTest.java49 ActivityManager activityManager = (ActivityManager) mContext.getSystemService( in testRestartPackage()
67 AlarmManager alarmManager = (AlarmManager) mContext.getSystemService( in testSetTimeZone()
124 Vibrator vibrator = (Vibrator)getContext().getSystemService(Context.VIBRATOR_SERVICE); in testVibrator()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/telecom/
DPhoneAccountUtils.java88 TelecomManager telecomManager = (TelecomManager) context.getSystemService( in registerTestPhoneAccount()
99 TelecomManager telecomManager = (TelecomManager) context.getSystemService( in getPhoneAccount()
109 TelecomManager telecomManager = (TelecomManager) context.getSystemService( in unRegisterTestPhoneAccount()
119 TelecomManager telecomManager = (TelecomManager) context.getSystemService( in registerTestSelfManagedPhoneAccount()
130 TelecomManager telecomManager = (TelecomManager) context.getSystemService( in unRegisterTestSelfManagedPhoneAccount()
142 TelecomManager telecomManager = (TelecomManager) context.getSystemService( in getSelfManagedPhoneAccount()
153 TelecomManager telecomManager = (TelecomManager) context.getSystemService( in getDefaultOutgoingPhoneAccount()
164 TelecomManager telecomManager = (TelecomManager) context.getSystemService( in getSelfManagedPhoneAccount2()
/cts/tests/tests/os/src/android/os/health/cts/
DSystemHealthManagerTest.java38 final SystemHealthManager healthy = context.getSystemService(SystemHealthManager.class); in testTakeMyUidSnapshot()
49 final SystemHealthManager healthy = context.getSystemService(SystemHealthManager.class); in testTakeUidSnapshotWithMe()
60 final SystemHealthManager healthy = context.getSystemService(SystemHealthManager.class); in testTakeMyUidSnapshotWithSystem()
78 final SystemHealthManager healthy = context.getSystemService(SystemHealthManager.class); in testTakeUidSnapshotsWithEmptyArray()
90 final SystemHealthManager healthy = context.getSystemService(SystemHealthManager.class); in testTakeUidSnapshotsWithMe()
107 final SystemHealthManager healthy = context.getSystemService(SystemHealthManager.class); in testTakeMyUidSnapshotsWithSystem()
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/
DCrossProfileUtils.java66 final DevicePolicyManager dpm = (DevicePolicyManager) getContext().getSystemService( in testAddParentCanAccessManagedFilters()
75 final DevicePolicyManager dpm = (DevicePolicyManager) getContext().getSystemService( in testAddManagedCanAccessParentFilters()
93 final DevicePolicyManager dpm = (DevicePolicyManager) getContext().getSystemService( in testRemoveAllFilters()
100 getContext().getSystemService(Context.DEVICE_POLICY_SERVICE); in testDisallowCrossProfileCopyPaste()
107 getContext().getSystemService(Context.DEVICE_POLICY_SERVICE); in testAllowCrossProfileCopyPaste()
116 getContext().getSystemService(Context.DEVICE_POLICY_SERVICE); in testDisableAllBrowsers()
127 final DevicePolicyManager dpm = (DevicePolicyManager) getContext().getSystemService( in testSetCrossProfilePackages()
DLauncherAppsTest.java78 ShortcutManager shortcutManager = mContext.getSystemService(ShortcutManager.class); in addDynamicShortcuts()
85 ShortcutManager shortcutManager = mContext.getSystemService(ShortcutManager.class); in removeAllDynamicShortcuts()
98 LauncherApps launcherApps = contextAsUser.getSystemService(LauncherApps.class); in shortcutIconDrawable_currentToOtherProfile_withUsersFullPermission_isNotNull()
114 LauncherApps launcherApps = contextAsUser.getSystemService(LauncherApps.class); in shortcutIconDrawable_currentToOtherProfile_withoutUsersFullPermission_isNull()
130 return contextAsUser.getSystemService(LauncherApps.class) in getShortcuts()
/cts/hostsidetests/media/app/MediaMetricsTest/src/android/media/metrics/cts/
DMediaMetricsAtomHostSideTests.java89 MediaMetricsManager manager = context.getSystemService(MediaMetricsManager.class); in testPlaybackStateEvent_default()
102 MediaMetricsManager manager = context.getSystemService(MediaMetricsManager.class); in testPlaybackStateEvent()
118 MediaMetricsManager manager = context.getSystemService(MediaMetricsManager.class); in testPlaybackErrorEvent_default()
132 MediaMetricsManager manager = context.getSystemService(MediaMetricsManager.class); in testPlaybackErrorEvent()
150 MediaMetricsManager manager = context.getSystemService(MediaMetricsManager.class); in testTrackChangeEvent_default()
162 MediaMetricsManager manager = context.getSystemService(MediaMetricsManager.class); in testTrackChangeEvent_text()
184 MediaMetricsManager manager = context.getSystemService(MediaMetricsManager.class); in testTrackChangeEvent_audio()
208 MediaMetricsManager manager = context.getSystemService(MediaMetricsManager.class); in testTrackChangeEvent_video()
234 MediaMetricsManager manager = context.getSystemService(MediaMetricsManager.class); in testNetworkEvent_default()
246 MediaMetricsManager manager = context.getSystemService(MediaMetricsManager.class); in testNetworkEvent()
[all …]
/cts/hostsidetests/accounts/test-apps/AccountManagerCrossUserApp/src/com/android/cts/accountmanager/
DAccountManagerCrossUserTest.java96 profileHandle, 0).getSystemService(Context.ACCOUNT_SERVICE); in testAccountManager_addMockAccount()
114 AccountManager accountManager = mContext.getSystemService(AccountManager.class); in testAccountManager_addMockAccountForCurrentUser()
135 profileHandle, 0).getSystemService(Context.ACCOUNT_SERVICE); in testAccountManager_getAccountsForTestUser()
151 AccountManager accountManager = (AccountManager) mContext.getSystemService( in testAccountManager_addAccountExplicitlyForCurrentUser()
160 AccountManager accountManager = (AccountManager) mContext.getSystemService( in testRemoveAccountExplicitly()
170 AccountManager accountManager = (AccountManager) mContext.getSystemService( in testAccountManager_getAccountsForCurrentUser()
189 profileHandle, 0).getSystemService(Context.ACCOUNT_SERVICE); in testAccountManager_failCreateContextAsUserRevokePermissions()
204 profileHandle, 0).getSystemService(Context.ACCOUNT_SERVICE); in testAccountManager_createContextAsUserForCurrentUserRevokePermissions()
211 AccountManager accountManager = mContext.getSystemService(AccountManager.class); in testAccountManager_getAuthTokenForCurrentUser()
223 AccountManager accountManager = mContext.getSystemService(AccountManager.class); in testAccountManager_startAddAccountSessionForCurrentUser()
/cts/tests/tests/telecom/src/android/telecom/cts/carmodetestapp/
DCtsCarModeInCallServiceControl.java52 UiModeManager uiModeManager = getSystemService(UiModeManager.class);
74 UiModeManager uiModeManager = getSystemService(UiModeManager.class);
80 UiModeManager uiModeManager = getSystemService(UiModeManager.class);
86 UiModeManager uiModeManager = getSystemService(UiModeManager.class);
92 UiModeManager uiModeManager = getSystemService(UiModeManager.class);
/cts/tests/BlobStore/helper-app/src/com/android/cts/blob/helper/
DBlobStoreTestService.java59 final BlobStoreManager blobStoreManager = getSystemService( in commit()
81 final BlobStoreManager blobStoreManager = getSystemService( in openBlob()
92 final BlobStoreManager blobStoreManager = getSystemService( in openSession()
105 final BlobStoreManager blobStoreManager = getSystemService( in acquireLease()
117 final BlobStoreManager blobStoreManager = getSystemService( in releaseLease()
129 final StorageStatsManager storageStatsManager = getSystemService( in queryStatsForPackage()
141 final StorageStatsManager storageStatsManager = getSystemService( in queryStatsForUid()
/cts/tests/tests/activityrecognition/src/android/activityrecognition/cts/
DActivityRecognizerAttributionTags.kt46 val roleManager = context.getSystemService(RoleManager::class.java)!! in makeSelfActivityRecognizer()
61 val roleManager = context.getSystemService(RoleManager::class.java)!! in restoreActivityRecognizers()
69 val appOpsManager = context.getSystemService(AppOpsManager::class.java)!! in setUpTest()
77 val roleManager = context.getSystemService(RoleManager::class.java)!! in addActivityRecognizer()
104 val appOpsManager = context.getSystemService(AppOpsManager::class.java) in accessActivityRecognition()
114 val appOpsManager: AppOpsManager = context.getSystemService(AppOpsManager::class.java)!! in assertNotedOpsSinceLastArAccess()
/cts/apps/NotificationBot/src/com/android/cts/robot/
DNotificationBot.java74 (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); in onReceive()
86 (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); in onReceive()
105 final NotificationManager nm = context.getSystemService(NotificationManager.class); in testShortcutResetSetupNotification()
108 final ShortcutManager sm = context.getSystemService(ShortcutManager.class); in testShortcutResetSetupNotification()
139 context.getSystemService(NotificationManager.class); in testShortcutResetSetupNotification()
161 final NotificationManager nm = context.getSystemService(NotificationManager.class); in testShortcutResetInlineReplyReceived()
168 final ShortcutManager sm = context.getSystemService(ShortcutManager.class); in testShortcutResetInlineReplyReceived()
/cts/tests/tests/telephony2/src/android/telephony2/cts/
DNoLocationPermissionTest.java56 TelephonyManager telephonyManager = mContext.getSystemService(TelephonyManager.class); in testGetCellLocation()
73 TelephonyManager telephonyManager = mContext.getSystemService(TelephonyManager.class); in testGetAllCellInfo()
90 TelephonyManager telephonyManager = mContext.getSystemService(TelephonyManager.class); in testListenCellLocation()
108 TelephonyManager telephonyManager = mContext.getSystemService(TelephonyManager.class); in testRequestCellInfoUpdate()
/cts/tests/tests/batterysaving/src/android/os/cts/deviceidle/
DDeviceIdleTest.java38 assertNotNull(context.getSystemService(Context.DEVICE_IDLE_CONTROLLER)); in testDeviceIdleManager()
45 assertTrue(context.getSystemService(PowerManager.class) in testPowerManagerIgnoringBatteryOptimizations()
47 assertFalse(context.getSystemService(PowerManager.class) in testPowerManagerIgnoringBatteryOptimizations()
/cts/tests/tests/telecom/src/android/telecom/cts/
DBackgroundCallAudioTest.java53 mRoleManager = (RoleManager) mContext.getSystemService(Context.ROLE_SERVICE); in setUp()
60 AudioManager audioManager = mContext.getSystemService(AudioManager.class); in setUp()
95 AudioManager audioManager = mContext.getSystemService(AudioManager.class); in testAudioProcessingFromCallScreeningAllow()
121 AudioManager audioManager = mContext.getSystemService(AudioManager.class); in testHoldAfterAudioProcessingFromCallScreening()
152 AudioManager audioManager = mContext.getSystemService(AudioManager.class); in testAudioProcessingFromCallScreeningDisallow()
180 AudioManager audioManager = mContext.getSystemService(AudioManager.class); in testAudioProcessingFromCallScreeningMissed()
206 AudioManager audioManager = mContext.getSystemService(AudioManager.class); in testAudioProcessingFromCallScreeningRemoteHangupDuringRing()
245 AudioManager audioManager = mContext.getSystemService(AudioManager.class); in testAudioProcessingFromCallScreeningAllowPlaceEmergencyCall()
289 AudioManager audioManager = mContext.getSystemService(AudioManager.class); in testAudioProcessingFromIncomingActivePlaceEmergencyCall()
324 AudioManager audioManager = mContext.getSystemService(AudioManager.class); in testAudioProcessActiveCall()
[all …]
/cts/tests/tests/shortcutmanager/throttling/src/android/content/pm/cts/shortcutmanager/throttling/
DThrottledTests.java37 final ShortcutManager manager = context.getSystemService(ShortcutManager.class); in assertThrottled()
59 final ShortcutManager manager = context.getSystemService(ShortcutManager.class); in ensureThrottled()
65 final ShortcutManager manager = context.getSystemService(ShortcutManager.class); in assertCallNotThrottled()
/cts/tests/tests/telephony/current/src/android/telephony/cts/
DTelephonyRegistryManagerTest.java43 .getSystemService(Context.TELEPHONY_REGISTRY_SERVICE); in setUp()
70 TelephonyManager tm = context.getSystemService(TelephonyManager.class); in testNotifyCallStateChangedForAllSubscriptions()
97 TelephonyManager tm = context.getSystemService(TelephonyManager.class); in testNotifyCallStateChanged()
128 TelephonyManager tm = context.getSystemService(TelephonyManager.class); in testNotifyServiceStateChanged()
158 TelephonyManager tm = context.getSystemService(TelephonyManager.class); in testNotifySignalStrengthChanged()
187 TelephonyManager tm = context.getSystemService(TelephonyManager.class); in testNotifyMessageWaitingChanged()
215 TelephonyManager tm = context.getSystemService(TelephonyManager.class); in testNotifyCallForwardingChanged()
241 TelephonyManager tm = context.getSystemService(TelephonyManager.class); in testNotifyDataActivityChanged()
/cts/tests/tests/wifi/src/android/net/wifi/nl80211/cts/
DWifiNl80211ManagerTest.java113 WifiNl80211Manager manager = mContext.getSystemService(WifiNl80211Manager.class); in testSendMgmtFrame()
128 WifiNl80211Manager manager = mContext.getSystemService(WifiNl80211Manager.class); in testGetTxPacketCounters()
136 WifiNl80211Manager manager = mContext.getSystemService(WifiNl80211Manager.class); in testSetOnServiceDeadCallback()
147 WifiManager wifiManager = mContext.getSystemService(WifiManager.class); in testCountryCodeChangeListener()
150 WifiNl80211Manager manager = mContext.getSystemService(WifiNl80211Manager.class); in testCountryCodeChangeListener()
/cts/tests/tests/telephony/current/src/android/telephony/ims/cts/
DImsMmTelManagerTest.java147 ImsManager imsManager = getContext().getSystemService(ImsManager.class); in testGetVoWiFiSetting_noPermission()
176 ImsManager imsManager = getContext().getSystemService(ImsManager.class); in testAdvancedCallingSetting()
208 ImsManager imsManager = getContext().getSystemService(ImsManager.class); in testVtSetting()
243 ImsManager imsManager = getContext().getSystemService(ImsManager.class); in testVoWiFiSetting()
280 ImsManager imsManager = getContext().getSystemService(ImsManager.class); in testCrossSIMSetting()
319 ImsManager imsManager = getContext().getSystemService(ImsManager.class); in testVoWiFiRoamingSetting()
343 ImsManager imsManager = getContext().getSystemService(ImsManager.class); in testGetVoWiFiModeSetting_noPermission()
359 ImsManager imsManager = getContext().getSystemService(ImsManager.class); in testGetVoWiFiRoamingModeSetting_noPermission()
384 ImsManager imsManager = getContext().getSystemService(ImsManager.class); in testVoWiFiModeSetting()
420 ImsManager imsManager = getContext().getSystemService(ImsManager.class); in testVoWiFiRoamingModeSetting()
[all …]
/cts/tests/tests/os/src/android/os/cts/
DStrictModeTest.java653 () -> applicationContext.getSystemService(WindowManager.class)); in testIncorrectContextUse_Application_ThrowViolation()
670 applicationContext.getSystemService(WallpaperManager.class) in testIncorrectContextUse_Application_ThrowViolation()
684 final Display display = getContext().getSystemService(DisplayManager.class) in testIncorrectContextUse_DisplayContext_ThrowViolation()
689 () -> displayContext.getSystemService(WindowManager.class)); in testIncorrectContextUse_DisplayContext_ThrowViolation()
706 displayContext.getSystemService(WallpaperManager.class) in testIncorrectContextUse_DisplayContext_ThrowViolation()
722 assertNoViolation(() -> windowContext.getSystemService(WINDOW_SERVICE)); in testIncorrectContextUse_WindowContext_NoViolation()
735 assertNoViolation(() -> windowContext.getSystemService(WallpaperManager.class) in testIncorrectContextUse_WindowContext_NoViolation()
753 assertNoViolation(() -> activity.getSystemService(WINDOW_SERVICE)); in testIncorrectContextUse_Activity_NoViolation()
766 assertNoViolation(() -> activity.getSystemService(WallpaperManager.class) in testIncorrectContextUse_Activity_NoViolation()
785 assertNoViolation(() -> uiDerivedConfigContext.getSystemService(WINDOW_SERVICE)); in testIncorrectContextUse_UiDerivedContext_NoViolation()
[all …]
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
DHeadlessSystemUserTest.java51 mCurrentUserDpm = mContext.getSystemService(DevicePolicyManager.class); in setUp()
52 mUserManager = mContext.getSystemService(UserManager.class); in setUp()
78 .getSystemService(DevicePolicyManager.class); in testProfileOwnerIsSetOnNewUser()
/cts/hostsidetests/statsdatom/apps/statsdapp/src/com/android/server/cts/device/statsdatom/
DCheckers.java36 Vibrator v = InstrumentationRegistry.getContext().getSystemService(Vibrator.class); in checkVibratorSupported()
42 WifiManager wm = InstrumentationRegistry.getContext().getSystemService(WifiManager.class); in checkWifiEnhancedPowerReportingSupported()
/cts/tests/tests/batterysaving/src/android/os/cts/powerexemption/
DPowerExemptionTest.java39 assertNotNull(context.getSystemService(PowerExemptionManager.class)); in testPowerExemptionManager_WithClass()
45 assertNotNull(context.getSystemService(Context.POWER_EXEMPTION_SERVICE)); in testPowerExemptionManager_WithContextString()

12345678910>>...45