Home
last modified time | relevance | path

Searched refs:icon (Results 1 – 25 of 598) sorted by relevance

12345678910>>...24

/packages/modules/IntentResolver/java/src/com/android/intentresolver/
DSimpleIconFactory.java209 Bitmap createUserBadgedIconBitmap(@Nullable Drawable icon, @Nullable UserHandle user) { in createUserBadgedIconBitmap() argument
213 if (icon == null) { in createUserBadgedIconBitmap()
214 icon = getFullResDefaultActivityIcon(mFillResIconDpi); in createUserBadgedIconBitmap()
216 icon = normalizeAndWrapToAdaptiveIcon(icon, null, scale); in createUserBadgedIconBitmap()
217 Bitmap bitmap = createIconBitmap(icon, scale[0]); in createUserBadgedIconBitmap()
218 if (icon instanceof AdaptiveIconDrawable) { in createUserBadgedIconBitmap()
253 public Bitmap createAppBadgedIconBitmap(@Nullable Drawable icon, Bitmap renderedAppIcon) { in createAppBadgedIconBitmap() argument
255 if (icon == null) { in createAppBadgedIconBitmap()
256 icon = getFullResDefaultActivityIcon(mFillResIconDpi); in createAppBadgedIconBitmap()
261 int w = icon.getIntrinsicWidth(); in createAppBadgedIconBitmap()
[all …]
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/common/
DTopLevelIconTest.java51 TopLevelIcon icon = new TopLevelIcon(mContext, new ColorDrawable(Color.BLACK)); in createIcon_shouldSetBackgroundAndInset() local
53 assertThat(icon.getNumberOfLayers()).isEqualTo(2); in createIcon_shouldSetBackgroundAndInset()
54 assertThat(icon.getDrawable(0)).isInstanceOf(TopLevelIconShapeDrawable.class); in createIcon_shouldSetBackgroundAndInset()
59 TopLevelIcon icon = spy(new TopLevelIcon(mContext, new ColorDrawable(Color.BLACK))); in setBackgroundColor_shouldUpdateTintList() local
61 when(icon.getDrawable(0)).thenReturn(background); in setBackgroundColor_shouldUpdateTintList()
62 icon.setBackgroundColor(Color.BLUE); in setBackgroundColor_shouldUpdateTintList()
71 TopLevelIcon icon = new TopLevelIcon(mContext, new ColorDrawable(Color.BLACK)); in injectedPreferenceWithBackgroundColorRawValue_shouldSetColor() local
72 icon.setBackgroundColor(mContext, metaData, mContext.getPackageName()); in injectedPreferenceWithBackgroundColorRawValue_shouldSetColor()
74 assertThat(icon.mBackgroundColorStateList.getDefaultColor()).isEqualTo(0xff0000); in injectedPreferenceWithBackgroundColorRawValue_shouldSetColor()
80 TopLevelIcon icon = new TopLevelIcon(mContext, new ColorDrawable(Color.BLACK)); in injectedPreferenceWithoutBackgroundColor_shouldSetDefaultBackgroundColor() local
[all …]
/packages/apps/Settings/src/com/android/settings/
DActivityPicker.java162 Drawable icon = null; in getItems() local
169 icon = res.getDrawable(res.getIdentifier( in getItems()
175 items.add(new PickAdapter.Item(this, label, icon)); in getItems()
225 Drawable icon; field in ActivityPicker.PickAdapter.Item
233 Item(Context context, CharSequence label, Drawable icon) { in Item() argument
235 this.icon = getResizer(context).createIconThumbnail(icon); in Item()
248 icon = getResizer(context).createIconThumbnail(resolveInfo.loadIcon(pm)); in Item()
322 textView.setCompoundDrawablesWithIntrinsicBounds(item.icon, null, null, null); in getView()
361 public Drawable createIconThumbnail(Drawable icon) { in createIconThumbnail() argument
365 if (icon == null) { in createIconThumbnail()
[all …]
DAppWidgetPickActivity.java98 Drawable icon = null; in createItem() local
100 if (info.icon != 0) { in createItem()
123 icon = packageResources.getDrawableForDensity(info.icon, iconDensity); in createItem()
125 Log.w(TAG, "Can't load icon drawable 0x" + Integer.toHexString(info.icon) in createItem()
128 if (icon == null) { in createItem()
129 Log.w(TAG, "Can't load icon drawable 0x" + Integer.toHexString(info.icon) in createItem()
134 PickAdapter.Item item = new PickAdapter.Item(context, label, icon); in createItem()
/packages/apps/Launcher3/quickstep/src/com/android/launcher3/hybridhotseat/
DHotseatPredictionController.java225 PredictedAppIcon icon = (PredictedAppIcon) child; in fillGapsWithPrediction() local
226 boolean animateIconChange = icon.shouldAnimateIconChange(predictedItem); in fillGapsWithPrediction()
227 icon.applyFromWorkspaceItem(predictedItem, animateIconChange, numViewsAnimated); in fillGapsWithPrediction()
231 icon.finishBinding(mPredictionLongClickListener); in fillGapsWithPrediction()
245 PredictedAppIcon icon = PredictedAppIcon.createIcon(mHotseat, item); in bindItems() local
246 mLauncher.getWorkspace().addInScreenFromBind(icon, item); in bindItems()
247 icon.finishBinding(mPredictionLongClickListener); in bindItems()
249 animationSet.play(ObjectAnimator.ofFloat(icon, SCALE_PROPERTY, 0.2f, 1)); in bindItems()
305 PredictedAppIcon icon = (PredictedAppIcon) mHotseat.getChildAt( in pinPrediction() local
308 if (icon == null) { in pinPrediction()
[all …]
/packages/apps/DocumentsUI/src/com/android/documentsui/
DIconUtils.java29 int icon, boolean maybeShowBadge) { in loadPackageIcon() argument
30 if (icon != 0) { in loadPackageIcon()
36 packageIcon = pm.getDrawable(info.packageName, icon, info.applicationInfo); in loadPackageIcon()
39 packageIcon = userId.getDrawable(context, icon); in loadPackageIcon()
68 final Drawable icon = context.getDrawable(drawableId); in applyTintColor() local
69 return applyTintColor(context, icon, tintColorId); in applyTintColor()
72 public static Drawable applyTintColor(Context context, Drawable icon, int tintColorId) { in applyTintColor() argument
73 icon.mutate(); in applyTintColor()
74 icon.setTintList(context.getColorStateList(tintColorId)); in applyTintColor()
75 return icon; in applyTintColor()
/packages/modules/Permission/PermissionController/src/android/support/wearable/view/
DWearableDialogHelper.java89 public WearableDialogHelper setPositiveIcon(@Nullable Drawable icon) { in setPositiveIcon() argument
90 mPositiveIcon = icon; in setPositiveIcon()
103 public WearableDialogHelper setNegativeIcon(@Nullable Drawable icon) { in setNegativeIcon() argument
104 mNegativeIcon = icon; in setNegativeIcon()
117 public WearableDialogHelper setNeutralIcon(@Nullable Drawable icon) { in setNeutralIcon() argument
118 mNeutralIcon = icon; in setNeutralIcon()
178 public DialogBuilder setPositiveIcon(@Nullable Drawable icon) { in setPositiveIcon() argument
179 mHelper.setPositiveIcon(icon); in setPositiveIcon()
188 public DialogBuilder setNegativeIcon(@Nullable Drawable icon) { in setNegativeIcon() argument
189 mHelper.setNegativeIcon(icon); in setNegativeIcon()
[all …]
/packages/apps/Launcher3/tests/src/com/android/launcher3/ui/workspace/
DThemeIconsTest.java66 HomeAppIcon icon = allApps.getAppIcon(APP_NAME); in testIconWithoutTheme() local
68 icon.dragToWorkspace(false, false); in testIconWithoutTheme()
84 HomeAppIcon icon = allApps.getAppIcon(SHORTCUT_APP_NAME); in testShortcutIconWithoutTheme() local
86 (HomeAppIconMenuItem) icon.openDeepShortcutMenu().getMenuItem(SHORTCUT_NAME); in testShortcutIconWithoutTheme()
103 HomeAppIcon icon = allApps.getAppIcon(APP_NAME); in testIconWithTheme() local
105 icon.dragToWorkspace(false, false); in testIconWithTheme()
121 HomeAppIcon icon = allApps.getAppIcon(SHORTCUT_APP_NAME); in testShortcutIconWithTheme() local
123 (HomeAppIconMenuItem) icon.openDeepShortcutMenu().getMenuItem(SHORTCUT_NAME); in testShortcutIconWithTheme()
142 BubbleTextView icon = null; in verifyIconTheme() local
153 icon = btv; in verifyIconTheme()
[all …]
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/applications/defaultapps/
DDefaultAppUtilsTest.java44 Drawable icon = DefaultAppUtils.getSafeIcon(drawable, testMaxDimensions); in setSafeIcon_smallerThanLimit() local
46 assertThat(icon.getMinimumHeight()).isEqualTo(height); in setSafeIcon_smallerThanLimit()
47 assertThat(icon.getMinimumWidth()).isEqualTo(width); in setSafeIcon_smallerThanLimit()
59 Drawable icon = DefaultAppUtils.getSafeIcon(drawable, testMaxDimensions); in setSafeIcon_largerThanLimit() local
61 assertThat(icon.getMinimumHeight()).isEqualTo(testMaxDimensions); in setSafeIcon_largerThanLimit()
62 assertThat(icon.getMinimumWidth()).isEqualTo(testMaxDimensions); in setSafeIcon_largerThanLimit()
74 Drawable icon = DefaultAppUtils.getSafeIcon(drawable, testMaxDimensions); in setSafeIcon_noChangeForVectorDrawable() local
76 assertThat(icon.getMinimumHeight()).isEqualTo(height); in setSafeIcon_noChangeForVectorDrawable()
77 assertThat(icon.getMinimumWidth()).isEqualTo(width); in setSafeIcon_noChangeForVectorDrawable()
/packages/apps/Launcher3/quickstep/src/com/android/launcher3/appprediction/
DPredictionRowView.java200 BubbleTextView icon = (BubbleTextView) inflater.inflate( in applyPredictionApps() local
202 icon.setOnClickListener(mActivityContext.getItemOnClickListener()); in applyPredictionApps()
203 icon.setOnLongClickListener(mOnIconLongClickListener); in applyPredictionApps()
204 icon.setLongPressTimeoutFactor(1f); in applyPredictionApps()
205 icon.setOnFocusChangeListener(mFocusHelper); in applyPredictionApps()
207 LayoutParams lp = (LayoutParams) icon.getLayoutParams(); in applyPredictionApps()
212 addView(icon); in applyPredictionApps()
219 BubbleTextView icon = (BubbleTextView) getChildAt(i); in applyPredictionApps() local
220 icon.reset(); in applyPredictionApps()
222 icon.setVisibility(View.VISIBLE); in applyPredictionApps()
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/notification/
DNotificationInfo.java78 Icon icon = iconType == Notification.BADGE_ICON_SMALL ? null : notification.getLargeIcon(); in NotificationInfo() local
79 if (icon == null) { in NotificationInfo()
81 icon = notification.getSmallIcon(); in NotificationInfo()
82 mIconDrawable = icon == null ? null : icon.loadDrawable(context); in NotificationInfo()
87 mIconDrawable = icon.loadDrawable(context); in NotificationInfo()
131 Drawable icon = mIconDrawable.mutate(); in getIconForBackground() local
134 icon.setTintList(null); in getIconForBackground()
135 icon.setTint(mIconColor); in getIconForBackground()
136 return icon; in getIconForBackground()
/packages/apps/Car/Settings/src/com/android/car/settings/common/
DExtraSettingsUtil.java70 Drawable icon; in createIcon() local
72 icon = loadDrawableFromPackage(context, packageName, resId); in createIcon()
74 icon = context.getDrawable(R.drawable.ic_settings_gear); in createIcon()
77 if (icon == null) { in createIcon()
81 icon.mutate().setTintList( in createIcon()
83 icon = new TopLevelIcon(context, icon, R.dimen.top_level_foreground_icon_inset); in createIcon()
84 ((TopLevelIcon) icon).setBackgroundColor(context, metaData, packageName); in createIcon()
87 icon.mutate().setTintList(context.getColorStateList(R.color.icon_color_default)); in createIcon()
89 return icon; in createIcon()
/packages/apps/Launcher3/tests/tapl/com/android/launcher3/tapl/
DAllApps.java68 final UiObject2 icon; in hasClickableIcon() local
70 icon = appListRecycler.findObject(appIconSelector); in hasClickableIcon()
75 if (icon == null) { in hasClickableIcon()
79 final Rect iconBounds = mLauncher.getVisibleBounds(icon); in hasClickableIcon()
85 if (hasSearchBox() && iconCenterInSearchBox(allAppsContainer, icon)) { in hasClickableIcon()
89 if (iconCenterInRecyclerTopPadding(appListRecycler, icon)) { in hasClickableIcon()
102 private boolean iconCenterInSearchBox(UiObject2 allAppsContainer, UiObject2 icon) { in iconCenterInSearchBox() argument
103 final Point iconCenter = icon.getVisibleCenter(); in iconCenterInSearchBox()
108 private boolean iconCenterInRecyclerTopPadding(UiObject2 appsListRecycler, UiObject2 icon) { in iconCenterInRecyclerTopPadding() argument
109 final Point iconCenter = icon.getVisibleCenter(); in iconCenterInRecyclerTopPadding()
[all …]
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/ui/
DDefaultSuggestionView.java187 NowOrLater<Drawable> icon = source.getIcon(sourceIconId); in set() local
188 if (icon.haveNow()) { in set()
190 handleNewDrawable(icon.getNow(), uniqueIconId, source); in set()
195 icon.getLater(new Consumer<Drawable>(){ in set()
197 public boolean consume(Drawable icon) { in set()
204 handleNewDrawable(icon, uniqueIconId, source); in set()
217 private void handleNewDrawable(Drawable icon, String id, Source source) { in handleNewDrawable() argument
218 if (icon == null) { in handleNewDrawable()
223 icon = getFallbackIcon(source); in handleNewDrawable()
225 setDrawable(icon, id); in handleNewDrawable()
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/folder/
DFolderIcon.java174 FolderIcon icon = inflateIcon(resId, activityContext, group, folderInfo); in inflateFolderAndIcon() local
175 folder.setFolderIcon(icon); in inflateFolderAndIcon()
177 icon.setFolder(folder); in inflateFolderAndIcon()
178 return icon; in inflateFolderAndIcon()
198 FolderIcon icon = (FolderIcon) inflater.inflate(resId, group, false); in inflateIcon() local
200 icon.setClipToPadding(false); in inflateIcon()
201 icon.mFolderName = icon.findViewById(R.id.folder_icon_name); in inflateIcon()
202 icon.mFolderName.setText(folderInfo.title); in inflateIcon()
203 icon.mFolderName.setCompoundDrawablePadding(0); in inflateIcon()
204 FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) icon.mFolderName.getLayoutParams(); in inflateIcon()
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/allapps/
DBaseAllAppsAdapter.java192 BubbleTextView icon = (BubbleTextView) mLayoutInflater.inflate( in onCreateViewHolder() local
194 icon.setLongPressTimeoutFactor(1f); in onCreateViewHolder()
195 icon.setOnFocusChangeListener(mIconFocusListener); in onCreateViewHolder()
196 icon.setOnClickListener(mOnIconClickListener); in onCreateViewHolder()
197 icon.setOnLongClickListener(mOnIconLongClickListener); in onCreateViewHolder()
199 icon.getLayoutParams().height = in onCreateViewHolder()
202 icon.getLayoutParams().height += mExtraTextHeight; in onCreateViewHolder()
204 return new ViewHolder(icon); in onCreateViewHolder()
230 BubbleTextView icon = (BubbleTextView) holder.itemView; in onBindViewHolder() local
231 icon.reset(); in onBindViewHolder()
[all …]
/packages/apps/TvSettings/TwoPanelSettingsLib/src/com/android/tv/twopanelsettings/slices/builders/
DPreferenceSliceBuilder.java299 private RowBuilder setTitleItem(@NonNull IconCompat icon) { in setTitleItem() argument
300 return setTitleItem(icon, false /* isLoading */); in setTitleItem()
315 private RowBuilder setTitleItem(@Nullable IconCompat icon, boolean isLoading) { in setTitleItem() argument
317 mTitleIcon = icon; in setTitleItem()
359 public RowBuilder setIcon(@NonNull IconCompat icon) { in setIcon() argument
361 return setTitleItem(icon); in setIcon()
373 public RowBuilder setEndIcon(@NonNull IconCompat icon) { in setEndIcon() argument
375 return setTitleItem(icon); in setEndIcon()
383 public RowBuilder setInfoImage(@NonNull IconCompat icon) { in setInfoImage() argument
384 mInfoImage = icon; in setInfoImage()
[all …]
/packages/apps/Settings/src/com/android/settings/fuelgauge/batteryusage/
DBatteryEntry.java61 public NameAndIcon(String name, Drawable icon, int iconId) { in NameAndIcon() argument
62 this(name, /*packageName=*/ null, icon, iconId); in NameAndIcon()
66 String name, String packageName, Drawable icon, int iconId) { in NameAndIcon() argument
68 this.mIcon = icon; in NameAndIcon()
352 Drawable icon) { in loadNameAndIcon() argument
381 if (ai.icon != 0) { in loadNameAndIcon()
383 icon = ai.loadIcon(pm); in loadNameAndIcon()
409 if (pi.applicationInfo.icon != 0) { in loadNameAndIcon()
411 icon = pi.applicationInfo.loadIcon(pm); in loadNameAndIcon()
425 if (icon == null) { in loadNameAndIcon()
[all …]
/packages/apps/Settings/src/com/android/settings/vpn2/
DVpnInfoPreference.java61 final View icon = holder.findViewById(R.id.warning_button); in onBindViewHolder() local
63 icon.setVisibility(View.VISIBLE); in onBindViewHolder()
64 icon.setOnClickListener(this); in onBindViewHolder()
65 icon.setEnabled(true); in onBindViewHolder()
67 icon.setVisibility(View.GONE); in onBindViewHolder()
68 icon.setOnClickListener(this); in onBindViewHolder()
69 icon.setEnabled(false); in onBindViewHolder()
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/enterprise/
DBaseEnterprisePrivacyPreferenceControllerTestCase.java115 Drawable icon = getIcon(label);
116 assertWithMessage("icon at index %s", i).that(pref.getIcon()).isEqualTo(icon);
151 Drawable icon = ICONS_BY_LABEL.get(label);
152 if (icon != null) {
153 Log.d(TAG, "getIcon(" + label + "): returning existing icon " + icon);
154 return icon;
156 icon = new TextDrawable(label);
157 ICONS_BY_LABEL.put(label, icon);
158 Log.d(TAG, "getIcon(" + label + "): returning new icon " + icon);
159 return icon;
/packages/apps/Contacts/src/com/android/contacts/list/
DContactListFilter.java69 public final Drawable icon; field in ContactListFilter
73 Drawable icon) { in ContactListFilter() argument
78 this.icon = icon; in ContactListFilter()
86 String dataSet, Drawable icon) { in createAccountFilter() argument
88 accountName, dataSet, icon); in createAccountFilter()
97 public static ContactListFilter createDeviceContactsFilter(Drawable icon) { in createDeviceContactsFilter() argument
99 /* accountType= */ null, /* accountName= */ null, /* dataSet= */ null, icon); in createDeviceContactsFilter()
102 public static ContactListFilter createDeviceContactsFilter(Drawable icon, in createDeviceContactsFilter() argument
105 account.type, account.name, account.dataSet, icon); in createDeviceContactsFilter()
108 public static ContactListFilter createSimContactsFilter(Drawable icon, in createSimContactsFilter() argument
[all …]
/packages/apps/Car/SystemUI/src/com/android/systemui/car/userswitcher/
DUserIconProvider.java50 Bitmap icon = userManager.getUserIcon(userInfo.id); in getRoundedUserIcon() local
52 if (icon == null) { in getRoundedUserIcon()
53 icon = assignDefaultIcon(userManager, res, userInfo); in getRoundedUserIcon()
56 return new BitmapDrawable(res, icon); in getRoundedUserIcon()
106 Bitmap icon = getGuestUserDefaultIcon(resources); in getRoundedGuestDefaultIcon() local
107 return new BitmapDrawable(resources, icon); in getRoundedGuestDefaultIcon()
113 private static BitmapDrawable scaleUserIcon(Resources res, Bitmap icon) { in scaleUserIcon() argument
116 Bitmap.createScaledBitmap(icon, desiredSize, desiredSize, /*filter=*/ true); in scaleUserIcon()
/packages/apps/Settings/src/com/android/settings/emergency/
DMoreSettingsPreferenceController.java89 final Drawable icon = getIcon(); in displayPreference() local
91 if (icon != null) { in displayPreference()
93 /* left= */ icon, in displayPreference()
154 private static Drawable getScaledDrawable(Context context, Drawable icon, int width, in getScaledDrawable() argument
164 convertToBitmap(icon, widthInDp, heightInDp)); in getScaledDrawable()
167 private static Bitmap convertToBitmap(Drawable icon, int width, int height) { in convertToBitmap() argument
168 if (icon == null) { in convertToBitmap()
173 icon.setBounds(0, 0, width, height); in convertToBitmap()
174 icon.draw(canvas); in convertToBitmap()
/packages/apps/Stk/src/com/android/stk/
DStkMenuConfig.java68 public String icon; field in StkMenuConfig.Config
70 public Config(int mcc, int mnc, String label, String icon) { in Config() argument
74 this.icon = icon; in Config()
105 if (mConfigs[slotId].icon != null) { in getIcon()
106 int resId = mContext.getResources().getIdentifier(mConfigs[slotId].icon, in getIcon()
111 if (DBG) CatLog.d(LOG_TAG, "getIcon: " + mConfigs[slotId].icon + ", slot id: " + slotId); in getIcon()
178 String icon = parser.getAttributeValue(null, XML_ICON_ATTR); in initialize() local
180 Config config = new Config(mcc, mnc, label, icon); in initialize()
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/
DIconUtilsTest.java76 final int icon = 1234; in testLoadPackageIcon() local
86 when(packageManager.getDrawable(anyString(), eq(icon), any(ApplicationInfo.class))) in testLoadPackageIcon()
89 IconUtils.loadPackageIcon(context, TestProvidersAccess.USER_ID, authority, icon, in testLoadPackageIcon()
92 verify(packageManager).getDrawable(any(), eq(icon), any()); in testLoadPackageIcon()
100 final int icon = 1234; in testLoadPackageIcon_maybeShowBadge() local
110 when(packageManager.getDrawable(any(), eq(icon), any())).thenReturn(drawable); in testLoadPackageIcon_maybeShowBadge()
112 IconUtils.loadPackageIcon(context, TestProvidersAccess.USER_ID, authority, icon, in testLoadPackageIcon_maybeShowBadge()
115 verify(packageManager).getDrawable(any(), eq(icon), any()); in testLoadPackageIcon_maybeShowBadge()

12345678910>>...24