diff options
author | Alan Viverette <alanv@google.com> | 2014-06-02 16:39:04 -0700 |
---|---|---|
committer | Alan Viverette <alanv@google.com> | 2014-06-02 16:39:04 -0700 |
commit | 6dbe51b50e82057af4d29882889444d22ac19c9c (patch) | |
tree | b06469b2ed2f73a95efb63cd6e5ffdb805a802ca /core/java/android/widget | |
parent | 66268f5d32106aafcbb56370f9800bde0c94cb0d (diff) | |
download | frameworks_base-6dbe51b50e82057af4d29882889444d22ac19c9c.zip frameworks_base-6dbe51b50e82057af4d29882889444d22ac19c9c.tar.gz frameworks_base-6dbe51b50e82057af4d29882889444d22ac19c9c.tar.bz2 |
Clean up drawable theming APIs
Removes APIs for themed creation of a drawable from a stream, since
that doesn't involve any inflation. Also cleans up tinting methods
left over from previous clean up.
BUG: 15089957
Change-Id: I2af7aa9a6d351ae61b33ee1216c674fae1bffe11
Signed-off-by: Alan Viverette <alanv@google.com>
Diffstat (limited to 'core/java/android/widget')
-rw-r--r-- | core/java/android/widget/ImageView.java | 2 | ||||
-rw-r--r-- | core/java/android/widget/ProgressBar.java | 5 | ||||
-rw-r--r-- | core/java/android/widget/SuggestionsAdapter.java | 2 |
3 files changed, 4 insertions, 5 deletions
diff --git a/core/java/android/widget/ImageView.java b/core/java/android/widget/ImageView.java index eedacb5..572302a 100644 --- a/core/java/android/widget/ImageView.java +++ b/core/java/android/widget/ImageView.java @@ -664,7 +664,7 @@ public class ImageView extends View { InputStream stream = null; try { stream = mContext.getContentResolver().openInputStream(mUri); - d = Drawable.createFromStreamThemed(stream, null, mContext.getTheme()); + d = Drawable.createFromStream(stream, null); } catch (Exception e) { Log.w("ImageView", "Unable to open content: " + mUri, e); } finally { diff --git a/core/java/android/widget/ProgressBar.java b/core/java/android/widget/ProgressBar.java index 0c3715d..b49938c 100644 --- a/core/java/android/widget/ProgressBar.java +++ b/core/java/android/widget/ProgressBar.java @@ -357,9 +357,8 @@ public class ProgressBar extends View { Shader.TileMode.REPEAT, Shader.TileMode.CLAMP); shapeDrawable.getPaint().setShader(bitmapShader); - // Ensure the color filter and tint are propagated. - shapeDrawable.setTint(bitmap.getTint()); - shapeDrawable.setTintMode(bitmap.getTintMode()); + // Ensure the tint and filter are propagated in the correct order. + shapeDrawable.setTint(bitmap.getTint(), bitmap.getTintMode()); shapeDrawable.setColorFilter(bitmap.getColorFilter()); return clip ? new ClipDrawable( diff --git a/core/java/android/widget/SuggestionsAdapter.java b/core/java/android/widget/SuggestionsAdapter.java index 0203301..c8917e0 100644 --- a/core/java/android/widget/SuggestionsAdapter.java +++ b/core/java/android/widget/SuggestionsAdapter.java @@ -574,7 +574,7 @@ class SuggestionsAdapter extends ResourceCursorAdapter implements OnClickListene throw new FileNotFoundException("Failed to open " + uri); } try { - return Drawable.createFromStreamThemed(stream, null, mContext.getTheme()); + return Drawable.createFromStream(stream, null); } finally { try { stream.close(); |