Home
last modified time | relevance | path

Searched refs:mActivityManager (Results 1 – 25 of 81) sorted by relevance

1234

/packages/apps/Car/Cluster/DirectRenderingCluster/src/android/car/cluster/
DActivityMonitor.java60 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/
DBackgroundProcessLimitPreferenceControllerTest.java43 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()
DKeepActivitiesPreferenceControllerTest.java52 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()
DGrammaticalGenderPreferenceControllerTest.java52 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/
DWorkSourceHelperTest.java58 @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/
DRestrictedProfileTest.java53 @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/
DAppImportanceFilterTest.java73 @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/
DActivityManagerCompat.java22 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/
DMemoryQuery.java53 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/
DSuggestionFeatureProviderImplTest.java51 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/
DForegroundUtilsTest.java49 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/
DWifiLockManagerTest.java100 @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/
DHealthConnectThreadSchedulerTest.java52 @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/
DSpecialAppAccessTest.java49 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/
DBubbleSummaryNotificationPreferenceControllerTest.java57 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/
DGrammaticalGenderPreferenceController.java47 private IActivityManager mActivityManager; field in GrammaticalGenderPreferenceController
62 mActivityManager = activityManager; in GrammaticalGenderPreferenceController()
77 Configuration config = mActivityManager.getConfiguration(); in onPreferenceChange()
83 mActivityManager.updatePersistentConfiguration(config); in onPreferenceChange()
DKeepActivitiesPreferenceController.java42 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/
DEnabledVrListenersController.java27 private final ActivityManager mActivityManager; field in EnabledVrListenersController
31 mActivityManager = mContext.getSystemService(ActivityManager.class); in EnabledVrListenersController()
37 && !mActivityManager.isLowRamDevice() ? AVAILABLE : UNSUPPORTED_ON_DEVICE; in getAvailabilityStatus()
DVrListenerScreenPreferenceController.java27 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/
DOneTimePermissionTest.java90 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/
DCarSystemBarElementStatusBarDisableControllerTest.java55 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/
DVrListenerScreenPreferenceControllerTest.java44 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()
DEnabledVrListenersControllerTest.java43 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/
DForegroundUtils.java31 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/
DWorkSourceHelper.java51 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()

1234