Home
last modified time | relevance | path

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

12

/packages/apps/Car/Cluster/src/android/car/cluster/
DActivityMonitor.java60 private IActivityManager mActivityManager; field in ActivityMonitor
119 mActivityManager = ActivityManager.getService(); in start()
123 mActivityManager.registerProcessObserver(mProcessObserver); in start()
124 mActivityManager.registerTaskStackListener(mTaskStackListener); in start()
139 if (mActivityManager == null) { in stop()
146 mActivityManager.unregisterProcessObserver(mProcessObserver); in stop()
147 mActivityManager.unregisterTaskStackListener(mTaskStackListener); in stop()
151 mActivityManager = null; in stop()
164 if (mActivityManager == null) { in notifyTopActivities()
167 List<StackInfo> infos = mActivityManager.getAllStackInfos(); in notifyTopActivities()
/packages/apps/Settings/tests/robotests/src/com/android/settings/development/
DBackgroundProcessLimitPreferenceControllerTest.java45 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()
/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/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/services/Car/tests/carservice_unit_test/src/android/car/userlib/
DCarUserManagerHelperTest.java68 @Mock private ActivityManager mActivityManager; field in CarUserManagerHelperTest
91 doReturn(mActivityManager).when(mContext).getSystemService(Context.ACTIVITY_SERVICE); in setUpMocksAndVariables()
118 doReturn(true).when(mActivityManager).switchUser(userIdToSwitchTo); in testSwitchToId()
121 verify(mActivityManager).switchUser(userIdToSwitchTo); in testSwitchToId()
126 doReturn(true).when(mActivityManager).switchUser(mForegroundUserId); in testSwitchToForegroundIdExitsEarly()
129 verify(mActivityManager, never()).switchUser(mForegroundUserId); in testSwitchToForegroundIdExitsEarly()
135 doReturn(true).when(mActivityManager).switchUser(userIdToSwitchTo); in testCannotSwitchIfSwitchingNotAllowed()
139 verify(mActivityManager, never()).switchUser(userIdToSwitchTo); in testCannotSwitchIfSwitchingNotAllowed()
/packages/apps/TvSettings/Settings/tests/robotests/src/com/android/tv/settings/device/apps/specialaccess/
DSpecialAppAccessTest.java42 private ShadowActivityManager mActivityManager; field in SpecialAppAccessTest
47 mActivityManager = extract(RuntimeEnvironment.application in setUp()
55 mActivityManager.setIsLowRamDevice(true); in testFeaturesDisabledOnLowRam()
66 mActivityManager.setIsLowRamDevice(false); in testFeaturesNotDisabledNonLowRam()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/am/
DFixedActivityServiceTest.java79 private IActivityManager mActivityManager; field in FixedActivityServiceTest
105 mFixedActivityService = new FixedActivityService(mContext, mActivityManager, mUserManager, in setUp()
313 verify(mActivityManager).registerTaskStackListener(any(TaskStackListener.class)); in testStopFixedActivityMode()
317 verify(mActivityManager).unregisterTaskStackListener(any(TaskStackListener.class)); in testStopFixedActivityMode()
323 verify(mActivityManager, never()).unregisterTaskStackListener(any(TaskStackListener.class)); in testStopFixedActivityMode_invalidDisplayId()
360 when(mActivityManager.getAllStackInfos()).thenReturn(createEmptyStackInfo()); in expectNoActivityStack()
364 OngoingStubbing<List<StackInfo>> stub = when(mActivityManager.getAllStackInfos()); in expectActivityStackInfo()
/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/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/applications/specialaccess/vrlistener/
DEnabledVrListenersController.java27 private final ActivityManager mActivityManager; field in EnabledVrListenersController
31 mActivityManager = mContext.getSystemService(ActivityManager.class); in EnabledVrListenersController()
37 && !mActivityManager.isLowRamDevice() 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/apps/Settings/tests/robotests/src/com/android/settings/applications/specialaccess/vrlistener/
DEnabledVrListenersControllerTest.java40 private ShadowActivityManager mActivityManager; field in EnabledVrListenersControllerTest
46 mActivityManager = Shadow.extract(mContext.getSystemService(Context.ACTIVITY_SERVICE)); in setUp()
56 mActivityManager.setIsLowRamDevice(true); in getAvailability_lowMemory_unavailable()
DVrListenerScreenPreferenceControllerTest.java40 private ShadowActivityManager mActivityManager; field in VrListenerScreenPreferenceControllerTest
46 mActivityManager = Shadow.extract(mContext.getSystemService(Context.ACTIVITY_SERVICE)); in setUp()
56 mActivityManager.setIsLowRamDevice(true); in getAvailability_lowMemory_unavailable()
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/appinfo/
DExternalSourcesDetailsTest.java64 private ActivityManager mActivityManager; field in ExternalSourcesDetailsTest
82 ReflectionHelpers.setField(mFragment, "mActivityManager", mActivityManager); in setUp()
96 verify(mActivityManager).killUid(eq(mockUid), anyString()); in setCanInstallApps_false_shouldKillNonCoreUid()
108 verify(mActivityManager, never()).killUid(eq(mockUid), anyString()); in setCanInstallApps_false_shouldNotKillCoreUid()
119 verify(mActivityManager, never()).killUid(eq(mockUid), anyString()); in setCanInstallApps_true_shouldNotKillUid()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/development/
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/development/
DKeepActivitiesPreferenceController.java42 private IActivityManager mActivityManager; field in KeepActivitiesPreferenceController
57 mActivityManager = getActivityManager(); in displayPreference()
83 mActivityManager.setAlwaysFinish(isEnabled); in writeImmediatelyDestroyActivitiesOptions()
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/specialaccess/zenaccess/
DZenAccessControllerTest.java49 private ShadowActivityManager mActivityManager; field in ZenAccessControllerTest
57 mActivityManager = Shadow.extract(mContext.getSystemService(Context.ACTIVITY_SERVICE)); in setUp()
67 mActivityManager.setIsLowRamDevice(true); in isAvailable_lowMemory_false()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/users/
DRestrictedProfileModel.java40 private final ActivityManager mActivityManager; field in RestrictedProfileModel
54 mActivityManager = (ActivityManager) mContext.getSystemService(Context.ACTIVITY_SERVICE); in RestrictedProfileModel()
134 mActivityManager.switchUser(userId); in switchUserNow()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/applications/specialaccess/zenaccess/
DZenAccessController.java43 private final ActivityManager mActivityManager; field in ZenAccessController
47 mActivityManager = (ActivityManager) mContext.getSystemService(Context.ACTIVITY_SERVICE); in ZenAccessController()
52 return isSupported(mActivityManager) in getAvailabilityStatus()
/packages/apps/Settings/src/com/android/settings/applications/specialaccess/zenaccess/
DZenAccessController.java43 private final ActivityManager mActivityManager; field in ZenAccessController
47 mActivityManager = (ActivityManager) mContext.getSystemService(Context.ACTIVITY_SERVICE); in ZenAccessController()
52 return isSupported(mActivityManager) ? AVAILABLE : UNSUPPORTED_ON_DEVICE; in getAvailabilityStatus()
/packages/apps/Settings/src/com/android/settings/applications/appinfo/
DExternalSourcesDetails.java49 private ActivityManager mActivityManager; field in ExternalSourcesDetails
61 mActivityManager = context.getSystemService(ActivityManager.class); in onCreate()
120 mActivityManager.killUid(uid, "User denied OP_REQUEST_INSTALL_PACKAGES"); in killApp()
/packages/apps/Settings/src/com/android/settings/accounts/
DAvatarViewMixin.java68 private final ActivityManager mActivityManager; field in AvatarViewMixin
75 mActivityManager = mContext.getSystemService(ActivityManager.class); in AvatarViewMixin()
124 if (mActivityManager.isLowRamDevice()) { in onStart()
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/accounts/
DAvatarViewMixin.java68 private final ActivityManager mActivityManager; field in AvatarViewMixin
74 mActivityManager = mContext.getSystemService(ActivityManager.class); in AvatarViewMixin()
123 if (mActivityManager.isLowRamDevice()) { in onStart()

12