/packages/apps/TV/tests/robotests/src/com/android/tv/dvr/ui/ |
D | SortedArrayAdapterTest.java | 45 private TestSortedArrayAdapter mAdapter; field in SortedArrayAdapterTest 49 mAdapter = new TestSortedArrayAdapter(Integer.MAX_VALUE, null); in setUp() 59 mAdapter.add(P1); in testAdd_one() 61 assertContentsInOrder(mAdapter, P1); in testAdd_one() 66 mAdapter.add(P1); in testAdd_two() 67 mAdapter.add(P2); in testAdd_two() 69 assertContentsInOrder(mAdapter, P2, P1); in testAdd_two() 74 mAdapter.setInitialItems(Arrays.asList(P1, P2)); in testSetInitialItems_two() 76 assertContentsInOrder(mAdapter, P2, P1); in testSetInitialItems_two() 81 mAdapter = new TestSortedArrayAdapter(1, null); in testMaxInitialCount() [all …]
|
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/category/ |
D | CategoryPanel.java | 39 private CategoryAdapter mAdapter; field in CategoryPanel 56 mAdapter = activity.getCategoryLooksAdapter(); in loadAdapter() 57 if (mAdapter != null) { in loadAdapter() 58 mAdapter.initializeSelection(MainPanel.LOOKS); in loadAdapter() 64 mAdapter = activity.getCategoryBordersAdapter(); in loadAdapter() 65 if (mAdapter != null) { in loadAdapter() 66 mAdapter.initializeSelection(MainPanel.BORDERS); in loadAdapter() 72 mAdapter = activity.getCategoryGeometryAdapter(); in loadAdapter() 73 if (mAdapter != null) { in loadAdapter() 74 mAdapter.initializeSelection(MainPanel.GEOMETRY); in loadAdapter() [all …]
|
D | CategoryTrack.java | 32 private CategoryAdapter mAdapter; field in CategoryTrack 40 if (getChildCount() != mAdapter.getCount()) { 60 mAdapter = adapter; in setAdapter() 61 mAdapter.registerDataSetObserver(mDataSetObserver); in setAdapter() 67 mAdapter.setItemWidth(mElemSize); in fillContent() 68 mAdapter.setItemHeight(LayoutParams.MATCH_PARENT); in fillContent() 69 int n = mAdapter.getCount(); in fillContent() 71 View view = mAdapter.getView(i, null, this); in fillContent()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/widget/ |
D | HighlightablePreferenceGroupAdapterTest.java | 78 private HighlightablePreferenceGroupAdapter mAdapter; field in HighlightablePreferenceGroupAdapterTest 89 mAdapter = spy(new HighlightablePreferenceGroupAdapter(mPreferenceCategory, TEST_KEY, in setUp() 91 when(mAdapter.getItem(anyInt())).thenReturn(mPreference); in setUp() 98 when(mAdapter.getPreferenceAdapterPosition(anyString())).thenReturn(1); in requestHighlight_hasKey_notHighlightedBefore_shouldRequest() 99 mAdapter.requestHighlight(mRoot, mock(RecyclerView.class), mock(AppBarLayout.class)); in requestHighlight_hasKey_notHighlightedBefore_shouldRequest() 111 when(mAdapter.getPreferenceAdapterPosition(anyString())).thenReturn(1); in requestHighlight_enableTouchExploration_shouldHaveA11yHighlightDelay() 112 mAdapter.requestHighlight(mRoot, mock(RecyclerView.class), mock(AppBarLayout.class)); in requestHighlight_enableTouchExploration_shouldHaveA11yHighlightDelay() 121 ReflectionHelpers.setField(mAdapter, "mHighlightKey", null); in requestHighlight_noKey_highlightedBefore_noRecyclerView_shouldNotRequest() 122 ReflectionHelpers.setField(mAdapter, "mHighlightRequested", false); in requestHighlight_noKey_highlightedBefore_noRecyclerView_shouldNotRequest() 123 mAdapter.requestHighlight(mRoot, mock(RecyclerView.class), mock(AppBarLayout.class)); in requestHighlight_noKey_highlightedBefore_noRecyclerView_shouldNotRequest() [all …]
|
/packages/apps/Gallery2/src/com/android/photos/views/ |
D | HeaderGridView.java | 220 private final ListAdapter mAdapter; field in HeaderGridView.HeaderViewGridAdapter 231 mAdapter = adapter; in HeaderViewGridAdapter() 248 return (mAdapter == null || mAdapter.isEmpty()) && getHeadersCount() == 0; in isEmpty() 290 if (mAdapter != null) { in getCount() 291 return getHeadersCount() * mNumColumns + mAdapter.getCount(); in getCount() 299 if (mAdapter != null) { in areAllItemsEnabled() 300 return mAreAllFixedViewsSelectable && mAdapter.areAllItemsEnabled(); in areAllItemsEnabled() 318 if (mAdapter != null) { in isEnabled() 319 adapterCount = mAdapter.getCount(); in isEnabled() 321 return mAdapter.isEnabled(adjPosition); in isEnabled() [all …]
|
/packages/apps/Camera2/src/com/android/camera/data/ |
D | FilmstripDataAdapterProxy.java | 40 protected final LocalFilmstripDataAdapter mAdapter; field in FilmstripDataAdapterProxy 56 mAdapter = wrappedAdapter; in FilmstripDataAdapterProxy() 63 mAdapter.suggestViewSizeBound(w, h); in suggestViewSizeBound() 68 mAdapter.setListener(listener); in setListener() 73 mAdapter.setLocalDataListener(listener); in setLocalDataListener() 78 mAdapter.requestLoad(onDone); in requestLoad() 83 mAdapter.requestLoadNewPhotos(); in requestLoadNewPhotos() 88 return mAdapter.addOrUpdate(item); in addOrUpdate() 93 mAdapter.clear(); in clear() 98 return mAdapter.executeDeletion(); in executeDeletion() [all …]
|
D | FixedLastProxyAdapter.java | 62 int totalNumber = mAdapter.getTotalNumber(); in getItemAt() 65 return mAdapter.getItemAt(index); in getItemAt() 74 if (index < mAdapter.getTotalNumber()) { in removeAt() 75 mAdapter.removeAt(index); in removeAt() 81 return mAdapter.findByContentUri(uri); in findByContentUri() 86 int totalNumber = mAdapter.getTotalNumber(); in updateItemAt() 89 mAdapter.updateItemAt(pos, item); in updateItemAt() 110 return mAdapter.getTotalNumber() + 1; in getTotalNumber() 115 int totalNumber = mAdapter.getTotalNumber(); in getView() 118 return mAdapter.getView(recycled, index, videoClickedCallback); in getView() [all …]
|
D | FixedFirstProxyAdapter.java | 66 return mAdapter.getItemAt(index - 1); in getItemAt() 72 mAdapter.removeAt(index - 1); in removeAt() 78 int pos = mAdapter.findByContentUri(uri); in findByContentUri() 103 mAdapter.updateItemAt(pos - 1, item); in updateItemAt() 109 return (mAdapter.getTotalNumber() + 1); in getTotalNumber() 119 return mAdapter.getView(recycled, index - 1, videoClickedCallback); in getView() 127 return mAdapter.getItemViewType(index); in getItemViewType() 135 return mAdapter.getFilmstripItemAt(index - 1); in getFilmstripItemAt() 141 mAdapter.setListener((listener == null) ? null : this); in setListener() 195 return mAdapter.updateMetadataAt(index - 1); in updateMetadataAt() [all …]
|
/packages/apps/Contacts/src/com/android/contacts/list/ |
D | ContactEntryListFragment.java | 121 private T mAdapter; field in ContactEntryListFragment 219 if (mAdapter != null) { in setEnabled() 223 mAdapter.clearPartitions(); in setEnabled() 242 return mAdapter; in getAdapter() 283 mAdapter = createListAdapter(); in onCreate() 326 if (mAdapter == null) { in startLoading() 332 int partitionCount = mAdapter.getPartitionCount(); in startLoading() 334 Partition partition = mAdapter.getPartition(i); in startLoading() 355 loader.setDirectorySearchMode(mAdapter.getDirectorySearchMode()); in onCreateLoader() 364 mAdapter.configureLoader(loader, directoryId); in onCreateLoader() [all …]
|
/packages/services/Telecomm/tests/src/com/android/server/telecom/tests/ |
D | CallAudioRoutePeripheralAdapterTest.java | 45 CallAudioRoutePeripheralAdapter mAdapter; field in CallAudioRoutePeripheralAdapterTest 58 mAdapter = new CallAudioRoutePeripheralAdapter( in setUp() 76 assertFalse(mAdapter.isBluetoothAudioOn()); in testIsBluetoothAudioOn() 79 assertTrue(mAdapter.isBluetoothAudioOn()); in testIsBluetoothAudioOn() 86 assertFalse(mAdapter.isHearingAidDeviceOn()); in testIsHearingAidDeviceOn() 89 assertTrue(mAdapter.isHearingAidDeviceOn()); in testIsHearingAidDeviceOn() 96 assertFalse(mAdapter.isLeAudioDeviceOn()); in testIsLeAudioDeviceOn() 99 assertTrue(mAdapter.isLeAudioDeviceOn()); in testIsLeAudioDeviceOn() 105 mAdapter.onBluetoothDeviceListChanged(); in testOnBluetoothDeviceListChanged() 113 mAdapter.onBluetoothActiveDevicePresent(); in testOnBluetoothActiveDevicePresent() [all …]
|
/packages/services/Car/car_product/car_ui_portrait/apps/CarUiPortraitCarUiProxy/plugin/src/main/java/com/chassis/car/ui/plugin/recyclerview/ |
D | RVAdapterWrapper.java | 37 private final AdapterOEMV1 mAdapter; field in RVAdapterWrapper 80 this.mAdapter = adapter; in RVAdapterWrapper() 86 switch (mAdapter.getStateRestorationPolicyInt()) { in updateStateRestorationPolicy() 104 return mAdapter.getItemCount(); in getItemCount() 109 return mAdapter.getItemId(position); in getItemId() 114 return mAdapter.getItemViewType(position); in getItemViewType() 119 mAdapter.onAttachedToRecyclerView(null); in onAttachedToRecyclerView() 124 mAdapter.bindViewHolder(holder.getViewHolder(), position); in onBindViewHolder() 129 return new ViewHolderWrapper(mAdapter.createViewHolder(parent, viewType)); in onCreateViewHolder() 134 mAdapter.onDetachedFromRecyclerView(null); in onDetachedFromRecyclerView() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/homepage/contextualcards/ |
D | ContextualCardsAdapterTest.java | 55 private ContextualCardsAdapter mAdapter; field in ContextualCardsAdapterTest 67 mAdapter = new ContextualCardsAdapter(mActivity, fragment, mManager); in setUp() 72 mAdapter.mContextualCards.addAll(getContextualCardList()); in getItemViewType_sliceFullWidth_shouldReturnSliceFullWidthViewType() 74 final int viewType = mAdapter.getItemViewType(1); in getItemViewType_sliceFullWidth_shouldReturnSliceFullWidthViewType() 82 mAdapter.mContextualCards.addAll(cards); in getItemCount_cardList_shouldReturnListSize() 84 final int count = mAdapter.getItemCount(); in getItemCount_cardList_shouldReturnListSize() 94 final RecyclerView.ViewHolder holder = mAdapter.onCreateViewHolder(recyclerView, in onCreateViewHolder_conditionalCard_shouldReturnConditionalCardHolder() 102 mAdapter.mContextualCards.add(buildConditionContextualCard()); in onBindViewHolder_conditionalCard_shouldSetTestTitle() 109 mAdapter.onBindViewHolder(holder, 0); in onBindViewHolder_conditionalCard_shouldSetTestTitle() 116 mAdapter.mContextualCards.addAll(getContextualCardList()); in onContextualCardUpdated_emptyList_shouldClearCardList() [all …]
|
/packages/apps/DocumentsUI/tests/functional/com/android/documentsui/dirlist/ |
D | DirectoryAddonsAdapterTest.java | 45 private DirectoryAddonsAdapter mAdapter; field in DirectoryAddonsAdapterTest 59 mAdapter = new DirectoryAddonsAdapter( in setUp() 68 mEnv.model.addUpdateListener(mAdapter.getModelUpdateListener()); in setUp() 75 assertEquals(mEnv.model.getItemCount() + 1, mAdapter.getItemCount()); in testItemCount_mixed() 83 assertEquals(0, mAdapter.getPosition(ModelId.build(mEnv.model.mUserId, AUTHORITY, "1"))); in testGetPosition() 86 assertEquals(2, mAdapter.getPosition(ModelId.build(mEnv.model.mUserId, AUTHORITY, "2"))); in testGetPosition() 96 assertEquals(mEnv.model.getItemCount(), mAdapter.getItemCount()); in testItemCount_allDirs() 106 assertEquals(mEnv.model.getItemCount(), mAdapter.getItemCount()); in testItemCount_allFiles() 118 assertEquals(mEnv.model.getItemCount() + 1, mAdapter.getItemCount()); in testAddsInfoMessage_WithDirectoryChildren() 124 assertEquals(1, mAdapter.getItemCount()); in testItemCount_none() [all …]
|
D | DirectoryAddonsAdapterPrivateSpaceTest.java | 57 private DirectoryAddonsAdapter mAdapter; field in DirectoryAddonsAdapterPrivateSpaceTest 85 mAdapter = new DirectoryAddonsAdapter( in setUp() 94 mEnv.model.addUpdateListener(mAdapter.getModelUpdateListener()); in setUp() 101 assertEquals(mEnv.model.getItemCount() + 1, mAdapter.getItemCount()); in testItemCount_mixed() 109 assertEquals(0, mAdapter.getPosition(ModelId.build(mEnv.model.mUserId, AUTHORITY, "1"))); in testGetPosition() 112 assertEquals(2, mAdapter.getPosition(ModelId.build(mEnv.model.mUserId, AUTHORITY, "2"))); in testGetPosition() 122 assertEquals(mEnv.model.getItemCount(), mAdapter.getItemCount()); in testItemCount_allDirs() 132 assertEquals(mEnv.model.getItemCount(), mAdapter.getItemCount()); in testItemCount_allFiles() 144 assertEquals(mEnv.model.getItemCount() + 1, mAdapter.getItemCount()); in testAddsInfoMessage_WithDirectoryChildren() 150 assertEquals(1, mAdapter.getItemCount()); in testItemCount_none() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/localepicker/ |
D | LocaleListEditorTest.java | 115 private LocaleDragAndDropAdapter mAdapter; field in LocaleListEditorTest 167 ReflectionHelpers.setField(mLocaleListEditor, "mAdapter", mAdapter); in setUp() 203 when(mAdapter.getCheckedCount()).thenReturn(1); in showRemoveLocaleWarningDialog_allLocaleSelected_shouldShowErrorDialog() 204 when(mAdapter.getItemCount()).thenReturn(1); in showRemoveLocaleWarningDialog_allLocaleSelected_shouldShowErrorDialog() 205 when(mAdapter.isFirstLocaleChecked()).thenReturn(true); in showRemoveLocaleWarningDialog_allLocaleSelected_shouldShowErrorDialog() 225 when(mAdapter.getCheckedCount()).thenReturn(1); in showRemoveLocaleWarningDialog_mainLocaleSelected_shouldShowLocaleChangeDialog() 226 when(mAdapter.getItemCount()).thenReturn(2); in showRemoveLocaleWarningDialog_mainLocaleSelected_shouldShowLocaleChangeDialog() 227 when(mAdapter.isFirstLocaleChecked()).thenReturn(true); in showRemoveLocaleWarningDialog_mainLocaleSelected_shouldShowLocaleChangeDialog() 247 when(mAdapter.getCheckedCount()).thenReturn(1); in showRemoveLocaleWarningDialog_mainLocaleNotSelected_shouldShowConfirmDialog() 248 when(mAdapter.getItemCount()).thenReturn(2); in showRemoveLocaleWarningDialog_mainLocaleNotSelected_shouldShowConfirmDialog() [all …]
|
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/dialog/old/ |
D | BaseActionFragment.java | 57 private ActionAdapter mAdapter; field in BaseActionFragment 102 mAdapter = new ActionAdapter(mFragment.getActivity()); in onCreate() 109 mAdapter.addAction(action); in onCreate() 126 mAdapter.setListener(this); in onCreate() 127 mAdapter.setOnFocusListener(this); in onCreate() 128 mAdapter.setOnKeyListener(this); in onCreate() 135 sav.addOnScrollListener(mAdapter); in onResume() 136 if (getAdapter() != mAdapter) { in onResume() 137 mAdapter.setScrollAdapterView(sav); in onResume() 138 setAdapter(mAdapter); in onResume() [all …]
|
/packages/screensavers/PhotoTable/src/com/android/dreams/phototable/ |
D | FlipperDreamSettings.java | 42 private SectionedAlbumDataAdapter mAdapter; field in FlipperDreamSettings 69 mAdapter = new SectionedAlbumDataAdapter(FlipperDreamSettings.this, in init() 79 mAdapter.registerDataSetObserver(new DataSetObserver () { in init() 89 setListAdapter(mAdapter); in init() 92 showApology(mAdapter.getCount() == 0); in init() 111 if (mAdapter != null) { in onOptionsItemSelected() 112 mAdapter.selectAll(!mAdapter.areAllSelected()); in onOptionsItemSelected() 130 if (mAdapter != null && mSelectAll != null) { in updateActionItem() 131 if (mAdapter.areAllSelected()) { in updateActionItem()
|
/packages/modules/Bluetooth/service/src/com/android/server/bluetooth/ |
D | BluetoothManagerService.java | 198 private AdapterBinder mAdapter = null; field in BluetoothManagerService 321 if (mAdapter == null) { in onFactoryReset() 326 mAdapter.stopBle(mContext.getAttributionSource()); in onFactoryReset() 330 mAdapter.disable(mContext.getAttributionSource()); in onFactoryReset() 464 if (mAdapter != null) { in forceToOffFromModeChange() 466 mAdapter.stopBle(mContext.getAttributionSource()); in forceToOffFromModeChange() 593 if (mAdapter != null && mState.oneOf(STATE_BLE_ON)) { 594 mAdapter.stopBle(mContext.getAttributionSource()); 595 } else if (mAdapter != null && mState.oneOf(STATE_ON)) { 596 mAdapter.disable(mContext.getAttributionSource()); [all …]
|
/packages/providers/MediaProvider/src/com/android/providers/media/photopicker/ui/ |
D | ViewPager2Wrapper.java | 43 private final PreviewAdapter mAdapter; field in ViewPager2Wrapper 53 mAdapter = new PreviewAdapter(context, muteStatus, onCreateSurfaceController, in ViewPager2Wrapper() 55 mAdapter.updateItemList(selectedItems); in ViewPager2Wrapper() 56 mViewPager.setAdapter(mAdapter); in ViewPager2Wrapper() 66 mAdapter.updateItemList(selectedItems); in updateList() 87 return mAdapter.getItem(position); in getItemAtInternal() 91 mAdapter.onStop(); in onStop() 105 mAdapter.onDestroy(); in onDestroy() 115 mAdapter.onHandlePageSelected(view); in transformPage()
|
/packages/apps/DocumentsUI/src/com/android/documentsui/ |
D | HorizontalBreadcrumb.java | 46 private BreadcrumbAdapter mAdapter; field in HorizontalBreadcrumb 69 mAdapter = new BreadcrumbAdapter(state, env, this::onKey); in setup() 89 setAdapter(mAdapter); in show() 91 int currentItemCount = mAdapter.getItemCount(); in show() 92 int lastItemCount = mAdapter.getLastItemSize(); in show() 94 mAdapter.notifyItemRangeInserted(lastItemCount, in show() 96 mAdapter.notifyItemChanged(lastItemCount - 1); in show() 98 mAdapter.notifyItemRangeRemoved(currentItemCount, in show() 100 mAdapter.notifyItemChanged(currentItemCount - 1); in show() 102 mAdapter.notifyItemChanged(currentItemCount - 1); in show() [all …]
|
/packages/apps/Settings/src/com/android/settings/localepicker/ |
D | LocaleListEditor.java | 89 private LocaleDragAndDropAdapter mAdapter; field in LocaleListEditor 129 mAdapter = new LocaleDragAndDropAdapter(this, feedsList); in onCreate() 175 mAdapter.restoreState(savedInstanceState, isDialogShowing); in onViewStateRestored() 193 mAdapter.saveState(outState); in onSaveInstanceState() 225 mAdapter.addLocale(localeInfo); in onActivityResult() 229 localeInfo = mAdapter.getFeedItemList().get(0); in onActivityResult() 231 mAdapter.doTheUpdate(); in onActivityResult() 244 mAdapter.notifyListChanged(localeInfo); in onActivityResult() 246 mAdapter.setCacheItemList(); in onActivityResult() 255 mAdapter.addLocale(mayAppendUnicodeTags(localeInfo, preferencesTags)); in onActivityResult() [all …]
|
D | LocaleLinearLayoutManager.java | 44 private final LocaleDragAndDropAdapter mAdapter; field in LocaleLinearLayoutManager 57 this.mAdapter = adapter; in LocaleLinearLayoutManager() 93 if (mAdapter.isRemoveMode()) { // We don't move things around in remove mode in onInitializeAccessibilityNodeInfoForItem() 123 mAdapter.onItemMove(position, position - 1); in performAccessibilityActionForItem() 128 mAdapter.onItemMove(position, position + 1); in performAccessibilityActionForItem() 133 mAdapter.onItemMove(position, 0); in performAccessibilityActionForItem() 138 mAdapter.onItemMove(position, itemCount - 1); in performAccessibilityActionForItem() 143 mAdapter.removeItem(position); in performAccessibilityActionForItem() 151 mLocaleListEditor.showConfirmDialog(false, mAdapter.getFeedItemList().get(0)); in performAccessibilityActionForItem()
|
/packages/modules/Bluetooth/android/app/tests/unit/src/com/android/bluetooth/a2dpsink/ |
D | A2dpSinkServiceBinderTest.java | 41 private BluetoothAdapter mAdapter; field in A2dpSinkServiceBinderTest 45 mAdapter = BluetoothAdapter.getDefaultAdapter(); in setUp() 56 BluetoothDevice device = TestUtils.getTestDevice(mAdapter, 0); in connect() 65 BluetoothDevice device = TestUtils.getTestDevice(mAdapter, 0); in disconnect() 91 BluetoothDevice device = TestUtils.getTestDevice(mAdapter, 0); in getConnectionState() 100 BluetoothDevice device = TestUtils.getTestDevice(mAdapter, 0); in setConnectionPolicy() 110 BluetoothDevice device = TestUtils.getTestDevice(mAdapter, 0); in getConnectionPolicy() 119 BluetoothDevice device = TestUtils.getTestDevice(mAdapter, 0); in isA2dpPlaying() 128 BluetoothDevice device = TestUtils.getTestDevice(mAdapter, 0); in getAudioConfig()
|
/packages/apps/QuickAccessWallet/src/com/android/systemui/plugin/globalactions/wallet/ |
D | WalletPopupMenu.java | 38 private final ArrayAdapter<OverflowItem> mAdapter; field in WalletPopupMenu 48 mAdapter = new ArrayAdapter<>(context, R.layout.wallet_more_item); in WalletPopupMenu() 49 setAdapter(mAdapter); in WalletPopupMenu() 57 mAdapter.getItem(position).onClickListener.run(); in WalletPopupMenu() 63 mAdapter.clear(); in setMenuItems() 64 mAdapter.addAll(menuItems); in setMenuItems() 74 int count = mAdapter.getCount(); in measureContentWidth() 78 itemView = mAdapter.getView(i, itemView, measureParent); in measureContentWidth()
|
/packages/apps/Gallery2/src/com/android/gallery3d/filtershow/presets/ |
D | PresetManagementDialog.java | 31 private UserPresetsAdapter mAdapter; field in PresetManagementDialog 40 mAdapter = activity.getUserPresetsAdapter(); in onCreateView() 53 mAdapter.clearChangedRepresentations(); in onClick() 54 mAdapter.clearDeletedRepresentations(); in onClick() 55 activity.updateUserPresetsFromAdapter(mAdapter); in onClick() 61 mAdapter.updateCurrent(); in onClick() 62 activity.updateUserPresetsFromAdapter(mAdapter); in onClick()
|