/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/conditional/ |
D | ConditionContextualCardRenderer.java | 63 final ConditionalContextualCard card = (ConditionalContextualCard) contextualCard; in bindView() local 68 card.getMetricsConstant()); 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 …]
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/homepage/contextualcards/conditional/ |
D | ConditionContextualCardRenderer.java | 63 final ConditionalContextualCard card = (ConditionalContextualCard) contextualCard; in bindView() local 68 card.getMetricsConstant()); 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 …]
|
/packages/apps/ThemePicker/src/com/android/customization/picker/theme/ |
D | ThemePreviewPage.java | 62 TextView header = card.findViewById(R.id.theme_preview_card_header); in bindPreviewContent() 66 card.findViewById(R.id.theme_preview_top_bar).setVisibility(View.GONE); in bindPreviewContent() 67 card.findViewById(R.id.edit_label).setVisibility(View.GONE); in bindPreviewContent() 69 ViewGroup body = card.findViewById(R.id.theme_preview_card_body_container); in bindPreviewContent() 143 if (card == null) { in bindBody() 149 card.addOnLayoutChangeListener(listener); in bindBody() 155 card.requestLayout(); in bindBody() 159 CompoundButton button = card.findViewById(mColorButtonIds[i]); in bindBody() 170 ImageView bg = card.findViewById(mColorTileIds[i]); in bindBody() 172 ImageView fg = card.findViewById(mColorTileIconIds[i][0]); in bindBody() [all …]
|
/packages/apps/ThemePicker/src/com/android/customization/picker/ |
D | BasePreviewAdapter.java | 67 return view == ((PreviewPage) object).card; in isViewFromObject() 76 CardView card = (CardView) mInflater.inflate(mPreviewCardResId, container, false); in instantiateItem() local 79 page.setCard(card); in instantiateItem() 81 if (card.getParent() != null) { in instantiateItem() 82 container.removeView(card); in instantiateItem() 84 container.addView(card); in instantiateItem() 91 View card = ((PreviewPage) object).card; in destroyItem() local 92 ((PreviewPage) object).card = null; in destroyItem() 93 if (card.getParent() == container) { in destroyItem() 94 container.removeView(card); in destroyItem() [all …]
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/homepage/contextualcards/ |
D | ContextualCardLoader.java | 114 final ContextualCard card = new ContextualCard(cursor); in loadInBackground() local 115 if (card.isCustomCard()) { in loadInBackground() 117 } else if (isLargeCard(card)) { in loadInBackground() 118 result.add(card.mutate().setIsLargeCard(true).build()); in loadInBackground() 120 result.add(card); in loadInBackground() 192 for (ContextualCard card : candidates) { in filterEligibleCards() 193 final EligibleCardChecker future = new EligibleCardChecker(mContext, card); in filterEligibleCards() 199 final ContextualCard card = cardFuture.get(ELIGIBILITY_CHECKER_TIMEOUT_MS, in filterEligibleCards() local 201 if (card != null) { in filterEligibleCards() 202 cards.add(card); in filterEligibleCards() [all …]
|
D | ContextualCardFeatureProviderImpl.java | 107 public void logContextualCardDismiss(ContextualCard card) { in logContextualCardDismiss() argument 110 intent.putExtra(EXTRA_CONTEXTUALCARD_NAME, card.getName()); in logContextualCardDismiss() 111 intent.putExtra(EXTRA_CONTEXTUALCARD_URI, card.getSliceUri().toString()); in logContextualCardDismiss() 112 intent.putExtra(EXTRA_CONTEXTUALCARD_SCORE, card.getRankingScore()); in logContextualCardDismiss() 127 public void logContextualCardClick(ContextualCard card, int row, in logContextualCardClick() argument 131 intent.putExtra(EXTRA_CONTEXTUALCARD_NAME, card.getName()); in logContextualCardClick() 132 intent.putExtra(EXTRA_CONTEXTUALCARD_URI, card.getSliceUri().toString()); in logContextualCardClick() 133 intent.putExtra(EXTRA_CONTEXTUALCARD_SCORE, card.getRankingScore()); in logContextualCardClick() 168 cards.stream().forEach(card -> builder.addCard( in serialize() 170 .setSliceUri(card.getSliceUri().toString()) in serialize() [all …]
|
D | ContextualCardManager.java | 129 for (ContextualCard card : mContextualCards) { in loadCardControllers() 130 setupController(card.getCardType()); in loadCardControllers() 175 .filter(card -> conditionalCardTypes.contains(card.getCardType())) in onContextualCardUpdated() 179 .filter(card -> !cardTypes.contains(card.getCardType())) in onContextualCardUpdated() 251 for (ContextualCard card : cards) { in onWindowFocusChanged() 253 .getController(mContext, card.getCardType()); in onWindowFocusChanged() 314 final ContextualCard card = cards.get(index); in getCardsWithDeferredSetupViewType() local 315 if (card.getCategory() == DEFERRED_SETUP_VALUE) { in getCardsWithDeferredSetupViewType() 316 result.set(index, card.mutate().setViewType( in getCardsWithDeferredSetupViewType() 329 .filter(card -> mSavedCards.contains(card.getName())) in getCardsToKeep() [all …]
|
D | ContextualCardsAdapter.java | 72 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() 146 final ContextualCard card = mContextualCards.get(position).mutate() in onSwiped() local 148 mContextualCards.set(position, card); in onSwiped()
|
D | EligibleCardChecker.java | 46 EligibleCardChecker(Context context, ContextualCard card) { in EligibleCardChecker() argument 48 mCard = card; in EligibleCardChecker() 82 boolean isCardEligibleToDisplay(ContextualCard card) { in isCardEligibleToDisplay() argument 83 if (card.getRankingScore() < 0) { in isCardEligibleToDisplay() 86 if (card.isCustomCard()) { in isCardEligibleToDisplay() 90 final Uri uri = card.getSliceUri(); in isCardEligibleToDisplay()
|
/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/ |
D | ContextualCardLoader.java | 114 final ContextualCard card = new ContextualCard(cursor); in loadInBackground() local 115 if (card.isCustomCard()) { in loadInBackground() 117 } else if (isLargeCard(card)) { in loadInBackground() 118 result.add(card.mutate().setIsLargeCard(true).build()); in loadInBackground() 120 result.add(card); in loadInBackground() 165 for (ContextualCard card : candidates) { in filterEligibleCards() 166 final EligibleCardChecker future = new EligibleCardChecker(mContext, card); in filterEligibleCards() 172 final ContextualCard card = cardFuture.get(ELIGIBILITY_CHECKER_TIMEOUT_MS, in filterEligibleCards() local 174 if (card != null) { in filterEligibleCards() 175 cards.add(card); in filterEligibleCards() [all …]
|
D | ContextualCardManager.java | 132 for (ContextualCard card : mContextualCards) { in loadCardControllers() 133 setupController(card.getCardType()); in loadCardControllers() 178 .filter(card -> conditionalCardTypes.contains(card.getCardType())) in onContextualCardUpdated() 182 .filter(card -> !cardTypes.contains(card.getCardType())) in onContextualCardUpdated() 260 for (ContextualCard card : cards) { in onWindowFocusChanged() 262 .getController(mContext, card.getCardType()); in onWindowFocusChanged() 338 final ContextualCard card = cards.get(index); in getCardsWithDeferredSetupViewType() local 339 if (card.getCategory() == DEFERRED_SETUP_VALUE) { in getCardsWithDeferredSetupViewType() 340 result.set(index, card.mutate().setViewType( in getCardsWithDeferredSetupViewType() 353 .filter(card -> mSavedCards.contains(card.getName())) in getCardsToKeep() [all …]
|
D | EligibleCardChecker.java | 51 EligibleCardChecker(Context context, ContextualCard card) { in EligibleCardChecker() argument 53 mCard = card; in EligibleCardChecker() 87 boolean isCardEligibleToDisplay(ContextualCard card) { in isCardEligibleToDisplay() argument 88 if (card.getRankingScore() < 0) { in isCardEligibleToDisplay() 91 if (card.isCustomCard()) { in isCardEligibleToDisplay() 95 final Uri uri = card.getSliceUri(); in isCardEligibleToDisplay() 103 mCard = card.mutate().setHasInlineAction(true).build(); in isCardEligibleToDisplay()
|
D | ContextualCardsAdapter.java | 72 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() 146 final ContextualCard card = mContextualCards.get(position).mutate() in onSwiped() local 148 mContextualCards.set(position, card); in onSwiped()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/homepage/contextualcards/slices/ |
D | SliceContextualCardRendererTest.java | 122 final ContextualCard card = buildContextualCard( in bindView_isPendingDismiss_shouldShowDismissalView() local 125 mRenderer.bindView(viewHolder, card); in bindView_isPendingDismiss_shouldShowDismissalView() 133 final ContextualCard card = buildContextualCard( in bindView_isPendingDismiss_shouldAddViewHolderToSet() local 136 mRenderer.bindView(viewHolder, card); in bindView_isPendingDismiss_shouldAddViewHolderToSet() 144 final ContextualCard card = buildContextualCard(TEST_SLICE_URI); in bindView_beforeSuccessfulSliceBinding_shouldHideSwipeBackground() local 147 mRenderer.bindView(viewHolder, card); in bindView_beforeSuccessfulSliceBinding_shouldHideSwipeBackground() 155 final ContextualCard card = buildContextualCard(TEST_SLICE_URI); in bindView_reuseViewHolder_shouldHideSwipeBackgroundBeforeSliceBinding() local 160 mRenderer.bindView(viewHolder, card); in bindView_reuseViewHolder_shouldHideSwipeBackgroundBeforeSliceBinding() 168 final ContextualCard card = buildContextualCard(TEST_SLICE_URI); in bindView_deferredSetupCard_shouldNotCrash() local 171 mRenderer.bindView(viewHolder, card); in bindView_deferredSetupCard_shouldNotCrash() [all …]
|
/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/slices/ |
D | SliceContextualCardController.java | 59 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 72 dbHelper.markContextualCardAsDismissed(mContext, card.getName()); in onDismissed() 74 showFeedbackDialog(card); in onDismissed() 81 ContextualCardLogUtils.buildCardDismissLog(card)); in onDismissed() 90 void showFeedbackDialog(ContextualCard card) { in showFeedbackDialog() argument 97 getSimpleCardName(card)); in showFeedbackDialog() 108 private String getSimpleCardName(ContextualCard card) { in getSimpleCardName() argument 109 final String[] split = card.getName().split("/"); in getSimpleCardName()
|
D | SliceContextualCardRenderer.java | 98 public void bindView(RecyclerView.ViewHolder holder, ContextualCard card) { in bindView() argument 99 final Uri uri = card.getSliceUri(); in bindView() 137 mDeferredSetupCardHelper.bindView(holder, card, slice); in bindView() 140 mHalfCardHelper.bindView(holder, card, slice); in bindView() 143 mFullCardHelper.bindView(holder, card, slice); in bindView() 155 initDismissalActions(holder, card); in bindView() 158 initDismissalActions(holder, card); in bindView() 161 if (card.isPendingDismiss()) { in bindView() 167 private void initDismissalActions(RecyclerView.ViewHolder holder, ContextualCard card) { in initDismissalActions() argument 176 mControllerRendererPool.getController(mContext, card.getCardType()).onDismissed(card); in initDismissalActions() [all …]
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/homepage/contextualcards/slices/ |
D | SliceContextualCardController.java | 59 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 72 dbHelper.markContextualCardAsDismissed(mContext, card.getName()); in onDismissed() 74 showFeedbackDialog(card); in onDismissed() 81 ContextualCardLogUtils.buildCardDismissLog(card)); in onDismissed() 90 void showFeedbackDialog(ContextualCard card) { in showFeedbackDialog() argument 97 getSimpleCardName(card)); in showFeedbackDialog() 108 private String getSimpleCardName(ContextualCard card) { in getSimpleCardName() argument 109 final String[] split = card.getName().split("/"); in getSimpleCardName()
|
D | SliceContextualCardRenderer.java | 96 public void bindView(RecyclerView.ViewHolder holder, ContextualCard card) { in bindView() argument 97 final Uri uri = card.getSliceUri(); in bindView() 122 mDeferredSetupCardHelper.bindView(holder, card, slice); in bindView() 125 mHalfCardHelper.bindView(holder, card, slice); in bindView() 128 mFullCardHelper.bindView(holder, card, slice); in bindView() 137 initDismissalActions(holder, card); in bindView() 140 initDismissalActions(holder, card); in bindView() 143 if (card.isPendingDismiss()) { in bindView() 149 private void initDismissalActions(RecyclerView.ViewHolder holder, ContextualCard card) { in initDismissalActions() argument 158 mControllerRendererPool.getController(mContext, card.getCardType()).onDismissed(card); in initDismissalActions() [all …]
|
/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/logging/ |
D | ContextualCardLogUtils.java | 142 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/tests/robotests/src/com/android/settings/homepage/contextualcards/conditional/ |
D | ConditionFooterContextualCardRendererTest.java | 64 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()
|
D | ConditionContextualCardRendererTest.java | 70 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()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/homepage/contextualcards/logging/ |
D | ContextualCardLogUtils.java | 142 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/src/com/android/settings/homepage/contextualcards/legacysuggestion/ |
D | LegacySuggestionContextualCardRenderer.java | 52 public void bindView(RecyclerView.ViewHolder holder, ContextualCard card) { in bindView() argument 54 vh.icon.setImageDrawable(card.getIconDrawable()); in bindView() 55 vh.title.setText(card.getTitleText()); in bindView() 56 vh.summary.setText(card.getSummaryText()); in bindView() 59 card.getCardType()).onPrimaryClick(card)); in bindView()
|
/packages/services/Car/tests/CarDeveloperOptions/src/com/android/car/developeroptions/homepage/contextualcards/legacysuggestion/ |
D | LegacySuggestionContextualCardRenderer.java | 52 public void bindView(RecyclerView.ViewHolder holder, ContextualCard card) { in bindView() argument 54 vh.icon.setImageDrawable(card.getIconDrawable()); in bindView() 55 vh.title.setText(card.getTitleText()); in bindView() 56 vh.summary.setText(card.getSummaryText()); in bindView() 59 card.getCardType()).onPrimaryClick(card)); in bindView()
|
/packages/services/Car/tests/CarDeveloperOptions/protos/ |
D | contextual_card_list.proto | 7 repeated ContextualCard card = 1; field 13 * The category of a card: this is a hint for how a card should be collected, 24 /** Slice uri of the contextual card */ 27 /** Name of the card. It should be identical in every app */
|