/packages/apps/Contacts/tests/src/com/android/contacts/widget/ |
D | CompositeListAdapterTest.java | 114 CompositeListAdapter adapter = new CompositeListAdapter(); in testGetCount() local 115 adapter.addAdapter(mAdapter1); in testGetCount() 116 adapter.addAdapter(mAdapter2); in testGetCount() 117 adapter.addAdapter(mAdapter3); in testGetCount() 119 assertEquals(5, adapter.getCount()); in testGetCount() 123 CompositeListAdapter adapter = new CompositeListAdapter(); in testGetCountWithInvalidation() local 124 assertEquals(0, adapter.getCount()); in testGetCountWithInvalidation() 126 adapter.addAdapter(mAdapter1); in testGetCountWithInvalidation() 127 assertEquals(2, adapter.getCount()); in testGetCountWithInvalidation() 129 adapter.addAdapter(mAdapter2); in testGetCountWithInvalidation() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/manageapplications/ |
D | ManageApplicationsTest.java | 211 final ManageApplications.ApplicationsAdapter adapter = in onQueryTextChange_shouldFilterSearchInApplicationsAdapter() local 214 ReflectionHelpers.setField(mFragment, "mApplications", adapter); in onQueryTextChange_shouldFilterSearchInApplicationsAdapter() 218 verify(adapter).filterSearch(query); in onQueryTextChange_shouldFilterSearchInApplicationsAdapter() 225 final ManageApplications.ApplicationsAdapter adapter = in updateLoading_appLoaded_shouldNotDelayCallToHandleLoadingContainer() local 230 ReflectionHelpers.setField(adapter, "mLoadingViewController", loadingViewController); in updateLoading_appLoaded_shouldNotDelayCallToHandleLoadingContainer() 233 ReflectionHelpers.setField(adapter, "mHasReceivedLoadEntries", true); in updateLoading_appLoaded_shouldNotDelayCallToHandleLoadingContainer() 238 adapter.updateLoading(); in updateLoading_appLoaded_shouldNotDelayCallToHandleLoadingContainer() 247 final ManageApplications.ApplicationsAdapter adapter = in updateLoading_appNotLoaded_shouldDelayCallToHandleLoadingContainer() local 252 ReflectionHelpers.setField(adapter, "mLoadingViewController", loadingViewController); in updateLoading_appNotLoaded_shouldDelayCallToHandleLoadingContainer() 255 ReflectionHelpers.setField(adapter, "mHasReceivedLoadEntries", false); in updateLoading_appNotLoaded_shouldDelayCallToHandleLoadingContainer() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/panel/ |
D | PanelSlicesAdapterTest.java | 120 final PanelSlicesAdapter adapter = in sizeOfAdapter_shouldNotExceedMaxNum() local 124 adapter.onCreateViewHolder(view, 0); in sizeOfAdapter_shouldNotExceedMaxNum() 126 assertThat(adapter.getItemCount()).isEqualTo(MAX_NUM_OF_SLICES); in sizeOfAdapter_shouldNotExceedMaxNum() 127 assertThat(adapter.getData().size()).isEqualTo(MAX_NUM_OF_SLICES); in sizeOfAdapter_shouldNotExceedMaxNum() 134 final PanelSlicesAdapter adapter = in mediaOutputIndicatorSlice_shouldNotAllowDividerAbove() local 139 adapter.onCreateViewHolder(view, 0 /* view type*/); in mediaOutputIndicatorSlice_shouldNotAllowDividerAbove() 141 adapter.onBindViewHolder(viewHolder, position); in mediaOutputIndicatorSlice_shouldNotAllowDividerAbove() 151 final PanelSlicesAdapter adapter = in sliderLargeIconPanel_shouldNotAllowDividerBelow() local 156 adapter.onCreateViewHolder(view, PanelContent.VIEW_TYPE_SLIDER_LARGE_ICON); in sliderLargeIconPanel_shouldNotAllowDividerBelow() 157 adapter.onBindViewHolder(viewHolder, position); in sliderLargeIconPanel_shouldNotAllowDividerBelow() [all …]
|
/packages/apps/Car/libs/car-ui-lib/tests/unit/src/com/android/car/ui/recyclerview/ |
D | CarUiRecyclerViewTest.java | 155 TestAdapter adapter = new TestAdapter(4); in testGridLayout() local 158 carUiRecyclerView.setAdapter(adapter); in testGridLayout() 164 onView(withText(adapter.getItemText(0))).check( in testGridLayout() 165 isTopAlignedWith(withText(adapter.getItemText(1)))); in testGridLayout() 166 onView(withText(adapter.getItemText(1))).check( in testGridLayout() 167 isTopAlignedWith(withText(adapter.getItemText(2)))); in testGridLayout() 170 onView(withText(adapter.getItemText(0))).check( in testGridLayout() 171 isBottomAlignedWith(withText(adapter.getItemText(1)))); in testGridLayout() 172 onView(withText(adapter.getItemText(1))).check( in testGridLayout() 173 isBottomAlignedWith(withText(adapter.getItemText(2)))); in testGridLayout() [all …]
|
/packages/apps/Contacts/src/com/android/contacts/list/ |
D | PhoneNumberPickerFragment.java | 176 final PhoneNumberListAdapter adapter = (PhoneNumberListAdapter) getAdapter(); in getPhoneNumber() local 177 return adapter.getPhoneNumber(position); in getPhoneNumber() 181 final PhoneNumberListAdapter adapter = (PhoneNumberListAdapter) getAdapter(); in getPhoneUri() local 182 return adapter.getDataUri(position); in getPhoneUri() 186 final PhoneNumberListAdapter adapter = (PhoneNumberListAdapter) getAdapter(); in getLookupKey() local 187 return adapter.getLookupKey(position); in getLookupKey() 214 PhoneNumberListAdapter adapter = new PhoneNumberListAdapter(getActivity()); in createListAdapter() local 215 adapter.setDisplayPhotos(true); in createListAdapter() 216 adapter.setUseCallableUri(mUseCallableUri); in createListAdapter() 217 return adapter; in createListAdapter() [all …]
|
D | PostalAddressPickerFragment.java | 50 PostalAddressListAdapter adapter = (PostalAddressListAdapter)getAdapter(); in onItemClick() local 51 pickPostalAddress(adapter.getDataUri(position)); in onItemClick() 53 LegacyPostalAddressListAdapter adapter = (LegacyPostalAddressListAdapter)getAdapter(); in onItemClick() local 54 pickPostalAddress(adapter.getContactMethodUri(position)); in onItemClick() 61 PostalAddressListAdapter adapter = new PostalAddressListAdapter(getActivity()); in createListAdapter() local 62 adapter.setSectionHeaderDisplayEnabled(true); in createListAdapter() 63 adapter.setDisplayPhotos(true); in createListAdapter() 64 return adapter; in createListAdapter() 66 LegacyPostalAddressListAdapter adapter = in createListAdapter() local 68 adapter.setSectionHeaderDisplayEnabled(false); in createListAdapter() [all …]
|
D | ContactBrowseListFragment.java | 337 ContactListAdapter adapter = getAdapter(); in setSelectedContactUri() local 338 if (adapter != null) { in setSelectedContactUri() 339 adapter.setSelectedContact(mSelectedContactDirectoryId, in setSelectedContactUri() 388 ContactListAdapter adapter = getAdapter(); in configureAdapter() local 389 if (adapter == null) { in configureAdapter() 395 adapter.setFilter(mFilter); in configureAdapter() 398 adapter.setSelectedContact( in configureAdapter() 403 adapter.setIncludeFavorites(!searchMode && mFilter.isContactsFilterType()); in configureAdapter() 432 ContactListAdapter adapter = getAdapter(); in checkSelection() local 433 if (adapter == null) { in checkSelection() [all …]
|
D | ContactPickerFragment.java | 136 HeaderEntryContactListAdapter adapter in createListAdapter() local 138 adapter.setFilter(ContactListFilter.createFilterWithType( in createListAdapter() 140 adapter.setSectionHeaderDisplayEnabled(true); in createListAdapter() 141 adapter.setDisplayPhotos(true); in createListAdapter() 142 adapter.setQuickContactEnabled(false); in createListAdapter() 143 adapter.setShowCreateContact(mCreateContactEnabled); in createListAdapter() 144 return adapter; in createListAdapter() 146 LegacyContactListAdapter adapter = new LegacyContactListAdapter(getActivity()); in createListAdapter() local 147 adapter.setSectionHeaderDisplayEnabled(false); in createListAdapter() 148 adapter.setDisplayPhotos(false); in createListAdapter() [all …]
|
D | JoinContactListFragment.java | 63 JoinContactListAdapter adapter = getAdapter(); 64 if (adapter != null) { 65 adapter.configureLoader(loader, 0); 125 JoinContactListAdapter adapter = getAdapter(); in onContactListLoaded() local 126 adapter.setSuggestionsCursor(suggestionsCursor); in onContactListLoaded() 146 JoinContactListAdapter adapter = new JoinContactListAdapter(getActivity()); in createListAdapter() local 147 adapter.setPhotoPosition(ContactListItemView.getDefaultPhotoPosition(false /* opposite */)); in createListAdapter() 148 return adapter; in createListAdapter() 154 JoinContactListAdapter adapter = getAdapter(); in configureAdapter() local 155 adapter.setTargetContactId(mTargetContactId); in configureAdapter()
|
D | LegacyPhoneNumberPickerFragment.java | 36 final LegacyPhoneNumberListAdapter adapter = (LegacyPhoneNumberListAdapter) getAdapter(); in getPhoneUri() local 37 return adapter.getPhoneUri(position); in getPhoneUri() 48 LegacyPhoneNumberListAdapter adapter = new LegacyPhoneNumberListAdapter(getActivity()); in createListAdapter() local 49 adapter.setDisplayPhotos(true); in createListAdapter() 50 return adapter; in createListAdapter() 54 protected void setPhotoPosition(ContactEntryListAdapter adapter) { in setPhotoPosition() argument
|
D | EmailAddressPickerFragment.java | 44 EmailAddressListAdapter adapter = (EmailAddressListAdapter)getAdapter(); in onItemClick() local 48 pickEmailAddress(adapter.getDataUri(position)); in onItemClick() 53 EmailAddressListAdapter adapter = new EmailAddressListAdapter(getActivity()); in createListAdapter() local 54 adapter.setSectionHeaderDisplayEnabled(true); in createListAdapter() 55 adapter.setDisplayPhotos(true); in createListAdapter() 56 return adapter; in createListAdapter()
|
/packages/apps/Gallery2/src/com/android/photos/views/ |
D | HeaderGridView.java | 81 ListAdapter adapter = getAdapter(); in onMeasure() local 82 if (adapter != null && adapter instanceof HeaderViewGridAdapter) { in onMeasure() 83 ((HeaderViewGridAdapter) adapter).setNumColumns(getNumColumns()); in onMeasure() 105 ListAdapter adapter = getAdapter(); in addHeaderView() local 107 if (adapter != null && ! (adapter instanceof HeaderViewGridAdapter)) { in addHeaderView() 123 if (adapter != null) { in addHeaderView() 124 ((HeaderViewGridAdapter) adapter).notifyDataSetChanged(); in addHeaderView() 156 ListAdapter adapter = getAdapter(); in removeHeaderView() local 157 if (adapter != null && ((HeaderViewGridAdapter) adapter).removeHeader(v)) { in removeHeaderView() 178 public void setAdapter(ListAdapter adapter) { in setAdapter() argument [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/datetime/timezone/ |
D | BaseTimeZoneAdapterTest.java | 49 TestTimeZoneAdapter adapter = new TestTimeZoneAdapter(items); in testFilter() local 50 assertSearch(adapter, "", items.toArray(new TestItem[0])); in testFilter() 51 assertSearch(adapter, "Unit", US, UK); in testFilter() 52 assertSearch(adapter, "kon", HK); in testFilter() 53 assertSearch(adapter, "brit", UK); in testFilter() 54 assertSearch(adapter, "sec", secretCountry); in testFilter() 57 private void assertSearch(TestTimeZoneAdapter adapter , String searchText, TestItem... items) in assertSearch() argument 59 Observer observer = new Observer(adapter); in assertSearch() 60 adapter.getFilter().filter(searchText); in assertSearch() 62 assertThat(adapter.getItemCount()).isEqualTo(items.length); in assertSearch() [all …]
|
D | RegionSearchPickerTest.java | 68 BaseTimeZoneAdapter adapter = picker.createAdapter(new TimeZoneData(finder)); in createAdapter_matchRegionName() local 69 assertEquals(1, adapter.getItemCount()); in createAdapter_matchRegionName() 70 AdapterItem item = adapter.getDataItem(0); in createAdapter_matchRegionName() 88 BaseTimeZoneAdapter<RegionItem> adapter = picker.createAdapter(new TimeZoneData(finder)); in clickItemView_duringRegionSearch_shouldNotCrash() local 90 ItemViewHolder viewHolder = (ItemViewHolder) adapter.onCreateViewHolder( in clickItemView_duringRegionSearch_shouldNotCrash() 92 adapter.onBindViewHolder(viewHolder, 0); in clickItemView_duringRegionSearch_shouldNotCrash() 93 assertEquals(1, adapter.getItemCount()); in clickItemView_duringRegionSearch_shouldNotCrash() 96 FilterWrapper filterWrapper = new FilterWrapper(adapter.getFilter()); in clickItemView_duringRegionSearch_shouldNotCrash() 100 assertEquals(0, adapter.getItemCount()); in clickItemView_duringRegionSearch_shouldNotCrash()
|
/packages/apps/Dialer/java/com/android/dialer/speeddial/draghelper/ |
D | SpeedDialItemTouchHelperCallback.java | 32 private final ItemTouchHelperAdapter adapter; field in SpeedDialItemTouchHelperCallback 41 public SpeedDialItemTouchHelperCallback(Context context, ItemTouchHelperAdapter adapter) { in SpeedDialItemTouchHelperCallback() argument 43 this.adapter = adapter; in SpeedDialItemTouchHelperCallback() 61 return adapter.canDropOver(target); in canDropOver() 66 if (!adapter.canDropOver(viewHolder)) { in getMovementFlags() 84 adapter.enterRemoveView(); in onMove() 92 adapter.leaveRemoveView(); in onMove() 94 adapter.onItemMove(viewHolder.getAdapterPosition(), target.getAdapterPosition()); in onMove() 125 adapter.dropOnRemoveView(viewHolder); in onChildDraw() 131 adapter.leaveRemoveView(); in onChildDraw() [all …]
|
/packages/apps/Dialer/java/com/android/dialer/app/list/ |
D | ListsFragment.java | 69 private DialtactsPagerAdapter adapter; field in ListsFragment 128 currentPage = adapter.getItem(viewPager.getCurrentItem()); in onResume() 199 adapter = in onCreateView() 205 viewPager.setAdapter(adapter); in onCreateView() 255 if (adapter.hasActiveVoicemailProvider()) { in showTab() 256 viewPager.setCurrentItem(adapter.getRtlPosition(DialtactsPagerAdapter.TAB_INDEX_VOICEMAIL)); in showTab() 262 viewPager.setCurrentItem(adapter.getRtlPosition(index)); in showTab() 273 tabIndex = adapter.getRtlPosition(position); in onPageScrolled() 296 tabIndex = adapter.getRtlPosition(position); in onPageSelected() 310 currentPage = adapter.getItem(position); in onPageSelected() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/wifi/calling/ |
D | ListWithEntrySummaryPreferenceTest.java | 67 ListAdapter adapter = dialog.getListView().getAdapter(); in initialize_defaultEntries_shouldDisplayDefaultEntries() local 70 assertThat(adapter.getCount()).isEqualTo(len); in initialize_defaultEntries_shouldDisplayDefaultEntries() 72 TextView title = adapter.getView(i, null, null).findViewById(R.id.title); in initialize_defaultEntries_shouldDisplayDefaultEntries() 73 TextView summary = adapter.getView(i, null, null).findViewById(R.id.summary); in initialize_defaultEntries_shouldDisplayDefaultEntries() 86 ListAdapter adapter = dialog.getListView().getAdapter(); in setEntries_customEntries_shouldUpdateEntries() local 89 assertThat(adapter.getCount()).isEqualTo(len); in setEntries_customEntries_shouldUpdateEntries() 91 TextView title = adapter.getView(i, null, null).findViewById(R.id.title); in setEntries_customEntries_shouldUpdateEntries() 92 TextView summary = adapter.getView(i, null, null).findViewById(R.id.summary); in setEntries_customEntries_shouldUpdateEntries() 111 ListAdapter adapter = dialog.getListView().getAdapter(); in onSaveAndRestoreInstanceState_resumePreference_shouldNotChangeEntries() local 114 assertThat(adapter.getCount()).isEqualTo(len); in onSaveAndRestoreInstanceState_resumePreference_shouldNotChangeEntries() [all …]
|
/packages/apps/Dialer/java/com/android/dialer/app/calllog/ |
D | CallLogFragment.java | 117 private CallLogAdapter adapter; field in CallLogFragment 126 if (adapter != null) { 127 adapter.notifyDataSetChanged(); 235 adapter.invalidatePositions(); in onCallsFetched() 236 adapter.setLoading(false); in onCallsFetched() 237 adapter.changeCursor(cursor); in onCallsFetched() 340 adapter = in setupData() 356 recyclerView.setAdapter(adapter); in setupData() 357 if (adapter.getOnScrollListener() != null) { in setupData() 358 recyclerView.addOnScrollListener(adapter.getOnScrollListener()); in setupData() [all …]
|
/packages/apps/Dialer/java/com/android/dialer/searchfragment/list/ |
D | NewSearchFragment.java | 112 private SearchAdapter adapter; field in NewSearchFragment 141 private final Runnable capabilitiesUpdatedRunnable = () -> adapter.notifyDataSetChanged(); 154 adapter = new SearchAdapter(getContext(), new SearchCursorManager(), this); in onCreateView() 155 adapter.setQuery(query, rawNumber); in onCreateView() 156 adapter.setSearchActions(getActions()); in onCreateView() 162 recyclerView.setAdapter(adapter); in onCreateView() 231 adapter.setContactsCursor((SearchCursor) cursor); in onLoadFinished() 234 adapter.setNearbyPlacesCursor((SearchCursor) cursor); in onLoadFinished() 237 adapter.setDirectoryContactsCursor((SearchCursor) cursor); in onLoadFinished() 254 adapter.setContactsCursor(null); in onLoaderReset() [all …]
|
/packages/apps/PermissionController/src/com/android/permissioncontroller/permission/ui/television/ |
D | PermissionsFrameFragment.java | 147 final RecyclerView.Adapter<?> adapter = super.onCreateAdapter(preferenceScreen); in onCreateAdapter() local 149 if (adapter != null) { in onCreateAdapter() 154 adapter.registerAdapterDataObserver(new RecyclerView.AdapterDataObserver() { in onCreateAdapter() 157 checkEmpty(adapter, recyclerView, emptyView); in onCreateAdapter() 162 checkEmpty(adapter, recyclerView, emptyView); in onCreateAdapter() 167 checkEmpty(adapter, recyclerView, emptyView); in onCreateAdapter() 171 checkEmpty(adapter, recyclerView, emptyView); in onCreateAdapter() 174 return adapter; in onCreateAdapter() 177 private void checkEmpty(RecyclerView.Adapter<?> adapter, View recyclerView, View emptyView) { in checkEmpty() argument 181 recyclerView.setVisibility(isEmpty && adapter.getItemCount() == 0 ? in checkEmpty()
|
/packages/apps/Car/libs/car-ui-lib/src/com/android/car/ui/ |
D | AlertDialogBuilder.java | 353 public AlertDialogBuilder setAdapter(final ListAdapter adapter, in setAdapter() argument 355 mBuilder.setAdapter(adapter, listener); in setAdapter() 364 public AlertDialogBuilder setAdapter(final CarUiListItemAdapter adapter) { in setAdapter() argument 365 setCustomList(adapter); in setAdapter() 369 private void setCustomList(@NonNull CarUiListItemAdapter adapter) { in setCustomList() argument 374 mList.setAdapter(adapter); in setCustomList() 534 public AlertDialogBuilder setSingleChoiceItems(ListAdapter adapter, int checkedItem, in setSingleChoiceItems() argument 536 mBuilder.setSingleChoiceItems(adapter, checkedItem, listener); in setSingleChoiceItems() 555 public AlertDialogBuilder setSingleChoiceItems(CarUiRadioButtonListItemAdapter adapter, in setSingleChoiceItems() argument 557 setCustomList(adapter); in setSingleChoiceItems() [all …]
|
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/ui/ |
D | ClusteredSuggestionsView.java | 36 public void setSuggestionsAdapter(SuggestionsAdapter<ExpandableListAdapter> adapter) { in setSuggestionsAdapter() argument 37 mSuggestionsAdapter = adapter; in setSuggestionsAdapter() 38 super.setAdapter(adapter == null ? null : adapter.getListAdapter()); in setSuggestionsAdapter() 63 ExpandableListAdapter adapter = mSuggestionsAdapter.getListAdapter(); in expandAll() local 64 for (int i = 0; i < adapter.getGroupCount(); ++i) { in expandAll()
|
/packages/apps/TV/src/com/android/tv/menu/ |
D | ItemListRow.java | 36 ItemListAdapter adapter) { in ItemListRow() argument 37 this(context, menu, context.getString(titleResId), itemHeightResId, adapter); in ItemListRow() 45 ItemListAdapter adapter) { in ItemListRow() argument 47 mAdapter = adapter; in ItemListRow() 55 public void setAdapter(ItemListAdapter<?> adapter) { in setAdapter() argument 56 mAdapter = adapter; in setAdapter()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/ |
D | TetherSettings.java | 134 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in onCreate() local 135 if (adapter != null) { in onCreate() 136 adapter.getProfileProxy(activity.getApplicationContext(), mProfileServiceListener, in onCreate() 177 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in onDestroy() local 179 if (profile != null && adapter != null) { in onDestroy() 180 adapter.closeProfileProxy(BluetoothProfile.PAN, profile); in onDestroy() 353 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in updateBluetoothState() local 354 if (adapter == null) { in updateBluetoothState() 357 int btState = adapter.getState(); in updateBluetoothState() 378 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in startTethering() local [all …]
|
/packages/apps/Car/Messenger/src/com/android/car/messenger/bluetooth/ |
D | BluetoothHelper.java | 24 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in getBondedDevices() local 26 if (adapter != null) { in getBondedDevices() 27 Set<BluetoothDevice> devices = adapter.getBondedDevices(); in getBondedDevices() 56 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in sendMessage() local 57 if (adapter == null) { in sendMessage() 60 BluetoothDevice device = adapter.getRemoteDevice(deviceAddress); in sendMessage()
|