/packages/apps/Car/Cluster/DirectRenderingCluster/src/android/car/cluster/ |
D | ActivityMonitor.java | 60 private IActivityManager mActivityManager; field in ActivityMonitor 123 mActivityManager = ActivityManager.getService(); in start() 127 mActivityManager.registerProcessObserver(mProcessObserver); in start() 128 mActivityManager.registerTaskStackListener(mTaskStackListener); in start() 143 if (mActivityManager == null) { in stop() 150 mActivityManager.unregisterProcessObserver(mProcessObserver); in stop() 151 mActivityManager.unregisterTaskStackListener(mTaskStackListener); in stop() 155 mActivityManager = null; in stop() 168 if (mActivityManager == null) { in notifyTopActivities() 171 List<RootTaskInfo> infos = mActivityManager.getAllRootTaskInfos(); in notifyTopActivities()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/development/ |
D | BackgroundProcessLimitPreferenceControllerTest.java | 43 private IActivityManager mActivityManager; field in BackgroundProcessLimitPreferenceControllerTest 71 doReturn(mActivityManager).when(mController).getActivityManagerService(); in setup() 81 verify(mActivityManager).setProcessLimit(Integer.valueOf(mListValues[1])); in onPreferenceChange_noBackgroundProcessSet_shouldSetToNoBackgroundProcess() 89 verify(mActivityManager).setProcessLimit(Integer.valueOf(mListValues[2])); in onPreferenceChange_1ProcessSet_shouldSetTo1BackgroundProcess() 95 when(mActivityManager.getProcessLimit()).thenReturn(Integer.valueOf(mListValues[1])); in updateState_noBackgroundProcessSet_shouldSetPreferenceToNoBackgroundProcess() 106 when(mActivityManager.getProcessLimit()).thenReturn(Integer.valueOf(mListValues[2])); in updateState_1ProcessSet_shouldSetPreference1BackgroundProcess() 116 when(mActivityManager.getProcessLimit()).thenReturn(Integer.MAX_VALUE); in updateState_veryHighLimit_shouldDefaultToStandardLimit() 130 verify(mActivityManager).setProcessLimit(-1); in onDeveloperOptionsSwitchDisabled_shouldDisableAndResetPreference()
|
D | KeepActivitiesPreferenceControllerTest.java | 52 private IActivityManager mActivityManager; field in KeepActivitiesPreferenceControllerTest 62 doReturn(mActivityManager).when(mController).getActivityManager(); in setup() 73 verify(mActivityManager).setAlwaysFinish(true); in onPreferenceChanged_settingEnabled_turnOnDestroyActivities() 81 verify(mActivityManager).setAlwaysFinish(false); in onPreferenceChanged_settingDisabled_turnOffDestroyActivities() 106 verify(mActivityManager).setAlwaysFinish(false); in onDeveloperOptionsDisabled_shouldDisablePreference()
|
D | GrammaticalGenderPreferenceControllerTest.java | 52 private IActivityManager mActivityManager; field in GrammaticalGenderPreferenceControllerTest 69 mController = new GrammaticalGenderPreferenceController(mContext, mActivityManager); in setUp() 73 doReturn(mConfiguration).when(mActivityManager).getConfiguration(); in setUp() 81 verify(mActivityManager).updatePersistentConfiguration(mConfiguration); in onPreferenceChange_setNeuter_shouldEnableNeuter() 101 verify(mActivityManager).updatePersistentConfiguration(mConfiguration); in onPreferenceChange_setFeminine_shouldEnableFeminine() 121 verify(mActivityManager).updatePersistentConfiguration(mConfiguration); in onPreferenceChange_setMasculine_shouldEnableMasculine()
|
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/util/ |
D | WorkSourceHelperTest.java | 58 @Mock private ActivityManager mActivityManager; field in WorkSourceHelperTest 64 when(mActivityManager.getPackageImportance(null)).thenReturn(IMPORTANCE_CACHED); in setUp() 74 ws, mWifiPermissionsUtil, mActivityManager, mPackageManager, mResources); in testGetRequestorWsPriority() 80 when(mActivityManager.getPackageImportance(TEST_PACKAGE_1)).thenReturn(IMPORTANCE_CACHED); in testGetRequestorWsPriority() 81 when(mActivityManager.getPackageImportance(TEST_PACKAGE_2)).thenReturn(IMPORTANCE_CACHED); in testGetRequestorWsPriority() 85 when(mActivityManager.getPackageImportance(TEST_PACKAGE_1)) in testGetRequestorWsPriority() 90 when(mActivityManager.getPackageImportance(TEST_PACKAGE_1)) in testGetRequestorWsPriority() 95 when(mActivityManager.getPackageImportance(TEST_PACKAGE_1)) in testGetRequestorWsPriority()
|
/packages/apps/TvSettings/Settings/tests/robotests/src/com/android/tv/settings/users/ |
D | RestrictedProfileTest.java | 53 @Mock private ActivityManager mActivityManager; field in RestrictedProfileTest 59 when(mContext.getSystemService(Context.ACTIVITY_SERVICE)).thenReturn(mActivityManager); in setUp() 86 verify(mActivityManager, times(1)).switchUser(eq(mProfileInfo.id)); in testEnterUser_isOwner_profileExists() 93 verify(mActivityManager, never()).switchUser(anyInt()); in testEnterUser_isOwner_profileDoesNotExist() 100 verify(mActivityManager, never()).switchUser(anyInt()); in testEnterUser_isProfile() 107 verify(mActivityManager, never()).switchUser(anyInt()); in testExitUser_isOwner() 114 verify(mActivityManager, times(1)).switchUser(eq(mOwnerInfo.id)); in testExitUser_isProfile() 122 verify(mActivityManager, times(1)).switchUser(eq(mSystemInfo.id)); in testExitUser_isProfile_legacyParent()
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/common/ |
D | AppImportanceFilterTest.java | 73 @Mock private ActivityManager mActivityManager; field in AppImportanceFilterTest 83 mActivityManager, in setUp() 98 verifyZeroInteractions(mActivityManager, mAdServiceLogger, mPackageManager); in testCalledWithForegroundAppPackageName_onSMinus_succeedBySkippingCheck() 104 when(mActivityManager.getPackageImportance(APP_PACKAGE_NAME)) in testCalledWithForegroundAppPackageName_succeed() 116 when(mActivityManager.getPackageImportance(APP_PACKAGE_NAME)) in testCalledWithForegroundServiceImportanceAppPackageName_succeed() 129 when(mActivityManager.getPackageImportance(APP_PACKAGE_NAME)) in testCalledWithLessThanForegroundImportanceAppPackageName_throwsIllegalStateException() 144 when(mActivityManager.getPackageImportance(APP_PACKAGE_NAME)) in testCalledWithLessThanForegroundImportanceAppPackageName_logsFailure() 170 when(mActivityManager.getPackageImportance(APP_PACKAGE_NAME)) in testFailureTryingToRetrievePackageImportancePackageName_throwsIllegalStateException() 189 verifyZeroInteractions(mActivityManager, mAdServiceLogger, mPackageManager); in testCalledWithForegroundAppUid_onSMinus_succeedBySkippingCheck() 318 when(mActivityManager.getUidImportance(uid)).thenReturn(result); in mockGetUidImportance() [all …]
|
/packages/apps/TvSettings/unbundle/java/com/android/tv/settings/unbundle/sdklib/ |
D | ActivityManagerCompat.java | 22 private final ActivityManager mActivityManager; field in ActivityManagerCompat 29 mActivityManager = (ActivityManager) context.getSystemService( in ActivityManagerCompat() 38 return mActivityManager.switchUser(userid); in switchUser() 46 return mActivityManager.clearApplicationUserData(packageName, in clearApplicationUserData()
|
/packages/apps/Camera2/src/com/android/camera/app/ |
D | MemoryQuery.java | 53 private ActivityManager mActivityManager; field in MemoryQuery 56 mActivityManager = activityManager; in MemoryQuery() 67 int memoryClass = mActivityManager.getMemoryClass(); in queryMemory() 68 int largeMemoryClass = mActivityManager.getLargeMemoryClass(); in queryMemory() 70 mActivityManager.getMemoryInfo(memoryInfo); in queryMemory() 95 Debug.MemoryInfo[] memoryInfoArray = mActivityManager.getProcessMemoryInfo(pids); in queryMemory()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/dashboard/suggestions/ |
D | SuggestionFeatureProviderImplTest.java | 51 private ActivityManager mActivityManager; field in SuggestionFeatureProviderImplTest 73 when(mContext.getSystemService(Context.ACTIVITY_SERVICE)).thenReturn(mActivityManager); in setUp() 74 when(mActivityManager.isLowRamDevice()).thenReturn(false); in setUp() 87 when(mActivityManager.isLowRamDevice()).thenReturn(true); in isSuggestionEnabled_isLowMemoryDevice_shouldReturnFalse() 94 when(mActivityManager.isLowRamDevice()).thenReturn(false); in isSuggestionEnabled_isNotLowMemoryDevice_shouldReturnTrue()
|
/packages/apps/Nfc/tests/unit/src/com/android/nfc/ |
D | ForegroundUtilsTest.java | 49 private ActivityManager mActivityManager; field in ForegroundUtilsTest 65 mActivityManager = mock(ActivityManager.class); in setUp() 68 () -> mForegroundUtils = new ForegroundUtils(mActivityManager)); in setUp() 84 when(mActivityManager.getUidImportance(0)).thenReturn(ActivityManager. in testRegisterUidToBackgroundCallback() 94 when(mActivityManager.getUidImportance(0)).thenReturn(100); in testIsInForeground() 95 when(mActivityManager.getUidImportance(10)).thenReturn(1); in testIsInForeground()
|
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/ |
D | WifiLockManagerTest.java | 100 @Mock ActivityManager mActivityManager; field in WifiLockManagerTest 131 when(mContext.getSystemService(Context.ACTIVITY_SERVICE)).thenReturn(mActivityManager); in setUp() 132 when(mContext.getSystemService(ActivityManager.class)).thenReturn(mActivityManager); in setUp() 183 verify(mActivityManager, times(2)).addOnUidImportanceListener( in captureUidImportanceListener() 250 when(mActivityManager.getUidImportance(anyInt())).thenReturn( in acquireWifiLockWithValidParamsShouldSucceed() 273 when(mActivityManager.getUidImportance(anyInt())).thenReturn( in secondCallToAcquireWifiLockWithSameBinderShouldFail() 296 when(mActivityManager.getUidImportance(anyInt())).thenReturn( in releaseWifiLockShouldSucceed() 324 when(mActivityManager.getUidImportance(anyInt())).thenReturn( in releaseLocksForOneCallerNotImpactOtherCallers() 368 when(mActivityManager.getUidImportance(anyInt())).thenReturn( in checkForProperValueForGetStrongestLockMode() 404 when(mActivityManager.getUidImportance(anyInt())).thenReturn( in createMergedWorkSourceShouldSucceed() [all …]
|
/packages/modules/HealthFitness/tests/unittests/src/com/android/server/healthconnect/ |
D | HealthConnectThreadSchedulerTest.java | 52 @Mock private ActivityManager mActivityManager; field in HealthConnectThreadSchedulerTest 98 when(mMockContext.getSystemService(ActivityManager.class)).thenReturn(mActivityManager); in testHealthConnectSchedulerScheduleInternal() 104 when(mActivityManager.getRunningAppProcesses()).thenReturn(List.of(runningAppProcessInfo)); in testHealthConnectSchedulerScheduleInternal() 118 when(mMockContext.getSystemService(ActivityManager.class)).thenReturn(mActivityManager); in testHealthConnectScheduler_runningAppProcessNull() 119 when(mActivityManager.getRunningAppProcesses()).thenReturn(null); in testHealthConnectScheduler_runningAppProcessNull()
|
/packages/apps/TvSettings/Settings/tests/robotests/src/com/android/tv/settings/device/apps/specialaccess/ |
D | SpecialAppAccessTest.java | 49 private ShadowActivityManager mActivityManager; field in SpecialAppAccessTest 56 mActivityManager = extract(RuntimeEnvironment.application in setUp() 70 mActivityManager.setIsLowRamDevice(true); in testFeaturesDisabledOnLowRam() 81 mActivityManager.setIsLowRamDevice(false); in testFeaturesNotDisabledNonLowRam()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/ |
D | BubbleSummaryNotificationPreferenceControllerTest.java | 57 private ShadowActivityManager mActivityManager; field in BubbleSummaryNotificationPreferenceControllerTest 66 mActivityManager = in setUp() 87 mActivityManager.setIsLowRamDevice(true); in isAvailable_lowRam_returnsUnsupported() 93 mActivityManager.setIsLowRamDevice(false); in isAvailable_notLowRam_returnsAvailable()
|
/packages/apps/Settings/src/com/android/settings/development/ |
D | GrammaticalGenderPreferenceController.java | 47 private IActivityManager mActivityManager; field in GrammaticalGenderPreferenceController 62 mActivityManager = activityManager; in GrammaticalGenderPreferenceController() 77 Configuration config = mActivityManager.getConfiguration(); in onPreferenceChange() 83 mActivityManager.updatePersistentConfiguration(config); in onPreferenceChange()
|
D | KeepActivitiesPreferenceController.java | 42 private IActivityManager mActivityManager; field in KeepActivitiesPreferenceController 57 mActivityManager = getActivityManager(); in displayPreference() 83 mActivityManager.setAlwaysFinish(isEnabled); in writeImmediatelyDestroyActivitiesOptions()
|
/packages/apps/Settings/src/com/android/settings/applications/specialaccess/vrlistener/ |
D | EnabledVrListenersController.java | 27 private final ActivityManager mActivityManager; field in EnabledVrListenersController 31 mActivityManager = mContext.getSystemService(ActivityManager.class); in EnabledVrListenersController() 37 && !mActivityManager.isLowRamDevice() ? AVAILABLE : UNSUPPORTED_ON_DEVICE; in getAvailabilityStatus()
|
D | VrListenerScreenPreferenceController.java | 27 private final ActivityManager mActivityManager; field in VrListenerScreenPreferenceController 31 mActivityManager = mContext.getSystemService(ActivityManager.class); in VrListenerScreenPreferenceController() 37 && !mActivityManager.isLowRamDevice() in getAvailabilityStatus()
|
/packages/modules/Permission/tests/cts/permission/src/android/permission/cts/ |
D | OneTimePermissionTest.java | 90 private final ActivityManager mActivityManager = field in OneTimePermissionTest 199 mActivityManager.killBackgroundProcesses(APP_PKG_NAME)); in testPermissionRevokedOnKill() 225 if (mActivityManager.getPackageImportance(APP_PKG_NAME) <= IMPORTANCE_CACHED) { in testStickyServiceMaintainsPermissionOnRestart() 231 if (mActivityManager.getPackageImportance(APP_PKG_NAME) in testStickyServiceMaintainsPermissionOnRestart() 313 if (mActivityManager.getPackageImportance(APP_PKG_NAME) in exitApp() 368 mActivityManager.addOnUidImportanceListener(new SingleAppExitListener( in registerAppExitListener() 392 mActivityManager.removeOnUidImportanceListener(this); in onUidImportance()
|
/packages/apps/Car/SystemUI/tests/src/com/android/systemui/car/systembar/element/ |
D | CarSystemBarElementStatusBarDisableControllerTest.java | 55 private ActivityManager mActivityManager; field in CarSystemBarElementStatusBarDisableControllerTest 64 mContext.addMockSystemService(ActivityManager.class, mActivityManager); in setUp() 120 when(mActivityManager.getLockTaskModeState()).thenReturn( in onStatusBarDisableChanged_doesNotAffectListener_listenerNotNotified() 134 when(mActivityManager.getLockTaskModeState()).thenReturn( in onStatusBarDisableChanged_disablesListener_listenerNotified() 149 when(mActivityManager.getLockTaskModeState()).thenReturn( in onStatusBarDisableChanged_enablesListener_listenerNotified()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/specialaccess/vrlistener/ |
D | VrListenerScreenPreferenceControllerTest.java | 44 private ShadowActivityManager mActivityManager; field in VrListenerScreenPreferenceControllerTest 50 mActivityManager = Shadow.extract(mContext.getSystemService(Context.ACTIVITY_SERVICE)); in setUp() 60 mActivityManager.setIsLowRamDevice(true); in getAvailability_lowMemory_unavailable()
|
D | EnabledVrListenersControllerTest.java | 43 private ShadowActivityManager mActivityManager; field in EnabledVrListenersControllerTest 49 mActivityManager = Shadow.extract(mContext.getSystemService(Context.ACTIVITY_SERVICE)); in setUp() 59 mActivityManager.setIsLowRamDevice(true); in getAvailability_lowMemory_unavailable()
|
/packages/apps/Nfc/src/com/android/nfc/ |
D | ForegroundUtils.java | 31 private final ActivityManager mActivityManager; field in ForegroundUtils 50 mActivityManager = am; in ForegroundUtils() 52 mActivityManager.addOnUidImportanceListener(this, in ForegroundUtils() 135 return (mActivityManager.getUidImportance(uid) in isInForegroundLocked()
|
/packages/modules/Wifi/service/java/com/android/server/wifi/util/ |
D | WorkSourceHelper.java | 51 private final ActivityManager mActivityManager; field in WorkSourceHelper 124 mActivityManager = activityManager; in WorkSourceHelper() 181 return mActivityManager.getPackageImportance(requestorPackageName) in isForegroundApp() 194 int importance = mActivityManager.getPackageImportance(requestorPackageName); in isForegroundService()
|