Home
last modified time | relevance | path

Searched refs:mActivityManager (Results 1 – 25 of 33) 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/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/apps/Settings/src/com/android/settings/applications/specialaccess/vrlistener/
DVrListenerScreenPreferenceController.java27 private final ActivityManager mActivityManager; field in VrListenerScreenPreferenceController
31 mActivityManager = mContext.getSystemService(ActivityManager.class); in VrListenerScreenPreferenceController()
37 && !mActivityManager.isLowRamDevice() in getAvailabilityStatus()
DEnabledVrListenersController.java27 private final ActivityManager mActivityManager; field in EnabledVrListenersController
31 mActivityManager = mContext.getSystemService(ActivityManager.class); in EnabledVrListenersController()
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/services/Car/tests/carservice_unit_test/src/android/car/userlib/
DCarUserManagerHelperTest.java76 private ActivityManager mActivityManager; field in CarUserManagerHelperTest
96 doReturn(mActivityManager).when(mContext).getSystemService(Context.ACTIVITY_SERVICE); in setUpMocksAndVariables()
523 verify(mActivityManager).switchUser(newAdminInfo.id); in testRemoveLastAdminUser()
546 verify(mActivityManager, never()).switchUser(anyInt()); in testRemoveLastAdminUserFailsToCreateNewUser()
558 verify(mActivityManager).switchUser(21); in testSwitchToGuest()
564 doReturn(true).when(mActivityManager).switchUser(userIdToSwitchTo); in testSwitchToId()
567 verify(mActivityManager).switchUser(userIdToSwitchTo); in testSwitchToId()
572 doReturn(true).when(mActivityManager).switchUser(mForegroundUserId); in testSwitchToForegroundIdExitsEarly()
575 verify(mActivityManager, never()).switchUser(mForegroundUserId); in testSwitchToForegroundIdExitsEarly()
581 doReturn(true).when(mActivityManager).switchUser(userIdToSwitchTo); in testCannotSwitchIfSwitchingNotAllowed()
[all …]
/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/apps/Settings/tests/robotests/src/com/android/settings/applications/specialaccess/vrlistener/
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()
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()
/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/services/Car/service/src/com/android/car/systeminterface/
DDisplayInterface.java77 private final ActivityManager mActivityManager; field in DisplayInterface.DefaultImpl
119 mActivityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); in DefaultImpl()
139 mActivityManager.getCurrentUser()); in refreshDisplayBrightness()
178 mActivityManager.getCurrentUser()); in setDisplayBrightness()
/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/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) in getAvailabilityStatus()
/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/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/accounts/
DAvatarViewMixin.java68 private final ActivityManager mActivityManager; field in AvatarViewMixin
74 mActivityManager = mContext.getSystemService(ActivityManager.class); in AvatarViewMixin()
123 if (mActivityManager.isLowRamDevice()) { in onStart()
/packages/apps/Settings/src/com/android/settings/accounts/
DAvatarViewMixin.java68 private final ActivityManager mActivityManager; field in AvatarViewMixin
74 mActivityManager = mContext.getSystemService(ActivityManager.class); in AvatarViewMixin()
123 if (mActivityManager.isLowRamDevice()) { in onStart()
/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()

12