diff options
author | Daniel Sandler <dsandler@android.com> | 2015-05-14 15:32:28 +0000 |
---|---|---|
committer | Dan Sandler <dsandler@android.com> | 2015-05-14 12:23:24 -0400 |
commit | 09e51a739f3e408567f0eefafcc5fedb01bc3401 (patch) | |
tree | d20689934b33b290a52cd74214db79b0c168fd6f /graphics | |
parent | 1b2e5c11b6a89d56d5058907c3b0c88bf0170857 (diff) | |
download | frameworks_base-09e51a739f3e408567f0eefafcc5fedb01bc3401.zip frameworks_base-09e51a739f3e408567f0eefafcc5fedb01bc3401.tar.gz frameworks_base-09e51a739f3e408567f0eefafcc5fedb01bc3401.tar.bz2 |
Revert "Icon support comes to Notification."
This reverts commit 08a04c15245c970856022d0779aa27d4d63cdee3.
This also reverts commit 5bcbf857d129f4513e562801a4e88077b2655ade.
Change-Id: Ia0b0a5339d523581c877822a3a1feec97ae4b73d
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/java/android/graphics/drawable/Icon.java | 82 |
1 files changed, 15 insertions, 67 deletions
diff --git a/graphics/java/android/graphics/drawable/Icon.java b/graphics/java/android/graphics/drawable/Icon.java index 37fb703..668a14a 100644 --- a/graphics/java/android/graphics/drawable/Icon.java +++ b/graphics/java/android/graphics/drawable/Icon.java @@ -53,14 +53,10 @@ import java.io.OutputStream; public final class Icon implements Parcelable { private static final String TAG = "Icon"; - /** @hide */ - public static final int TYPE_BITMAP = 1; - /** @hide */ - public static final int TYPE_RESOURCE = 2; - /** @hide */ - public static final int TYPE_DATA = 3; - /** @hide */ - public static final int TYPE_URI = 4; + private static final int TYPE_BITMAP = 1; + private static final int TYPE_RESOURCE = 2; + private static final int TYPE_DATA = 3; + private static final int TYPE_URI = 4; private static final int VERSION_STREAM_SERIALIZER = 1; @@ -85,34 +81,15 @@ public final class Icon implements Parcelable { // TYPE_DATA: data offset private int mInt2; - /** - * @return The type of image data held in this Icon. One of - * {@link #TYPE_BITMAP}, - * {@link #TYPE_RESOURCE}, - * {@link #TYPE_DATA}, or - * {@link #TYPE_URI}. - * @hide - */ - public int getType() { - return mType; - } - - /** - * @return The {@link android.graphics.Bitmap} held by this {@link #TYPE_BITMAP} Icon. - * @hide - */ - public Bitmap getBitmap() { + // Internal accessors for different mType variants + private Bitmap getBitmap() { if (mType != TYPE_BITMAP) { throw new IllegalStateException("called getBitmap() on " + this); } return (Bitmap) mObj1; } - /** - * @return The length of the compressed bitmap byte array held by this {@link #TYPE_DATA} Icon. - * @hide - */ - public int getDataLength() { + private int getDataLength() { if (mType != TYPE_DATA) { throw new IllegalStateException("called getDataLength() on " + this); } @@ -121,12 +98,7 @@ public final class Icon implements Parcelable { } } - /** - * @return The offset into the byte array held by this {@link #TYPE_DATA} Icon at which - * valid compressed bitmap data is found. - * @hide - */ - public int getDataOffset() { + private int getDataOffset() { if (mType != TYPE_DATA) { throw new IllegalStateException("called getDataOffset() on " + this); } @@ -135,12 +107,7 @@ public final class Icon implements Parcelable { } } - /** - * @return The byte array held by this {@link #TYPE_DATA} Icon ctonaining compressed - * bitmap data. - * @hide - */ - public byte[] getDataBytes() { + private byte[] getDataBytes() { if (mType != TYPE_DATA) { throw new IllegalStateException("called getDataBytes() on " + this); } @@ -149,58 +116,39 @@ public final class Icon implements Parcelable { } } - /** - * @return The {@link android.content.res.Resources} for this {@link #TYPE_RESOURCE} Icon. - * @hide - */ - public Resources getResources() { + private Resources getResources() { if (mType != TYPE_RESOURCE) { throw new IllegalStateException("called getResources() on " + this); } return (Resources) mObj1; } - /** - * @return The package containing resources for this {@link #TYPE_RESOURCE} Icon. - * @hide - */ - public String getResPackage() { + private String getResPackage() { if (mType != TYPE_RESOURCE) { throw new IllegalStateException("called getResPackage() on " + this); } return mString1; } - /** - * @return The resource ID for this {@link #TYPE_RESOURCE} Icon. - * @hide - */ - public int getResId() { + private int getResId() { if (mType != TYPE_RESOURCE) { throw new IllegalStateException("called getResId() on " + this); } return mInt1; } - /** - * @return The URI (as a String) for this {@link #TYPE_URI} Icon. - * @hide - */ - public String getUriString() { + private String getUriString() { if (mType != TYPE_URI) { throw new IllegalStateException("called getUriString() on " + this); } return mString1; } - /** - * @return The {@link android.net.Uri} for this {@link #TYPE_URI} Icon. - * @hide - */ - public Uri getUri() { + private Uri getUri() { return Uri.parse(getUriString()); } + // Convert a int32 into a four-char string private static final String typeToString(int x) { switch (x) { case TYPE_BITMAP: return "BITMAP"; |