Loading api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -13829,12 +13829,12 @@ package android.graphics.drawable { } public final class Icon implements android.os.Parcelable { method public static android.graphics.drawable.Icon createWithAdaptiveBitmap(android.graphics.Bitmap); method public static android.graphics.drawable.Icon createWithBitmap(android.graphics.Bitmap); method public static android.graphics.drawable.Icon createWithContentUri(java.lang.String); method public static android.graphics.drawable.Icon createWithContentUri(android.net.Uri); method public static android.graphics.drawable.Icon createWithData(byte[], int, int); method public static android.graphics.drawable.Icon createWithFilePath(java.lang.String); method public static android.graphics.drawable.Icon createWithMaskableBitmap(android.graphics.Bitmap); method public static android.graphics.drawable.Icon createWithResource(android.content.Context, int); method public static android.graphics.drawable.Icon createWithResource(java.lang.String, int); method public int describeContents(); api/system-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -14465,12 +14465,12 @@ package android.graphics.drawable { } public final class Icon implements android.os.Parcelable { method public static android.graphics.drawable.Icon createWithAdaptiveBitmap(android.graphics.Bitmap); method public static android.graphics.drawable.Icon createWithBitmap(android.graphics.Bitmap); method public static android.graphics.drawable.Icon createWithContentUri(java.lang.String); method public static android.graphics.drawable.Icon createWithContentUri(android.net.Uri); method public static android.graphics.drawable.Icon createWithData(byte[], int, int); method public static android.graphics.drawable.Icon createWithFilePath(java.lang.String); method public static android.graphics.drawable.Icon createWithMaskableBitmap(android.graphics.Bitmap); method public static android.graphics.drawable.Icon createWithResource(android.content.Context, int); method public static android.graphics.drawable.Icon createWithResource(java.lang.String, int); method public int describeContents(); api/test-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -13867,12 +13867,12 @@ package android.graphics.drawable { } public final class Icon implements android.os.Parcelable { method public static android.graphics.drawable.Icon createWithAdaptiveBitmap(android.graphics.Bitmap); method public static android.graphics.drawable.Icon createWithBitmap(android.graphics.Bitmap); method public static android.graphics.drawable.Icon createWithContentUri(java.lang.String); method public static android.graphics.drawable.Icon createWithContentUri(android.net.Uri); method public static android.graphics.drawable.Icon createWithData(byte[], int, int); method public static android.graphics.drawable.Icon createWithFilePath(java.lang.String); method public static android.graphics.drawable.Icon createWithMaskableBitmap(android.graphics.Bitmap); method public static android.graphics.drawable.Icon createWithResource(android.content.Context, int); method public static android.graphics.drawable.Icon createWithResource(java.lang.String, int); method public int describeContents(); core/java/android/content/pm/LauncherApps.java +2 −2 Original line number Diff line number Diff line Loading @@ -829,7 +829,7 @@ public class LauncherApps { final Bitmap bmp = BitmapFactory.decodeFileDescriptor(pfd.getFileDescriptor()); if (bmp != null) { BitmapDrawable dr = new BitmapDrawable(mContext.getResources(), bmp); if (shortcut.hasMaskableBitmap()) { if (shortcut.hasAdaptiveBitmap()) { return new AdaptiveIconDrawable(null, dr); } else { return dr; Loading @@ -854,7 +854,7 @@ public class LauncherApps { icon.getResId(), shortcut.getUserHandle(), density); } case Icon.TYPE_BITMAP: case Icon.TYPE_BITMAP_MASKABLE: { case Icon.TYPE_ADAPTIVE_BITMAP: { return icon.loadDrawable(mContext); } default: Loading core/java/android/content/pm/ShortcutInfo.java +8 −7 Original line number Diff line number Diff line Loading @@ -96,7 +96,7 @@ public final class ShortcutInfo implements Parcelable { public static final int FLAG_IMMUTABLE = 1 << 8; /** @hide */ public static final int FLAG_MASKABLE_BITMAP = 1 << 9; public static final int FLAG_ADAPTIVE_BITMAP = 1 << 9; /** @hide */ public static final int FLAG_CHOOSER = 1 << 10; Loading @@ -118,7 +118,7 @@ public final class ShortcutInfo implements Parcelable { FLAG_DISABLED, FLAG_STRINGS_RESOLVED, FLAG_IMMUTABLE, FLAG_MASKABLE_BITMAP, FLAG_ADAPTIVE_BITMAP, FLAG_CHOOSER, }) @Retention(RetentionPolicy.SOURCE) Loading Loading @@ -784,7 +784,7 @@ public final class ShortcutInfo implements Parcelable { switch (icon.getType()) { case Icon.TYPE_RESOURCE: case Icon.TYPE_BITMAP: case Icon.TYPE_BITMAP_MASKABLE: case Icon.TYPE_ADAPTIVE_BITMAP: break; // OK default: throw getInvalidIconException(); Loading Loading @@ -917,7 +917,7 @@ public final class ShortcutInfo implements Parcelable { * and will be ignored. * * <p>Only icons created with {@link Icon#createWithBitmap(Bitmap)}, * {@link Icon#createWithMaskableBitmap(Bitmap)} * {@link Icon#createWithAdaptiveBitmap(Bitmap)} * and {@link Icon#createWithResource} are supported. * Other types, such as URI-based icons, are not supported. * Loading Loading @@ -1615,12 +1615,13 @@ public final class ShortcutInfo implements Parcelable { } /** * Return whether a shortcut's icon is maskable. * Return whether a shortcut's icon is adaptive bitmap following design guideline * defined in {@link AdaptiveIconDrawable}. * * @hide internal/unit tests only */ public boolean hasMaskableBitmap() { return hasFlags(FLAG_MASKABLE_BITMAP); public boolean hasAdaptiveBitmap() { return hasFlags(FLAG_ADAPTIVE_BITMAP); } /** Loading Loading
api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -13829,12 +13829,12 @@ package android.graphics.drawable { } public final class Icon implements android.os.Parcelable { method public static android.graphics.drawable.Icon createWithAdaptiveBitmap(android.graphics.Bitmap); method public static android.graphics.drawable.Icon createWithBitmap(android.graphics.Bitmap); method public static android.graphics.drawable.Icon createWithContentUri(java.lang.String); method public static android.graphics.drawable.Icon createWithContentUri(android.net.Uri); method public static android.graphics.drawable.Icon createWithData(byte[], int, int); method public static android.graphics.drawable.Icon createWithFilePath(java.lang.String); method public static android.graphics.drawable.Icon createWithMaskableBitmap(android.graphics.Bitmap); method public static android.graphics.drawable.Icon createWithResource(android.content.Context, int); method public static android.graphics.drawable.Icon createWithResource(java.lang.String, int); method public int describeContents();
api/system-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -14465,12 +14465,12 @@ package android.graphics.drawable { } public final class Icon implements android.os.Parcelable { method public static android.graphics.drawable.Icon createWithAdaptiveBitmap(android.graphics.Bitmap); method public static android.graphics.drawable.Icon createWithBitmap(android.graphics.Bitmap); method public static android.graphics.drawable.Icon createWithContentUri(java.lang.String); method public static android.graphics.drawable.Icon createWithContentUri(android.net.Uri); method public static android.graphics.drawable.Icon createWithData(byte[], int, int); method public static android.graphics.drawable.Icon createWithFilePath(java.lang.String); method public static android.graphics.drawable.Icon createWithMaskableBitmap(android.graphics.Bitmap); method public static android.graphics.drawable.Icon createWithResource(android.content.Context, int); method public static android.graphics.drawable.Icon createWithResource(java.lang.String, int); method public int describeContents();
api/test-current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -13867,12 +13867,12 @@ package android.graphics.drawable { } public final class Icon implements android.os.Parcelable { method public static android.graphics.drawable.Icon createWithAdaptiveBitmap(android.graphics.Bitmap); method public static android.graphics.drawable.Icon createWithBitmap(android.graphics.Bitmap); method public static android.graphics.drawable.Icon createWithContentUri(java.lang.String); method public static android.graphics.drawable.Icon createWithContentUri(android.net.Uri); method public static android.graphics.drawable.Icon createWithData(byte[], int, int); method public static android.graphics.drawable.Icon createWithFilePath(java.lang.String); method public static android.graphics.drawable.Icon createWithMaskableBitmap(android.graphics.Bitmap); method public static android.graphics.drawable.Icon createWithResource(android.content.Context, int); method public static android.graphics.drawable.Icon createWithResource(java.lang.String, int); method public int describeContents();
core/java/android/content/pm/LauncherApps.java +2 −2 Original line number Diff line number Diff line Loading @@ -829,7 +829,7 @@ public class LauncherApps { final Bitmap bmp = BitmapFactory.decodeFileDescriptor(pfd.getFileDescriptor()); if (bmp != null) { BitmapDrawable dr = new BitmapDrawable(mContext.getResources(), bmp); if (shortcut.hasMaskableBitmap()) { if (shortcut.hasAdaptiveBitmap()) { return new AdaptiveIconDrawable(null, dr); } else { return dr; Loading @@ -854,7 +854,7 @@ public class LauncherApps { icon.getResId(), shortcut.getUserHandle(), density); } case Icon.TYPE_BITMAP: case Icon.TYPE_BITMAP_MASKABLE: { case Icon.TYPE_ADAPTIVE_BITMAP: { return icon.loadDrawable(mContext); } default: Loading
core/java/android/content/pm/ShortcutInfo.java +8 −7 Original line number Diff line number Diff line Loading @@ -96,7 +96,7 @@ public final class ShortcutInfo implements Parcelable { public static final int FLAG_IMMUTABLE = 1 << 8; /** @hide */ public static final int FLAG_MASKABLE_BITMAP = 1 << 9; public static final int FLAG_ADAPTIVE_BITMAP = 1 << 9; /** @hide */ public static final int FLAG_CHOOSER = 1 << 10; Loading @@ -118,7 +118,7 @@ public final class ShortcutInfo implements Parcelable { FLAG_DISABLED, FLAG_STRINGS_RESOLVED, FLAG_IMMUTABLE, FLAG_MASKABLE_BITMAP, FLAG_ADAPTIVE_BITMAP, FLAG_CHOOSER, }) @Retention(RetentionPolicy.SOURCE) Loading Loading @@ -784,7 +784,7 @@ public final class ShortcutInfo implements Parcelable { switch (icon.getType()) { case Icon.TYPE_RESOURCE: case Icon.TYPE_BITMAP: case Icon.TYPE_BITMAP_MASKABLE: case Icon.TYPE_ADAPTIVE_BITMAP: break; // OK default: throw getInvalidIconException(); Loading Loading @@ -917,7 +917,7 @@ public final class ShortcutInfo implements Parcelable { * and will be ignored. * * <p>Only icons created with {@link Icon#createWithBitmap(Bitmap)}, * {@link Icon#createWithMaskableBitmap(Bitmap)} * {@link Icon#createWithAdaptiveBitmap(Bitmap)} * and {@link Icon#createWithResource} are supported. * Other types, such as URI-based icons, are not supported. * Loading Loading @@ -1615,12 +1615,13 @@ public final class ShortcutInfo implements Parcelable { } /** * Return whether a shortcut's icon is maskable. * Return whether a shortcut's icon is adaptive bitmap following design guideline * defined in {@link AdaptiveIconDrawable}. * * @hide internal/unit tests only */ public boolean hasMaskableBitmap() { return hasFlags(FLAG_MASKABLE_BITMAP); public boolean hasAdaptiveBitmap() { return hasFlags(FLAG_ADAPTIVE_BITMAP); } /** Loading