Home
last modified time | relevance | path

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

12345678910>>...20

/frameworks/base/core/java/com/android/internal/util/
DMimeIconUtils.java38 int icon;
41 icon = R.drawable.ic_doc_apk;
42 add("application/vnd.android.package-archive", icon);
45 icon = R.drawable.ic_doc_audio;
46 add("application/ogg", icon);
47 add("application/x-flac", icon);
50 icon = R.drawable.ic_doc_certificate;
51 add("application/pgp-keys", icon);
52 add("application/pgp-signature", icon);
53 add("application/x-pkcs12", icon);
[all …]
DUserIcons.java47 public static Bitmap convertToBitmap(Drawable icon) { in convertToBitmap() argument
48 if (icon == null) { in convertToBitmap()
51 final int width = icon.getIntrinsicWidth(); in convertToBitmap()
52 final int height = icon.getIntrinsicHeight(); in convertToBitmap()
55 icon.setBounds(0, 0, width, height); in convertToBitmap()
56 icon.draw(canvas); in convertToBitmap()
75 Drawable icon = resources.getDrawable(R.drawable.ic_account_circle, null).mutate(); in getDefaultUserIcon() local
76 icon.setColorFilter(resources.getColor(colorResId, null), Mode.SRC_IN); in getDefaultUserIcon()
77 icon.setBounds(0, 0, icon.getIntrinsicWidth(), icon.getIntrinsicHeight()); in getDefaultUserIcon()
78 return icon; in getDefaultUserIcon()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/cat/
DCommandParams.java38 boolean setIcon(Bitmap icon) { return true; } in setIcon() argument
55 boolean setIcon(Bitmap icon) { in setIcon() argument
56 if (icon != null && mTextMsg != null) { in setIcon()
57 mTextMsg.icon = icon; in setIcon()
83 boolean setIcon(Bitmap icon) { in setIcon() argument
84 if (icon != null && mConfirmMsg != null) { in setIcon()
85 mConfirmMsg.icon = icon; in setIcon()
117 boolean setIcon(Bitmap icon) { in setIcon() argument
118 if (icon != null && mTextMsg != null) { in setIcon()
119 mTextMsg.icon = icon; in setIcon()
[all …]
DItem.java34 public Bitmap icon; field in Item
40 public Item(int id, String text, Bitmap icon) { in Item() argument
43 this.icon = icon; in Item()
49 icon = in.readParcelable(null); in Item()
61 dest.writeParcelable(icon, flags); in writeToParcel()
/frameworks/support/compat/src/main/java/androidx/core/graphics/drawable/
DIconCompat.java341 Icon icon; in toIcon() local
347 icon = Icon.createWithBitmap((Bitmap) mObj1); in toIcon()
351 icon = Icon.createWithAdaptiveBitmap((Bitmap) mObj1); in toIcon()
353 icon = Icon.createWithBitmap( in toIcon()
358 icon = Icon.createWithResource((String) mObj1, mInt1); in toIcon()
361 icon = Icon.createWithData((byte[]) mObj1, mInt1, mInt2); in toIcon()
364 icon = Icon.createWithContentUri((String) mObj1); in toIcon()
370 icon.setTintList(mTintList); in toIcon()
373 icon.setTintMode(mTintMode); in toIcon()
375 return icon; in toIcon()
[all …]
/frameworks/base/packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/
DIconLoader.java88 Drawable icon = mIconCache.getAndInvalidateIfModified(taskKey); in getAndInvalidateIfModified() local
89 if (icon != null) { in getAndInvalidateIfModified()
90 return icon; in getAndInvalidateIfModified()
94 icon = createNewIconForTask(taskKey, td, false /* returnDefault */); in getAndInvalidateIfModified()
95 if (icon != null) { in getAndInvalidateIfModified()
96 mIconCache.put(taskKey, icon); in getAndInvalidateIfModified()
97 return icon; in getAndInvalidateIfModified()
134 Drawable icon = getBadgedActivityIcon(activityInfo, userId, desc); in createNewIconForTask() local
135 if (icon != null) { in createNewIconForTask()
136 return icon; in createNewIconForTask()
[all …]
/frameworks/base/core/java/com/android/internal/widget/
DCachingIconView.java53 public void setImageIcon(@Nullable Icon icon) { in setImageIcon() argument
54 if (!testAndSetCache(icon)) { in setImageIcon()
57 super.setImageIcon(icon); in setImageIcon()
63 public Runnable setImageIconAsync(@Nullable Icon icon) { in setImageIconAsync() argument
65 return super.setImageIconAsync(icon); in setImageIconAsync()
123 private synchronized boolean testAndSetCache(Icon icon) { in testAndSetCache() argument
124 if (icon != null && icon.getType() == Icon.TYPE_RESOURCE) { in testAndSetCache()
125 String iconPackage = normalizeIconPackage(icon); in testAndSetCache()
128 && icon.getResId() == mLastResId in testAndSetCache()
132 mLastResId = icon.getResId(); in testAndSetCache()
[all …]
/frameworks/base/core/java/com/android/internal/statusbar/
DStatusBarIcon.java28 public Icon icon; field in StatusBarIcon
34 public StatusBarIcon(UserHandle user, String resPackage, Icon icon, int iconLevel, int number, in StatusBarIcon() argument
36 if (icon.getType() == Icon.TYPE_RESOURCE in StatusBarIcon()
37 && TextUtils.isEmpty(icon.getResPackage())) { in StatusBarIcon()
41 icon = Icon.createWithResource(resPackage, icon.getResId()); in StatusBarIcon()
45 this.icon = icon; in StatusBarIcon()
60 return "StatusBarIcon(icon=" + icon in toString()
70 StatusBarIcon that = new StatusBarIcon(this.user, this.pkg, this.icon, in clone()
84 this.icon = (Icon) in.readParcelable(null); in readFromParcel()
94 out.writeParcelable(this.icon, 0); in writeToParcel()
/frameworks/base/core/java/android/content/pm/
DLabeledIntent.java44 int labelRes, int icon) { in LabeledIntent() argument
49 mIcon = icon; in LabeledIntent()
62 CharSequence nonLocalizedLabel, int icon) { in LabeledIntent() argument
67 mIcon = icon; in LabeledIntent()
78 public LabeledIntent(String sourcePackage, int labelRes, int icon) { in LabeledIntent() argument
82 mIcon = icon; in LabeledIntent()
94 CharSequence nonLocalizedLabel, int icon) { in LabeledIntent() argument
98 mIcon = icon; in LabeledIntent()
154 Drawable icon = pm.getDrawable(mSourcePackage, mIcon, null); in loadIcon() local
155 if (icon != null) { in loadIcon()
[all …]
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/utils/
DIconCache.java38 public Drawable getIcon(Icon icon) { in getIcon() argument
39 if (icon == null) { in getIcon()
42 Drawable drawable = mMap.get(icon); in getIcon()
44 drawable = icon.loadDrawable(mContext); in getIcon()
45 updateIcon(icon, drawable); in getIcon()
50 public void updateIcon(Icon icon, Drawable drawable) { in updateIcon() argument
51 mMap.put(icon, drawable); in updateIcon()
/frameworks/base/core/java/android/util/
DIconDrawableFactory.java65 Drawable icon = mPm.loadUnbadgedItemIcon(itemInfo, appInfo); in getBadgedIcon() local
67 return icon; in getBadgedIcon()
70 icon = getShadowedIcon(icon); in getBadgedIcon()
74 icon = mLauncherIcons.getBadgedDrawable(icon, in getBadgedIcon()
79 icon = mLauncherIcons.getBadgedDrawable(icon, in getBadgedIcon()
83 return icon; in getBadgedIcon()
89 public Drawable getShadowedIcon(Drawable icon) { in getShadowedIcon() argument
90 return mLauncherIcons.wrapIconDrawableWithShadow(icon); in getShadowedIcon()
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/template/
DIconMixin.java49 final @DrawableRes int icon = a.getResourceId(R.styleable.SuwIconMixin_android_icon, 0); in IconMixin() local
50 if (icon != 0) { in IconMixin()
51 setIcon(icon); in IconMixin()
62 public void setIcon(Drawable icon) { in setIcon() argument
65 iconView.setImageDrawable(icon); in setIcon()
66 iconView.setVisibility(icon != null ? View.VISIBLE : View.GONE); in setIcon()
75 public void setIcon(@DrawableRes int icon) { in setIcon() argument
80 iconView.setImageResource(icon); in setIcon()
81 iconView.setVisibility(icon != 0 ? View.VISIBLE : View.GONE); in setIcon()
/frameworks/base/packages/SystemUI/src/com/android/systemui/tuner/
DNavBarTuner.java125 ListPreference icon = (ListPreference) findPreference(ICON + "_" + k); in bindButton() local
126 setupIcons(icon); in bindButton()
137 icon.setValue(uri); in bindButton()
138 updateSummary(icon); in bindButton()
141 icon.setVisible(true); in bindButton()
145 icon.setVisible(false); in bindButton()
150 setValue(setting, type, keycode, icon); in bindButton()
151 updateSummary(icon); in bindButton()
156 icon.setOnPreferenceChangeListener(listener); in bindButton()
170 setValue(setting, type, keycode, icon); in bindButton()
[all …]
/frameworks/base/libs/input/
DSpriteController.cpp139 update.state.surfaceWidth = update.state.icon.bitmap.width(); in doUpdateSprites()
140 update.state.surfaceHeight = update.state.icon.bitmap.height(); in doUpdateSprites()
158 int32_t desiredWidth = update.state.icon.bitmap.width(); in doUpdateSprites()
159 int32_t desiredHeight = update.state.icon.bitmap.height(); in doUpdateSprites()
208 surfaceCanvas.drawBitmap(update.state.icon.bitmap, 0, 0, &paint); in doUpdateSprites()
210 if (outBuffer.width > update.state.icon.bitmap.width()) { in doUpdateSprites()
212 surfaceCanvas.drawRect(SkRect::MakeLTRB(update.state.icon.bitmap.width(), 0, in doUpdateSprites()
213 outBuffer.width, update.state.icon.bitmap.height()), paint); in doUpdateSprites()
215 if (outBuffer.height > update.state.icon.bitmap.height()) { in doUpdateSprites()
217 surfaceCanvas.drawRect(SkRect::MakeLTRB(0, update.state.icon.bitmap.height(), in doUpdateSprites()
[all …]
/frameworks/base/services/core/java/com/android/server/policy/
DIconUtilities.java71 public Bitmap createIconBitmap(Drawable icon) { in createIconBitmap() argument
75 if (icon instanceof PaintDrawable) { in createIconBitmap()
76 PaintDrawable painter = (PaintDrawable) icon; in createIconBitmap()
79 } else if (icon instanceof BitmapDrawable) { in createIconBitmap()
81 BitmapDrawable bitmapDrawable = (BitmapDrawable) icon; in createIconBitmap()
87 int sourceWidth = icon.getIntrinsicWidth(); in createIconBitmap()
88 int sourceHeight = icon.getIntrinsicHeight(); in createIconBitmap()
119 mOldBounds.set(icon.getBounds()); in createIconBitmap()
120 icon.setBounds(left, top, left+width, top+height); in createIconBitmap()
121 icon.draw(canvas); in createIconBitmap()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DNetworkController.java59 default void setEthernetIndicators(IconState icon) {} in setEthernetIndicators() argument
61 default void setIsAirplaneMode(IconState icon) {} in setIsAirplaneMode() argument
72 public final int icon; field in NetworkController.IconState
75 public IconState(boolean visible, int icon, String contentDescription) { in IconState() argument
77 this.icon = icon; in IconState()
81 public IconState(boolean visible, int icon, int contentDescription, in IconState() argument
83 this(visible, icon, context.getString(contentDescription)); in IconState()
/frameworks/base/core/java/com/android/internal/globalactions/
DSinglePressAction.java42 protected SinglePressAction(int iconResId, Drawable icon, CharSequence message) { in SinglePressAction() argument
46 mIcon = icon; in SinglePressAction()
75 ImageView icon = v.findViewById(R.id.icon); in create() local
87 if (icon != null) { in create()
89 icon.setImageDrawable(mIcon); in create()
90 icon.setScaleType(ImageView.ScaleType.CENTER_CROP); in create()
92 icon.setImageDrawable(context.getDrawable(mIconResId)); in create()
/frameworks/support/slices/builders/src/main/java/androidx/slice/builders/
DListBuilder.java873 public RowBuilder setTitleItem(@NonNull Icon icon) { in setTitleItem() argument
874 return setTitleItem(icon, ICON_IMAGE); in setTitleItem()
883 public RowBuilder setTitleItem(@Nullable Icon icon, boolean isLoading) { in setTitleItem() argument
884 return setTitleItem(icon, ICON_IMAGE, isLoading); in setTitleItem()
892 public RowBuilder setTitleItem(@NonNull Icon icon, @ImageMode int imageMode) { in setTitleItem() argument
893 mImpl.setTitleItem(IconCompat.createFromIcon(icon), imageMode, false /* isLoading */); in setTitleItem()
903 public RowBuilder setTitleItem(@Nullable Icon icon, @ImageMode int imageMode, in setTitleItem() argument
905 mImpl.setTitleItem(IconCompat.createFromIcon(icon), imageMode, in setTitleItem()
918 public RowBuilder setTitleItem(@NonNull IconCompat icon) { in setTitleItem() argument
919 return setTitleItem(icon, ICON_IMAGE); in setTitleItem()
[all …]
/frameworks/base/core/java/android/app/
DLauncherActivity.java68 public Drawable icon; field in LauncherActivity.ListItem
83 icon = resizer.createIconThumbnail(resolveInfo.loadIcon(pm)); in ListItem()
166 if (item.icon == null) { in bindView()
167 … item.icon = mIconResizer.createIconThumbnail(item.resolveInfo.loadIcon(getPackageManager())); in bindView()
169 text.setCompoundDrawablesRelativeWithIntrinsicBounds(item.icon, null, null, null); in bindView()
277 public Drawable createIconThumbnail(Drawable icon) { in createIconThumbnail() argument
281 final int iconWidth = icon.getIntrinsicWidth(); in createIconThumbnail()
282 final int iconHeight = icon.getIntrinsicHeight(); in createIconThumbnail()
284 if (icon instanceof PaintDrawable) { in createIconThumbnail()
285 PaintDrawable painter = (PaintDrawable) icon; in createIconThumbnail()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/qs/tileimpl/
DQSIconViewImpl.java92 final QSTile.Icon icon = state.iconSupplier != null ? state.iconSupplier.get() : state.icon; in updateIcon() local
93 if (!Objects.equals(icon, iv.getTag(R.id.qs_icon_tag)) in updateIcon()
97 Drawable d = icon != null in updateIcon()
98 ? shouldAnimate ? icon.getDrawable(mContext) in updateIcon()
99 : icon.getInvisibleDrawable(mContext) : null; in updateIcon()
100 int padding = icon != null ? icon.getPadding() : 0; in updateIcon()
113 iv.setTag(R.id.qs_icon_tag, icon); in updateIcon()
206 final ImageView icon = new SlashImageView(mContext); in createIcon() local
207 icon.setId(android.R.id.icon); in createIcon()
208 icon.setScaleType(ScaleType.FIT_CENTER); in createIcon()
[all …]
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/items/
DItem.java79 public void setIcon(Drawable icon) { in setIcon() argument
80 mIcon = icon; in setIcon()
152 final Drawable icon = getIcon(); in onBindView() local
153 if (icon != null) { in onBindView()
158 onMergeIconStateAndLevels(iconView, icon); in onBindView()
159 iconView.setImageDrawable(icon); in onBindView()
173 protected void onMergeIconStateAndLevels(ImageView iconView, Drawable icon) { in onMergeIconStateAndLevels() argument
174 iconView.setImageState(icon.getState(), false /* merge */); in onMergeIconStateAndLevels()
175 iconView.setImageLevel(icon.getLevel()); in onMergeIconStateAndLevels()
/frameworks/support/core/ktx/src/androidTest/java/androidx/core/graphics/drawable/
DIconTest.kt43 val icon = bitmap.toAdaptiveIcon() in fromBitmapAdaptive() constant
45 val rendered = icon.toIntrinsicBitmap() in fromBitmapAdaptive()
57 val icon = bitmap.toIcon() in fromBitmap() constant
59 val rendered = icon.toIntrinsicBitmap() in fromBitmap()
71 val icon = uri.toIcon() in fromUri() constant
73 val rendered = icon.toIntrinsicBitmap() in fromUri()
81 val icon = bytes.toIcon() in fromByteArray() constant
83 val rendered = icon.toIntrinsicBitmap() in fromByteArray()
/frameworks/support/compat/src/androidTest/java/androidx/core/graphics/drawable/
DIconCompatTest.java260 IconCompat icon = IconCompat.createWithBitmap(Bitmap.createBitmap(16, 16, in testBitmapIconCompat_getType() local
262 assertEquals(Icon.TYPE_BITMAP, icon.getType()); in testBitmapIconCompat_getType()
269 IconCompat icon = IconCompat.createWithData(data, 0, 4); in testDataIconCompat_getType() local
270 assertEquals(Icon.TYPE_DATA, icon.getType()); in testDataIconCompat_getType()
281 IconCompat icon = IconCompat.createWithContentUri(Uri.fromFile(file)); in testFileIconCompat_getType() local
282 assertEquals(Icon.TYPE_URI, icon.getType()); in testFileIconCompat_getType()
283 assertEquals(filePath, icon.getUri().getPath()); in testFileIconCompat_getType()
285 icon = IconCompat.createWithContentUri(file.toURI().toString()); in testFileIconCompat_getType()
286 assertEquals(Icon.TYPE_URI, icon.getType()); in testFileIconCompat_getType()
287 assertEquals(filePath, icon.getUri().getPath()); in testFileIconCompat_getType()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/
DNotificationShelf.java320 StatusBarIconView icon = row.getEntry().expandedIcon; in updateAppearance() local
321 NotificationIconContainer.IconState iconState = getIconState(icon); in updateAppearance()
389 StatusBarIconView icon = row.getEntry().expandedIcon;
390 float shelfIconPosition = getTranslationY() + icon.getTop() + icon.getTranslationY();
393 Rect clipRect = new Rect(0, top, icon.getWidth(), Math.max(top, icon.getHeight()));
394 icon.setClipBounds(clipRect);
396 icon.setClipBounds(null);
401 StatusBarIconView icon = row.getEntry().expandedIcon;
402 boolean needsContinuousClipping = ViewState.isAnimatingY(icon) && !mAmbientState.isDark();
403 boolean isContinuousClipping = icon.getTag(TAG_CONTINUOUS_CLIPPING) != null;
[all …]
/frameworks/base/core/java/android/view/
DPointerIcon.java206 PointerIcon icon = gSystemIcons.get(type); in getSystemIcon() local
207 if (icon != null) { in getSystemIcon()
208 return icon; in getSystemIcon()
229 icon = new PointerIcon(type); in getSystemIcon()
231 icon.mSystemIconResourceId = resourceId; in getSystemIcon()
233 icon.loadResource(context, context.getResources(), resourceId); in getSystemIcon()
235 gSystemIcons.append(type, icon); in getSystemIcon()
236 return icon; in getSystemIcon()
267 PointerIcon icon = new PointerIcon(TYPE_CUSTOM); in create() local
268 icon.mBitmap = bitmap; in create()
[all …]

12345678910>>...20