Home
last modified time | relevance | path

Searched refs:card (Results 1 – 25 of 74) sorted by relevance

123

/packages/apps/ThemePicker/src/com/android/customization/picker/
DBasePreviewAdapter.java69 return view == ((PreviewPage) object).card; in isViewFromObject()
78 CardView card = (CardView) mInflater.inflate(mPreviewCardResId, container, false); in instantiateItem() local
81 page.setCard(card); in instantiateItem()
83 if (card.getParent() != null) { in instantiateItem()
84 container.removeView(card); in instantiateItem()
86 container.addView(card); in instantiateItem()
93 View card = ((PreviewPage) object).card; in destroyItem() local
94 ((PreviewPage) object).card = null; in destroyItem()
95 if (card.getParent() == container) { in destroyItem()
96 container.removeView(card); in destroyItem()
[all …]
/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/conditional/
DConditionContextualCardRenderer.java63 final ConditionalContextualCard card = (ConditionalContextualCard) contextualCard; in bindView() local
68 card.getMetricsConstant(), 0); in bindView()
69 initializePrimaryClick(view, card, metricsFeatureProvider); in bindView()
70 initializeView(view, card); in bindView()
71 initializeActionButton(view, card, metricsFeatureProvider); in bindView()
74 private void initializePrimaryClick(ConditionalCardHolder view, ConditionalContextualCard card, in initializePrimaryClick() argument
80 card.getMetricsConstant()); in initializePrimaryClick()
82 card.getCardType()).onPrimaryClick(card); in initializePrimaryClick()
86 private void initializeView(ConditionalCardHolder view, ConditionalContextualCard card) { in initializeView() argument
87 view.icon.setImageDrawable(card.getIconDrawable()); in initializeView()
[all …]
DConditionContextualCardController.java88 final ConditionalContextualCard card = (ConditionalContextualCard) contextualCard; in onPrimaryClick() local
89 mConditionManager.onPrimaryClick(mContext, card.getConditionId()); in onPrimaryClick()
94 final ConditionalContextualCard card = (ConditionalContextualCard) contextualCard; in onActionClick() local
95 mConditionManager.onActionClick(card.getConditionId()); in onActionClick()
169 final ConditionalContextualCard card = in getExpandedConditionalCards() local
171 expandedCards.set(lastIndex, card.mutate().setViewType( in getExpandedConditionalCards()
DConditionManager.java63 for (ConditionalCardController card : mCardControllers) { in getDisplayableCards()
64 final DisplayableChecker checker = new DisplayableChecker(getController(card.getId())); in getDisplayableCards()
70 final ContextualCard card = cardFuture.get( in getDisplayableCards() local
72 if (card != null) { in getDisplayableCards()
73 cards.add(card); in getDisplayableCards()
/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/
DContextualCardLoader.java113 final ContextualCard card = new ContextualCard(cursor); in loadInBackground() local
114 if (isLargeCard(card)) { in loadInBackground()
115 result.add(card.mutate().setIsLargeCard(true).build()); in loadInBackground()
117 result.add(card); in loadInBackground()
134 eligibleCards.forEach(card -> { in getDisplayableCards()
135 if (card.getCategory() != STICKY_VALUE) { in getDisplayableCards()
139 stickyCards.add(card); in getDisplayableCards()
141 hiddenCards.add(card); in getDisplayableCards()
146 eligibleCards.forEach(card -> { in getDisplayableCards()
147 if (card.getCategory() == STICKY_VALUE) { in getDisplayableCards()
[all …]
DContextualCardManager.java142 for (ContextualCard card : mContextualCards) { in loadCardControllers()
143 setupController(card.getCardType()); in loadCardControllers()
203 .filter(card -> conditionalCardTypes.contains(card.getCardType())) in onContextualCardUpdated()
207 .filter(card -> !cardTypes.contains(card.getCardType())) in onContextualCardUpdated()
285 for (ContextualCard card : cards) { in onWindowFocusChanged()
287 .getController(mContext, card.getCardType()); in onWindowFocusChanged()
360 final ContextualCard card = cards.get(index); in getCardsWithStickyViewType() local
361 if (card.getCategory() == STICKY_VALUE) { in getCardsWithStickyViewType()
362 result.set(index, card.mutate().setViewType( in getCardsWithStickyViewType()
374 .filter(card -> mSavedCards.contains(card.getName())) in getCardsToKeep()
[all …]
DEligibleCardChecker.java50 EligibleCardChecker(Context context, ContextualCard card) { in EligibleCardChecker() argument
52 mCard = card; in EligibleCardChecker()
86 boolean isCardEligibleToDisplay(ContextualCard card) { in isCardEligibleToDisplay() argument
87 if (card.getRankingScore() < 0) { in isCardEligibleToDisplay()
91 final Uri uri = card.getSliceUri(); in isCardEligibleToDisplay()
103 mCard = card.mutate().setSlice(slice).build(); in isCardEligibleToDisplay()
106 mCard = card.mutate().setHasInlineAction(true).build(); in isCardEligibleToDisplay()
DContextualCardsAdapter.java72 final ContextualCard card = mContextualCards.get(position); in getItemViewType() local
73 return card.getViewType(); in getItemViewType()
86 final ContextualCard card = mContextualCards.get(position); in onBindViewHolder() local
88 mContext, mLifecycleOwner, card.getViewType()); in onBindViewHolder()
89 renderer.bindView(holder, card); in onBindViewHolder()
142 final ContextualCard card = mContextualCards.get(position).mutate() in onSwiped() local
144 mContextualCards.set(position, card); in onSwiped()
DContextualCardController.java27 void onPrimaryClick(ContextualCard card); in onPrimaryClick() argument
29 void onActionClick(ContextualCard card); in onActionClick() argument
31 void onDismissed(ContextualCard card); in onDismissed() argument
/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/slices/
DSliceContextualCardController.java59 public void onPrimaryClick(ContextualCard card) { in onPrimaryClick() argument
64 public void onActionClick(ContextualCard card) { in onActionClick() argument
69 public void onDismissed(ContextualCard card) { in onDismissed() argument
73 cardFeatureProvider.markCardAsDismissed(mContext, card.getName()); in onDismissed()
75 showFeedbackDialog(card); in onDismissed()
82 ContextualCardLogUtils.buildCardDismissLog(card)); in onDismissed()
91 void showFeedbackDialog(ContextualCard card) { in showFeedbackDialog() argument
98 getSimpleCardName(card)); in showFeedbackDialog()
109 private String getSimpleCardName(ContextualCard card) { in getSimpleCardName() argument
110 final String[] split = card.getName().split("/"); in getSimpleCardName()
DSliceContextualCardRenderer.java98 public void bindView(RecyclerView.ViewHolder holder, ContextualCard card) { in bindView() argument
99 final Uri uri = card.getSliceUri(); in bindView()
108 ((SliceViewHolder) holder).sliceView.setSlice(card.getSlice()); in bindView()
147 mHalfCardHelper.bindView(holder, card, slice); in bindView()
149 mFullCardHelper.bindView(holder, card, slice); in bindView()
157 initDismissalActions(holder, card); in bindView()
159 if (card.isPendingDismiss()) { in bindView()
166 private void initDismissalActions(RecyclerView.ViewHolder holder, ContextualCard card) { in initDismissalActions() argument
175 mControllerRendererPool.getController(mContext, card.getCardType()).onDismissed(card); in initDismissalActions()
178 mSliceLiveDataMap.get(card.getSliceUri()).removeObservers(mLifecycleOwner); in initDismissalActions()
[all …]
DSliceFullCardRendererHelper.java48 void bindView(RecyclerView.ViewHolder holder, ContextualCard card, Slice slice) { in bindView() argument
51 cardHolder.sliceView.setTag(card.getSliceUri()); in bindView()
56 final String log = ContextualCardLogUtils.buildCardClickLog(card, eventInfo.rowIndex, in bindView()
68 if (card.isLargeCard()) { in bindView()
/packages/apps/Settings/tests/robotests/src/com/android/settings/homepage/contextualcards/legacysuggestion/
DLegacySuggestionContextualCardRendererTest.java71 final ContextualCard card = buildContextualCard(); in bindView_shouldSetListener() local
72 final View cardView = LayoutInflater.from(mActivity).inflate(card.getViewType(), in bindView_shouldSetListener()
75 card.getViewType()); in bindView_shouldSetListener()
89 final ContextualCard card = buildContextualCard(); in bindView_closeButton_shouldSetListener() local
90 final View cardView = LayoutInflater.from(mActivity).inflate(card.getViewType(), in bindView_closeButton_shouldSetListener()
93 card.getViewType()); in bindView_closeButton_shouldSetListener()
108 final ContextualCard card = buildContextualCard(); in viewClick_shouldInvokeControllerPrimaryClick() local
109 final View cardView = LayoutInflater.from(mActivity).inflate(card.getViewType(), in viewClick_shouldInvokeControllerPrimaryClick()
112 card.getViewType()); in viewClick_shouldInvokeControllerPrimaryClick()
128 final ContextualCard card = buildContextualCard(); in viewClick_closeButton_shouldInvokeControllerDismissClick() local
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/
DSliceContextualCardRendererTest.java156 final ContextualCard card = buildContextualCard( in bindView_isPendingDismiss_shouldShowDismissalView() local
159 mRenderer.bindView(viewHolder, card); in bindView_isPendingDismiss_shouldShowDismissalView()
167 final ContextualCard card = buildContextualCard( in bindView_isPendingDismiss_shouldAddViewHolderToSet() local
170 mRenderer.bindView(viewHolder, card); in bindView_isPendingDismiss_shouldAddViewHolderToSet()
178 final ContextualCard card = buildContextualCard(TEST_SLICE_URI); in bindView_beforeSuccessfulSliceBinding_shouldHideSwipeBackground() local
181 mRenderer.bindView(viewHolder, card); in bindView_beforeSuccessfulSliceBinding_shouldHideSwipeBackground()
189 final ContextualCard card = buildContextualCard(TEST_SLICE_URI); in bindView_reuseViewHolder_shouldHideSwipeBackgroundBeforeSliceBinding() local
194 mRenderer.bindView(viewHolder, card); in bindView_reuseViewHolder_shouldHideSwipeBackgroundBeforeSliceBinding()
205 final ContextualCard card = buildContextualCard( in viewClick_keepCard_shouldShowSlice() local
207 mRenderer.bindView(viewHolder, card); in viewClick_keepCard_shouldShowSlice()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/homepage/contextualcards/conditional/
DConditionFooterContextualCardRendererTest.java64 final ContextualCard card = generateConditionFooterContextualCard(); in bindView_shouldSetClickListener() local
65 final View view = LayoutInflater.from(mContext).inflate(card.getViewType(), recyclerView, in bindView_shouldSetClickListener()
68 card.getViewType()); in bindView_shouldSetClickListener()
72 mRenderer.bindView(viewHolder, card); in bindView_shouldSetClickListener()
82 final ContextualCard card = generateConditionFooterContextualCard(); in bindView_clickView_shouldSetTrueToIsConditionExpanded() local
83 final View view = LayoutInflater.from(mContext).inflate(card.getViewType(), recyclerView, in bindView_clickView_shouldSetTrueToIsConditionExpanded()
86 card.getViewType()); in bindView_clickView_shouldSetTrueToIsConditionExpanded()
90 mRenderer.bindView(viewHolder, card); in bindView_clickView_shouldSetTrueToIsConditionExpanded()
DConditionContextualCardRendererTest.java70 final ContextualCard card = buildConditionContextualCard(); in bindView_shouldSetListener() local
71 final View view = LayoutInflater.from(mActivity).inflate(card.getViewType(), recyclerView, in bindView_shouldSetListener()
74 card.getViewType()); in bindView_shouldSetListener()
79 mRenderer.bindView(viewHolder, card); in bindView_shouldSetListener()
89 final ContextualCard card = buildConditionContextualCard(); in viewClick_shouldInvokeControllerPrimaryClick() local
90 final View view = LayoutInflater.from(mActivity).inflate(card.getViewType(), recyclerView, in viewClick_shouldInvokeControllerPrimaryClick()
93 card.getViewType()); in viewClick_shouldInvokeControllerPrimaryClick()
98 mRenderer.bindView(viewHolder, card); in viewClick_shouldInvokeControllerPrimaryClick()
DConditionHeaderContextualCardRendererTest.java72 final ContextualCard card = generateConditionHeaderContextualCard(); in bindView_shouldSetClickListener() local
73 final View view = LayoutInflater.from(mActivity).inflate(card.getViewType(), recyclerView, in bindView_shouldSetClickListener()
76 card.getViewType()); in bindView_shouldSetClickListener()
90 final ContextualCard card = generateConditionHeaderContextualCard(); in bindView_clickView_shouldSetTrueToIsConditionExpanded() local
91 final View view = LayoutInflater.from(mActivity).inflate(card.getViewType(), recyclerView, in bindView_clickView_shouldSetTrueToIsConditionExpanded()
94 card.getViewType()); in bindView_clickView_shouldSetTrueToIsConditionExpanded()
DHotspotConditionControllerTest.java65 final ContextualCard card = mController.buildContextualCard(); in buildContextualCard_hasWifiAp_shouldHaveWifiApSsid() local
67 assertThat(card.getSummaryText()).isEqualTo(WIFI_AP_SSID); in buildContextualCard_hasWifiAp_shouldHaveWifiApSsid()
72 final ContextualCard card = mController.buildContextualCard(); in buildContextualCard_noWifiAp_shouldHaveEmptySsid() local
74 assertThat(card.getSummaryText()).isEqualTo(""); in buildContextualCard_noWifiAp_shouldHaveEmptySsid()
DDndConditionalCardControllerTest.java76 final ContextualCard card = mController.buildContextualCard(); in buildContextualCard_allSoundsMuted_shouldHavePhoneMutedSummary() local
78 assertThat(card.getSummaryText()).isEqualTo( in buildContextualCard_allSoundsMuted_shouldHavePhoneMutedSummary()
86 final ContextualCard card = mController.buildContextualCard(); in buildContextualCard_allowSomeSounds_shouldHaveWittExceptionsSummary() local
88 assertThat(card.getSummaryText()).isEqualTo( in buildContextualCard_allowSomeSounds_shouldHaveWittExceptionsSummary()
/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/legacysuggestion/
DLegacySuggestionContextualCardRenderer.java53 public void bindView(RecyclerView.ViewHolder holder, ContextualCard card) { in bindView() argument
56 .getController(mContext, card.getCardType()); in bindView()
57 vh.icon.setImageDrawable(card.getIconDrawable()); in bindView()
58 vh.title.setText(card.getTitleText()); in bindView()
59 vh.summary.setText(card.getSummaryText()); in bindView()
60 vh.itemView.setOnClickListener(v -> controller.onPrimaryClick(card)); in bindView()
61 vh.closeButton.setOnClickListener(v -> controller.onDismissed(card)); in bindView()
DLegacySuggestionContextualCardController.java80 public void onPrimaryClick(ContextualCard card) { in onPrimaryClick() argument
82 ((LegacySuggestionContextualCard) card).getPendingIntent().send(); in onPrimaryClick()
84 Log.w(TAG, "Failed to start suggestion " + card.getTitleText()); in onPrimaryClick()
89 public void onActionClick(ContextualCard card) { in onActionClick() argument
94 public void onDismissed(ContextualCard card) { in onDismissed() argument
96 .dismissSuggestions(((LegacySuggestionContextualCard) card).getSuggestion()); in onDismissed()
97 mSuggestions.remove(card); in onDismissed()
/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/logging/
DContextualCardLogUtils.java142 public static String buildCardClickLog(ContextualCard card, int sliceRow, int tapTarget, in buildCardClickLog() argument
145 log.append(card.getTextSliceUri()).append("|") in buildCardClickLog()
146 .append(card.getRankingScore()).append("|") in buildCardClickLog()
183 public static String buildCardDismissLog(ContextualCard card) { in buildCardDismissLog() argument
185 log.append(card.getTextSliceUri()) in buildCardDismissLog()
187 .append(card.getRankingScore()); in buildCardDismissLog()
219 for (ContextualCard card : cards) { in buildCardListLog()
220 log.append("|").append(card.getTextSliceUri()) in buildCardListLog()
221 .append("|").append(card.getRankingScore()); in buildCardListLog()
/packages/apps/Settings/protos/
Dcontextual_card_list.proto7 repeated ContextualCard card = 1; field
13 * The category of a card: this is a hint for how a card should be collected,
25 /** Slice uri of the contextual card */
28 /** Name of the card. It should be identical in every app */
/packages/apps/Settings/tests/unit/src/com/android/settings/homepage/contextualcards/
DContextualCardsDiffCallbackTest.java82 final ContextualCard card = getContextualCard("test1").mutate() in areContentsTheSame_sliceWithToggle_returnFalse() local
84 mNewCards.add(0, card); in areContentsTheSame_sliceWithToggle_returnFalse()
91 final ContextualCard card = getContextualCard("test1").mutate() in areContentsTheSame_stickySlice_returnFalse() local
93 mNewCards.add(0, card); in areContentsTheSame_stickySlice_returnFalse()
100 final ContextualCard card = getContextualCard("test1").mutate() in areContentsTheSame_importantSlice_returnFalse() local
102 mNewCards.add(0, card); in areContentsTheSame_importantSlice_returnFalse()
/packages/apps/QuickAccessWallet/src/com/android/systemui/plugin/globalactions/wallet/
DWalletPanelViewController.java186 for (WalletCard card : walletCards) { in onWalletCardsRetrieved()
187 data.add(new QAWalletCardViewInfo(card)); in onWalletCardsRetrieved()
247 public void onCardSelected(WalletCardViewInfo card) { in onCardSelected() argument
251 mSelectedCardId = card.getCardId(); in onCardSelected()
272 public void onCardClicked(WalletCardViewInfo card) { in onCardClicked() argument
276 PendingIntent pendingIntent = ((QAWalletCardViewInfo) card).mWalletCard.getPendingIntent(); in onCardClicked()

123