Home
last modified time | relevance | path

Searched refs:adapter (Results 1 – 25 of 236) sorted by relevance

12345678910

/frameworks/ex/common/tests/src/com/android/common/widget/
DCompositeCursorAdapterTest.java81 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/
DConnectionServiceAdapter.java50 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/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/
DKeyguardUserSwitcherAdapterTest.kt64 private lateinit var adapter: KeyguardUserSwitcherController.KeyguardUserAdapter variable in com.android.systemui.statusbar.policy.KeyguardUserSwitcherAdapterTest
74 adapter = KeyguardUserSwitcherController.KeyguardUserAdapter( in setUp()
91 return adapter.createUserDetailItemView(otherView, parent, user) in createViewFromDifferentType()
103 return adapter.createUserDetailItemView(keyguardUserDetailItemView, parent, user) in createViewFromSameType()
111 verify(v)!!.setOnClickListener(adapter) in shouldSetOnClickListener_notCurrentUser_notGuestUser_oldViewIsSameType()
119 verify(v)!!.setOnClickListener(adapter) in shouldSetOnClickListener_notCurrentUser_guestUser_oldViewIsSameType()
127 verify(v)!!.setOnClickListener(adapter) in shouldSetOnOnClickListener_currentUser_notGuestUser_oldViewIsSameType()
135 verify(v)!!.setOnClickListener(adapter) in shouldSetOnClickListener_currentUser_guestUser_oldViewIsSameType()
143 verify(v)!!.setOnClickListener(adapter) in shouldSetOnClickListener_notCurrentUser_notGuestUser_oldViewIsDifferentType()
151 verify(v)!!.setOnClickListener(adapter) in shouldSetOnClickListener_notCurrentUser_guestUser_oldViewIsDifferentType()
[all …]
/frameworks/opt/setupwizard/library/test/instrumentation/src/com/android/setupwizardlib/test/
DItemAdapterTest.java59 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/opt/setupwizard/library/recyclerview/src/com/android/setupwizardlib/view/
DHeaderRecyclerView.java67 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/
DRecyclerItemAdapterTest.java69 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/
DNfcAdapterExtras.java76 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/widget/
DAdapterView.java478 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 …]
DSpinner.java533 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/base/packages/SettingsLib/src/com/android/settingslib/bluetooth/
DLocalBluetoothManager.java60 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/
DRemoteAnimationDefinition.java57 @ActivityType int activityTypeFilter, RemoteAnimationAdapter adapter) { in addRemoteAnimation() argument
59 new RemoteAnimationAdapterEntry(adapter, activityTypeFilter)); in addRemoteAnimation()
71 RemoteAnimationAdapter adapter) { in addRemoteAnimation() argument
72 addRemoteAnimation(transition, ACTIVITY_TYPE_UNDEFINED, adapter); in addRemoteAnimation()
104 return entry.adapter; in getAdapter()
127 mTransitionAnimationMap.valueAt(i).adapter.setCallingPidUid(pid, uid); in setCallingPidUid()
137 mTransitionAnimationMap.valueAt(i).adapter.getRunner().asBinder() in linkToDeath()
173 final RemoteAnimationAdapter adapter; field in RemoteAnimationDefinition.RemoteAnimationAdapterEntry
181 RemoteAnimationAdapterEntry(RemoteAnimationAdapter adapter, int activityTypeFilter) { in RemoteAnimationAdapterEntry() argument
182 this.adapter = adapter; in RemoteAnimationAdapterEntry()
[all …]
/frameworks/base/services/core/java/com/android/server/wm/
DPendingRemoteAnimationRegistry.java47 void addPendingAnimation(String packageName, RemoteAnimationAdapter adapter, in addPendingAnimation() argument
49 mEntries.put(packageName, new Entry(packageName, adapter, launchCookie)); in addPendingAnimation()
63 options = ActivityOptions.makeRemoteAnimation(entry.adapter); in overrideOptionsIfNeeded()
65 options.setRemoteAnimationAdapter(entry.adapter); in overrideOptionsIfNeeded()
77 final RemoteAnimationAdapter adapter; field in PendingRemoteAnimationRegistry.Entry
81 Entry(String packageName, RemoteAnimationAdapter adapter, @Nullable IBinder launchCookie) { in Entry() argument
83 this.adapter = adapter; in Entry()
/frameworks/native/libs/gui/tests/
DBLASTBufferQueue_test.cpp217 void setUpProducer(BLASTBufferQueueHelper& adapter, sp<IGraphicBufferProducer>& producer, in setUpProducer() argument
219 producer = adapter.getIGraphicBufferProducer(); in setUpProducer()
358 BLASTBufferQueueHelper adapter(mSurfaceControl, mDisplayWidth, mDisplayHeight); in TEST_F() local
359 ASSERT_EQ(mSurfaceControl, adapter.getSurfaceControl()); in TEST_F()
360 ASSERT_EQ(mDisplayWidth, adapter.getWidth()); in TEST_F()
361 ASSERT_EQ(mDisplayHeight, adapter.getHeight()); in TEST_F()
362 ASSERT_EQ(nullptr, adapter.getTransactionReadyCallback()); in TEST_F()
366 BLASTBufferQueueHelper adapter(mSurfaceControl, mDisplayWidth, mDisplayHeight); in TEST_F() local
370 adapter.update(updateSurface, mDisplayWidth / 2, mDisplayHeight / 2); in TEST_F()
371 ASSERT_EQ(updateSurface, adapter.getSurfaceControl()); in TEST_F()
[all …]
/frameworks/opt/telephony/src/java/com/android/internal/telephony/ims/
DImsServiceControllerCompat.java102 MmTelFeatureCompatAdapter adapter = mMmTelCompatAdapters.get(slotId); in enableIms() local
103 if (adapter == null) { in enableIms()
108 adapter.enableIms(); in enableIms()
119 MmTelFeatureCompatAdapter adapter = mMmTelCompatAdapters.get(slotId); in disableIms() local
120 if (adapter == null) { in disableIms()
125 adapter.disableIms(); in disableIms()
136 ImsRegistrationCompatAdapter adapter = mRegCompatAdapters.get(slotId); in getRegistration() local
137 if (adapter == null) { in getRegistration()
141 return adapter.getBinder(); in getRegistration()
149 ImsConfigCompatAdapter adapter = mConfigCompatAdapters.get(slotId); in getConfig() local
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/controls/management/
DFavoritesModelTest.kt60 private lateinit var adapter: RecyclerView.Adapter<*> in <lambda>() variable in com.android.systemui.controls.management.FavoritesModelTest
71 model.attachAdapter(adapter) in <lambda>()
135 verify(adapter).notifyItemChanged(eq(lastPos), any(Any::class.java)) in <lambda>()
136 verify(adapter).notifyItemMoved(removed, lastPos) in <lambda>()
161 verify(adapter).notifyItemChanged(oldDividerPosition) in <lambda>()
173 verify(adapter /* only once */).notifyItemChanged(anyInt(), any(Any::class.java)) in <lambda>()
174 verify(adapter /* only once */).notifyItemMoved(anyInt(), anyInt()) in <lambda>()
175 verify(adapter /* only once (divider) */).notifyItemChanged(anyInt()) in <lambda>()
202 verify(adapter, times(2)).notifyItemChanged(anyInt()) // divider in <lambda>()
229 verify(adapter, times(2)).notifyItemChanged(anyInt(), any(Any::class.java)) in <lambda>()
[all …]
/frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/widget/
DSettingsSpinnerPreferenceTest.java63 final SettingsSpinnerAdapter adapter = new SettingsSpinnerAdapter(mContext); in onBindViewHolder_noSetSelection_getDefaultItem() local
64 adapter.addAll(list); in onBindViewHolder_noSetSelection_getDefaultItem()
65 mSpinnerPreference.setAdapter(adapter); in onBindViewHolder_noSetSelection_getDefaultItem()
69 assertThat(adapter).isEqualTo(mSpinner.getAdapter()); in onBindViewHolder_noSetSelection_getDefaultItem()
80 final SettingsSpinnerAdapter adapter = new SettingsSpinnerAdapter(mContext); in onBindViewHolder_setSelection_getSelectedItem() local
81 adapter.addAll(list); in onBindViewHolder_setSelection_getSelectedItem()
82 mSpinnerPreference.setAdapter(adapter); in onBindViewHolder_setSelection_getSelectedItem()
/frameworks/opt/setupwizard/library/recyclerview/src/com/android/setupwizardlib/template/
DRecyclerMixin.java107 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/
DMenuPopup.java137 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/packages/SystemUI/tests/src/com/android/systemui/controls/ui/
DOverflowMenuAdapterTest.kt35 val adapter = in <lambda>() constant
44 ids.forEachIndexed { index, id -> assertThat(adapter.getItemId(index)).isEqualTo(id) } in <lambda>()
51 val adapter = in <lambda>() constant
60 assertThat(adapter.isEnabled(0)).isTrue() in <lambda>()
61 assertThat(adapter.isEnabled(1)).isFalse() in <lambda>()
/frameworks/base/packages/SystemUI/src/com/android/systemui/user/
DUserSwitcherPopupMenu.kt36 private var adapter: ListAdapter? = null variable in com.android.systemui.user.UserSwitcherPopupMenu
44 override fun setAdapter(adapter: ListAdapter?) { in setAdapter()
45 super.setAdapter(adapter) in setAdapter()
46 this.adapter = adapter in setAdapter()
77 adapter?.let { in findMaxWidth()
/frameworks/base/core/java/com/android/internal/widget/
DWatchHeaderListView.java51 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/core/java/android/nfc/
DNfcManager.java51 NfcAdapter adapter; in NfcManager() local
58 adapter = NfcAdapter.getNfcAdapter(context); in NfcManager()
60 adapter = null; in NfcManager()
62 mAdapter = adapter; in NfcManager()
/frameworks/base/core/tests/coretests/src/android/widget/
DListViewTest.java46 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()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/shade/
DSplitShadeTransitionAdapterTest.kt38 private lateinit var adapter: SplitShadeTransitionAdapter variable in com.android.systemui.shade.SplitShadeTransitionAdapterTest
43 adapter = SplitShadeTransitionAdapter(keyguardStatusViewController) in setUp()
48 val animator = adapter.createAnimator(startValues = null, endValues = TransitionValues()) in createAnimator_nullStartValues_returnsNull()
55 val animator = adapter.createAnimator(startValues = TransitionValues(), endValues = null) in createAnimator_nullEndValues_returnsNull()
63 adapter.createAnimator(startValues = TransitionValues(), endValues = TransitionValues()) in createAnimator_nonNullStartAndEndValues_returnsAnimator()
/frameworks/base/libs/WindowManager/Shell/src/com/android/wm/shell/activityembedding/
DActivityEmbeddingAnimationRunner.java127 for (ActivityEmbeddingAnimationAdapter adapter : adapters) { in createAnimator()
128 duration = Math.max(duration, adapter.getDurationHint()); in createAnimator()
133 for (ActivityEmbeddingAnimationAdapter adapter : adapters) { in createAnimator()
134 adapter.onAnimationUpdate(t, animator.getCurrentPlayTime()); in createAnimator()
147 for (ActivityEmbeddingAnimationAdapter adapter : adapters) { in createAnimator()
148 adapter.onAnimationEnd(t); in createAnimator()
233 final ActivityEmbeddingAnimationAdapter adapter = createOpenCloseAnimationAdapter( in createOpenCloseAnimationAdapters() local
236 adapter.overrideLayer(offsetLayer++); in createOpenCloseAnimationAdapters()
238 adapters.add(adapter); in createOpenCloseAnimationAdapters()
241 final ActivityEmbeddingAnimationAdapter adapter = createOpenCloseAnimationAdapter( in createOpenCloseAnimationAdapters() local
[all …]

12345678910