/frameworks/ex/common/tests/src/com/android/common/widget/ |
D | CompositeCursorAdapterTest.java | 81 TestCompositeCursorAdapter adapter = new TestCompositeCursorAdapter(); in testGetCountNoEmptySections() local 82 adapter.addPartition(false, false); in testGetCountNoEmptySections() 83 adapter.addPartition(false, false); in testGetCountNoEmptySections() 85 adapter.changeCursor(0, makeCursor("a", 2)); in testGetCountNoEmptySections() 86 adapter.changeCursor(1, makeCursor("b", 3)); in testGetCountNoEmptySections() 88 assertEquals(5, adapter.getCount()); in testGetCountNoEmptySections() 92 TestCompositeCursorAdapter adapter = new TestCompositeCursorAdapter(); in testGetViewNoEmptySections() local 93 adapter.addPartition(false, false); in testGetViewNoEmptySections() 94 adapter.addPartition(false, false); in testGetViewNoEmptySections() 96 adapter.changeCursor(0, makeCursor("a", 1)); in testGetViewNoEmptySections() [all …]
|
/frameworks/base/core/tests/bluetoothtests/src/android/bluetooth/ |
D | BluetoothStressTest.java | 64 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in testEnable() local 65 mTestUtils.disable(adapter); in testEnable() 69 mTestUtils.enable(adapter); in testEnable() 70 mTestUtils.disable(adapter); in testEnable() 83 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in testDiscoverable() local 84 mTestUtils.disable(adapter); in testDiscoverable() 85 mTestUtils.enable(adapter); in testDiscoverable() 86 mTestUtils.undiscoverable(adapter); in testDiscoverable() 90 mTestUtils.discoverable(adapter); in testDiscoverable() 91 mTestUtils.undiscoverable(adapter); in testDiscoverable() [all …]
|
D | BluetoothRebootStressTest.java | 54 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in testStart() local 55 mTestUtils.enable(adapter); in testStart() 64 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in testMiddleNoToggle() local 66 assertTrue(adapter.isEnabled()); in testMiddleNoToggle() 75 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in testMiddleToggle() local 77 assertTrue(adapter.isEnabled()); in testMiddleToggle() 79 mTestUtils.disable(adapter); in testMiddleToggle() 80 mTestUtils.enable(adapter); in testMiddleToggle() 88 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in testStop() local 90 assertTrue(adapter.isEnabled()); in testStop() [all …]
|
D | BluetoothTestUtils.java | 423 public void enable(BluetoothAdapter adapter) { in enable() argument 429 int state = adapter.getState(); in enable() 432 assertTrue(adapter.isEnabled()); in enable() 436 assertFalse(adapter.isEnabled()); in enable() 440 assertFalse(adapter.isEnabled()); in enable() 442 assertTrue(adapter.enable()); in enable() 446 assertTrue(adapter.enable()); in enable() 455 state = adapter.getState(); in enable() 458 assertTrue(adapter.isEnabled()); in enable() 483 public void disable(BluetoothAdapter adapter) { in disable() argument [all …]
|
/frameworks/opt/mailcommon/tests/src/com/android/mailcommon/ |
D | MergedAdapterTest.java | 108 MergedAdapter<ListSpinnerAdapter> adapter = new MergedAdapter<ListSpinnerAdapter>(); in testGetSubAdapters() local 110 adapter.setAdapters(mFirst, mSecond); in testGetSubAdapters() 111 assertEquals(2, adapter.getSubAdapterCount()); in testGetSubAdapters() 112 assertEquals(mFirst, adapter.getSubAdapter(0)); in testGetSubAdapters() 113 assertEquals(mSecond, adapter.getSubAdapter(1)); in testGetSubAdapters() 117 MergedAdapter<ListSpinnerAdapter> adapter = new MergedAdapter<ListSpinnerAdapter>(); in testGetSubAdapterOffset() local 119 adapter.setAdapters(mFirst, mSecond); in testGetSubAdapterOffset() 120 LocalAdapterPosition<ListSpinnerAdapter> p = adapter.getAdapterOffsetForItem(13); in testGetSubAdapterOffset() 126 MergedAdapter<ListSpinnerAdapter> adapter = new MergedAdapter<ListSpinnerAdapter>(); in testGetItemAndCount() local 128 adapter.setAdapters(mFirst, mSecond); in testGetItemAndCount() [all …]
|
/frameworks/opt/mailcommon/java/com/android/mailcommon/ |
D | MergedAdapter.java | 52 public LocalAdapterPosition(T adapter, int offset) { in LocalAdapterPosition() argument 53 mAdapter = adapter; in LocalAdapterPosition() 69 for (T adapter : mAdapters) { in setAdapters() 70 adapter.unregisterDataSetObserver(mObserver); in setAdapters() 76 for (T adapter : mAdapters) { in setAdapters() 77 adapter.registerDataSetObserver(mObserver); in setAdapters() 92 for (T adapter : mAdapters) { in getCount() 93 count += adapter.getCount(); in getCount() 141 for (T adapter : mAdapters) { in getViewTypeCount() 142 count += adapter.getViewTypeCount(); in getViewTypeCount() [all …]
|
D | MultiAdapterSpinner.java | 112 public void setSelectedItem(final FancySpinnerAdapter adapter, final int position) { in setSelectedItem() argument 118 if (a == adapter) { in setSelectedItem() 126 if (adapter.canSelect(position)) { in setSelectedItem() 128 View itemView = adapter.getView(position, null, this); in setSelectedItem() 133 if (position < adapter.getCount()) { in setSelectedItem()
|
/frameworks/base/core/java/android/widget/ |
D | AdapterView.java | 440 public abstract void setAdapter(T adapter); in setAdapter() argument 565 T adapter = getAdapter(); in getSelectedItem() local 567 if (adapter != null && adapter.getCount() > 0 && selection >= 0) { in getSelectedItem() 568 return adapter.getItem(selection); in getSelectedItem() 658 final T adapter = getAdapter(); in setEmptyView() local 659 final boolean empty = ((adapter == null) || adapter.isEmpty()); in setEmptyView() 686 final T adapter = getAdapter(); in setFocusable() local 687 final boolean empty = adapter == null || adapter.getCount() == 0; in setFocusable() 699 final T adapter = getAdapter(); in setFocusableInTouchMode() local 700 final boolean empty = adapter == null || adapter.getCount() == 0; in setFocusableInTouchMode() [all …]
|
D | Spinner.java | 370 public void setAdapter(SpinnerAdapter adapter) { in setAdapter() argument 371 super.setAdapter(adapter); in setAdapter() 374 mPopup.setAdapter(new DropDownAdapter(adapter)); in setAdapter() 376 mTempAdapter = new DropDownAdapter(adapter); in setAdapter() 644 int measureContentWidth(SpinnerAdapter adapter, Drawable background) { in measureContentWidth() argument 645 if (adapter == null) { in measureContentWidth() 660 final int end = Math.min(adapter.getCount(), start + MAX_ITEMS_MEASURED); in measureContentWidth() 664 final int positionType = adapter.getItemViewType(i); in measureContentWidth() 669 itemView = adapter.getView(i, itemView, this); in measureContentWidth() 701 public DropDownAdapter(SpinnerAdapter adapter) { in DropDownAdapter() argument [all …]
|
D | ExpandableListConnector.java | 470 HeterogeneousExpandableList adapter = in getItemViewType() local 473 retValue = adapter.getGroupType(pos.groupPos); in getItemViewType() 475 final int childType = adapter.getChildType(pos.groupPos, pos.childPos); in getItemViewType() 476 retValue = adapter.getGroupTypeCount() + childType; in getItemViewType() 494 HeterogeneousExpandableList adapter = in getViewTypeCount() local 496 return adapter.getGroupTypeCount() + adapter.getChildTypeCount(); in getViewTypeCount() 729 ExpandableListAdapter adapter = getAdapter(); in getFilter() local 730 if (adapter instanceof Filterable) { in getFilter() 731 return ((Filterable) adapter).getFilter(); in getFilter() 763 ExpandableListAdapter adapter = getAdapter(); in isEmpty() local [all …]
|
D | RemoteViewsAdapter.java | 119 public RemoteViewsAdapterServiceConnection(RemoteViewsAdapter adapter) { in RemoteViewsAdapterServiceConnection() argument 120 mAdapter = new WeakReference<RemoteViewsAdapter>(adapter); in RemoteViewsAdapterServiceConnection() 153 final RemoteViewsAdapter adapter = mAdapter.get(); in onServiceConnected() local 154 if (adapter == null) return; in onServiceConnected() 157 adapter.mWorkerQueue.post(new Runnable() { in onServiceConnected() 160 if (adapter.mNotifyDataSetChangedAfterOnServiceConnected) { in onServiceConnected() 162 adapter.onNotifyDataSetChanged(); in onServiceConnected() 165 adapter.mServiceConnection.getRemoteViewsFactory(); in onServiceConnected() 186 adapter.updateTemporaryMetaData(); in onServiceConnected() 189 adapter.mMainQueue.post(new Runnable() { in onServiceConnected() [all …]
|
D | AutoCompleteTextView.java | 609 public <T extends ListAdapter & Filterable> void setAdapter(T adapter) { in setAdapter() argument 615 mAdapter = adapter; in setAdapter() 619 adapter.registerDataSetObserver(mObserver); in setAdapter() 1097 final ListAdapter adapter = mAdapter; in buildImeCompletions() local 1098 if (adapter != null) { in buildImeCompletions() 1101 final int count = Math.min(adapter.getCount(), 20); in buildImeCompletions() 1106 if (adapter.isEnabled(i)) { in buildImeCompletions() 1107 Object item = adapter.getItem(i); in buildImeCompletions() 1108 long id = adapter.getItemId(i); in buildImeCompletions() 1236 final ListAdapter adapter = mAdapter; in onChanged() [all …]
|
/frameworks/base/nfc-extras/java/com/android/nfc_extras/ |
D | NfcAdapterExtras.java | 76 private static void initService(NfcAdapter adapter) { in initService() argument 77 final INfcAdapterExtras service = adapter.getNfcAdapterExtrasInterface(); in initService() 93 public static NfcAdapterExtras get(NfcAdapter adapter) { in get() argument 94 Context context = adapter.getContext(); in get() 102 initService(adapter); in get() 104 NfcAdapterExtras extras = sNfcExtras.get(adapter); in get() 106 extras = new NfcAdapterExtras(adapter); in get() 107 sNfcExtras.put(adapter, extras); in get() 113 private NfcAdapterExtras(NfcAdapter adapter) { in NfcAdapterExtras() argument 114 mAdapter = adapter; in NfcAdapterExtras() [all …]
|
/frameworks/base/core/java/android/nfc/ |
D | NfcManager.java | 47 NfcAdapter adapter; in NfcManager() local 54 adapter = NfcAdapter.getNfcAdapter(context); in NfcManager() 56 adapter = null; in NfcManager() 58 mAdapter = adapter; in NfcManager()
|
/frameworks/base/core/tests/coretests/src/android/widget/ |
D | ListViewTest.java | 45 Adapter<String> adapter = new Adapter<String>(context, 0, items); in testRequestLayout() local 46 listView.setAdapter(adapter); in testRequestLayout() 50 adapter.notifyDataSetChanged(); in testRequestLayout() 75 Adapter<String> adapter = new Adapter<String>(context, 0, items); in testNoSelectableItems() local 76 listView.setAdapter(adapter); in testNoSelectableItems() 82 adapter.notifyDataSetChanged(); in testNoSelectableItems() 88 adapter.notifyDataSetChanged(); in testNoSelectableItems()
|
/frameworks/base/core/java/android/bluetooth/ |
D | BluetoothAudioGateway.java | 57 public BluetoothAudioGateway(BluetoothAdapter adapter) { in BluetoothAudioGateway() argument 58 this(adapter, DEFAULT_HF_AG_CHANNEL, DEFAULT_HS_AG_CHANNEL); in BluetoothAudioGateway() 61 public BluetoothAudioGateway(BluetoothAdapter adapter, int handsfreeAgRfcommChannel, in BluetoothAudioGateway() argument 63 mAdapter = adapter; in BluetoothAudioGateway() 80 IncomingConnectionInfo(BluetoothAdapter adapter, BluetoothDevice remoteDevice, in IncomingConnectionInfo() argument 82 mAdapter = adapter; in IncomingConnectionInfo()
|
D | HeadsetBase.java | 77 public HeadsetBase(PowerManager pm, BluetoothAdapter adapter, in HeadsetBase() argument 81 mAdapter = adapter; in HeadsetBase() 93 public HeadsetBase(PowerManager pm, BluetoothAdapter adapter, in HeadsetBase() argument 98 mAdapter = adapter; in HeadsetBase()
|
/frameworks/support/v4/java/android/support/v4/view/ |
D | PagerTitleStrip.java | 247 final PagerAdapter adapter = pager.getAdapter(); in onAttachedToWindow() local 252 updateAdapter(null, adapter); in onAttachedToWindow() 266 void updateText(int currentItem, PagerAdapter adapter) { in updateText() argument 267 final int itemCount = adapter != null ? adapter.getCount() : 0; in updateText() 271 if (currentItem >= 1 && adapter != null) { in updateText() 272 text = adapter.getPageTitle(currentItem - 1); in updateText() 276 mCurrText.setText(adapter != null && currentItem < itemCount ? in updateText() 277 adapter.getPageTitle(currentItem) : null); in updateText() 280 if (currentItem + 1 < itemCount && adapter != null) { in updateText() 281 text = adapter.getPageTitle(currentItem + 1); in updateText()
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/ |
D | BluetoothController.java | 49 final BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in BluetoothController() local 50 if (adapter != null) { in BluetoothController() 51 handleAdapterStateChange(adapter.getState()); in BluetoothController() 52 handleConnectionStateChange(adapter.getConnectionState()); in BluetoothController()
|
/frameworks/base/core/java/com/android/internal/view/menu/ |
D | MenuPopupHelper.java | 155 MenuAdapter adapter = mAdapter; in onItemClick() local 156 adapter.mAdapterMenu.performItemAction(adapter.getItem(position), 0); in onItemClick() 167 private int measureContentWidth(ListAdapter adapter) { in measureContentWidth() argument 176 final int count = adapter.getCount(); in measureContentWidth() 178 final int positionType = adapter.getItemViewType(i); in measureContentWidth() 186 itemView = adapter.getView(i, itemView, mMeasureParent); in measureContentWidth()
|
/frameworks/base/core/java/android/app/ |
D | ListFragment.java | 236 public void setListAdapter(ListAdapter adapter) { in setListAdapter() argument 238 mAdapter = adapter; in setListAdapter() 240 mList.setAdapter(adapter); in setListAdapter() 422 ListAdapter adapter = mAdapter; in ensureList() local 424 setListAdapter(adapter); in ensureList()
|
D | ListActivity.java | 261 public void setListAdapter(ListAdapter adapter) { in setListAdapter() argument 264 mAdapter = adapter; in setListAdapter() 265 mList.setAdapter(adapter); in setListAdapter()
|
D | ExpandableListActivity.java | 242 public void setListAdapter(ExpandableListAdapter adapter) { in setListAdapter() argument 245 mAdapter = adapter; in setListAdapter() 246 mList.setAdapter(adapter); in setListAdapter()
|
/frameworks/base/tests/FrameworkPerf/src/com/android/frameworkperf/ |
D | FrameworkPerfActivity.java | 165 ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, in onCreate() local 167 adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); in onCreate() 168 mFgSpinner.setAdapter(adapter); in onCreate() 171 adapter = new ArrayAdapter<String>(this, in onCreate() 173 adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); in onCreate() 174 mBgSpinner.setAdapter(adapter); in onCreate() 177 adapter = new ArrayAdapter<String>(this, in onCreate() 179 adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); in onCreate() 180 mLimitSpinner.setAdapter(adapter); in onCreate()
|
/frameworks/base/core/java/android/webkit/ |
D | AutoCompletePopup.java | 120 public <T extends ListAdapter & Filterable> void setAdapter(T adapter) { in setAdapter() argument 122 mPopup.setAdapter(adapter); in setAdapter() 123 mAdapter = adapter; in setAdapter() 124 if (adapter != null) { in setAdapter() 125 mFilter = adapter.getFilter(); in setAdapter()
|