diff --git a/api/current.txt b/api/current.txt
index 38d4aef0a0ff8..864ed1903c509 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -564,9 +564,9 @@ package android {
field public static final int fastScrollTextColor = 16843609; // 0x1010359
field public static final int fastScrollThumbDrawable = 16843574; // 0x1010336
field public static final int fastScrollTrackDrawable = 16843577; // 0x1010339
- field public static final int fill = 16843807; // 0x101041f
field public static final int fillAfter = 16843197; // 0x10101bd
field public static final int fillBefore = 16843196; // 0x10101bc
+ field public static final int fillColor = 16843807; // 0x101041f
field public static final int fillEnabled = 16843343; // 0x101024f
field public static final int fillOpacity = 16843806; // 0x101041e
field public static final int fillViewport = 16843130; // 0x101017a
@@ -1161,7 +1161,7 @@ package android {
field public static final int streamType = 16843273; // 0x1010209
field public static final int stretchColumns = 16843081; // 0x1010149
field public static final int stretchMode = 16843030; // 0x1010116
- field public static final int stroke = 16843809; // 0x1010421
+ field public static final int strokeColor = 16843809; // 0x1010421
field public static final int strokeLineCap = 16843815; // 0x1010427
field public static final int strokeLineJoin = 16843816; // 0x1010428
field public static final int strokeOpacity = 16843810; // 0x1010422
diff --git a/core/java/android/util/PathParser.java b/core/java/android/util/PathParser.java
index c36421db9b06a..6820f7785ec20 100644
--- a/core/java/android/util/PathParser.java
+++ b/core/java/android/util/PathParser.java
@@ -74,6 +74,9 @@ public class PathParser {
* @return a deep copy of the source.
*/
public static PathDataNode[] deepCopyNodes(PathDataNode[] source) {
+ if (source == null) {
+ return null;
+ }
PathDataNode[] copy = new PathParser.PathDataNode[source.length];
for (int i = 0; i < source.length; i ++) {
copy[i] = new PathDataNode(source[i]);
diff --git a/core/res/res/drawable-nodpi/platlogo.xml b/core/res/res/drawable-nodpi/platlogo.xml
index d1e2df3f94e1f..fb528301fe193 100644
--- a/core/res/res/drawable-nodpi/platlogo.xml
+++ b/core/res/res/drawable-nodpi/platlogo.xml
@@ -13,27 +13,28 @@
limitations under the License.
-->
-
-
-
-
+
diff --git a/core/res/res/drawable-nodpi/stat_sys_adb.xml b/core/res/res/drawable-nodpi/stat_sys_adb.xml
index 6b3be4a181adf..1fee2df3af4b1 100644
--- a/core/res/res/drawable-nodpi/stat_sys_adb.xml
+++ b/core/res/res/drawable-nodpi/stat_sys_adb.xml
@@ -13,10 +13,11 @@
limitations under the License.
-->
-
-
-
-
+
diff --git a/core/res/res/drawable/ic_audio_ring_notif.xml b/core/res/res/drawable/ic_audio_ring_notif.xml
index b52db5c332056..60a98abf7f91a 100644
--- a/core/res/res/drawable/ic_audio_ring_notif.xml
+++ b/core/res/res/drawable/ic_audio_ring_notif.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="24.0">
diff --git a/core/res/res/drawable/ic_audio_ring_notif_mute.xml b/core/res/res/drawable/ic_audio_ring_notif_mute.xml
index 8d7d6cbe0747e..17dfa7e72c568 100644
--- a/core/res/res/drawable/ic_audio_ring_notif_mute.xml
+++ b/core/res/res/drawable/ic_audio_ring_notif_mute.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="24.0">
diff --git a/core/res/res/drawable/ic_audio_ring_notif_vibrate.xml b/core/res/res/drawable/ic_audio_ring_notif_vibrate.xml
index 2f1d940eb1a20..2ed33eab48487 100644
--- a/core/res/res/drawable/ic_audio_ring_notif_vibrate.xml
+++ b/core/res/res/drawable/ic_audio_ring_notif_vibrate.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="24.0">
diff --git a/core/res/res/drawable/ic_corp_badge.xml b/core/res/res/drawable/ic_corp_badge.xml
index 16c101b15c194..e185fc45e0b26 100644
--- a/core/res/res/drawable/ic_corp_badge.xml
+++ b/core/res/res/drawable/ic_corp_badge.xml
@@ -13,31 +13,28 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="20.0">
+ android:fillColor="#FF5722"/>
+ android:fillColor="#FFFFFF"/>
+ android:fillColor="#FFFFFF"/>
+ android:fillColor="#00000000"/>
+ android:fillColor="#FFFFFF"/>
+ android:fillColor="#00000000"/>
diff --git a/core/res/res/drawable/ic_corp_icon_badge.xml b/core/res/res/drawable/ic_corp_icon_badge.xml
index c8e49e1d5fa56..d20c43133c56a 100644
--- a/core/res/res/drawable/ic_corp_icon_badge.xml
+++ b/core/res/res/drawable/ic_corp_icon_badge.xml
@@ -13,42 +13,39 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="64.0">
+ android:fillColor="#FF5722"/>
+ android:fillColor="#FFFFFF"/>
+ android:fillColor="#FFFFFF"/>
+ android:fillColor="#00000000"/>
+ android:fillColor="#00000000"/>
+ android:fillColor="#00000000"/>
+ android:fillColor="#FFFFFF"/>
diff --git a/core/res/res/drawable/ic_lock_bugreport.xml b/core/res/res/drawable/ic_lock_bugreport.xml
index b93a09a8e1ec1..8540eee20a20e 100644
--- a/core/res/res/drawable/ic_lock_bugreport.xml
+++ b/core/res/res/drawable/ic_lock_bugreport.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="24.0">
diff --git a/core/res/res/drawable/stat_notify_disabled_data.xml b/core/res/res/drawable/stat_notify_disabled_data.xml
index d287a75b27f84..2f6ffaf12f504 100644
--- a/core/res/res/drawable/stat_notify_disabled_data.xml
+++ b/core/res/res/drawable/stat_notify_disabled_data.xml
@@ -13,25 +13,22 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="48.0">
diff --git a/core/res/res/drawable/vector_drawable_progress_bar_large.xml b/core/res/res/drawable/vector_drawable_progress_bar_large.xml
index 6e0840c20ea8a..3bf3cd70e328d 100644
--- a/core/res/res/drawable/vector_drawable_progress_bar_large.xml
+++ b/core/res/res/drawable/vector_drawable_progress_bar_large.xml
@@ -13,15 +13,11 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
-
+ android:viewportWidth="48" >
-
-
-
-
-
+ android:viewportWidth="48" >
-
-
-
-
-
+ android:viewportWidth="48" >
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
@@ -5165,9 +5157,9 @@
-
+
-
+
@@ -5178,7 +5170,7 @@
-
+
@@ -5196,6 +5188,14 @@
+
+
+
+
+
+
+
+
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index a6e85e934ff8e..c5fccde0b4cc0 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -2119,9 +2119,9 @@
-
+
-
+
diff --git a/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java b/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java
index 11c25710d2e60..54683aa9268d2 100644
--- a/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java
+++ b/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java
@@ -49,13 +49,11 @@ import java.util.ArrayList;
*
* Here is a simple VectorDrawable in this vectordrawable.xml file.
*
- * <vector xmlns:android="http://schemas.android.com/apk/res/android" >
- * <size
- * android:height="64dp"
- * android:width="64dp" />
- * <viewport
- * android:viewportHeight="600"
- * android:viewportWidth="600" />
+ * <vector xmlns:android="http://schemas.android.com/apk/res/android"
+ * android:height="64dp"
+ * android:width="64dp"
+ * android:viewportHeight="600"
+ * android:viewportWidth="600" >
* <group
* android:name="rotationGroup"
* android:pivotX="300.0"
@@ -63,7 +61,7 @@ import java.util.ArrayList;
* android:rotation="45.0" >
* <path
* android:name="v"
- * android:fill="#000000"
+ * android:fillColor="#000000"
* android:pathData="M300,70 l 0,-70 70,70 0,0 -70,70z" />
* </group>
* </vector>
diff --git a/graphics/java/android/graphics/drawable/VectorDrawable.java b/graphics/java/android/graphics/drawable/VectorDrawable.java
index f32fa1f6fd704..f41b11a6ef40e 100644
--- a/graphics/java/android/graphics/drawable/VectorDrawable.java
+++ b/graphics/java/android/graphics/drawable/VectorDrawable.java
@@ -54,76 +54,130 @@ import java.util.Stack;
*
* The vector drawable has the following elements:
*
- *
* <vector>
- * - Used to defined a vector drawable
- * <size>
- * - Used to defined the intrinsic Width Height size of the drawable using
- *
android:width and android:height
- * <viewport>
- * - Used to defined the size of the virtual canvas the paths are drawn on.
- * The size is defined using the attributes
android:viewportHeight
- * android:viewportWidth
+ *
+ * - Used to defined a vector drawable
+ *
+ * android:width
+ * - Used to defined the intrinsic width of the drawable.
+ * This support all the dimension units, normally specified with dp.
+ * android:height
+ * - Used to defined the intrinsic height the drawable.
+ * This support all the dimension units, normally specified with dp.
+ * android:viewportWidth
+ * - Used to defined the width of the viewport space. Viewport is basically
+ * the virtual canvas where the paths are drawn on.
+ * android:viewportHeight
+ * - Used to defined the height of the viewport space. Viewport is basically
+ * the virtual canvas where the paths are drawn on.
+ * android:tint
+ * - The color to apply to the drawable as a tint. By default, no tint is applied.
+ * android:tintMode
+ * - The Porter-Duff blending mode for the tint color. The default value is src_in.
+ * android:autoMirrored
+ * - Indicates if the drawable needs to be mirrored when its layout direction is
+ * RTL (right-to-left).
+ *
+ *
+ *
+ *
* <group>
* - Defines a group of paths or subgroups, plus transformation information.
* The transformations are defined in the same coordinates as the viewport.
- * And the transformations are applied in the order of scale, rotate then translate.
- * android:rotation
- * - The degrees of rotation of the group.
- * android:pivotX
- * - The X coordinate of the pivot for the scale and rotation of the group
- * android:pivotY
- * - The Y coordinate of the pivot for the scale and rotation of the group
- * android:scaleX
- * - The amount of scale on the X Coordinate
- * android:scaleY
- * - The amount of scale on the Y coordinate
- * android:translateX
- * - The amount of translation on the X coordinate
- * android:translateY
- * - The amount of translation on the Y coordinate
+ * And the transformations are applied in the order of scale, rotate then translate.
+ *
+ * android:rotation
+ * - The degrees of rotation of the group.
+ * android:pivotX
+ * - The X coordinate of the pivot for the scale and rotation of the group.
+ * This is defined in the viewport space.
+ * android:pivotY
+ * - The Y coordinate of the pivot for the scale and rotation of the group.
+ * This is defined in the viewport space.
+ * android:scaleX
+ * - The amount of scale on the X Coordinate.
+ * android:scaleY
+ * - The amount of scale on the Y coordinate.
+ * android:translateX
+ * - The amount of translation on the X coordinate.
+ * This is defined in the viewport space.
+ * android:translateY
+ * - The amount of translation on the Y coordinate.
+ * This is defined in the viewport space.
+ *
+ *
+ *
+ *
* <path>
* - Defines paths to be drawn.
*
- * android:name
- * - Defines the name of the path.
- * android:pathData
+ * android:name
+ * - Defines the name of the path.
+ * android:pathData
* - Defines path string. This is using exactly same format as "d" attribute
- * in the SVG's path data
- * android:fill
- * - Defines the color to fill the path (none if not present).
- * android:stroke
+ * in the SVG's path data. This is defined in the viewport space.
+ * android:fillColor
+ * - Defines the color to fill the path (none if not present).
+ * android:strokeColor
* - Defines the color to draw the path outline (none if not present).
- *
- * android:strokeWidth
- * - The width a path stroke
- * android:strokeOpacity
- * - The opacity of a path stroke
- * android:fillOpacity
- * - The opacity to fill the path with
- * android:trimPathStart
- * - The fraction of the path to trim from the start from 0 to 1
- * android:trimPathEnd
- * - The fraction of the path to trim from the end from 0 to 1
- * android:trimPathOffset
- * - Shift trim region (allows showed region to include the start and end)
- * from 0 to 1
- * android:clipToPath
- * - Path will set the clip path
- * android:strokeLineCap
- * - Sets the linecap for a stroked path: butt, round, square
- * android:strokeLineJoin
- * - Sets the lineJoin for a stroked path: miter,round,bevel
- * android:strokeMiterLimit
- * - Sets the Miter limit for a stroked path
+ * android:strokeWidth
+ * - The width a path stroke.
+ * android:strokeOpacity
+ * - The opacity of a path stroke.
+ * android:fillOpacity
+ * - The opacity to fill the path with.
+ * android:trimPathStart
+ * - The fraction of the path to trim from the start, in the range from 0 to 1.
+ * android:trimPathEnd
+ * - The fraction of the path to trim from the end, in the range from 0 to 1.
+ * android:trimPathOffset
+ * - Shift trim region (allows showed region to include the start and end), in the range
+ * from 0 to 1.
+ * android:strokeLineCap
+ * - Sets the linecap for a stroked path: butt, round, square.
+ * android:strokeLineJoin
+ * - Sets the lineJoin for a stroked path: miter,round,bevel.
+ * android:strokeMiterLimit
+ * - Sets the Miter limit for a stroked path.
+ *
*
- *
+ *
+ *
+ * <clip-path>
+ * - Defines path to be the current clip.
+ *
+ * android:name
+ * - Defines the name of the clip path.
+ * android:pathData
+ * - Defines clip path string. This is using exactly same format as "d" attribute
+ * in the SVG's path data.
+ *
+ *
+ * Here is a simple VectorDrawable in this vectordrawable.xml file.
+ *
+ * <vector xmlns:android="http://schemas.android.com/apk/res/android"
+ * android:height="64dp"
+ * android:width="64dp"
+ * android:viewportHeight="600"
+ * android:viewportWidth="600" >
+ * <group
+ * android:name="rotationGroup"
+ * android:pivotX="300.0"
+ * android:pivotY="300.0"
+ * android:rotation="45.0" >
+ * <path
+ * android:name="v"
+ * android:fillColor="#000000"
+ * android:pathData="M300,70 l 0,-70 70,70 0,0 -70,70z" />
+ * </group>
+ * </vector>
+ *
*/
+
public class VectorDrawable extends Drawable {
private static final String LOGTAG = VectorDrawable.class.getSimpleName();
- private static final String SHAPE_SIZE = "size";
- private static final String SHAPE_VIEWPORT = "viewport";
+ private static final String SHAPE_CLIP_PATH = "clip-path";
private static final String SHAPE_GROUP = "group";
private static final String SHAPE_PATH = "path";
private static final String SHAPE_VECTOR = "vector";
@@ -337,20 +391,24 @@ public class VectorDrawable extends Drawable {
@Override
public void inflate(Resources res, XmlPullParser parser, AttributeSet attrs, Theme theme)
throws XmlPullParserException, IOException {
- final TypedArray a = obtainAttributes(res, theme, attrs, R.styleable.VectorDrawable);
+ final VectorDrawableState state = mVectorState;
+ final VPathRenderer pathRenderer = new VPathRenderer();
+ state.mVPathRenderer = pathRenderer;
+
+ TypedArray a = obtainAttributes(res, theme, attrs, R.styleable.VectorDrawable);
updateStateFromTypedArray(a);
a.recycle();
- final VectorDrawableState state = mVectorState;
- mVectorState.mCacheDirty = true;
+ state.mCacheDirty = true;
inflateInternal(res, parser, attrs, theme);
mTintFilter = updateTintFilter(mTintFilter, state.mTint, state.mTintMode);
state.mVPathRenderer.setColorFilter(mTintFilter);
}
- private void updateStateFromTypedArray(TypedArray a) {
+ private void updateStateFromTypedArray(TypedArray a) throws XmlPullParserException {
final VectorDrawableState state = mVectorState;
+ final VPathRenderer pathRenderer = state.mVPathRenderer;
// Account for any configuration changes.
state.mChangingConfigurations |= a.getChangingConfigurations();
@@ -370,16 +428,38 @@ public class VectorDrawable extends Drawable {
state.mAutoMirrored = a.getBoolean(
R.styleable.VectorDrawable_autoMirrored, state.mAutoMirrored);
+
+ pathRenderer.mViewportWidth = a.getFloat(
+ R.styleable.VectorDrawable_viewportWidth, pathRenderer.mViewportWidth);
+ pathRenderer.mViewportHeight = a.getFloat(
+ R.styleable.VectorDrawable_viewportHeight, pathRenderer.mViewportHeight);
+
+ if (pathRenderer.mViewportWidth <= 0) {
+ throw new XmlPullParserException(a.getPositionDescription() +
+ " tag requires viewportWidth > 0");
+ } else if (pathRenderer.mViewportHeight <= 0) {
+ throw new XmlPullParserException(a.getPositionDescription() +
+ " tag requires viewportHeight > 0");
+ }
+
+ pathRenderer.mBaseWidth = a.getDimension(
+ R.styleable.VectorDrawable_width, pathRenderer.mBaseWidth);
+ pathRenderer.mBaseHeight = a.getDimension(
+ R.styleable.VectorDrawable_height, pathRenderer.mBaseHeight);
+
+ if (pathRenderer.mBaseWidth <= 0) {
+ throw new XmlPullParserException(a.getPositionDescription() +
+ " tag requires width > 0");
+ } else if (pathRenderer.mBaseHeight <= 0) {
+ throw new XmlPullParserException(a.getPositionDescription() +
+ " tag requires height > 0");
+ }
}
private void inflateInternal(Resources res, XmlPullParser parser, AttributeSet attrs,
Theme theme) throws XmlPullParserException, IOException {
final VectorDrawableState state = mVectorState;
- final VPathRenderer pathRenderer = new VPathRenderer();
- state.mVPathRenderer = pathRenderer;
-
- boolean noSizeTag = true;
- boolean noViewportTag = true;
+ final VPathRenderer pathRenderer = state.mVPathRenderer;
boolean noPathTag = true;
// Use a stack to help to build the group tree.
@@ -394,7 +474,7 @@ public class VectorDrawable extends Drawable {
final VGroup currentGroup = groupStack.peek();
if (SHAPE_PATH.equals(tagName)) {
- final VPath path = new VPath();
+ final VFullPath path = new VFullPath();
path.inflate(res, attrs, theme);
currentGroup.mChildren.add(path);
if (path.getPathName() != null) {
@@ -402,14 +482,14 @@ public class VectorDrawable extends Drawable {
}
noPathTag = false;
state.mChangingConfigurations |= path.mChangingConfigurations;
- } else if (SHAPE_SIZE.equals(tagName)) {
- pathRenderer.parseSize(res, attrs);
- noSizeTag = false;
- state.mChangingConfigurations |= pathRenderer.mChangingConfigurations;
- } else if (SHAPE_VIEWPORT.equals(tagName)) {
- pathRenderer.parseViewport(res, attrs);
- noViewportTag = false;
- state.mChangingConfigurations |= pathRenderer.mChangingConfigurations;
+ } else if (SHAPE_CLIP_PATH.equals(tagName)) {
+ final VClipPath path = new VClipPath();
+ path.inflate(res, attrs, theme);
+ currentGroup.mChildren.add(path);
+ if (path.getPathName() != null) {
+ pathRenderer.mVGTargetsMap.put(path.getPathName(), path);
+ }
+ state.mChangingConfigurations |= path.mChangingConfigurations;
} else if (SHAPE_GROUP.equals(tagName)) {
VGroup newChildGroup = new VGroup();
newChildGroup.inflate(res, attrs, theme);
@@ -435,26 +515,13 @@ public class VectorDrawable extends Drawable {
printGroupTree(pathRenderer.mRootGroup, 0);
}
- if (noSizeTag || noViewportTag || noPathTag) {
+ if (noPathTag) {
final StringBuffer tag = new StringBuffer();
- if (noSizeTag) {
- tag.append(SHAPE_SIZE);
- }
-
- if (noViewportTag) {
- if (tag.length() > 0) {
- tag.append(" & ");
- }
- tag.append(SHAPE_SIZE);
- }
-
- if (noPathTag) {
- if (tag.length() > 0) {
- tag.append(" or ");
- }
- tag.append(SHAPE_PATH);
+ if (tag.length() > 0) {
+ tag.append(" or ");
}
+ tag.append(SHAPE_PATH);
throw new XmlPullParserException("no " + tag + " defined");
}
@@ -611,10 +678,10 @@ public class VectorDrawable extends Drawable {
// Variables below need to be copied (deep copy if applicable) for mutation.
private int mChangingConfigurations;
private final VGroup mRootGroup;
- private float mBaseWidth = 0;
- private float mBaseHeight = 0;
- private float mViewportWidth = 0;
- private float mViewportHeight = 0;
+ float mBaseWidth = 0;
+ float mBaseHeight = 0;
+ float mViewportWidth = 0;
+ float mViewportHeight = 0;
private int mRootAlpha = 0xFF;
final ArrayMap mVGTargetsMap = new ArrayMap();
@@ -736,7 +803,8 @@ public class VectorDrawable extends Drawable {
public void draw(Canvas canvas, int w, int h) {
// Travese the tree in pre-order to draw.
- drawGroupTree(mRootGroup, IDENTITY_MATRIX, ((float) mRootAlpha) / 0xFF, canvas, w, h);
+ drawGroupTree(mRootGroup, IDENTITY_MATRIX, ((float) mRootAlpha) / 0xFF,
+ canvas, w, h);
}
private void drawPath(VGroup vGroup, VPath vPath, float stackedAlpha,
@@ -751,47 +819,48 @@ public class VectorDrawable extends Drawable {
vPath.toPath(mPath);
final Path path = mPath;
- if (vPath.mTrimPathStart != 0.0f || vPath.mTrimPathEnd != 1.0f) {
- float start = (vPath.mTrimPathStart + vPath.mTrimPathOffset) % 1.0f;
- float end = (vPath.mTrimPathEnd + vPath.mTrimPathOffset) % 1.0f;
-
- if (mPathMeasure == null) {
- mPathMeasure = new PathMeasure();
- }
- mPathMeasure.setPath(mPath, false);
-
- float len = mPathMeasure.getLength();
- start = start * len;
- end = end * len;
- path.reset();
- if (start > end) {
- mPathMeasure.getSegment(start, len, path, true);
- mPathMeasure.getSegment(0f, end, path, true);
- } else {
- mPathMeasure.getSegment(start, end, path, true);
- }
- path.rLineTo(0, 0); // fix bug in measure
- }
-
mRenderPath.reset();
- mRenderPath.addPath(path, mFinalPathMatrix);
-
- if (vPath.mClip) {
+ if (vPath.isClipPath()) {
+ mRenderPath.addPath(path, mFinalPathMatrix);
canvas.clipPath(mRenderPath, Region.Op.REPLACE);
} else {
- if (vPath.mFillColor != 0) {
+ VFullPath fullPath = (VFullPath) vPath;
+ if (fullPath.mTrimPathStart != 0.0f || fullPath.mTrimPathEnd != 1.0f) {
+ float start = (fullPath.mTrimPathStart + fullPath.mTrimPathOffset) % 1.0f;
+ float end = (fullPath.mTrimPathEnd + fullPath.mTrimPathOffset) % 1.0f;
+
+ if (mPathMeasure == null) {
+ mPathMeasure = new PathMeasure();
+ }
+ mPathMeasure.setPath(mPath, false);
+
+ float len = mPathMeasure.getLength();
+ start = start * len;
+ end = end * len;
+ path.reset();
+ if (start > end) {
+ mPathMeasure.getSegment(start, len, path, true);
+ mPathMeasure.getSegment(0f, end, path, true);
+ } else {
+ mPathMeasure.getSegment(start, end, path, true);
+ }
+ path.rLineTo(0, 0); // fix bug in measure
+ }
+ mRenderPath.addPath(path, mFinalPathMatrix);
+
+ if (fullPath.mFillColor != 0) {
if (mFillPaint == null) {
mFillPaint = new Paint();
mFillPaint.setColorFilter(mColorFilter);
mFillPaint.setStyle(Paint.Style.FILL);
mFillPaint.setAntiAlias(true);
}
- mFillPaint.setColor(applyAlpha(vPath.mFillColor, stackedAlpha));
+ mFillPaint.setColor(applyAlpha(fullPath.mFillColor, stackedAlpha));
canvas.drawPath(mRenderPath, mFillPaint);
}
- if (vPath.mStrokeColor != 0) {
+ if (fullPath.mStrokeColor != 0) {
if (mStrokePaint == null) {
mStrokePaint = new Paint();
mStrokePaint.setColorFilter(mColorFilter);
@@ -800,70 +869,25 @@ public class VectorDrawable extends Drawable {
}
final Paint strokePaint = mStrokePaint;
- if (vPath.mStrokeLineJoin != null) {
- strokePaint.setStrokeJoin(vPath.mStrokeLineJoin);
+ if (fullPath.mStrokeLineJoin != null) {
+ strokePaint.setStrokeJoin(fullPath.mStrokeLineJoin);
}
- if (vPath.mStrokeLineCap != null) {
- strokePaint.setStrokeCap(vPath.mStrokeLineCap);
+ if (fullPath.mStrokeLineCap != null) {
+ strokePaint.setStrokeCap(fullPath.mStrokeLineCap);
}
- strokePaint.setStrokeMiter(vPath.mStrokeMiterlimit * minScale);
+ strokePaint.setStrokeMiter(fullPath.mStrokeMiterlimit * minScale);
- strokePaint.setColor(applyAlpha(vPath.mStrokeColor, stackedAlpha));
- strokePaint.setStrokeWidth(vPath.mStrokeWidth * minScale);
+ strokePaint.setColor(applyAlpha(fullPath.mStrokeColor, stackedAlpha));
+ strokePaint.setStrokeWidth(fullPath.mStrokeWidth * minScale);
canvas.drawPath(mRenderPath, strokePaint);
}
}
}
-
- private void parseViewport(Resources r, AttributeSet attrs)
- throws XmlPullParserException {
- final TypedArray a = r.obtainAttributes(attrs, R.styleable.VectorDrawableViewport);
-
- // Account for any configuration changes.
- mChangingConfigurations |= a.getChangingConfigurations();
-
- mViewportWidth = a.getFloat(
- R.styleable.VectorDrawableViewport_viewportWidth, mViewportWidth);
- mViewportHeight = a.getFloat(
- R.styleable.VectorDrawableViewport_viewportHeight, mViewportHeight);
-
- if (mViewportWidth <= 0) {
- throw new XmlPullParserException(a.getPositionDescription() +
- " tag requires viewportWidth > 0");
- } else if (mViewportHeight <= 0) {
- throw new XmlPullParserException(a.getPositionDescription() +
- " tag requires viewportHeight > 0");
- }
-
- a.recycle();
- }
-
- private void parseSize(Resources r, AttributeSet attrs)
- throws XmlPullParserException {
- final TypedArray a = r.obtainAttributes(attrs, R.styleable.VectorDrawableSize);
-
- // Account for any configuration changes.
- mChangingConfigurations |= a.getChangingConfigurations();
-
- mBaseWidth = a.getDimension(R.styleable.VectorDrawableSize_width, mBaseWidth);
- mBaseHeight = a.getDimension(R.styleable.VectorDrawableSize_height, mBaseHeight);
-
- if (mBaseWidth <= 0) {
- throw new XmlPullParserException(a.getPositionDescription() +
- " tag requires width > 0");
- } else if (mBaseHeight <= 0) {
- throw new XmlPullParserException(a.getPositionDescription() +
- " tag requires height > 0");
- }
-
- a.recycle();
- }
-
}
- static class VGroup {
+ private static class VGroup {
// mStackedMatrix is only used temporarily when drawing, it combines all
// the parents' local matrices with the current one.
private final Matrix mStackedMatrix = new Matrix();
@@ -912,9 +936,15 @@ public class VectorDrawable extends Drawable {
if (copyChild instanceof VGroup) {
VGroup copyGroup = (VGroup) copyChild;
mChildren.add(new VGroup(copyGroup, targetsMap));
- } else if (copyChild instanceof VPath) {
- VPath copyPath = (VPath) copyChild;
- VPath newPath = new VPath(copyPath);
+ } else {
+ VPath newPath = null;
+ if (copyChild instanceof VFullPath) {
+ newPath = new VFullPath((VFullPath) copyChild);
+ } else if (copyChild instanceof VClipPath) {
+ newPath = new VClipPath((VClipPath) copyChild);
+ } else {
+ throw new IllegalStateException("Unknown object in the tree!");
+ }
mChildren.add(newPath);
if (newPath.mPathName != null) {
targetsMap.put(newPath.mPathName, newPath);
@@ -926,94 +956,6 @@ public class VectorDrawable extends Drawable {
public VGroup() {
}
- /* Getter and Setter */
- public float getRotation() {
- return mRotate;
- }
-
- public void setRotation(float rotation) {
- if (rotation != mRotate) {
- mRotate = rotation;
- updateLocalMatrix();
- }
- }
-
- public float getPivotX() {
- return mPivotX;
- }
-
- public void setPivotX(float pivotX) {
- if (pivotX != mPivotX) {
- mPivotX = pivotX;
- updateLocalMatrix();
- }
- }
-
- public float getPivotY() {
- return mPivotY;
- }
-
- public void setPivotY(float pivotY) {
- if (pivotY != mPivotY) {
- mPivotY = pivotY;
- updateLocalMatrix();
- }
- }
-
- public float getScaleX() {
- return mScaleX;
- }
-
- public void setScaleX(float scaleX) {
- if (scaleX != mScaleX) {
- mScaleX = scaleX;
- updateLocalMatrix();
- }
- }
-
- public float getScaleY() {
- return mScaleY;
- }
-
- public void setScaleY(float scaleY) {
- if (scaleY != mScaleY) {
- mScaleY = scaleY;
- updateLocalMatrix();
- }
- }
-
- public float getTranslateX() {
- return mTranslateX;
- }
-
- public void setTranslateX(float translateX) {
- if (translateX != mTranslateX) {
- mTranslateX = translateX;
- updateLocalMatrix();
- }
- }
-
- public float getTranslateY() {
- return mTranslateY;
- }
-
- public void setTranslateY(float translateY) {
- if (translateY != mTranslateY) {
- mTranslateY = translateY;
- updateLocalMatrix();
- }
- }
-
- public float getAlpha() {
- return mGroupAlpha;
- }
-
- public void setAlpha(float groupAlpha) {
- if (groupAlpha != mGroupAlpha) {
- mGroupAlpha = groupAlpha;
- }
- }
-
public String getGroupName() {
return mGroupName;
}
@@ -1062,7 +1004,8 @@ public class VectorDrawable extends Drawable {
return;
}
- final TypedArray a = t.resolveAttributes(mThemeAttrs, R.styleable.VectorDrawablePath);
+ final TypedArray a = t.resolveAttributes(mThemeAttrs,
+ R.styleable.VectorDrawableGroup);
updateStateFromTypedArray(a);
a.recycle();
}
@@ -1076,9 +1019,207 @@ public class VectorDrawable extends Drawable {
mLocalMatrix.postRotate(mRotate, 0, 0);
mLocalMatrix.postTranslate(mTranslateX + mPivotX, mTranslateY + mPivotY);
}
+
+ /* Setters and Getters, used by animator from AnimatedVectorDrawable. */
+ @SuppressWarnings("unused")
+ public float getRotation() {
+ return mRotate;
+ }
+
+ @SuppressWarnings("unused")
+ public void setRotation(float rotation) {
+ if (rotation != mRotate) {
+ mRotate = rotation;
+ updateLocalMatrix();
+ }
+ }
+
+ @SuppressWarnings("unused")
+ public float getPivotX() {
+ return mPivotX;
+ }
+
+ @SuppressWarnings("unused")
+ public void setPivotX(float pivotX) {
+ if (pivotX != mPivotX) {
+ mPivotX = pivotX;
+ updateLocalMatrix();
+ }
+ }
+
+ @SuppressWarnings("unused")
+ public float getPivotY() {
+ return mPivotY;
+ }
+
+ @SuppressWarnings("unused")
+ public void setPivotY(float pivotY) {
+ if (pivotY != mPivotY) {
+ mPivotY = pivotY;
+ updateLocalMatrix();
+ }
+ }
+
+ @SuppressWarnings("unused")
+ public float getScaleX() {
+ return mScaleX;
+ }
+
+ @SuppressWarnings("unused")
+ public void setScaleX(float scaleX) {
+ if (scaleX != mScaleX) {
+ mScaleX = scaleX;
+ updateLocalMatrix();
+ }
+ }
+
+ @SuppressWarnings("unused")
+ public float getScaleY() {
+ return mScaleY;
+ }
+
+ @SuppressWarnings("unused")
+ public void setScaleY(float scaleY) {
+ if (scaleY != mScaleY) {
+ mScaleY = scaleY;
+ updateLocalMatrix();
+ }
+ }
+
+ @SuppressWarnings("unused")
+ public float getTranslateX() {
+ return mTranslateX;
+ }
+
+ @SuppressWarnings("unused")
+ public void setTranslateX(float translateX) {
+ if (translateX != mTranslateX) {
+ mTranslateX = translateX;
+ updateLocalMatrix();
+ }
+ }
+
+ @SuppressWarnings("unused")
+ public float getTranslateY() {
+ return mTranslateY;
+ }
+
+ @SuppressWarnings("unused")
+ public void setTranslateY(float translateY) {
+ if (translateY != mTranslateY) {
+ mTranslateY = translateY;
+ updateLocalMatrix();
+ }
+ }
+
+ @SuppressWarnings("unused")
+ public float getAlpha() {
+ return mGroupAlpha;
+ }
+
+ @SuppressWarnings("unused")
+ public void setAlpha(float groupAlpha) {
+ if (groupAlpha != mGroupAlpha) {
+ mGroupAlpha = groupAlpha;
+ }
+ }
}
+ /**
+ * Common Path information for clip path and normal path.
+ */
private static class VPath {
+ protected PathParser.PathDataNode[] mNodes = null;
+ String mPathName;
+ int mChangingConfigurations;
+
+ public VPath() {
+ // Empty constructor.
+ }
+
+ public VPath(VPath copy) {
+ mPathName = copy.mPathName;
+ mChangingConfigurations = copy.mChangingConfigurations;
+ mNodes = PathParser.deepCopyNodes(copy.mNodes);
+ }
+
+ public void toPath(Path path) {
+ path.reset();
+ if (mNodes != null) {
+ PathParser.PathDataNode.nodesToPath(mNodes, path);
+ }
+ }
+
+ public String getPathName() {
+ return mPathName;
+ }
+
+ public boolean canApplyTheme() {
+ return false;
+ }
+
+ public void applyTheme(Theme t) {
+ }
+
+ public boolean isClipPath() {
+ return false;
+ }
+
+ /* Setters and Getters, used by animator from AnimatedVectorDrawable. */
+ @SuppressWarnings("unused")
+ public PathParser.PathDataNode[] getPathData() {
+ return mNodes;
+ }
+
+ @SuppressWarnings("unused")
+ public void setPathData(PathParser.PathDataNode[] nodes) {
+ if (!PathParser.canMorph(mNodes, nodes)) {
+ // This should not happen in the middle of animation.
+ mNodes = PathParser.deepCopyNodes(nodes);
+ } else {
+ PathParser.updateNodes(mNodes, nodes);
+ }
+ }
+ }
+
+ /**
+ * Clip path, which only has name and pathData.
+ */
+ private static class VClipPath extends VPath{
+ public VClipPath() {
+ // Empty constructor.
+ }
+
+ public VClipPath(VClipPath copy) {
+ super(copy);
+ }
+
+ public void inflate(Resources r, AttributeSet attrs, Theme theme) {
+ final TypedArray a = obtainAttributes(r, theme, attrs,
+ R.styleable.VectorDrawableClipPath);
+ updateStateFromTypedArray(a);
+ a.recycle();
+ }
+
+ private void updateStateFromTypedArray(TypedArray a) {
+ // Account for any configuration changes.
+ mChangingConfigurations |= a.getChangingConfigurations();
+
+ mPathName = a.getString(R.styleable.VectorDrawableClipPath_name);
+ mNodes = PathParser.createNodesFromPathData(a.getString(
+ R.styleable.VectorDrawableClipPath_pathData));
+ }
+
+ @Override
+ public boolean isClipPath() {
+ return true;
+ }
+ }
+
+ /**
+ * Normal path, which contains all the fill / paint information.
+ */
+ private static class VFullPath extends VPath {
/////////////////////////////////////////////////////
// Variables below need to be copied (deep copy if applicable) for mutation.
private int[] mThemeAttrs;
@@ -1093,20 +1234,16 @@ public class VectorDrawable extends Drawable {
float mTrimPathEnd = 1;
float mTrimPathOffset = 0;
- boolean mClip = false;
Paint.Cap mStrokeLineCap = Paint.Cap.BUTT;
Paint.Join mStrokeLineJoin = Paint.Join.MITER;
float mStrokeMiterlimit = 4;
- private PathParser.PathDataNode[] mNodes = null;
- String mPathName;
- private int mChangingConfigurations;
-
- public VPath() {
+ public VFullPath() {
// Empty constructor.
}
- public VPath(VPath copy) {
+ public VFullPath(VFullPath copy) {
+ super(copy);
mThemeAttrs = copy.mThemeAttrs;
mStrokeColor = copy.mStrokeColor;
@@ -1119,25 +1256,9 @@ public class VectorDrawable extends Drawable {
mTrimPathEnd = copy.mTrimPathEnd;
mTrimPathOffset = copy.mTrimPathOffset;
- mClip = copy.mClip;
mStrokeLineCap = copy.mStrokeLineCap;
mStrokeLineJoin = copy.mStrokeLineJoin;
mStrokeMiterlimit = copy.mStrokeMiterlimit;
-
- mNodes = PathParser.deepCopyNodes(copy.mNodes);
- mPathName = copy.mPathName;
- mChangingConfigurations = copy.mChangingConfigurations;
- }
-
- public void toPath(Path path) {
- path.reset();
- if (mNodes != null) {
- PathParser.PathDataNode.nodesToPath(mNodes, path);
- }
- }
-
- public String getPathName() {
- return mPathName;
}
private Paint.Cap getStrokeLineCap(int id, Paint.Cap defValue) {
@@ -1166,22 +1287,78 @@ public class VectorDrawable extends Drawable {
}
}
- /* Setters and Getters, mostly used by animator from AnimatedVectorDrawable. */
- @SuppressWarnings("unused")
- public PathParser.PathDataNode[] getPathData() {
- return mNodes;
+ @Override
+ public boolean canApplyTheme() {
+ return mThemeAttrs != null;
}
- @SuppressWarnings("unused")
- public void setPathData(PathParser.PathDataNode[] nodes) {
- if (!PathParser.canMorph(mNodes, nodes)) {
- // This should not happen in the middle of animation.
- mNodes = PathParser.deepCopyNodes(nodes);
- } else {
- PathParser.updateNodes(mNodes, nodes);
+ public void inflate(Resources r, AttributeSet attrs, Theme theme) {
+ final TypedArray a = obtainAttributes(r, theme, attrs,
+ R.styleable.VectorDrawablePath);
+ updateStateFromTypedArray(a);
+ a.recycle();
+ }
+
+ private void updateStateFromTypedArray(TypedArray a) {
+ // Account for any configuration changes.
+ mChangingConfigurations |= a.getChangingConfigurations();
+
+ // Extract the theme attributes, if any.
+ mThemeAttrs = a.extractThemeAttrs();
+
+ mPathName = a.getString(R.styleable.VectorDrawablePath_name);
+ mNodes = PathParser.createNodesFromPathData(a.getString(
+ R.styleable.VectorDrawablePath_pathData));
+
+ mFillColor = a.getColor(R.styleable.VectorDrawablePath_fillColor,
+ mFillColor);
+ mFillOpacity = a.getFloat(R.styleable.VectorDrawablePath_fillOpacity,
+ mFillOpacity);
+ mStrokeLineCap = getStrokeLineCap(a.getInt(
+ R.styleable.VectorDrawablePath_strokeLineCap, -1), mStrokeLineCap);
+ mStrokeLineJoin = getStrokeLineJoin(a.getInt(
+ R.styleable.VectorDrawablePath_strokeLineJoin, -1), mStrokeLineJoin);
+ mStrokeMiterlimit = a.getFloat(
+ R.styleable.VectorDrawablePath_strokeMiterLimit, mStrokeMiterlimit);
+ mStrokeColor = a.getColor(R.styleable.VectorDrawablePath_strokeColor,
+ mStrokeColor);
+ mStrokeOpacity = a.getFloat(R.styleable.VectorDrawablePath_strokeOpacity,
+ mStrokeOpacity);
+ mStrokeWidth = a.getFloat(R.styleable.VectorDrawablePath_strokeWidth,
+ mStrokeWidth);
+ mTrimPathEnd = a.getFloat(R.styleable.VectorDrawablePath_trimPathEnd,
+ mTrimPathEnd);
+ mTrimPathOffset = a.getFloat(
+ R.styleable.VectorDrawablePath_trimPathOffset, mTrimPathOffset);
+ mTrimPathStart = a.getFloat(
+ R.styleable.VectorDrawablePath_trimPathStart, mTrimPathStart);
+
+ updateColorAlphas();
+ }
+
+ @Override
+ public void applyTheme(Theme t) {
+ if (mThemeAttrs == null) {
+ return;
+ }
+
+ final TypedArray a = t.resolveAttributes(mThemeAttrs,
+ R.styleable.VectorDrawablePath);
+ updateStateFromTypedArray(a);
+ a.recycle();
+ }
+
+ private void updateColorAlphas() {
+ if (!Float.isNaN(mFillOpacity)) {
+ mFillColor = applyAlpha(mFillColor, mFillOpacity);
+ }
+
+ if (!Float.isNaN(mStrokeOpacity)) {
+ mStrokeColor = applyAlpha(mStrokeColor, mStrokeOpacity);
}
}
+ /* Setters and Getters, used by animator from AnimatedVectorDrawable. */
@SuppressWarnings("unused")
int getStroke() {
return mStrokeColor;
@@ -1261,69 +1438,5 @@ public class VectorDrawable extends Drawable {
void setTrimPathOffset(float trimPathOffset) {
mTrimPathOffset = trimPathOffset;
}
-
- public boolean canApplyTheme() {
- return mThemeAttrs != null;
- }
-
- public void inflate(Resources r, AttributeSet attrs, Theme theme) {
- final TypedArray a = obtainAttributes(r, theme, attrs, R.styleable.VectorDrawablePath);
- updateStateFromTypedArray(a);
- a.recycle();
- }
-
- private void updateStateFromTypedArray(TypedArray a) {
- // Account for any configuration changes.
- mChangingConfigurations |= a.getChangingConfigurations();
-
- // Extract the theme attributes, if any.
- mThemeAttrs = a.extractThemeAttrs();
-
- mClip = a.getBoolean(R.styleable.VectorDrawablePath_clipToPath, mClip);
-
- mPathName = a.getString(R.styleable.VectorDrawablePath_name);
- mNodes = PathParser.createNodesFromPathData(a.getString(
- R.styleable.VectorDrawablePath_pathData));
-
- mFillColor = a.getColor(R.styleable.VectorDrawablePath_fill, mFillColor);
- mFillOpacity = a.getFloat(R.styleable.VectorDrawablePath_fillOpacity, mFillOpacity);
- mStrokeLineCap = getStrokeLineCap(a.getInt(
- R.styleable.VectorDrawablePath_strokeLineCap, -1), mStrokeLineCap);
- mStrokeLineJoin = getStrokeLineJoin(a.getInt(
- R.styleable.VectorDrawablePath_strokeLineJoin, -1), mStrokeLineJoin);
- mStrokeMiterlimit = a.getFloat(
- R.styleable.VectorDrawablePath_strokeMiterLimit, mStrokeMiterlimit);
- mStrokeColor = a.getColor(R.styleable.VectorDrawablePath_stroke, mStrokeColor);
- mStrokeOpacity = a.getFloat(
- R.styleable.VectorDrawablePath_strokeOpacity, mStrokeOpacity);
- mStrokeWidth = a.getFloat(R.styleable.VectorDrawablePath_strokeWidth, mStrokeWidth);
- mTrimPathEnd = a.getFloat(R.styleable.VectorDrawablePath_trimPathEnd, mTrimPathEnd);
- mTrimPathOffset = a.getFloat(
- R.styleable.VectorDrawablePath_trimPathOffset, mTrimPathOffset);
- mTrimPathStart = a.getFloat(
- R.styleable.VectorDrawablePath_trimPathStart, mTrimPathStart);
-
- updateColorAlphas();
- }
-
- public void applyTheme(Theme t) {
- if (mThemeAttrs == null) {
- return;
- }
-
- final TypedArray a = t.resolveAttributes(mThemeAttrs, R.styleable.VectorDrawablePath);
- updateStateFromTypedArray(a);
- a.recycle();
- }
-
- private void updateColorAlphas() {
- if (!Float.isNaN(mFillOpacity)) {
- mFillColor = applyAlpha(mFillColor, mFillOpacity);
- }
-
- if (!Float.isNaN(mStrokeOpacity)) {
- mStrokeColor = applyAlpha(mStrokeColor, mStrokeOpacity);
- }
- }
}
}
diff --git a/packages/Keyguard/res/drawable/ic_backspace_24dp.xml b/packages/Keyguard/res/drawable/ic_backspace_24dp.xml
index 9e5016d991da7..47c8d14330c05 100644
--- a/packages/Keyguard/res/drawable/ic_backspace_24dp.xml
+++ b/packages/Keyguard/res/drawable/ic_backspace_24dp.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="48.0">
diff --git a/packages/SystemUI/res/drawable/ic_account_circle.xml b/packages/SystemUI/res/drawable/ic_account_circle.xml
index 4a4c1c1e2afc3..d8649e598e28e 100644
--- a/packages/SystemUI/res/drawable/ic_account_circle.xml
+++ b/packages/SystemUI/res/drawable/ic_account_circle.xml
@@ -13,14 +13,11 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="24.0">
diff --git a/packages/SystemUI/res/drawable/ic_account_circle_qs_muted.xml b/packages/SystemUI/res/drawable/ic_account_circle_qs_muted.xml
index afcddf1414d24..7b8b89f1814da 100644
--- a/packages/SystemUI/res/drawable/ic_account_circle_qs_muted.xml
+++ b/packages/SystemUI/res/drawable/ic_account_circle_qs_muted.xml
@@ -16,14 +16,11 @@
~ limitations under the License
-->
-
-
-
-
+ android:viewportHeight="24.0">
diff --git a/packages/SystemUI/res/drawable/ic_chevron_left.xml b/packages/SystemUI/res/drawable/ic_chevron_left.xml
index 27c203439f173..379382b065041 100644
--- a/packages/SystemUI/res/drawable/ic_chevron_left.xml
+++ b/packages/SystemUI/res/drawable/ic_chevron_left.xml
@@ -13,16 +13,13 @@
~ See the License for the specific language governing permissions and
~ limitations under the License
-->
-
-
-
-
+ android:viewportHeight="36.0">
diff --git a/packages/SystemUI/res/drawable/ic_clear_all.xml b/packages/SystemUI/res/drawable/ic_clear_all.xml
index b0f3a5a46c993..187a420c2bd13 100644
--- a/packages/SystemUI/res/drawable/ic_clear_all.xml
+++ b/packages/SystemUI/res/drawable/ic_clear_all.xml
@@ -13,16 +13,13 @@
~ See the License for the specific language governing permissions and
~ limitations under the License
-->
-
-
-
-
+ android:viewportHeight="48.0">
diff --git a/packages/SystemUI/res/drawable/ic_lock_24dp.xml b/packages/SystemUI/res/drawable/ic_lock_24dp.xml
index b2e486c0adfe8..204af7e81f4c9 100644
--- a/packages/SystemUI/res/drawable/ic_lock_24dp.xml
+++ b/packages/SystemUI/res/drawable/ic_lock_24dp.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="24.0">
diff --git a/packages/SystemUI/res/drawable/ic_lock_open_24dp.xml b/packages/SystemUI/res/drawable/ic_lock_open_24dp.xml
index 28b16dda7410d..c877f063b7a80 100644
--- a/packages/SystemUI/res/drawable/ic_lock_open_24dp.xml
+++ b/packages/SystemUI/res/drawable/ic_lock_open_24dp.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="24.0">
diff --git a/packages/SystemUI/res/drawable/ic_lock_to_app_24dp.xml b/packages/SystemUI/res/drawable/ic_lock_to_app_24dp.xml
index e5737ee3d9487..2d779499f6e60 100644
--- a/packages/SystemUI/res/drawable/ic_lock_to_app_24dp.xml
+++ b/packages/SystemUI/res/drawable/ic_lock_to_app_24dp.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="24.0">
diff --git a/packages/SystemUI/res/drawable/ic_power_low.xml b/packages/SystemUI/res/drawable/ic_power_low.xml
index 5bb7aba6fa748..ba99948a57370 100644
--- a/packages/SystemUI/res/drawable/ic_power_low.xml
+++ b/packages/SystemUI/res/drawable/ic_power_low.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="48.0">
diff --git a/packages/SystemUI/res/drawable/ic_power_saver.xml b/packages/SystemUI/res/drawable/ic_power_saver.xml
index 26e7375d01bda..2162d79e7b8fb 100644
--- a/packages/SystemUI/res/drawable/ic_power_saver.xml
+++ b/packages/SystemUI/res/drawable/ic_power_saver.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="48.0">
diff --git a/packages/SystemUI/res/drawable/ic_qs_airplane_off.xml b/packages/SystemUI/res/drawable/ic_qs_airplane_off.xml
index c68238f24d206..79a9d409e6873 100644
--- a/packages/SystemUI/res/drawable/ic_qs_airplane_off.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_airplane_off.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="48.0">
diff --git a/packages/SystemUI/res/drawable/ic_qs_airplane_on.xml b/packages/SystemUI/res/drawable/ic_qs_airplane_on.xml
index c1e3c7e9a805e..5d5d2576c6cd9 100644
--- a/packages/SystemUI/res/drawable/ic_qs_airplane_on.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_airplane_on.xml
@@ -13,19 +13,16 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="48.0">
diff --git a/packages/SystemUI/res/drawable/ic_qs_back.xml b/packages/SystemUI/res/drawable/ic_qs_back.xml
index 52039f588cd28..f00ba03eb8296 100644
--- a/packages/SystemUI/res/drawable/ic_qs_back.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_back.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="24.0">
diff --git a/packages/SystemUI/res/drawable/ic_qs_bluetooth_connected.xml b/packages/SystemUI/res/drawable/ic_qs_bluetooth_connected.xml
index 3957d02fdefda..0c65389349ae4 100644
--- a/packages/SystemUI/res/drawable/ic_qs_bluetooth_connected.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_bluetooth_connected.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="48.0">
diff --git a/packages/SystemUI/res/drawable/ic_qs_bluetooth_connecting.xml b/packages/SystemUI/res/drawable/ic_qs_bluetooth_connecting.xml
index e4038f9d66d2a..b9a315cd74e3c 100644
--- a/packages/SystemUI/res/drawable/ic_qs_bluetooth_connecting.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_bluetooth_connecting.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="48.0">
diff --git a/packages/SystemUI/res/drawable/ic_qs_bluetooth_detail_empty.xml b/packages/SystemUI/res/drawable/ic_qs_bluetooth_detail_empty.xml
index aa0b369648089..dd92126a6dc74 100644
--- a/packages/SystemUI/res/drawable/ic_qs_bluetooth_detail_empty.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_bluetooth_detail_empty.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="48.0">
diff --git a/packages/SystemUI/res/drawable/ic_qs_bluetooth_off.xml b/packages/SystemUI/res/drawable/ic_qs_bluetooth_off.xml
index 00c5af8a2ecf1..0cb1f32acb393 100644
--- a/packages/SystemUI/res/drawable/ic_qs_bluetooth_off.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_bluetooth_off.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="48.0">
diff --git a/packages/SystemUI/res/drawable/ic_qs_bluetooth_on.xml b/packages/SystemUI/res/drawable/ic_qs_bluetooth_on.xml
index 2b14f33ab5147..9a68dad159eff 100644
--- a/packages/SystemUI/res/drawable/ic_qs_bluetooth_on.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_bluetooth_on.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="48.0">
diff --git a/packages/SystemUI/res/drawable/ic_qs_bugreport.xml b/packages/SystemUI/res/drawable/ic_qs_bugreport.xml
index 29588480a7492..0df1a9626ffc6 100644
--- a/packages/SystemUI/res/drawable/ic_qs_bugreport.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_bugreport.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="24.0">
diff --git a/packages/SystemUI/res/drawable/ic_qs_cancel.xml b/packages/SystemUI/res/drawable/ic_qs_cancel.xml
index de72f130a3e41..e4f4174b9ca1c 100644
--- a/packages/SystemUI/res/drawable/ic_qs_cancel.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_cancel.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="48.0">
diff --git a/packages/SystemUI/res/drawable/ic_qs_cast_detail_empty.xml b/packages/SystemUI/res/drawable/ic_qs_cast_detail_empty.xml
index fbc21d4a43314..59dcea2337cb7 100644
--- a/packages/SystemUI/res/drawable/ic_qs_cast_detail_empty.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_cast_detail_empty.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="48.0">
diff --git a/packages/SystemUI/res/drawable/ic_qs_cast_off.xml b/packages/SystemUI/res/drawable/ic_qs_cast_off.xml
index 2a9541e493a14..80517958dac23 100644
--- a/packages/SystemUI/res/drawable/ic_qs_cast_off.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_cast_off.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="48.0">
diff --git a/packages/SystemUI/res/drawable/ic_qs_cast_on.xml b/packages/SystemUI/res/drawable/ic_qs_cast_on.xml
index 159bf65256c96..794eb9e6bd588 100644
--- a/packages/SystemUI/res/drawable/ic_qs_cast_on.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_cast_on.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="48.0">
diff --git a/packages/SystemUI/res/drawable/ic_qs_flashlight_off.xml b/packages/SystemUI/res/drawable/ic_qs_flashlight_off.xml
index 0f30be2a5a7b3..d4bd76fbc8a69 100644
--- a/packages/SystemUI/res/drawable/ic_qs_flashlight_off.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_flashlight_off.xml
@@ -13,22 +13,19 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="48.0">
\ No newline at end of file
diff --git a/packages/SystemUI/res/drawable/ic_qs_flashlight_on.xml b/packages/SystemUI/res/drawable/ic_qs_flashlight_on.xml
index 2e9d401314468..5514b44c1481d 100644
--- a/packages/SystemUI/res/drawable/ic_qs_flashlight_on.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_flashlight_on.xml
@@ -13,19 +13,16 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="48.0">
diff --git a/packages/SystemUI/res/drawable/ic_qs_hotspot_off.xml b/packages/SystemUI/res/drawable/ic_qs_hotspot_off.xml
index 0a00d14c8aeb3..d68ee4c2f65b3 100644
--- a/packages/SystemUI/res/drawable/ic_qs_hotspot_off.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_hotspot_off.xml
@@ -13,16 +13,12 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
-
+ android:viewportHeight="48.0">
diff --git a/packages/SystemUI/res/drawable/ic_qs_hotspot_on.xml b/packages/SystemUI/res/drawable/ic_qs_hotspot_on.xml
index 01cb0ab3c544c..da09f6e39f4e5 100644
--- a/packages/SystemUI/res/drawable/ic_qs_hotspot_on.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_hotspot_on.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="48.0">
diff --git a/packages/SystemUI/res/drawable/ic_qs_inversion_off.xml b/packages/SystemUI/res/drawable/ic_qs_inversion_off.xml
index b6a5cadfe0c82..4237b63c5eb41 100644
--- a/packages/SystemUI/res/drawable/ic_qs_inversion_off.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_inversion_off.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="48.0">
diff --git a/packages/SystemUI/res/drawable/ic_qs_inversion_on.xml b/packages/SystemUI/res/drawable/ic_qs_inversion_on.xml
index e8d59e0dad9d8..860e76963f5ef 100644
--- a/packages/SystemUI/res/drawable/ic_qs_inversion_on.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_inversion_on.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="48.0">
diff --git a/packages/SystemUI/res/drawable/ic_qs_location_off.xml b/packages/SystemUI/res/drawable/ic_qs_location_off.xml
index 26ebfbf050b18..e0fe12ee2fe0a 100644
--- a/packages/SystemUI/res/drawable/ic_qs_location_off.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_location_off.xml
@@ -13,19 +13,16 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="48.0">
+ android:fillColor="#4DFFFFFF"/>
diff --git a/packages/SystemUI/res/drawable/ic_qs_location_on.xml b/packages/SystemUI/res/drawable/ic_qs_location_on.xml
index bc73005ff8913..6a7cd53930fed 100644
--- a/packages/SystemUI/res/drawable/ic_qs_location_on.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_location_on.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="48.0">
diff --git a/packages/SystemUI/res/drawable/ic_qs_minus.xml b/packages/SystemUI/res/drawable/ic_qs_minus.xml
index 7b76e0f4d56e1..4722c9edcc403 100644
--- a/packages/SystemUI/res/drawable/ic_qs_minus.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_minus.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="48.0">
diff --git a/packages/SystemUI/res/drawable/ic_qs_plus.xml b/packages/SystemUI/res/drawable/ic_qs_plus.xml
index 4b9f5062a993d..17d74cfec1364 100644
--- a/packages/SystemUI/res/drawable/ic_qs_plus.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_plus.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="48.0">
diff --git a/packages/SystemUI/res/drawable/ic_qs_ringer_audible.xml b/packages/SystemUI/res/drawable/ic_qs_ringer_audible.xml
index 787eec5517153..9c5983d4d6e40 100644
--- a/packages/SystemUI/res/drawable/ic_qs_ringer_audible.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_ringer_audible.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="24.0">
diff --git a/packages/SystemUI/res/drawable/ic_qs_ringer_silent.xml b/packages/SystemUI/res/drawable/ic_qs_ringer_silent.xml
index dd6be76093d06..904ccdfb70ad3 100644
--- a/packages/SystemUI/res/drawable/ic_qs_ringer_silent.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_ringer_silent.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="24.0">
diff --git a/packages/SystemUI/res/drawable/ic_qs_ringer_vibrate.xml b/packages/SystemUI/res/drawable/ic_qs_ringer_vibrate.xml
index 96d20e8ecb9bb..a23c6f0afa9cb 100644
--- a/packages/SystemUI/res/drawable/ic_qs_ringer_vibrate.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_ringer_vibrate.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="24.0">
diff --git a/packages/SystemUI/res/drawable/ic_qs_rotation_landscape.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_landscape.xml
index e4c7cb589f497..4bb3668f9108c 100644
--- a/packages/SystemUI/res/drawable/ic_qs_rotation_landscape.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_rotation_landscape.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="48.0">
diff --git a/packages/SystemUI/res/drawable/ic_qs_rotation_portrait.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_portrait.xml
index e4bf367db694c..f0878c7113643 100644
--- a/packages/SystemUI/res/drawable/ic_qs_rotation_portrait.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_rotation_portrait.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="48.0">
diff --git a/packages/SystemUI/res/drawable/ic_qs_rotation_unlocked.xml b/packages/SystemUI/res/drawable/ic_qs_rotation_unlocked.xml
index a6c2cf8c2f7e0..6872a33198cb0 100644
--- a/packages/SystemUI/res/drawable/ic_qs_rotation_unlocked.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_rotation_unlocked.xml
@@ -13,22 +13,19 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="24.0">
diff --git a/packages/SystemUI/res/drawable/ic_qs_wifi_detail_empty.xml b/packages/SystemUI/res/drawable/ic_qs_wifi_detail_empty.xml
index 16fa30bbc9b95..ad6b247490d1c 100644
--- a/packages/SystemUI/res/drawable/ic_qs_wifi_detail_empty.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_wifi_detail_empty.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="48.0">
+ android:fillColor="@color/qs_detail_empty" />
diff --git a/packages/SystemUI/res/drawable/ic_ringer_audible.xml b/packages/SystemUI/res/drawable/ic_ringer_audible.xml
index 296994825b1fb..f358fa2e39a83 100644
--- a/packages/SystemUI/res/drawable/ic_ringer_audible.xml
+++ b/packages/SystemUI/res/drawable/ic_ringer_audible.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="24.0">
diff --git a/packages/SystemUI/res/drawable/ic_ringer_vibrate.xml b/packages/SystemUI/res/drawable/ic_ringer_vibrate.xml
index d8ded5844dc4b..9642be308f5ce 100644
--- a/packages/SystemUI/res/drawable/ic_ringer_vibrate.xml
+++ b/packages/SystemUI/res/drawable/ic_ringer_vibrate.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="24.0">
diff --git a/packages/SystemUI/res/drawable/ic_settings_24dp.xml b/packages/SystemUI/res/drawable/ic_settings_24dp.xml
index a2f78225b77b2..9c7874215cf76 100644
--- a/packages/SystemUI/res/drawable/ic_settings_24dp.xml
+++ b/packages/SystemUI/res/drawable/ic_settings_24dp.xml
@@ -12,18 +12,15 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+android:height="24dp" android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
diff --git a/packages/SystemUI/res/drawable/qs_dual_tile_caret.xml b/packages/SystemUI/res/drawable/qs_dual_tile_caret.xml
index 9137e7f6a0b95..71400dbedc6ac 100644
--- a/packages/SystemUI/res/drawable/qs_dual_tile_caret.xml
+++ b/packages/SystemUI/res/drawable/qs_dual_tile_caret.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="48.0">
diff --git a/packages/SystemUI/res/drawable/qs_subhead_caret.xml b/packages/SystemUI/res/drawable/qs_subhead_caret.xml
index f140bd0adda4d..13a168d758aa4 100644
--- a/packages/SystemUI/res/drawable/qs_subhead_caret.xml
+++ b/packages/SystemUI/res/drawable/qs_subhead_caret.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="48.0">
diff --git a/packages/SystemUI/res/drawable/recents_dismiss_dark.xml b/packages/SystemUI/res/drawable/recents_dismiss_dark.xml
index 9c1165de6175c..337c028b77c8b 100644
--- a/packages/SystemUI/res/drawable/recents_dismiss_dark.xml
+++ b/packages/SystemUI/res/drawable/recents_dismiss_dark.xml
@@ -13,20 +13,16 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
-
+ android:viewportWidth="100" >
diff --git a/packages/SystemUI/res/drawable/recents_dismiss_light.xml b/packages/SystemUI/res/drawable/recents_dismiss_light.xml
index a8afeb3134359..963ccf7be00d9 100644
--- a/packages/SystemUI/res/drawable/recents_dismiss_light.xml
+++ b/packages/SystemUI/res/drawable/recents_dismiss_light.xml
@@ -13,21 +13,17 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
-
+ android:viewportWidth="100" >
diff --git a/packages/SystemUI/res/drawable/stat_sys_data_bluetooth.xml b/packages/SystemUI/res/drawable/stat_sys_data_bluetooth.xml
index e28490bfb890c..f53f0e4729dfd 100644
--- a/packages/SystemUI/res/drawable/stat_sys_data_bluetooth.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_data_bluetooth.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="48.0">
diff --git a/packages/SystemUI/res/drawable/stat_sys_data_bluetooth_connected.xml b/packages/SystemUI/res/drawable/stat_sys_data_bluetooth_connected.xml
index c012d14a7fbaa..2aac4ee03c3c9 100644
--- a/packages/SystemUI/res/drawable/stat_sys_data_bluetooth_connected.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_data_bluetooth_connected.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="48.0">
diff --git a/packages/SystemUI/res/drawable/stat_sys_no_sim.xml b/packages/SystemUI/res/drawable/stat_sys_no_sim.xml
index 70948b7f4d5f4..22d1d4b8beac5 100644
--- a/packages/SystemUI/res/drawable/stat_sys_no_sim.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_no_sim.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="24.0">
diff --git a/packages/SystemUI/res/drawable/stat_sys_ringer_vibrate.xml b/packages/SystemUI/res/drawable/stat_sys_ringer_vibrate.xml
index e1d63c3743581..352d86ff8c66d 100644
--- a/packages/SystemUI/res/drawable/stat_sys_ringer_vibrate.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_ringer_vibrate.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="24.0">
diff --git a/packages/SystemUI/res/drawable/stat_sys_zen_important.xml b/packages/SystemUI/res/drawable/stat_sys_zen_important.xml
index 54a9b1b61a36e..73d7cba56b19d 100644
--- a/packages/SystemUI/res/drawable/stat_sys_zen_important.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_zen_important.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="24.0">
diff --git a/packages/SystemUI/res/drawable/stat_sys_zen_none.xml b/packages/SystemUI/res/drawable/stat_sys_zen_none.xml
index 101e3c467c963..d8ab078c14a84 100644
--- a/packages/SystemUI/res/drawable/stat_sys_zen_none.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_zen_none.xml
@@ -13,16 +13,13 @@ Copyright (C) 2014 The Android Open Source Project
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:viewportHeight="48.0">
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable01.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable01.xml
index 3b01e029e1c79..705cc34ff62bd 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable01.xml
+++ b/tests/VectorDrawableTest/res/drawable/vector_drawable01.xml
@@ -13,22 +13,18 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
-
+ android:viewportWidth="480" >
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable02.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable02.xml
index 40f23f0c4bc1a..f5d647ceaa8f9 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable02.xml
+++ b/tests/VectorDrawableTest/res/drawable/vector_drawable02.xml
@@ -12,14 +12,10 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
-
+ android:height="64dp" android:viewportWidth="320"
+ android:viewportHeight="320">
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable03.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable03.xml
index cd2fd479098d3..a0b0e000d09e4 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable03.xml
+++ b/tests/VectorDrawableTest/res/drawable/vector_drawable03.xml
@@ -14,23 +14,17 @@
limitations under the License.
-->
-
-
-
-
+ android:viewportWidth="7.30625" >
-
@@ -50,9 +44,8 @@
android:pivotX="3.65"
android:pivotY="6.125"
android:rotation="-30" >
-
-
-
-
-
+ android:viewportHeight="12.25">
-
-
+ a .001,.001 0 1,0-.002,0z"/>
-
+
+
+ a 6,6 0 1,0-12,0z"/>
+ android:fillColor="#ff88ff"/>
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable05.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable05.xml
index 673c465242431..5b1f6abba3d3d 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable05.xml
+++ b/tests/VectorDrawableTest/res/drawable/vector_drawable05.xml
@@ -14,26 +14,21 @@
limitations under the License.
-->
-
-
-
-
+ android:viewportWidth="7.30625" >
-
-
-
-
+ android:viewportHeight="700">
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable07.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable07.xml
index ccb0df0c9aa86..88c4a1eaea48d 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable07.xml
+++ b/tests/VectorDrawableTest/res/drawable/vector_drawable07.xml
@@ -12,13 +12,10 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
+ android:height="64dp" android:viewportWidth="140"
+ android:viewportHeight="110">
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable08.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable08.xml
index 59f745942dc7f..75529e2fd4ed1 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable08.xml
+++ b/tests/VectorDrawableTest/res/drawable/vector_drawable08.xml
@@ -12,22 +12,17 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
-
-
+ android:height="64dp" android:viewportWidth="600"
+ android:viewportHeight="600">
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable09.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable09.xml
index 77434fca58f02..853a77000d4c7 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable09.xml
+++ b/tests/VectorDrawableTest/res/drawable/vector_drawable09.xml
@@ -13,15 +13,11 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
-
+ android:viewportWidth="200" >
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable10.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable10.xml
index df24713e3ba00..83ed194a14e40 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable10.xml
+++ b/tests/VectorDrawableTest/res/drawable/vector_drawable10.xml
@@ -14,32 +14,28 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
-
+ android:viewportHeight="200">
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable11.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable11.xml
index 3422bbfe9d056..b3d7d8eed3491 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable11.xml
+++ b/tests/VectorDrawableTest/res/drawable/vector_drawable11.xml
@@ -13,26 +13,22 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
-
+ android:viewportWidth="40" >
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable12.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable12.xml
index a212defb551c6..2c8b75118dfe9 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable12.xml
+++ b/tests/VectorDrawableTest/res/drawable/vector_drawable12.xml
@@ -13,15 +13,11 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
-
+ android:viewportWidth="600" >
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable13.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable13.xml
index 8c946df20d5e7..2468a1b303cb5 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable13.xml
+++ b/tests/VectorDrawableTest/res/drawable/vector_drawable13.xml
@@ -13,28 +13,24 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
-
+ android:viewportWidth="600" >
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable14.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable14.xml
index 8d4ca61f82ab6..01e24d302288f 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable14.xml
+++ b/tests/VectorDrawableTest/res/drawable/vector_drawable14.xml
@@ -13,15 +13,11 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
-
+ android:viewportWidth="800" >
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable15.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable15.xml
index b08e157f00ca2..4bab2e37898ac 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable15.xml
+++ b/tests/VectorDrawableTest/res/drawable/vector_drawable15.xml
@@ -13,15 +13,11 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
-
+ android:viewportWidth="500" >
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable16.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable16.xml
index ae85d9b14caad..107cda2ca2334 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable16.xml
+++ b/tests/VectorDrawableTest/res/drawable/vector_drawable16.xml
@@ -13,25 +13,21 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
-
+ android:viewportWidth="200" >
+ android:fillColor="#FF000000"/>
+ android:fillColor="#FF000000"/>
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable17.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable17.xml
index c28aff46cd89e..801954986ab79 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable17.xml
+++ b/tests/VectorDrawableTest/res/drawable/vector_drawable17.xml
@@ -12,21 +12,17 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
-
+ android:height="64dp" android:viewportWidth="1200"
+ android:viewportHeight="600">
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable18.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable18.xml
index d7042fd0b2baa..c93bdb94f6462 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable18.xml
+++ b/tests/VectorDrawableTest/res/drawable/vector_drawable18.xml
@@ -13,22 +13,18 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
-
+ android:viewportWidth="500" >
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable19.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable19.xml
index 47a9574eb681f..996b6beff8bf5 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable19.xml
+++ b/tests/VectorDrawableTest/res/drawable/vector_drawable19.xml
@@ -13,15 +13,11 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
-
+ android:viewportWidth="1000" >
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable20.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable20.xml
index b8af7e2d076cf..58021446bdc5f 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable20.xml
+++ b/tests/VectorDrawableTest/res/drawable/vector_drawable20.xml
@@ -13,25 +13,21 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
-
+ android:viewportWidth="480" >
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable21.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable21.xml
index e0013e7d28dd4..5626b44e4b507 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable21.xml
+++ b/tests/VectorDrawableTest/res/drawable/vector_drawable21.xml
@@ -13,25 +13,21 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
-
+ android:viewportWidth="200" >
+ android:fillColor="#FF000000"/>
+ android:fillColor="#FF000000"/>
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable22.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable22.xml
index 8d38cb51bf423..5b40d0d070133 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable22.xml
+++ b/tests/VectorDrawableTest/res/drawable/vector_drawable22.xml
@@ -13,24 +13,20 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
-
+ android:viewportWidth="400" >
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable23.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable23.xml
index 52acd7afed5a4..6ab6ffd2b1fb7 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable23.xml
+++ b/tests/VectorDrawableTest/res/drawable/vector_drawable23.xml
@@ -13,24 +13,20 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
-
+ android:viewportWidth="400" >
@@ -75,8 +71,8 @@
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable24.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable24.xml
index c062d702f0d8d..5c1ccaa03361a 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable24.xml
+++ b/tests/VectorDrawableTest/res/drawable/vector_drawable24.xml
@@ -13,25 +13,21 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
-
+ android:viewportWidth="400" >
@@ -80,8 +76,8 @@
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable25.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable25.xml
index a3f0447875981..069a53154495b 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable25.xml
+++ b/tests/VectorDrawableTest/res/drawable/vector_drawable25.xml
@@ -13,15 +13,11 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
-
+ android:viewportWidth="400" >
@@ -62,7 +58,7 @@
android:translateX="100.0"
android:translateY="50.0" >
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable_favorite.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable_favorite.xml
index 5a66e2d4bc9ff..7be49a9d9b861 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable_favorite.xml
+++ b/tests/VectorDrawableTest/res/drawable/vector_drawable_favorite.xml
@@ -13,15 +13,11 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
-
+ android:viewportWidth="480" >
-
-
-
-
+ android:viewportWidth="256" >
diff --git a/tests/VectorDrawableTest/res/drawable/vector_drawable_progress_bar.xml b/tests/VectorDrawableTest/res/drawable/vector_drawable_progress_bar.xml
index f1b2996beab24..4544cae92a316 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_drawable_progress_bar.xml
+++ b/tests/VectorDrawableTest/res/drawable/vector_drawable_progress_bar.xml
@@ -13,15 +13,11 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
-
+ android:viewportWidth="64" >
-
-
-
-
-
+ android:viewportWidth="24" >
diff --git a/tests/VectorDrawableTest/res/drawable/vector_icon_delete.xml b/tests/VectorDrawableTest/res/drawable/vector_icon_delete.xml
index 042173ca9f9c1..94c10dfd66561 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_icon_delete.xml
+++ b/tests/VectorDrawableTest/res/drawable/vector_icon_delete.xml
@@ -13,19 +13,15 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
-
+ android:viewportWidth="24" >
diff --git a/tests/VectorDrawableTest/res/drawable/vector_icon_heart.xml b/tests/VectorDrawableTest/res/drawable/vector_icon_heart.xml
index 6b6f43de122be..870e508319e22 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_icon_heart.xml
+++ b/tests/VectorDrawableTest/res/drawable/vector_icon_heart.xml
@@ -13,19 +13,15 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
-
+ android:viewportWidth="24" >
diff --git a/tests/VectorDrawableTest/res/drawable/vector_icon_schedule.xml b/tests/VectorDrawableTest/res/drawable/vector_icon_schedule.xml
index ba8ebcad170cc..8cabca86368f9 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_icon_schedule.xml
+++ b/tests/VectorDrawableTest/res/drawable/vector_icon_schedule.xml
@@ -13,15 +13,11 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
-
+ android:viewportWidth="24" >
-
-
-
-
-
+ android:viewportWidth="24" >
diff --git a/tests/VectorDrawableTest/res/drawable/vector_test01.xml b/tests/VectorDrawableTest/res/drawable/vector_test01.xml
index fc2a15c11b239..dd71ef0e88f5f 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_test01.xml
+++ b/tests/VectorDrawableTest/res/drawable/vector_test01.xml
@@ -13,23 +13,19 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
-
+ android:viewportWidth="512" >
+ android:fillColor="#00000000" />
\ No newline at end of file
diff --git a/tests/VectorDrawableTest/res/drawable/vector_test02.xml b/tests/VectorDrawableTest/res/drawable/vector_test02.xml
index 9f4abbff5d919..e4f48de862fa4 100644
--- a/tests/VectorDrawableTest/res/drawable/vector_test02.xml
+++ b/tests/VectorDrawableTest/res/drawable/vector_test02.xml
@@ -13,23 +13,19 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
-
-
-
+ android:viewportWidth="512" >
+ android:fillColor="#00000000" />
\ No newline at end of file