/frameworks/support/preference/src/androidTest/java/androidx/preference/tests/ |
D | PreferencePersistTest.java | 63 private PreferenceWrapper mPreference; field in PreferencePersistTest 73 mPreference = new PreferenceWrapper(context); in setup() 74 mPreference.setKey(KEY); in setup() 77 screen.addPreference(mPreference); in setup() 90 String result = mPreference.getString(expected); in string_retrieveWhenEmpty_returnsDefault() 100 boolean wasPersisted = mPreference.putString(expected); in string_persist_getsStoredToSharedPrefs() 109 mPreference.setPersistent(false); in string_persistWhileDisabled_notPersisted() 111 boolean wasPersisted = mPreference.putString("Test"); in string_persistWhileDisabled_notPersisted() 122 mPreference.putString(expected); in string_persistAndRetrieve_returnsPersistedValue() 123 String result = mPreference.getString("Default"); in string_persistAndRetrieve_returnsPersistedValue() [all …]
|
D | PreferenceDataStoreTest.java | 72 private PreferenceWrapper mPreference; field in PreferenceDataStoreTest 92 mPreference = new PreferenceWrapper(mContext); in setup() 93 mPreference.setKey(KEY); in setup() 143 mPreference.setPreferenceDataStore(mDataStore); in testDataStoresHierarchy() 147 mScreen.addPreference(mPreference); in testDataStoresHierarchy() 149 mPreference.putString(TEST_STR); in testDataStoresHierarchy() 152 assertEquals(mDataStore, mPreference.getPreferenceDataStore()); in testDataStoresHierarchy() 200 mPreference.setPreferenceDataStore(mDataStore); in testPutStringWithDataStoreOnPref() 201 mScreen.addPreference(mPreference); in testPutStringWithDataStoreOnPref() 209 mScreen.addPreference(mPreference); in testPutStringWithDataStoreOnMgr() [all …]
|
D | PreferenceSingleLineTitleTest.java | 45 private Preference mPreference; field in PreferenceSingleLineTitleTest 57 mPreference = new Preference(InstrumentationRegistry.getTargetContext()); in setUp() 58 mPreference.setTitle("Test Title"); in setUp() 64 mPreference.onBindViewHolder(holder); in bindViewHolder_singleLineTitleNotSet_shouldNotSetSingleLine() 72 mPreference.setSingleLineTitle(true); in bindViewHolder_singleLineTitleSetToTrue_shouldSetSingleLineToTrue() 73 mPreference.onBindViewHolder(holder); in bindViewHolder_singleLineTitleSetToTrue_shouldSetSingleLineToTrue() 81 mPreference.setSingleLineTitle(false); in bindViewHolder_singleLineTitleSetToFalse_shouldSetSingleLineToFalse() 82 mPreference.onBindViewHolder(holder); in bindViewHolder_singleLineTitleSetToFalse_shouldSetSingleLineToFalse()
|
D | PreferenceIconSpaceTest.java | 48 private Preference mPreference; field in PreferenceIconSpaceTest 65 mPreference = new Preference(InstrumentationRegistry.getTargetContext()); in setUp() 72 mPreference.setIconSpaceReserved(true); in bindViewHolder_iconSpaceReserved_shouldReserveIconSpace() 73 mPreference.onBindViewHolder(holder); in bindViewHolder_iconSpaceReserved_shouldReserveIconSpace() 84 mPreference.setIconSpaceReserved(false); in bindViewHolder_iconSpaceNotReserved_shouldNotReserveIconSpace() 85 mPreference.onBindViewHolder(holder); in bindViewHolder_iconSpaceNotReserved_shouldNotReserveIconSpace() 95 mPreference.setIcon(new ColorDrawable(Color.BLACK)); in bindViewHolder_hasIcon_shouldDisplayIcon() 96 mPreference.onBindViewHolder(holder); in bindViewHolder_hasIcon_shouldDisplayIcon()
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/development/ |
D | EnableAdbPreferenceControllerTest.java | 52 private SwitchPreference mPreference; field in EnableAdbPreferenceControllerTest 63 mPreference = new SwitchPreference(mContext); in setUp() 64 mPreference.setKey(mController.getPreferenceKey()); in setUp() 65 when(mScreen.findPreference(mPreference.getKey())).thenReturn(mPreference); in setUp() 74 assertThat(mPreference.isVisible()).isFalse(); in displayPreference_isNotAdmin_shouldRemovePreference() 83 assertThat(mPreference.isVisible()).isTrue(); in displayPreference_isAdmin_shouldNotRemovePreference() 91 mPreference.setChecked(true); in resetPreference_shouldUncheck() 95 assertThat(mPreference.isChecked()).isFalse(); in resetPreference_shouldUncheck() 103 mPreference.setChecked(true); in handlePreferenceTreeClick_shouldUpdateSettings() 106 mController.handlePreferenceTreeClick(mPreference); in handlePreferenceTreeClick_shouldUpdateSettings() [all …]
|
D | DeveloperOptionsPreferenceControllerTest.java | 40 private Preference mPreference; field in DeveloperOptionsPreferenceControllerTest 50 doReturn(mPreference).when(mPreferenceScreen).findPreference(TEST_KEY); in setUp() 58 verify(mPreference).setEnabled(true); in onDeveloperOptionsEnabled_shouldEnablePreference() 65 verify(mPreference).setEnabled(false); in onDeveloperOptionsDisabled_shouldDisablePreference()
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/core/ |
D | AbstractPreferenceControllerTest.java | 40 private Preference mPreference; field in AbstractPreferenceControllerTest 47 mPreference = new Preference(mContext); in setUp() 48 mPreference.setKey(TestPrefController.KEY_PREF); in setUp() 49 when(mScreen.findPreference(TestPrefController.KEY_PREF)).thenReturn(mPreference); in setUp() 59 assertThat(mPreference.isVisible()).isTrue(); in displayPref_ifAvailable() 66 assertThat(mPreference.isVisible()).isTrue(); in setVisible_prefIsVisible_shouldSetToVisible() 73 assertThat(mPreference.isVisible()).isFalse(); in setVisible_prefNotVisible_shouldSetToInvisible() 82 assertThat(mPreference.isVisible()).isFalse(); in doNotDisplayPref_ifNotAvailable() 87 mTestPrefController.updateState(mPreference); in updateState_hasSummary_shouldSetSummary() 89 assertThat(mPreference.getSummary()).isEqualTo(TestPrefController.TEST_SUMMARY); in updateState_hasSummary_shouldSetSummary()
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/ |
D | TwoTargetPreferenceTest.java | 45 private TwoTargetPreference mPreference; field in TwoTargetPreferenceTest 52 mPreference = spy(new TwoTargetPreference(mContext)); in setUp() 62 assertThat(mPreference.shouldHideSecondTarget()).isTrue(); in bind_noSecondTarget_shouldNotDrawDivider() 64 mPreference.onBindViewHolder(mViewHolder); in bind_noSecondTarget_shouldNotDrawDivider() 72 doReturn(false).when(mPreference).shouldHideSecondTarget(); in bind_hasSecondTarget_shouldNotDrawDivider() 74 mPreference.onBindViewHolder(mViewHolder); in bind_hasSecondTarget_shouldNotDrawDivider() 82 mPreference.setIconSize(ICON_SIZE_SMALL); in bind_smallIcon_shouldUseSmallIconSize() 84 mPreference.onBindViewHolder(mViewHolder); in bind_smallIcon_shouldUseSmallIconSize() 98 mPreference.setIconSize(ICON_SIZE_MEDIUM); in bind_mediumIcon_shouldUseMediumIconSize() 100 mPreference.onBindViewHolder(mViewHolder); in bind_mediumIcon_shouldUseMediumIconSize() [all …]
|
D | CustomEditTextPreferenceTest.java | 42 private TestPreference mPreference; field in CustomEditTextPreferenceTest 47 mPreference = new TestPreference(RuntimeEnvironment.application); in setUp() 57 mPreference.onBindDialogView(mView); in bindDialogView_shouldRequestFocus() 64 ReflectionHelpers.setField(mPreference, "mFragment", in getEditText_noDialog_shouldNotCrash() 67 mPreference.getEditText(); in getEditText_noDialog_shouldNotCrash()
|
D | RestrictedPreferenceHelperTest.java | 44 private Preference mPreference; field in RestrictedPreferenceHelperTest 53 mHelper = new RestrictedPreferenceHelper(mContext, mPreference, null); in setUp()
|
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/deviceinfo/ |
D | SerialNumberPreferenceControllerTest.java | 42 private Preference mPreference; field in SerialNumberPreferenceControllerTest 49 mPreference = new Preference(mContext); in setUp() 50 mPreference.setKey(AbstractSerialNumberPreferenceController.KEY_SERIAL_NUMBER); in setUp() 51 when(mScreen.findPreference(mPreference.getKey())).thenReturn(mPreference); in setUp() 74 assertThat(mPreference.isVisible()).isFalse(); in testDisplay_noSerial_shouldHidePreference() 84 assertThat(mPreference.isVisible()).isTrue(); in testDisplay_hasSerial_shouldSetSummary() 85 assertThat(mPreference.getSummary()).isEqualTo(serial); in testDisplay_hasSerial_shouldSetSummary()
|
D | UptimePreferenceControllerTest.java | 49 private Preference mPreference; field in UptimePreferenceControllerTest 54 doReturn(mPreference).when(mScreen) in setUp() 66 verify(mPreference).setSummary(DateUtils.formatDuration(SystemClock.elapsedRealtime())); in testDisplayPreference() 76 verify(mPreference, times(1)).setSummary(any(CharSequence.class)); in testUptimeTick() 80 verify(mPreference, times(2)).setSummary(any(CharSequence.class)); in testUptimeTick() 84 verify(mPreference, times(3)).setSummary(any(CharSequence.class)); in testUptimeTick() 88 verify(mPreference, times(4)).setSummary(any(CharSequence.class)); in testUptimeTick()
|
D | WifiMacAddressPreferenceControllerTest.java | 57 private Preference mPreference; field in WifiMacAddressPreferenceControllerTest 64 doReturn(mPreference).when(mScreen) in setUp() 95 verify(mPreference).setSummary(R.string.status_unavailable); in testWifiMacAddress() 100 verify(mPreference).setSummary(TEST_MAC_ADDRESS); in testWifiMacAddress() 105 verify(mPreference, times(2)).setSummary(TEST_MAC_ADDRESS); in testWifiMacAddress() 109 verify(mPreference).setSummary(R.string.wifi_status_mac_randomized); in testWifiMacAddress()
|
D | IpAddressPreferenceControllerTest.java | 50 private Preference mPreference; field in IpAddressPreferenceControllerTest 55 doReturn(mPreference).when(mScreen) in setUp()
|
D | BluetoothAddressPreferenceControllerTest.java | 49 private Preference mPreference; field in BluetoothAddressPreferenceControllerTest 54 doReturn(mPreference).when(mScreen) in setUp()
|
D | ImsStatusPreferenceControllerTest.java | 52 private Preference mPreference; field in ImsStatusPreferenceControllerTest 57 doReturn(mPreference).when(mScreen) in setUp()
|
/frameworks/base/core/tests/coretests/src/android/preference/ |
D | PreferenceIconSpaceTest.java | 43 private TestPreference mPreference; field in PreferenceIconSpaceTest 60 mPreference = new TestPreference(InstrumentationRegistry.getTargetContext()); in setUp() 65 mPreference.setIconSpaceReserved(true); in bindView_iconSpaceReserved_shouldReserveIconSpace() 66 mPreference.bindView(mViewGroup); in bindView_iconSpaceReserved_shouldReserveIconSpace() 74 mPreference.setIconSpaceReserved(false); in bindView_iconSpaceNotReserved_shouldNotReserveIconSpace() 75 mPreference.bindView(mViewGroup); in bindView_iconSpaceNotReserved_shouldNotReserveIconSpace() 83 mPreference.setIcon(new ColorDrawable(Color.BLACK)); in bindView_hasIcon_shouldDisplayIcon() 84 mPreference.bindView(mViewGroup); in bindView_hasIcon_shouldDisplayIcon()
|
/frameworks/support/preference/src/main/java/androidx/preference/ |
D | PreferenceDialogFragmentCompat.java | 62 private DialogPreference mPreference; field in PreferenceDialogFragmentCompat 90 mPreference = (DialogPreference) fragment.findPreference(key); in onCreate() 91 mDialogTitle = mPreference.getDialogTitle(); in onCreate() 92 mPositiveButtonText = mPreference.getPositiveButtonText(); in onCreate() 93 mNegativeButtonText = mPreference.getNegativeButtonText(); in onCreate() 94 mDialogMessage = mPreference.getDialogMessage(); in onCreate() 95 mDialogLayoutRes = mPreference.getDialogLayoutResource(); in onCreate() 97 final Drawable icon = mPreference.getDialogIcon(); in onCreate() 174 if (mPreference == null) { in getPreference() 178 mPreference = (DialogPreference) fragment.findPreference(key); in getPreference() [all …]
|
D | PreferenceDialogFragment.java | 62 private DialogPreference mPreference; field in PreferenceDialogFragment 90 mPreference = (DialogPreference) fragment.findPreference(key); in onCreate() 91 mDialogTitle = mPreference.getDialogTitle(); in onCreate() 92 mPositiveButtonText = mPreference.getPositiveButtonText(); in onCreate() 93 mNegativeButtonText = mPreference.getNegativeButtonText(); in onCreate() 94 mDialogMessage = mPreference.getDialogMessage(); in onCreate() 95 mDialogLayoutRes = mPreference.getDialogLayoutResource(); in onCreate() 97 final Drawable icon = mPreference.getDialogIcon(); in onCreate() 174 if (mPreference == null) { in getPreference() 178 mPreference = (DialogPreference) fragment.findPreference(key); in getPreference() [all …]
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/development/ |
D | AbstractEnableAdbPreferenceController.java | 46 protected SwitchPreference mPreference; field in AbstractEnableAdbPreferenceController 56 mPreference = (SwitchPreference) screen.findPreference(KEY_ENABLE_ADB); in displayPreference() 84 mPreference.setEnabled(enabled); in enablePreference() 89 if (mPreference.isChecked()) { in resetPreference() 90 mPreference.setChecked(false); in resetPreference() 91 handlePreferenceTreeClick(mPreference); in resetPreference()
|
D | DeveloperOptionsPreferenceController.java | 33 protected Preference mPreference; field in DeveloperOptionsPreferenceController 52 mPreference = screen.findPreference(getPreferenceKey()); in displayPreference() 77 mPreference.setEnabled(true); in onDeveloperOptionsSwitchEnabled() 84 mPreference.setEnabled(false); in onDeveloperOptionsSwitchDisabled()
|
/frameworks/support/leanback-preference/src/main/java/androidx/leanback/preference/ |
D | LeanbackPreferenceDialogFragment.java | 29 private DialogPreference mPreference; field in LeanbackPreferenceDialogFragment 49 if (mPreference == null) { in getPreference() 53 mPreference = (DialogPreference) fragment.findPreference(key); in getPreference() 55 return mPreference; in getPreference()
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/ |
D | RestrictedPreferenceHelper.java | 39 private final Preference mPreference; field in RestrictedPreferenceHelper 49 mPreference = preference; in RestrictedPreferenceHelper() 157 mPreference.setEnabled(!disabled); in setDisabledByAdmin()
|
/frameworks/ml/nn/runtime/ |
D | CompilationBuilder.cpp | 50 int n = mModel->partitionTheWork(devices, mPreference, &mPlan); in finish() 85 mPreference = preference; in setPreference()
|
D | CompilationBuilder.h | 57 int32_t mPreference = ANEURALNETWORKS_PREFER_FAST_SINGLE_ANSWER; variable
|