/cts/tests/tests/permission/src/android/permission/cts/ |
D | ServicesInstantAppsCannotAccessTests.java | 47 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()
|
D | PowerManagerServicePermissionTest.java | 26 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()
|
D | NoCaptureVideoPermissionTest.java | 47 (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()
|
D | NoSystemFunctionPermissionTest.java | 49 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/ |
D | PhoneAccountUtils.java | 88 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/ |
D | SystemHealthManagerTest.java | 38 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/tests/tests/telecom/src/android/telecom/cts/carmodetestapp/ |
D | CtsCarModeInCallServiceControl.java | 52 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/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/ |
D | CrossProfileUtils.java | 66 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()
|
D | LauncherAppsTest.java | 78 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/accounts/test-apps/AccountManagerCrossUserApp/src/com/android/cts/accountmanager/ |
D | AccountManagerCrossUserTest.java | 96 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/hostsidetests/media/app/MediaMetricsTest/src/android/media/metrics/cts/ |
D | MediaMetricsAtomHostSideTests.java | 89 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/tests/BlobStore/helper-app/src/com/android/cts/blob/helper/ |
D | BlobStoreTestService.java | 59 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/batterysaving/src/android/os/cts/deviceidle/ |
D | DeviceIdleTest.java | 38 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/activityrecognition/src/android/activityrecognition/cts/ |
D | ActivityRecognizerAttributionTags.kt | 46 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/tests/tests/telephony2/src/android/telephony2/cts/ |
D | NoLocationPermissionTest.java | 56 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/apps/NotificationBot/src/com/android/cts/robot/ |
D | NotificationBot.java | 74 (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/shortcutmanager/throttling/src/android/content/pm/cts/shortcutmanager/throttling/ |
D | ThrottledTests.java | 37 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/telecom/src/android/telecom/cts/ |
D | BackgroundCallAudioTest.java | 53 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/wifi/src/android/net/wifi/nl80211/cts/ |
D | WifiNl80211ManagerTest.java | 113 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/hostsidetests/statsdatom/apps/statsdapp/src/com/android/server/cts/device/statsdatom/ |
D | Checkers.java | 36 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/ |
D | PowerExemptionTest.java | 39 assertNotNull(context.getSystemService(PowerExemptionManager.class)); in testPowerExemptionManager_WithClass() 45 assertNotNull(context.getSystemService(Context.POWER_EXEMPTION_SERVICE)); in testPowerExemptionManager_WithContextString()
|
/cts/tests/tests/telephony/current/src/android/telephony/cts/ |
D | TelephonyRegistryManagerTest.java | 43 .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/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/ |
D | HeadlessSystemUserTest.java | 51 mCurrentUserDpm = mContext.getSystemService(DevicePolicyManager.class); in setUp() 52 mUserManager = mContext.getSystemService(UserManager.class); in setUp() 78 .getSystemService(DevicePolicyManager.class); in testProfileOwnerIsSetOnNewUser()
|
/cts/tests/inputmethod/src/android/view/inputmethod/cts/util/ |
D | UnlockScreenRule.java | 37 final PowerManager pm = context.getSystemService(PowerManager.class); in apply() 38 final KeyguardManager km = context.getSystemService(KeyguardManager.class); in apply()
|
/cts/tests/tests/os/src/android/os/cts/ |
D | StrictModeTest.java | 719 () -> applicationContext.getSystemService(WindowManager.class)); in testIncorrectContextUse_Application_ThrowViolation() 736 applicationContext.getSystemService(WallpaperManager.class) in testIncorrectContextUse_Application_ThrowViolation() 750 final Display display = getContext().getSystemService(DisplayManager.class) in testIncorrectContextUse_DisplayContext_ThrowViolation() 755 () -> displayContext.getSystemService(WindowManager.class)); in testIncorrectContextUse_DisplayContext_ThrowViolation() 772 displayContext.getSystemService(WallpaperManager.class) in testIncorrectContextUse_DisplayContext_ThrowViolation() 788 assertNoViolation(() -> windowContext.getSystemService(WINDOW_SERVICE)); in testIncorrectContextUse_WindowContext_NoViolation() 801 assertNoViolation(() -> windowContext.getSystemService(WallpaperManager.class) in testIncorrectContextUse_WindowContext_NoViolation() 819 assertNoViolation(() -> activity.getSystemService(WINDOW_SERVICE)); in testIncorrectContextUse_Activity_NoViolation() 832 assertNoViolation(() -> activity.getSystemService(WallpaperManager.class) in testIncorrectContextUse_Activity_NoViolation() 851 assertNoViolation(() -> uiDerivedConfigContext.getSystemService(WINDOW_SERVICE)); in testIncorrectContextUse_UiDerivedContext_NoViolation() [all …]
|