/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/telecomm/java/android/telecom/ |
D | ConnectionServiceAdapter.java | 50 void addAdapter(IConnectionServiceAdapter adapter) { in addAdapter() argument 52 if (it.asBinder() == adapter.asBinder()) { in addAdapter() 57 if (mAdapters.add(adapter)) { in addAdapter() 59 adapter.asBinder().linkToDeath(this, 0); in addAdapter() 61 mAdapters.remove(adapter); in addAdapter() 66 void removeAdapter(IConnectionServiceAdapter adapter) { in removeAdapter() argument 67 if (adapter != null) { in removeAdapter() 69 if (it.asBinder() == adapter.asBinder() && mAdapters.remove(it)) { in removeAdapter() 70 adapter.asBinder().unlinkToDeath(this, 0); in removeAdapter() 82 IConnectionServiceAdapter adapter = it.next(); in binderDied() local [all …]
|
/frameworks/base/core/tests/bluetoothtests/src/android/bluetooth/ |
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 | 470 public void enable(BluetoothAdapter adapter) { in enable() argument 472 assertFalse(adapter.isEnabled()); in enable() 473 int btState = adapter.getState(); in enable() 495 adapter.enable(); in enable() 516 public void disable(BluetoothAdapter adapter) { in disable() argument 518 assertTrue(adapter.isEnabled()); in disable() 519 int btState = adapter.getState(); in disable() 541 adapter.disable(); in disable() 562 public void discoverable(BluetoothAdapter adapter) { in discoverable() argument 563 if (!adapter.isEnabled()) { in discoverable() [all …]
|
/frameworks/opt/setupwizard/library/test/instrumentation/src/com/android/setupwizardlib/test/ |
D | ItemAdapterTest.java | 59 ItemAdapter adapter = new ItemAdapter(mItemGroup); in testAdapter() local 60 assertEquals("Adapter should have 5 items", 5, adapter.getCount()); in testAdapter() 61 assertEquals("Adapter should return the first item", mItems[0], adapter.getItem(0)); in testAdapter() 62 assertEquals("ID should be same as position", 2, adapter.getItemId(2)); in testAdapter() 65 assertEquals("Should have 3 different view types", 3, adapter.getViewTypeCount()); in testAdapter() 67 viewTypes.add(adapter.getItemViewType(0)); in testAdapter() 68 viewTypes.add(adapter.getItemViewType(1)); in testAdapter() 69 viewTypes.add(adapter.getItemViewType(2)); in testAdapter() 76 ItemAdapter adapter = new ItemAdapter(mItemGroup); in testGetRootItemHierarchy() local 77 ItemHierarchy root = adapter.getRootItemHierarchy(); in testGetRootItemHierarchy() [all …]
|
/frameworks/base/core/java/android/widget/ |
D | AdapterView.java | 478 public abstract void setAdapter(T adapter); in setAdapter() argument 603 T adapter = getAdapter(); in getSelectedItem() local 605 if (adapter != null && adapter.getCount() > 0 && selection >= 0) { in getSelectedItem() 606 return adapter.getItem(selection); in getSelectedItem() 705 final T adapter = getAdapter(); in setEmptyView() local 706 final boolean empty = ((adapter == null) || adapter.isEmpty()); in setEmptyView() 733 final T adapter = getAdapter(); in setFocusable() local 734 final boolean empty = adapter == null || adapter.getCount() == 0; in setFocusable() 746 final T adapter = getAdapter(); in setFocusableInTouchMode() local 747 final boolean empty = adapter == null || adapter.getCount() == 0; in setFocusableInTouchMode() [all …]
|
D | Spinner.java | 533 public void setAdapter(SpinnerAdapter adapter) { in setAdapter() argument 537 mTempAdapter = adapter; in setAdapter() 541 super.setAdapter(adapter); in setAdapter() 547 && adapter != null && adapter.getViewTypeCount() != 1) { in setAdapter() 552 mPopup.setAdapter(new DropDownAdapter(adapter, popupContext.getTheme())); in setAdapter() 844 int measureContentWidth(SpinnerAdapter adapter, Drawable background) { in measureContentWidth() argument 845 if (adapter == null) { in measureContentWidth() 860 final int end = Math.min(adapter.getCount(), start + MAX_ITEMS_MEASURED); in measureContentWidth() 864 final int positionType = adapter.getItemViewType(i); in measureContentWidth() 869 itemView = adapter.getView(i, itemView, this); in measureContentWidth() [all …]
|
/frameworks/opt/setupwizard/library/recyclerview/src/com/android/setupwizardlib/view/ |
D | HeaderRecyclerView.java | 67 private final RecyclerView.Adapter<CVH> adapter; field in HeaderRecyclerView.HeaderAdapter 115 public HeaderAdapter(RecyclerView.Adapter<CVH> adapter) { in HeaderAdapter() argument 116 this.adapter = adapter; in HeaderAdapter() 117 this.adapter.registerAdapterDataObserver(observer); in HeaderAdapter() 118 setHasStableIds(this.adapter.hasStableIds()); in HeaderAdapter() 136 return adapter.onCreateViewHolder(parent, viewType); in onCreateViewHolder() 157 adapter.onBindViewHolder((CVH) holder, position); in onBindViewHolder() 169 return adapter.getItemViewType(position); in getItemViewType() 174 int count = adapter.getItemCount(); in getItemCount() 189 return adapter.getItemId(position); in getItemId() [all …]
|
/frameworks/opt/setupwizard/library/recyclerview/test/instrumentation/src/com/android/setupwizardlib/items/ |
D | RecyclerItemAdapterTest.java | 69 RecyclerItemAdapter adapter = new RecyclerItemAdapter(mItemGroup); in testAdapter() local 70 assertEquals("Adapter should have 5 items", 5, adapter.getItemCount()); in testAdapter() 71 assertEquals("Adapter should return the first item", mItems[0], adapter.getItem(0)); in testAdapter() 72 assertEquals("ID should be same as position", 2, adapter.getItemId(2)); in testAdapter() 75 assertEquals("Second item should have view type 21", 21, adapter.getItemViewType(2)); in testAdapter() 80 RecyclerItemAdapter adapter = new RecyclerItemAdapter(mItemGroup); in testGetRootItemHierarchy() local 81 ItemHierarchy root = adapter.getRootItemHierarchy(); in testGetRootItemHierarchy() 109 RecyclerItemAdapter adapter = new RecyclerItemAdapter(mItemGroup); in testAdapterNotifications() local 111 adapter.registerAdapterDataObserver(observer); in testAdapterNotifications() 125 RecyclerItemAdapter adapter = new RecyclerItemAdapter(mItemGroup); in testCreateViewHolder() local [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/packages/SettingsLib/src/com/android/settingslib/bluetooth/ |
D | LocalBluetoothManager.java | 60 LocalBluetoothAdapter adapter = LocalBluetoothAdapter.getInstance(); in getInstance() local 61 if (adapter == null) { in getInstance() 65 sInstance = new LocalBluetoothManager(adapter, context, /* handler= */ null, in getInstance() 82 LocalBluetoothAdapter adapter = LocalBluetoothAdapter.getInstance(); in create() local 83 if (adapter == null) { in create() 86 return new LocalBluetoothManager(adapter, context, handler, /* userHandle= */ null); in create() 101 LocalBluetoothAdapter adapter = LocalBluetoothAdapter.getInstance(); in create() local 102 if (adapter == null) { in create() 105 return new LocalBluetoothManager(adapter, context, handler, in create() 109 private LocalBluetoothManager(LocalBluetoothAdapter adapter, Context context, Handler handler, in LocalBluetoothManager() argument [all …]
|
/frameworks/base/core/java/android/view/ |
D | RemoteAnimationDefinition.java | 55 @ActivityType int activityTypeFilter, RemoteAnimationAdapter adapter) { in addRemoteAnimation() argument 57 new RemoteAnimationAdapterEntry(adapter, activityTypeFilter)); in addRemoteAnimation() 68 public void addRemoteAnimation(@TransitionType int transition, RemoteAnimationAdapter adapter) { in addRemoteAnimation() argument 69 addRemoteAnimation(transition, ACTIVITY_TYPE_UNDEFINED, adapter); in addRemoteAnimation() 100 return entry.adapter; in getAdapter() 123 mTransitionAnimationMap.valueAt(i).adapter.setCallingPidUid(pid, uid); in setCallingPidUid() 155 final RemoteAnimationAdapter adapter; field in RemoteAnimationDefinition.RemoteAnimationAdapterEntry 163 RemoteAnimationAdapterEntry(RemoteAnimationAdapter adapter, int activityTypeFilter) { in RemoteAnimationAdapterEntry() argument 164 this.adapter = adapter; in RemoteAnimationAdapterEntry() 169 adapter = in.readParcelable(RemoteAnimationAdapter.class.getClassLoader()); in RemoteAnimationAdapterEntry() [all …]
|
/frameworks/base/services/core/java/com/android/server/wm/ |
D | PendingRemoteAnimationRegistry.java | 48 void addPendingAnimation(String packageName, RemoteAnimationAdapter adapter) { in addPendingAnimation() argument 49 mEntries.put(packageName, new Entry(packageName, adapter)); in addPendingAnimation() 63 options = ActivityOptions.makeRemoteAnimation(entry.adapter); in overrideOptionsIfNeeded() 65 options.setRemoteAnimationAdapter(entry.adapter); in overrideOptionsIfNeeded() 73 final RemoteAnimationAdapter adapter; field in PendingRemoteAnimationRegistry.Entry 75 Entry(String packageName, RemoteAnimationAdapter adapter) { in Entry() argument 77 this.adapter = adapter; in Entry()
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/ims/ |
D | ImsServiceControllerCompat.java | 74 MmTelFeatureCompatAdapter adapter = mMmTelCompatAdapters.get(slotId); in enableIms() local 75 if (adapter == null) { in enableIms() 80 adapter.enableIms(); in enableIms() 91 MmTelFeatureCompatAdapter adapter = mMmTelCompatAdapters.get(slotId); in disableIms() local 92 if (adapter == null) { in disableIms() 97 adapter.disableIms(); in disableIms() 108 ImsRegistrationCompatAdapter adapter = mRegCompatAdapters.get(slotId); in getRegistration() local 109 if (adapter == null) { in getRegistration() 113 return adapter.getBinder(); in getRegistration() 121 ImsConfigCompatAdapter adapter = mConfigCompatAdapters.get(slotId); in getConfig() local [all …]
|
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/ |
D | QSDetail.java | 187 public void handleShowingDetail(final DetailAdapter adapter, int x, int y, in handleShowingDetail() argument 189 final boolean showingDetail = adapter != null; in handleShowingDetail() 192 setupDetailHeader(adapter); in handleShowingDetail() 213 boolean visibleDiff = (mDetailAdapter != null) != (adapter != null); in handleShowingDetail() 214 if (!visibleDiff && mDetailAdapter == adapter) return; // already in right state in handleShowingDetail() 216 if (adapter != null) { in handleShowingDetail() 217 int viewCacheIndex = adapter.getMetricsCategory(); in handleShowingDetail() 218 View detailView = adapter.createDetailView(mContext, mDetailViews.get(viewCacheIndex), in handleShowingDetail() 222 setupDetailFooter(adapter); in handleShowingDetail() 227 Dependency.get(MetricsLogger.class).visible(adapter.getMetricsCategory()); in handleShowingDetail() [all …]
|
/frameworks/opt/setupwizard/library/recyclerview/src/com/android/setupwizardlib/template/ |
D | RecyclerMixin.java | 107 final RecyclerItemAdapter adapter = new RecyclerItemAdapter(inflated); in parseAttributes() local 108 adapter.setHasStableIds(a.getBoolean(R.styleable.SuwRecyclerMixin_suwHasStableIds, false)); in parseAttributes() 109 setAdapter(adapter); in parseAttributes() 166 final RecyclerView.Adapter<? extends ViewHolder> adapter = recyclerView.getAdapter(); in getAdapter() local 167 if (adapter instanceof HeaderAdapter) { in getAdapter() 168 return ((HeaderAdapter<? extends ViewHolder>) adapter).getWrappedAdapter(); in getAdapter() 170 return adapter; in getAdapter() 174 public void setAdapter(Adapter<? extends ViewHolder> adapter) { in setAdapter() argument 175 recyclerView.setAdapter(adapter); in setAdapter()
|
/frameworks/base/core/java/com/android/internal/view/menu/ |
D | MenuPopup.java | 137 protected static int measureIndividualMenuWidth(ListAdapter adapter, ViewGroup parent, in measureIndividualMenuWidth() argument 146 final int count = adapter.getCount(); in measureIndividualMenuWidth() 148 final int positionType = adapter.getItemViewType(i); in measureIndividualMenuWidth() 158 itemView = adapter.getView(i, itemView, parent); in measureIndividualMenuWidth() 180 protected static MenuAdapter toMenuAdapter(ListAdapter adapter) { in toMenuAdapter() argument 181 if (adapter instanceof HeaderViewListAdapter) { in toMenuAdapter() 182 return (MenuAdapter) ((HeaderViewListAdapter) adapter).getWrappedAdapter(); in toMenuAdapter() 184 return (MenuAdapter) adapter; in toMenuAdapter()
|
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/ |
D | RemoteAnimationControllerTest.java | 92 final AnimationAdapter adapter = mController.createRemoteAnimationRecord(win.mAppToken, in testRun() local 94 adapter.startAnimation(mMockLeash, mMockTransaction, mFinishedCallback); in testRun() 116 verify(mFinishedCallback).onAnimationFinished(eq(adapter)); in testRun() 125 final AnimationAdapter adapter = mController.createRemoteAnimationRecord(win.mAppToken, in testCancel() local 127 adapter.startAnimation(mMockLeash, mMockTransaction, mFinishedCallback); in testCancel() 130 adapter.onAnimationCancelled(mMockLeash); in testCancel() 138 final AnimationAdapter adapter = mController.createRemoteAnimationRecord(win.mAppToken, in testTimeout() local 140 adapter.startAnimation(mMockLeash, mMockTransaction, mFinishedCallback); in testTimeout() 147 verify(mFinishedCallback).onAnimationFinished(eq(adapter)); in testTimeout() 156 final AnimationAdapter adapter = mController.createRemoteAnimationRecord( in testTimeout_scaled() local [all …]
|
/frameworks/base/core/java/com/android/internal/widget/ |
D | WatchHeaderListView.java | 51 ListAdapter adapter) { in wrapHeaderListAdapterInternal() argument 52 return new WatchHeaderListAdapter(headerViewInfos, footerViewInfos, adapter); in wrapHeaderListAdapterInternal() 70 public void setAdapter(ListAdapter adapter) { in setAdapter() argument 71 super.setAdapter(adapter); in setAdapter() 111 ListAdapter adapter = getAdapter(); in wrapAdapterIfNecessary() local 112 if (adapter != null && mTopPanel != null) { in wrapAdapterIfNecessary() 113 if (!(adapter instanceof WatchHeaderListAdapter)) { in wrapAdapterIfNecessary() 128 ListAdapter adapter) { in WatchHeaderListAdapter() argument 129 super(headerViewInfos, footerViewInfos, adapter); in WatchHeaderListAdapter()
|
/frameworks/base/packages/SystemUI/shared/src/com/android/systemui/shared/system/ |
D | RemoteAnimationDefinitionCompat.java | 28 public void addRemoteAnimation(int transition, RemoteAnimationAdapterCompat adapter) { in addRemoteAnimation() argument 29 mWrapped.addRemoteAnimation(transition, adapter.getWrapped()); in addRemoteAnimation() 33 RemoteAnimationAdapterCompat adapter) { in addRemoteAnimation() argument 34 mWrapped.addRemoteAnimation(transition, activityTypeFilter, adapter.getWrapped()); in addRemoteAnimation()
|
/frameworks/base/core/tests/coretests/src/android/widget/ |
D | ListViewTest.java | 46 Adapter<String> adapter = new Adapter<String>(context, 0, items); in testRequestLayout() local 47 listView.setAdapter(adapter); in testRequestLayout() 51 adapter.notifyDataSetChanged(); in testRequestLayout() 76 Adapter<String> adapter = new Adapter<String>(context, 0, items); in testNoSelectableItems() local 77 listView.setAdapter(adapter); in testNoSelectableItems() 83 adapter.notifyDataSetChanged(); in testNoSelectableItems() 89 adapter.notifyDataSetChanged(); in testNoSelectableItems()
|
D | RemoteViewsAdapterTest.java | 86 RemoteViewsAdapter adapter = getOnUiThread( in onRemoteAdapterConnected_after_metadata_loaded() local 88 assertFalse(adapter.isDataReady()); in onRemoteAdapterConnected_after_metadata_loaded() 103 assertEquals((Integer) 1, getOnUiThread(adapter::getCount)); in onRemoteAdapterConnected_after_metadata_loaded() 111 RemoteViewsAdapter adapter = getOnUiThread( in viewReplaced_after_mainView_loaded() local 122 View view = getOnUiThread(() -> adapter.getView(0, null, new FrameLayout(mContext))); in viewReplaced_after_mainView_loaded() 145 RemoteViewsAdapter adapter = getOnUiThread( in notifyDataSetChanged_deferred() local 154 assertEquals((Integer) 1, getOnUiThread(adapter::getCount)); in notifyDataSetChanged_deferred() 161 adapter.registerDataSetObserver(observer); in notifyDataSetChanged_deferred() 162 adapter.notifyDataSetChanged(); in notifyDataSetChanged_deferred() 169 assertEquals((Integer) 1, getOnUiThread(adapter::getCount)); in notifyDataSetChanged_deferred() [all …]
|
/frameworks/base/core/java/android/nfc/ |
D | NfcManager.java | 51 NfcAdapter adapter; in NfcManager() local 58 adapter = NfcAdapter.getNfcAdapter(context); in NfcManager() 60 adapter = null; in NfcManager() 62 mAdapter = adapter; in NfcManager()
|
/frameworks/base/cmds/svc/src/com/android/commands/svc/ |
D | BluetoothCommand.java | 43 BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); in run() local 45 if (adapter == null) { in run() 51 adapter.enable(); in run() 53 adapter.disable(); in run()
|
D | NfcCommand.java | 45 INfcAdapter adapter = INfcAdapter.Stub.asInterface( in run() local 48 if (adapter == null) { in run() 55 adapter.enable(); in run() 58 adapter.disable(true); in run()
|