Home
last modified time | relevance | path

Searched refs:mQuietModeEnabler (Results 1 – 3 of 3) sorted by relevance

/packages/apps/Settings/tests/robotests/src/com/android/settings/accounts/
DManagedProfileQuietModeEnablerTest.java69 private ManagedProfileQuietModeEnabler mQuietModeEnabler; field in ManagedProfileQuietModeEnablerTest
110 mQuietModeEnabler = new ManagedProfileQuietModeEnabler(mContext, in setUp()
118 mQuietModeEnabler.setQuietModeEnabled(mEnable); in onSetQuietMode_shouldRequestQuietModeEnabled()
128 mQuietModeEnabler.setQuietModeEnabled(mEnable); in onSetQuietMode_ifQuietModeAlreadyInDesiredState_shouldNotRequestQuietModeEnabled()
135 assertThat(mQuietModeEnabler.isQuietModeEnabled()).isEqualTo( in onIsQuietModeEnabled_shouldCallIsQuietModeEnabled()
141 mQuietModeEnabler.onStart(mLifecycleOwner); in onQuietModeChanged_listenerNotified()
153 mQuietModeEnabler.onStart(mLifecycleOwner); in onStart_shouldRegisterReceiver()
154 verify(mContext).registerReceiver(eq(mQuietModeEnabler.mReceiver), any(), anyInt()); in onStart_shouldRegisterReceiver()
160 mContext.registerReceiver(mQuietModeEnabler.mReceiver, null, in onStop_shouldUnregisterReceiver()
163 mQuietModeEnabler.onStop(mLifecycleOwner); in onStop_shouldUnregisterReceiver()
[all …]
/packages/apps/Settings/src/com/android/settings/accounts/
DContactSearchPreferenceController.java42 private final ManagedProfileQuietModeEnabler mQuietModeEnabler; field in ContactSearchPreferenceController
49 mQuietModeEnabler = new ManagedProfileQuietModeEnabler(context, this); in ContactSearchPreferenceController()
54 return mQuietModeEnabler.isAvailable() ? AVAILABLE : DISABLED_FOR_USER; in getAvailabilityStatus()
63 pref.setEnabled(!mQuietModeEnabler.isQuietModeEnabled()); in updateState()
82 lifecycleOwner.getLifecycle().addObserver(mQuietModeEnabler); in onStart()
87 lifecycleOwner.getLifecycle().removeObserver(mQuietModeEnabler); in onStop()
92 if (mManagedUser == null || mQuietModeEnabler.isQuietModeEnabled()) { in isChecked()
101 if (mManagedUser == null || mQuietModeEnabler.isQuietModeEnabled()) { in setChecked()
DWorkModePreferenceController.java40 private final ManagedProfileQuietModeEnabler mQuietModeEnabler; field in WorkModePreferenceController
45 mQuietModeEnabler = new ManagedProfileQuietModeEnabler(context, this); in WorkModePreferenceController()
57 return (mQuietModeEnabler.isAvailable()) ? AVAILABLE : DISABLED_FOR_USER; in getAvailabilityStatus()
62 lifecycleOwner.getLifecycle().addObserver(mQuietModeEnabler); in onStart()
67 lifecycleOwner.getLifecycle().removeObserver(mQuietModeEnabler); in onStop()
72 mQuietModeEnabler.setQuietModeEnabled(!isChecked); in onCheckedChanged()
80 mPreference.updateStatus(!mQuietModeEnabler.isQuietModeEnabled()); in updateState()