Home
last modified time | relevance | path

Searched refs:mController (Results 1 – 25 of 255) sorted by relevance

1234567891011

/packages/apps/Settings/tests/robotests/src/com/android/settings/gestures/
DGesturePreferenceControllerTest.java58 private TestPrefController mController; field in GesturePreferenceControllerTest
63 mController = new TestPrefController(mContext, mLifecycle); in setUp()
68 mController.mIsPrefAvailable = true; in display_configIsTrue_shouldDisplay()
71 mController.displayPreference(mScreen); in display_configIsTrue_shouldDisplay()
78 mController.mIsPrefAvailable = false; in display_configIsFalse_shouldNotDisplay()
82 when(preference.getKey()).thenReturn(mController.getPreferenceKey()); in display_configIsFalse_shouldNotDisplay()
84 mController.displayPreference(mScreen); in display_configIsFalse_shouldNotDisplay()
92 when(mScreen.findPreference(mController.getVideoPrefKey())).thenReturn(videoPreference); in onResume_shouldStartVideoPreferenceWithVideoPauseState()
93 mController.mIsPrefAvailable = true; in onResume_shouldStartVideoPreferenceWithVideoPauseState()
95 mController.displayPreference(mScreen); in onResume_shouldStartVideoPreferenceWithVideoPauseState()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/fuelgauge/
DAppButtonsPreferenceControllerTest.java107 private AppButtonsPreferenceController mController; field in AppButtonsPreferenceControllerTest
121 mController = spy(new AppButtonsPreferenceController(mSettingsActivity, mFragment, in setUp()
124 doReturn(false).when(mController).isFallbackPackage(anyString()); in setUp()
132 mController.mUninstallButton = mUninstallButton; in setUp()
133 mController.mForceStopButton = mForceStopButton; in setUp()
134 mController.mPackageInfo = mPackageInfo; in setUp()
152 mController.retrieveAppEntry(); in testRetrieveAppEntry_hasAppEntry_notNull()
154 assertThat(mController.mAppEntry).isNotNull(); in testRetrieveAppEntry_hasAppEntry_notNull()
155 assertThat(mController.mPackageInfo).isNotNull(); in testRetrieveAppEntry_hasAppEntry_notNull()
164 mController.retrieveAppEntry(); in testRetrieveAppEntry_noAppEntry_null()
[all …]
DBackgroundActivityPreferenceControllerTest.java74 private BackgroundActivityPreferenceController mController; field in BackgroundActivityPreferenceControllerTest
99 mController = spy(new BackgroundActivityPreferenceController(mContext, UID_NORMAL)); in setUp()
100 mController.isAvailable(); in setUp()
101 mController.mDpm = mDevicePolicyManagerWrapper; in setUp()
106 mController.onPreferenceChange(mPreference, true); in testOnPreferenceChange_TurnOnCheck_MethodInvoked()
109 mController.getTargetPackage(), AppOpsManager.MODE_ALLOWED); in testOnPreferenceChange_TurnOnCheck_MethodInvoked()
110 verify(mController).updateSummary(mPreference); in testOnPreferenceChange_TurnOnCheck_MethodInvoked()
115 mController.onPreferenceChange(mPreference, false); in testOnPreferenceChange_TurnOffCheck_MethodInvoked()
118 mController.getTargetPackage(), AppOpsManager.MODE_IGNORED); in testOnPreferenceChange_TurnOffCheck_MethodInvoked()
119 verify(mController).updateSummary(mPreference); in testOnPreferenceChange_TurnOffCheck_MethodInvoked()
[all …]
/packages/apps/UnifiedEmail/src/com/android/mail/ui/
DMailActivity.java73 private ActivityController mController; field in MailActivity
137 mController.onTouchEvent(ev); in dispatchTouchEvent()
151 mController.onActivityResult(requestCode, resultCode, data); in onActivityResult()
156 if (!mController.onBackPressed()) { in onBackPressed()
174 mController = ControllerFactory.forActivity(this, mViewMode, tabletUi); in onCreate()
176 setContentView(mController.getContentViewResource()); in onCreate()
182 mCustomViewToolbar.setController(this, mController, mViewMode); in onCreate()
183 mController.addConversationListLayoutListener(mCustomViewToolbar); in onCreate()
187 toolbar.setNavigationOnClickListener(mController.getNavigationViewClickListener()); in onCreate()
197 mController.onCreate(savedState); in onCreate()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/security/
DOwnerInfoPreferenceControllerTest.java70 private OwnerInfoPreferenceController mController; field in OwnerInfoPreferenceControllerTest
84 mController = spy(new OwnerInfoPreferenceController(mContext, mFragment, null)); in setUp()
85 when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference); in setUp()
86 ReflectionHelpers.setField(mController, "mLockPatternUtils", mLockPatternUtils); in setUp()
91 assertThat(mController.isAvailable()).isTrue(); in isAvailable_shouldReturnTrue()
96 mController.onResume(); in onResume_shouldUpdateEnableState()
98 verify(mController).updateEnableState(); in onResume_shouldUpdateEnableState()
103 mController.onResume(); in onResume_shouldUpdateSummary()
105 verify(mController).updateSummary(); in onResume_shouldUpdateSummary()
111 doReturn(true).when(mController).isDeviceOwnerInfoEnabled(); in updateSummary_deviceOwnerInfoEnabled_shouldSetDeviceOwnerInfoSummary()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/widget/
DEntityHeaderControllerTest.java74 private EntityHeaderController mController; field in EntityHeaderControllerTest
92 mController = EntityHeaderController.newInstance(mActivity, mFragment, null); in testBuildView_constructedWithoutView_shouldCreateNewView()
93 View view = mController.done(mActivity); in testBuildView_constructedWithoutView_shouldCreateNewView()
100 mController = EntityHeaderController.newInstance(mActivity, mFragment, null); in testBuildView_withContext_shouldBuildPreference()
101 Preference preference = mController.done(mActivity, mShadowContext); in testBuildView_withContext_shouldBuildPreference()
109 mController = EntityHeaderController.newInstance(mActivity, mFragment, inputView); in testBuildView_constructedWithView_shouldReturnSameView()
110 View view = mController.done(mActivity); in testBuildView_constructedWithView_shouldReturnSameView()
123 mController = EntityHeaderController.newInstance(mActivity, mFragment, header); in bindViews_shouldBindAllData()
124 mController.setLabel(testString); in bindViews_shouldBindAllData()
125 mController.setSummary(testString); in bindViews_shouldBindAllData()
[all …]
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/preprovisioning/
DPreProvisioningControllerTest.java113 private PreProvisioningController mController; field in PreProvisioningControllerTest
147 mController = new PreProvisioningController(mContext, mUi, mTimeLogger, mMessageParser, in setUp()
155 mController.initiateProvisioning(mIntent, null, TEST_MDM_PACKAGE); in testManagedProfile()
159 mController.continueProvisioningAfterUserConsent(); in testManagedProfile()
173 mController.initiateProvisioning(mIntent, null, TEST_MDM_PACKAGE); in testManagedProfile_provisioningNotAllowed()
184 mController.initiateProvisioning(mIntent, null, null); in testManagedProfile_nullCallingPackage()
195 mController.initiateProvisioning(mIntent, null, "com.android.invalid.dpc"); in testManagedProfile_invalidCallingPackage()
207 mController.initiateProvisioning(mIntent, null, TEST_MDM_PACKAGE); in testManagedProfile_withEncryption()
209 mController.continueProvisioningAfterUserConsent(); in testManagedProfile_withEncryption()
222 mController.initiateProvisioning(mIntent, null, MP_PACKAGE_NAME); in testManagedProfile_afterEncryption()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/
DTetherPreferenceControllerTest.java67 private TetherPreferenceController mController; field in TetherPreferenceControllerTest
72 mController = spy(TetherPreferenceController.class); in setUp()
73 ReflectionHelpers.setField(mController, "mContext", mContext); in setUp()
74 ReflectionHelpers.setField(mController, "mConnectivityManager", mConnectivityManager); in setUp()
75 ReflectionHelpers.setField(mController, "mBluetoothAdapter", mBluetoothAdapter); in setUp()
76 ReflectionHelpers.setField(mController, "mPreference", mPreference); in setUp()
81 mController.onCreate(null); in lifeCycle_onCreate_shouldInitBluetoothPan()
83 verify(mBluetoothAdapter).getProfileProxy(mContext, mController.mBtProfileServiceListener, in lifeCycle_onCreate_shouldInitBluetoothPan()
91 ReflectionHelpers.getField(mController, "mBluetoothPan"); in goThroughLifecycle_shouldDestoryBluetoothProfile()
94 mController.onDestroy(); in goThroughLifecycle_shouldDestoryBluetoothProfile()
[all …]
DMobileNetworkPreferenceControllerTest.java69 private MobileNetworkPreferenceController mController; field in MobileNetworkPreferenceControllerTest
90 mController = new MobileNetworkPreferenceController(mContext); in secondaryUser_prefIsNotAvailable()
91 assertThat(mController.isAvailable()).isFalse(); in secondaryUser_prefIsNotAvailable()
102 mController = new MobileNetworkPreferenceController(mContext); in wifiOnly_prefIsNotAvailable()
103 assertThat(mController.isAvailable()).isFalse(); in wifiOnly_prefIsNotAvailable()
108 mController = spy(new MobileNetworkPreferenceController(mContext)); in goThroughLifecycle_isAvailable_shouldListenToServiceChange()
109 mLifecycle.addObserver(mController); in goThroughLifecycle_isAvailable_shouldListenToServiceChange()
110 doReturn(true).when(mController).isAvailable(); in goThroughLifecycle_isAvailable_shouldListenToServiceChange()
113 verify(mTelephonyManager).listen(mController.mPhoneStateListener, in goThroughLifecycle_isAvailable_shouldListenToServiceChange()
117 verify(mTelephonyManager).listen(mController.mPhoneStateListener, in goThroughLifecycle_isAvailable_shouldListenToServiceChange()
[all …]
/packages/apps/Car/Media/src/com/android/car/media/
DMediaPlaybackModel.java56 private MediaController mController; field in MediaPlaybackModel
141 if (mController != null) { in stop()
142 mController.unregisterCallback(mMediaControllerCallback); in stop()
143 mController = null; in stop()
201 if (mController == null) { in getMetadata()
204 return mController.getMetadata(); in getMetadata()
210 if (mController == null) { in getQueue()
213 List<MediaSession.QueueItem> currentQueue = mController.getQueue(); in getQueue()
223 if (mController == null) { in getPlaybackState()
226 return mController.getPlaybackState(); in getPlaybackState()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/datetime/
DAutoTimeZonePreferenceControllerTest.java51 private AutoTimeZonePreferenceController mController; field in AutoTimeZonePreferenceControllerTest
67 mController = new AutoTimeZonePreferenceController( in isFromSUW_notAvailable()
70 assertThat(mController.isAvailable()).isFalse(); in isFromSUW_notAvailable()
75 mController = new AutoTimeZonePreferenceController( in notFromSUW_isAvailable()
78 assertThat(mController.isAvailable()).isTrue(); in notFromSUW_isAvailable()
85 mController = new AutoTimeZonePreferenceController( in isWifiOnly_notAvailable()
88 assertThat(mController.isAvailable()).isFalse(); in isWifiOnly_notAvailable()
93 mController = new AutoTimeZonePreferenceController( in isFromSUW_notEnable()
96 assertThat(mController.isEnabled()).isFalse(); in isFromSUW_notEnable()
103 mController = new AutoTimeZonePreferenceController( in isWifiOnly_notEnable()
[all …]
DTimeFormatPreferenceControllerTest.java55 private TimeFormatPreferenceController mController; field in TimeFormatPreferenceControllerTest
66 mController = new TimeFormatPreferenceController(mContext, mCallback, true); in isCalledFromSUW_NotAvailable()
68 assertThat(mController.isAvailable()).isFalse(); in isCalledFromSUW_NotAvailable()
73 mController = new TimeFormatPreferenceController(mContext, mCallback, false); in notCalledFromSUW_shouldBeAvailable()
75 assertThat(mController.isAvailable()).isTrue(); in notCalledFromSUW_shouldBeAvailable()
80 mController = new TimeFormatPreferenceController(mContext, mCallback, false); in updateState_24HourSet_shouldCheckPreference()
82 mPreference.setKey(mController.getPreferenceKey()); in updateState_24HourSet_shouldCheckPreference()
86 mController.updateState(mPreference); in updateState_24HourSet_shouldCheckPreference()
93 mController = new TimeFormatPreferenceController(mContext, mCallback, false); in updateState_12HourSet_shouldNotCheckPreference()
95 mPreference.setKey(mController.getPreferenceKey()); in updateState_12HourSet_shouldNotCheckPreference()
[all …]
/packages/apps/StorageManager/robotests/src/com/android/storagemanager/automatic/
DNotificationControllerTest.java48 private NotificationController mController; field in NotificationControllerTest
56 mController = new NotificationController(); in setUp()
58 mController.setClock(mClock); in setUp()
64 mController.onReceive(mContext, in testShouldShowNotificationFirstTime()
68 mController.onReceive(mContext, in testShouldShowNotificationFirstTime()
77 mController.onReceive(mContext, in testNotificationNotShownIfShownTooManyTimes()
80 mController.onReceive(mContext, in testNotificationNotShownIfShownTooManyTimes()
87 mController.onReceive(mContext, in testNotificationNotShownIfShownTooManyTimes()
96 mController.onReceive(mContext, in testNotificationNotShownIfDismissedTooManyTimes()
99 mController.onReceive(mContext, in testNotificationNotShownIfDismissedTooManyTimes()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/
DSettingPrefControllerTest.java63 private PreferenceControllerTestable mController; field in SettingPrefControllerTest
73 mController = new PreferenceControllerTestable(mContext, mSetting, null); in setUp()
74 mPreference = mController.getPref(); in setUp()
79 mController.displayPreference(mScreen); in displayPreference_shouldInitPreference()
86 mController.isAvailable(); in isAvailable_shouldCallisApplicable()
93 assertThat(mController.getPreferenceKey()).isEqualTo(mController.KEY_TEST); in getPreferenceKey_shouldReturnPrefKey()
98 mController.updateState(null); in updateState_shouldUpdatePreference()
105 mController.displayPreference(mScreen); in onResume_shouldRegisterContentObserver()
106 mController.onResume(); in onResume_shouldRegisterContentObserver()
109 Global.getUriFor("Setting1"), false, mController.getObserver()); in onResume_shouldRegisterContentObserver()
[all …]
DWorkSoundPreferenceControllerTest.java74 private WorkSoundPreferenceController mController; field in WorkSoundPreferenceControllerTest
92 mController = new WorkSoundPreferenceController(mContext, mFragment, null, mAudioHelper); in setUp()
102 assertThat(mController.isAvailable()).isTrue(); in isAvailable_managedProfileAndNotSingleVolume_shouldReturnTrue()
112 assertThat(mController.isAvailable()).isFalse(); in isAvailable_noManagedProfile_shouldReturnFalse()
122 assertThat(mController.isAvailable()).isFalse(); in isAvailable_singleVolume_shouldReturnFalse()
135 mController.displayPreference(mScreen); in onManagedProfileAdded_shouldDisplayPreferenceCategory()
139 mController.onResume(); in onManagedProfileAdded_shouldDisplayPreferenceCategory()
142 mController.onManagedProfileAdded(UserHandle.myUserId()); in onManagedProfileAdded_shouldDisplayPreferenceCategory()
158 mController.displayPreference(mScreen); in onManagedProfileRemoved_shouldHidePreferenceCategory()
159 mController.onResume(); in onManagedProfileRemoved_shouldHidePreferenceCategory()
[all …]
/packages/apps/Camera2/src/com/android/camera/app/
DCameraAppUI.java483 private final AppController mController; field in CameraAppUI
780 mController = controller; in CameraAppUI()
804 boolean shouldShowSettingsCling = mController.getSettingsManager().getBoolean( in CameraAppUI()
875 refocusCling.setText(mController.getAndroidContext().getResources() in setupClingForViewer()
879 int clingWidth = mController.getAndroidContext() in setupClingForViewer()
970 int currentModuleIndex = mController.getCurrentModuleIndex(); in onSwipeDetected()
972 mController.getQuickSwitchToModuleId(currentModuleIndex); in onSwipeDetected()
977 mController.getAndroidContext()); in onSwipeDetected()
991 mController.onModeSelected(moduleToTransitionTo); in onSwipeDetected()
1046 int modeId = mController.getCurrentModuleIndex(); in showModeCoverUntilPreviewReady()
[all …]
/packages/apps/Calendar/src/com/android/calendar/
DAllInOneActivity.java105 private CalendarController mController; field in AllInOneActivity
294 if (millis != -1 && mViewEventId == -1 && mController != null) { in onNewIntent()
298 mController.sendEvent(this, EventType.GO_TO, time, time, -1, ViewType.CURRENT); in onNewIntent()
325 mController = CalendarController.getInstance(this); in onCreate()
426 mController.registerFirstEventHandler(HANDLER_KEY, this); in onCreate()
516 mController.registerFirstEventHandler(HANDLER_KEY, this); in onResume()
522 initFragments(mController.getTime(), mController.getViewType(), null); in onResume()
526 t.set(mController.getTime()); in onResume()
527 mController.sendEvent(this, EventType.UPDATE_TITLE, t, t, -1, ViewType.CURRENT, in onResume()
528 mController.getDateFlags(), null, null); in onResume()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/development/
DBugReportInPowerPreferenceControllerTest.java63 private BugReportInPowerPreferenceController mController; field in BugReportInPowerPreferenceControllerTest
74 mController = new BugReportInPowerPreferenceController(mContext); in setUp()
75 mPreference.setKey(mController.getPreferenceKey()); in setUp()
84 mController.displayPreference(mScreen); in displayPreference_hasDebugRestriction_shouldRemovePreference()
93 mController.displayPreference(mScreen); in displayPreference_noDebugRestriction_shouldNotRemovePreference()
101 mController.displayPreference(mScreen); in enablePreference_hasDebugRestriction_shouldNotEnable()
104 mController.enablePreference(true); in enablePreference_hasDebugRestriction_shouldNotEnable()
112 mController.displayPreference(mScreen); in enablePreference_noDebugRestriction_shouldEnable()
115 mController.enablePreference(true); in enablePreference_noDebugRestriction_shouldEnable()
123 mController.displayPreference(mScreen); in resetPreference_shouldUncheck()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/location/
DLocationPreferenceControllerTest.java67 private LocationPreferenceController mController; field in LocationPreferenceControllerTest
76 mController = new LocationPreferenceController(mContext, mLifecycle); in setUp()
77 when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference); in setUp()
82 assertThat(mController.isAvailable()).isTrue(); in isAvailable_shouldReturnTrue()
87 mController.updateState(mPreference); in updateState_shouldSetSummary()
94 mController.displayPreference(mScreen); in updateSummary_shouldSetSummary()
95 mController.updateSummary(); in updateSummary_shouldSetSummary()
105 assertThat(mController.getLocationSummary(mContext)).isEqualTo( in getLocationSummary_locationOff_shouldSetSummaryOff()
114 assertThat(mController.getLocationSummary(mContext)).isEqualTo( in getLocationSummary_sensorsOnly_shouldSetSummarySensorsOnly()
124 assertThat(mController.getLocationSummary(mContext)).isEqualTo( in getLocationSummary_highAccuracy_shouldSetSummarHighAccuracy()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/enterprise/
DExposureChangesCategoryPreferenceControllerTest.java60 private ExposureChangesCategoryPreferenceController mController; field in ExposureChangesCategoryPreferenceControllerTest
68 mController = new ExposureChangesCategoryPreferenceController(mContext, in setUp()
70 mController.setAvailabilityObserver(mObserver); in setUp()
75 verify(mControllers.get(0)).setAvailabilityObserver(mController); in testInitialization()
76 verify(mControllers.get(1)).setAvailabilityObserver(mController); in testInitialization()
81 assertThat(mController.getAvailabilityObserver()).isEqualTo(mObserver); in testGetAvailabilityObserver()
89 mController.updateState(preference); in testOnPreferenceAvailabilityUpdated()
92 mController.onPreferenceAvailabilityUpdated(KEY_1, true); in testOnPreferenceAvailabilityUpdated()
97 mController.onPreferenceAvailabilityUpdated(KEY_2, true); in testOnPreferenceAvailabilityUpdated()
102 mController.onPreferenceAvailabilityUpdated(KEY_1, false); in testOnPreferenceAvailabilityUpdated()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/password/
DChooseLockGenericControllerTest.java56 private ChooseLockGenericController mController; field in ChooseLockGenericControllerTest
68 mController = new ChooseLockGenericController( in setUp()
86 assertThat(mController.isScreenLockVisible(lock)).named(lock + " visible") in isScreenLockVisible_shouldRespectResourceConfig()
92 assertThat(mController.isScreenLockVisible(ScreenLockType.NONE)).named("NONE visible") in isScreenLockVisible_shouldRespectResourceConfig()
94 assertThat(mController.isScreenLockVisible(ScreenLockType.SWIPE)).named("SWIPE visible") in isScreenLockVisible_shouldRespectResourceConfig()
100 mController = new ChooseLockGenericController(application, 1 /* userId */); in isScreenLockVisible_notCurrentUser_shouldHideSwipe()
101 assertThat(mController.isScreenLockVisible(ScreenLockType.SWIPE)).named("SWIPE visible") in isScreenLockVisible_notCurrentUser_shouldHideSwipe()
109 assertThat(mController.isScreenLockVisible(ScreenLockType.MANAGED)).named("MANAGED visible") in isScreenLockVisible_managedPasswordChoosable_shouldShowManaged()
116 assertThat(mController.isScreenLockEnabled(lock, lock.maxQuality + 1)) in isScreenLockEnabled_lowerQuality_shouldReturnFalse()
125 assertThat(mController.isScreenLockEnabled(lock, lock.defaultQuality)) in isScreenLockEnabled_equalQuality_shouldReturnTrue()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/fingerprint/
DSetupFingerprintEnrollIntroductionTest.java77 private ActivityController<SetupFingerprintEnrollIntroduction> mController; field in SetupFingerprintEnrollIntroductionTest
88 mController = Robolectric.buildActivity(SetupFingerprintEnrollIntroduction.class, intent); in setUp()
103 mController.create().resume(); in testKeyguardNotSecure_shouldFinishWithSetupSkipDialogResultSkip()
105 final Button skipButton = mController.get().findViewById(R.id.fingerprint_cancel_button); in testKeyguardNotSecure_shouldFinishWithSetupSkipDialogResultSkip()
109 ShadowActivity shadowActivity = Shadows.shadowOf(mController.get()); in testKeyguardNotSecure_shouldFinishWithSetupSkipDialogResultSkip()
110 assertThat(mController.get().isFinishing()).named("Is finishing").isTrue(); in testKeyguardNotSecure_shouldFinishWithSetupSkipDialogResultSkip()
119 mController.create().resume(); in testKeyguardSecure_shouldFinishWithFingerprintResultSkip()
121 final Button skipButton = mController.get().findViewById(R.id.fingerprint_cancel_button); in testKeyguardSecure_shouldFinishWithFingerprintResultSkip()
125 ShadowActivity shadowActivity = Shadows.shadowOf(mController.get()); in testKeyguardSecure_shouldFinishWithFingerprintResultSkip()
126 assertThat(mController.get().isFinishing()).named("Is finishing").isTrue(); in testKeyguardSecure_shouldFinishWithFingerprintResultSkip()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/deviceinfo/
DBuildNumberPreferenceControllerTest.java80 private BuildNumberPreferenceController mController; field in BuildNumberPreferenceControllerTest
88 mController = new BuildNumberPreferenceController( in setUp()
92 mPreference.setKey(mController.getPreferenceKey()); in setUp()
102 mController.displayPreference(mScreen); in displayPref_shouldAlwaysDisplay()
104 verify(mScreen.findPreference(mController.getPreferenceKey())) in displayPref_shouldAlwaysDisplay()
111 assertThat(mController.handlePreferenceTreeClick(mock(Preference.class))).isFalse(); in handlePrefTreeClick_onlyHandleBuildNumberPref()
118 assertThat(mController.handlePreferenceTreeClick(mPreference)).isFalse(); in handlePrefTreeClick_notAdminUser_doNothing()
128 mController = new BuildNumberPreferenceController( in handlePrefTreeClick_deviceNotProvisioned_doNothing()
130 ReflectionHelpers.setField(mController, "mContext", context); in handlePrefTreeClick_deviceNotProvisioned_doNothing()
131 ReflectionHelpers.setField(mController, "mUm", mUserManager); in handlePrefTreeClick_deviceNotProvisioned_doNothing()
[all …]
/packages/apps/Settings/src/com/android/settings/display/
DNightDisplaySettings.java54 private NightDisplayController mController; field in NightDisplaySettings
68 mController = new NightDisplayController(context); in onCreate()
73 mTemperaturePreference.setMax(convertTemperature(mController.getMinimumColorTemperature())); in onCreate()
115 mController.setListener(this); in onStart()
118 onActivated(mController.isActivated()); in onStart()
119 onAutoModeChanged(mController.getAutoMode()); in onStart()
120 onCustomStartTimeChanged(mController.getCustomStartTime()); in onStart()
121 onCustomEndTimeChanged(mController.getCustomEndTime()); in onStart()
122 onColorTemperatureChanged(mController.getColorTemperature()); in onStart()
123 onDisplayColorModeChanged(mController.getColorMode()); in onStart()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/display/
DBrightnessLevelPreferenceControllerTest.java60 private BrightnessLevelPreferenceController mController; field in BrightnessLevelPreferenceControllerTest
71 mController = spy(new BrightnessLevelPreferenceController(mContext, null, mPowerManager)); in setUp()
72 doReturn(false).when(mController).isInVrMode(); in setUp()
78 assertThat(mController.isAvailable()).isTrue(); in isAvailable_shouldAlwaysReturnTrue()
125 doReturn(true).when(mController).isInVrMode(); in updateState_inVrMode_shouldSetSummaryToVrBrightness()
128 mController.updateState(mPreference); in updateState_inVrMode_shouldSetSummaryToVrBrightness()
135 doReturn(false).when(mController).isInVrMode(); in updateState_autoBrightness_shouldSetSummaryToAutoBrightness()
141 mController.updateState(mPreference); in updateState_autoBrightness_shouldSetSummaryToAutoBrightness()
148 doReturn(false).when(mController).isInVrMode(); in updateState_manualBrightness_shouldSetSummaryToScreenBrightness()
154 mController.updateState(mPreference); in updateState_manualBrightness_shouldSetSummaryToScreenBrightness()
[all …]

1234567891011