/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/common/ |
D | ActionButtonsPreferenceTest.java | 56 private ActionButtonsPreference mPref; field in ActionButtonsPreferenceTest 64 mPref = new ActionButtonsPreference(mContext); in setUp() 78 mPref.getButton(ActionButtons.BUTTON1).setText(R.string.settings_label); in onBindViewHolder_setTitle_shouldShowButtonByDefault() 79 mPref.getButton(ActionButtons.BUTTON2).setText(R.string.settings_label); in onBindViewHolder_setTitle_shouldShowButtonByDefault() 80 mPref.getButton(ActionButtons.BUTTON3).setText(R.string.settings_label); in onBindViewHolder_setTitle_shouldShowButtonByDefault() 81 mPref.getButton(ActionButtons.BUTTON4).setText(R.string.settings_label); in onBindViewHolder_setTitle_shouldShowButtonByDefault() 83 mPref.onBindViewHolder(mHolder); in onBindViewHolder_setTitle_shouldShowButtonByDefault() 97 mPref.getButton(ActionButtons.BUTTON1).setIcon(R.drawable.ic_lock); in onBindViewHolder_setIcon_shouldShowButtonByDefault() 98 mPref.getButton(ActionButtons.BUTTON2).setIcon(R.drawable.ic_lock); in onBindViewHolder_setIcon_shouldShowButtonByDefault() 99 mPref.getButton(ActionButtons.BUTTON3).setIcon(R.drawable.ic_lock); in onBindViewHolder_setIcon_shouldShowButtonByDefault() [all …]
|
D | MultiActionPreferenceTest.java | 52 private MultiActionPreference mPref; field in MultiActionPreferenceTest 78 mPref = new MultiActionPreference(mContext); in onBindViewHolder_actionItemsNullByDefault() 79 mPref.onBindViewHolder(mHolder); in onBindViewHolder_actionItemsNullByDefault() 81 assertThat(mPref.getActionItem(MultiActionPreference.ActionItem.ACTION_ITEM1)) in onBindViewHolder_actionItemsNullByDefault() 83 assertThat(mPref.getActionItem(MultiActionPreference.ActionItem.ACTION_ITEM2)) in onBindViewHolder_actionItemsNullByDefault() 85 assertThat(mPref.getActionItem(MultiActionPreference.ActionItem.ACTION_ITEM3)) in onBindViewHolder_actionItemsNullByDefault() 104 mPref = new MultiActionPreference(mContext); in onBindViewHolder_toggleButtons_attributesVisible() 105 mPref.onBindViewHolder(mHolder); in onBindViewHolder_toggleButtons_attributesVisible() 107 assertThat(mPref.getActionItem(MultiActionPreference.ActionItem.ACTION_ITEM1) in onBindViewHolder_toggleButtons_attributesVisible() 109 assertThat(mPref.getActionItem(MultiActionPreference.ActionItem.ACTION_ITEM2) in onBindViewHolder_toggleButtons_attributesVisible() [all …]
|
D | ClickableWhileDisabledSwitchPreferenceTest.java | 49 private ClickableWhileDisabledSwitchPreference mPref; field in ClickableWhileDisabledSwitchPreferenceTest 65 mPref = new ClickableWhileDisabledSwitchPreference(mContext); in setUp() 66 mPref.setDisabledClickListener(mPreferenceConsumer); in setUp() 71 mPref.setEnabled(false); in isDisabled_isClickable() 72 mPref.onBindViewHolder(mHolder); in isDisabled_isClickable() 79 mPref.setEnabled(false); in onClick_isDisabled_handleWithDisabledClickHandler() 80 mPref.onBindViewHolder(mHolder); in onClick_isDisabled_handleWithDisabledClickHandler() 82 mPref.performClick(); in onClick_isDisabled_handleWithDisabledClickHandler() 89 mPref.setEnabled(true); in onClick_isEnabled_handleWithRegularClickHandler() 90 mPref.onBindViewHolder(mHolder); in onClick_isEnabled_handleWithRegularClickHandler() [all …]
|
D | ClickableWhileDisabledPreferenceTest.java | 48 private ClickableWhileDisabledPreference mPref; field in ClickableWhileDisabledPreferenceTest 60 mPref = new ClickableWhileDisabledPreference(mContext); in setUp() 61 mPref.setDisabledClickListener(mPreferenceConsumer); in setUp() 66 mPref.setEnabled(false); in isDisabled_isClickable() 67 mPref.onBindViewHolder(mHolder); in isDisabled_isClickable() 74 mPref.setEnabled(false); in onClick_isDisabled_handleWithDisabledClickHandler() 75 mPref.onBindViewHolder(mHolder); in onClick_isDisabled_handleWithDisabledClickHandler() 77 mPref.performClick(); in onClick_isDisabled_handleWithDisabledClickHandler() 84 mPref.setEnabled(true); in onClick_isEnabled_handleWithRegularClickHandler() 85 mPref.onBindViewHolder(mHolder); in onClick_isEnabled_handleWithRegularClickHandler() [all …]
|
D | EntityHeaderPreferenceTest.java | 41 private EntityHeaderPreference mPref; field in EntityHeaderPreferenceTest 48 mPref = new EntityHeaderPreference(mContext); in setUp() 53 mPref.onBindViewHolder(mHolder); in onBindViewHolder_noSetIcon_shouldNotBeVisible() 61 mPref.onBindViewHolder(mHolder); in onBindViewHolder_noSetTitle_shouldNotBeVisible() 69 mPref.onBindViewHolder(mHolder); in onBindViewHolder_noSetSummary_shouldNotBeVisible() 77 mPref.setIcon(R.drawable.ic_lock); in onBindViewHolder_setIcon_shouldShowIcon() 79 mPref.onBindViewHolder(mHolder); in onBindViewHolder_setIcon_shouldShowIcon() 89 mPref.setTitle(mContext.getText(R.string.settings_label)); in onBindViewHolder_setLabel_shouldShowSameText() 91 mPref.onBindViewHolder(mHolder); in onBindViewHolder_setLabel_shouldShowSameText() 101 mPref.setSummary(mContext.getText(R.string.settings_label)); in onBindViewHolder_setSummary_shouldShowSameText() [all …]
|
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/suggestions/ |
D | SuggestionPreferenceTest.java | 57 private SuggestionPreference mPref; field in SuggestionPreferenceTest 68 mPref = new SuggestionPreference(context, mSuggestion, mCallback); in setUp() 73 assertThat(mPref.getSuggestion()).isEqualTo(mSuggestion); in getSuggestion_returnsSuggestion() 86 mPref.updateSuggestion(updatedSuggestion); in updateSuggestion_updatesPreference() 88 assertThat(mPref.getSuggestion()).isEqualTo(updatedSuggestion); in updateSuggestion_updatesPreference() 89 assertThat(mPref.getIcon()).isEqualTo(iconDrawable); in updateSuggestion_updatesPreference() 90 assertThat(mPref.getTitle()).isEqualTo(title); in updateSuggestion_updatesPreference() 91 assertThat(mPref.getSummary()).isEqualTo(summary); in updateSuggestion_updatesPreference() 99 () -> mPref.updateSuggestion(updatedSuggestion)); in updateSuggestion_idMismatch_throwsIllegalArgumentException() 104 assertThat(mPref.getKey()).isEqualTo( in getKey_includesSuggestionId() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/zen/ |
D | ZenModeVisEffectsCustomPreferenceControllerTest.java | 62 private RadioButtonPreference mPref; field in ZenModeVisEffectsCustomPreferenceControllerTest 84 when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPref); in setup() 103 mController.updateState(mPref); in updateState_notChecked_noVisEffects() 105 verify(mPref).setChecked(false); in updateState_notChecked_noVisEffects() 120 mController.updateState(mPref); in updateState_notChecked_allVisEffects() 122 verify(mPref).setChecked(false); in updateState_notChecked_allVisEffects() 128 mController.updateState(mPref); in updateState_checked() 130 verify(mPref).setChecked(true); in updateState_checked() 136 mController.updateState(mPref); in updateState_listeners() 138 verify(mPref).setExtraWidgetOnClickListener(any()); in updateState_listeners() [all …]
|
D | ZenModeVisEffectsAllPreferenceControllerTest.java | 64 private RadioButtonPreference mPref; field in ZenModeVisEffectsAllPreferenceControllerTest 87 when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPref); in setup() 99 mController.updateState(mPref); in updateState_notChecked() 101 verify(mPref).setChecked(false); in updateState_notChecked() 116 mController.updateState(mPref); in updateState_checked() 118 verify(mPref).setChecked(true); in updateState_checked() 133 mController.onRadioButtonClicked(mPref); in onPreferenceChanged_checkedTrue()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/widget/ |
D | DisabledCheckBoxPreferenceTest.java | 47 private DisabledCheckBoxPreference mPref; field in DisabledCheckBoxPreferenceTest 55 mPref = new DisabledCheckBoxPreference(mContext); in setUp() 63 mPref.onBindViewHolder(mHolder); in inflatePreference() 76 mPref.setOnPreferenceClickListener(onClick); in checkboxOnClick_checkboxDisabled() 79 mPref.enableCheckbox(false); in checkboxOnClick_checkboxDisabled() 80 mPref.performClick(mRootView); in checkboxOnClick_checkboxDisabled() 89 mPref.setOnPreferenceClickListener(onClick); in checkboxOnClick_checkboxEnabled() 92 mPref.enableCheckbox(true); in checkboxOnClick_checkboxEnabled() 93 mPref.performClick(mRootView); in checkboxOnClick_checkboxEnabled()
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/utils/ |
D | ImportantNoticeUtilsTests.java | 53 private final SharedPreferences mPref; field in ImportantNoticeUtilsTests.ImportantNoticePreferences 58 mPref = ImportantNoticeUtils.getImportantNoticePreferences(context); in ImportantNoticePreferences() 62 if (mPref.contains(key)) { in getInt() 63 return mPref.getInt(key, 0); in getInt() 69 if (mPref.contains(key)) { in getLong() 70 return mPref.getLong(key, 0); in getLong() 79 mPref.edit().putInt(key, value).apply(); in putInt() 87 mPref.edit().putLong(key, value).apply(); in putLong() 92 mPref.edit().remove(key).apply(); in removePreference()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/dream/ |
D | StartNowPreferenceControllerTest.java | 49 private MainSwitchPreference mPref; field in StartNowPreferenceControllerTest 59 mPref = mock(MainSwitchPreference.class); in setup() 60 when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPref); in setup() 69 verify(mPref).addOnSwitchChangeListener(mController); in displayPreference_shouldAddOnSwitchChangeListener() 77 mController.updateState(mPref); in updateState_neverDreaming_preferenceShouldDidabled() 79 verify(mPref).setEnabled(false); in updateState_neverDreaming_preferenceShouldDidabled() 87 mController.updateState(mPref); in updateState_dreamIsAvailable_preferenceShouldEnabled() 89 verify(mPref).setEnabled(true); in updateState_dreamIsAvailable_preferenceShouldEnabled()
|
/packages/services/Telephony/testapps/TestRcsApp/TestApp/src/com/google/android/sample/rcsclient/ |
D | ProvisioningActivity.java | 75 private SharedPreferences mPref; field in ProvisioningActivity 132 mPref = getSharedPreferences(RCS_CONFIG, MODE_PRIVATE); in onCreate() 247 mPref.edit().putString(RCS_PROFILE, mRcsProfile) in initRcsProfile() 257 mRcsProfile = mPref.getString(RCS_PROFILE, UP_10); in initRcsProfile() 258 mRcsVersion = mPref.getString(RCS_VERSION, V_6); in initRcsProfile()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/clipping/ |
D | ClipStorage.java | 71 private final SharedPreferences mPref; field in ClipStorage 82 mPref = pref; in ClipStorage() 84 mNextSlot = mPref.getInt(NEXT_AVAIL_SLOT, 0); in ClipStorage() 127 mPref.edit().putInt(NEXT_AVAIL_SLOT, mNextSlot).commit(); in claimStorageSlot()
|
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/clipping/ |
D | UrisSupplierTest.java | 57 private SharedPreferences mPref; field in UrisSupplierTest 66 mPref = InstrumentationRegistry.getInstrumentation().getTargetContext() in setUp() 68 mStorage = new ClipStorage(folder.getRoot(), mPref); in setUp()
|
D | ClipStorageTest.java | 60 private SharedPreferences mPref; field in ClipStorageTest 68 mPref = InstrumentationRegistry.getInstrumentation().getTargetContext() in setUp() 71 mStorage = new ClipStorage(clipDir, mPref); in setUp()
|
/packages/apps/Settings/src/com/android/settings/notification/zen/ |
D | ZenRulePreference.java | 46 final Preference mPref; field in ZenRulePreference 73 mPref = this; in ZenRulePreference()
|
/packages/apps/TvSettings/TwoPanelSettingsLib/src/com/android/tv/twopanelsettings/ |
D | TwoPanelSettingsFragment.java | 488 private final Preference mPref; field in TwoPanelSettingsFragment.PostShowPreviewRunnable 493 this.mPref = pref; in PostShowPreviewRunnable() 499 if (mPref == mFocusedPreference) { in run() 503 handleFragmentTransactionWhenFocused(mPref, mForceFresh); in run()
|