Merge "Fall back to setting the level of the entire progress drawable" into nyc-dev am: a63d2db

am: 147baca

* commit '147baca4aa2f595ee1c2e8bb53b1aed43d3d7ddd':
  Fall back to setting the level of the entire progress drawable

Change-Id: If851161f3e26de46667006f2eb1522fd7c66fd37
This commit is contained in:
Alan Viverette
2016-04-13 17:32:34 +00:00
committed by android-build-merger

View File

@@ -1347,6 +1347,13 @@ public class ProgressBar extends View {
if (d instanceof LayerDrawable) {
d = ((LayerDrawable) d).findDrawableByLayerId(id);
if (d == null) {
// If we can't find the requested layer, fall back to setting
// the level of the entire drawable. This will break if
// progress is set on multiple elements, but the theme-default
// drawable will always have all layer IDs present.
d = mCurrentDrawable;
}
}
if (d != null) {