diff options
| -rw-r--r-- | api/current.txt | 2 | ||||
| -rw-r--r-- | core/java/android/content/pm/ApplicationInfo.java | 43 | ||||
| -rw-r--r-- | core/java/android/content/pm/PackageParser.java | 6 | ||||
| -rw-r--r-- | core/res/res/values/attrs_manifest.xml | 12 | ||||
| -rw-r--r-- | core/res/res/values/public.xml | 1 | ||||
| -rw-r--r-- | data/fonts/Android.mk | 3 | ||||
| -rw-r--r-- | data/fonts/AndroidEmoji.ttf | bin | 2760 -> 0 bytes | |||
| -rw-r--r-- | data/fonts/fallback_fonts.xml | 5 | ||||
| -rw-r--r-- | data/fonts/fonts.mk | 1 | ||||
| -rw-r--r-- | docs/html/design/wear/index.jd | 11 | ||||
| -rw-r--r-- | docs/html/design/wear/patterns.jd | 4 | ||||
| -rw-r--r-- | docs/html/training/wearables/apps/packaging.jd | 17 | ||||
| -rw-r--r-- | graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java | 2 | ||||
| -rw-r--r-- | graphics/java/android/graphics/drawable/VectorDrawable.java | 156 |
14 files changed, 194 insertions, 69 deletions
diff --git a/api/current.txt b/api/current.txt index d8b09f0ff1d8..56bb55345471 100644 --- a/api/current.txt +++ b/api/current.txt @@ -852,6 +852,7 @@ package android { field public static final int mirrorForRtl = 16843726; // 0x10103ce field public static final int mode = 16843134; // 0x101017e field public static final int moreIcon = 16843061; // 0x1010135 + field public static final int multiArch = 16843918; // 0x101048e field public static final int multiprocess = 16842771; // 0x1010013 field public static final int name = 16842755; // 0x1010003 field public static final int navigationBarColor = 16843860; // 0x1010454 @@ -8204,6 +8205,7 @@ package android.content.pm { field public static final int FLAG_IS_GAME = 33554432; // 0x2000000 field public static final int FLAG_KILL_AFTER_RESTORE = 65536; // 0x10000 field public static final int FLAG_LARGE_HEAP = 1048576; // 0x100000 + field public static final int FLAG_MULTIARCH = -2147483648; // 0x80000000 field public static final int FLAG_PERSISTENT = 8; // 0x8 field public static final int FLAG_RESIZEABLE_FOR_SCREENS = 4096; // 0x1000 field public static final int FLAG_RESTORE_ANY_VERSION = 131072; // 0x20000 diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java index 514b26e5866d..1e93d92f53f9 100644 --- a/core/java/android/content/pm/ApplicationInfo.java +++ b/core/java/android/content/pm/ApplicationInfo.java @@ -334,12 +334,24 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { public static final int FLAG_FULL_BACKUP_ONLY = 1<<26; /** - * Value for {@link #flags}: set to {@code true} if the application - * is permitted to hold privileged permissions. + * Value for {@link #flags}: true if the application is blocked via restrictions and for + * most purposes is considered as not installed. + * {@hide} + */ + public static final int FLAG_BLOCKED = 1<<27; + + /** + * Value for {@link #flags}: set to <code>true</code> if the application + * has reported that it is heavy-weight, and thus can not participate in + * the normal application lifecycle. + * + * <p>Comes from the + * android.R.styleable#AndroidManifestApplication_cantSaveState + * attribute of the <application> tag. * * {@hide} */ - public static final int FLAG_PRIVILEGED = 1<<30; + public static final int FLAG_CANT_SAVE_STATE = 1<<28; /** * Value for {@link #flags}: Set to true if the application has been @@ -352,24 +364,25 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { public static final int FLAG_FORWARD_LOCK = 1<<29; /** - * Value for {@link #flags}: set to <code>true</code> if the application - * has reported that it is heavy-weight, and thus can not participate in - * the normal application lifecycle. - * - * <p>Comes from the - * android.R.styleable#AndroidManifestApplication_cantSaveState - * attribute of the <application> tag. + * Value for {@link #flags}: set to {@code true} if the application + * is permitted to hold privileged permissions. * * {@hide} */ - public static final int FLAG_CANT_SAVE_STATE = 1<<28; + public static final int FLAG_PRIVILEGED = 1<<30; /** - * Value for {@link #flags}: true if the application is blocked via restrictions and for - * most purposes is considered as not installed. - * {@hide} + * Value for {@link #flags}: true if code from this application will need to be + * loaded into other applications' processes. On devices that support multiple + * instruction sets, this implies the code might be loaded into a process that's + * using any of the devices supported instruction sets. + * + * <p> The system might treat such applications specially, for eg., by + * extracting the application's native libraries for all supported instruction + * sets or by compiling the application's dex code for all supported instruction + * sets. */ - public static final int FLAG_BLOCKED = 1<<27; + public static final int FLAG_MULTIARCH = 1 << 31; /** * Flags associated with the application. Any combination of diff --git a/core/java/android/content/pm/PackageParser.java b/core/java/android/content/pm/PackageParser.java index 7651aeff8247..3b118c0d7d75 100644 --- a/core/java/android/content/pm/PackageParser.java +++ b/core/java/android/content/pm/PackageParser.java @@ -2305,6 +2305,12 @@ public class PackageParser { ai.flags |= ApplicationInfo.FLAG_SUPPORTS_RTL; } + if (sa.getBoolean( + com.android.internal.R.styleable.AndroidManifestApplication_multiArch, + false)) { + ai.flags |= ApplicationInfo.FLAG_MULTIARCH; + } + String str; str = sa.getNonConfigurationString( com.android.internal.R.styleable.AndroidManifestApplication_permission, 0); diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml index afaf2e97c7f7..9789eeec7598 100644 --- a/core/res/res/values/attrs_manifest.xml +++ b/core/res/res/values/attrs_manifest.xml @@ -387,6 +387,17 @@ with that application. The activity is re-parented to the task with the same {@link android.R.attr#taskAffinity} as it has. --> <attr name="allowTaskReparenting" format="boolean" /> + + <!-- Declare that code from this application will need to be loaded into other + applications' processes. On devices that support multiple instruction sets, + this implies the code might be loaded into a process that's using any of the devices + supported instruction sets. + + <p> The system might treat such applications specially, for eg., by + extracting the application's native libraries for all supported instruction + sets or by compiling the application's dex code for all supported instruction + sets. --> + <attr name="multiArch" format ="boolean" /> <!-- Specify whether a component is allowed to have multiple instances of itself running in different processes. Use with the activity @@ -1114,6 +1125,7 @@ "com.google". --> <attr name="requiredAccountType" format="string"/> <attr name="isGame" /> + <attr name="multiArch" /> </declare-styleable> <!-- The <code>permission</code> tag declares a security permission that can be diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml index 99c345056e8b..1eb89468fc64 100644 --- a/core/res/res/values/public.xml +++ b/core/res/res/values/public.xml @@ -2507,4 +2507,5 @@ <!-- A transition that moves views in or out of the scene to or from the left edge when a view visibility changes. --> <public type="transition" name="slide_left"/> + <public type="attr" name="multiArch" /> </resources> diff --git a/data/fonts/Android.mk b/data/fonts/Android.mk index 86a45c514b6c..9f6b64cb921f 100644 --- a/data/fonts/Android.mk +++ b/data/fonts/Android.mk @@ -137,8 +137,7 @@ font_src_files += \ RobotoCondensed-Italic.ttf \ RobotoCondensed-BoldItalic.ttf \ RobotoCondensed-Light.ttf \ - RobotoCondensed-LightItalic.ttf \ - AndroidEmoji.ttf + RobotoCondensed-LightItalic.ttf endif # !MINIMAL_FONT diff --git a/data/fonts/AndroidEmoji.ttf b/data/fonts/AndroidEmoji.ttf Binary files differdeleted file mode 100644 index 8bdc26ac7945..000000000000 --- a/data/fonts/AndroidEmoji.ttf +++ /dev/null diff --git a/data/fonts/fallback_fonts.xml b/data/fonts/fallback_fonts.xml index 37e9b157e750..a7e159af8c35 100644 --- a/data/fonts/fallback_fonts.xml +++ b/data/fonts/fallback_fonts.xml @@ -264,11 +264,6 @@ </family> <family> <fileset> - <file>AndroidEmoji.ttf</file> - </fileset> - </family> - <family> - <fileset> <file>NotoColorEmoji.ttf</file> </fileset> </family> diff --git a/data/fonts/fonts.mk b/data/fonts/fonts.mk index 70fc6a2df6aa..2ff201039f43 100644 --- a/data/fonts/fonts.mk +++ b/data/fonts/fonts.mk @@ -39,7 +39,6 @@ PRODUCT_PACKAGES := \ RobotoCondensed-Light.ttf \ RobotoCondensed-LightItalic.ttf \ DroidSansMono.ttf \ - AndroidEmoji.ttf \ Clockopia.ttf \ AndroidClock.ttf \ AndroidClock_Highlight.ttf \ diff --git a/docs/html/design/wear/index.jd b/docs/html/design/wear/index.jd index d6202d1e4bab..104e1549ad9f 100644 --- a/docs/html/design/wear/index.jd +++ b/docs/html/design/wear/index.jd @@ -7,7 +7,16 @@ page.title=Android Wear is substantially different than designing for phones or tablets: different strengths and weaknesses, different use cases, different ergonomics. To get started, you should understand the overall vision for the Android Wear experience, -and how apps fit into and enhance this experience.</p> +and how apps fit into and enhance this experience. We've also provided source files for UI resources +that you can use in your own apps in the +<a href="{@docRoot}design/downloads/index.html#Wear">Downloads</a> section.</p> + +<a class="notice-designers" style="clear:none" href="{@docRoot}design/downloads/index.html#Wear"> + <div> + <h3>Downloads</h3> + <p>UI Toolkit, Flows, and Mocks</p> + </div> +</a> <p>A new form factor deserves a new UI model. At a high level, the Android Wear UI consists of two main spaces centered around the core functions of <strong>Suggest</strong> and diff --git a/docs/html/design/wear/patterns.jd b/docs/html/design/wear/patterns.jd index 274b62f8608b..152379ca126f 100644 --- a/docs/html/design/wear/patterns.jd +++ b/docs/html/design/wear/patterns.jd @@ -112,10 +112,10 @@ page.title=UI Patterns for Android Wear </div> </a> - <h2 id="2DPicker" style="clear:both">2D Picker</h2> -<p>A 2D Picker component in your app can be invoked from the cue card or from an action button. It allows users to choose from a list of items, and optionally select an attribute of each item. For example, in response to a voice action to “buy tickets to a movie tonight,” you could show a 2D Picker with a vertical list of movies playing, with each movie having a horizontal list of showtimes.</p> +<p>A 2D Picker component in your app can be invoked from the cue card or from an action button. It allows users to choose from a list of items, and optionally select an attribute of each item. For example, for a social check-in app, you could show a 2D Picker with a vertical list of places +to check-in to.</p> <img src="{@docRoot}design/media/wear/2D_picker_action.png" width="500" alt=""> diff --git a/docs/html/training/wearables/apps/packaging.jd b/docs/html/training/wearables/apps/packaging.jd index 3660099334b6..d09cd08e4c32 100644 --- a/docs/html/training/wearables/apps/packaging.jd +++ b/docs/html/training/wearables/apps/packaging.jd @@ -102,22 +102,23 @@ if you are using another IDE or another method of building. </p> <ol> - <li>Copy the signed wearable app into your handheld project's <code>assets/</code> directory, - referred to as <code>path/to/wearable_app.apk</code>.</li> + <li>Copy the signed wearable app to your handheld project's <code>res/raw</code> directory. We'll + refer to the APK as <code>wearable_app.apk</code>.</li> <li>Create a <code>res/xml/wearable_app_desc.xml</code> file that contains the version and path information of the wearable app: <pre> <wearableApp package="com.google.android.wearable.myapp"> - <versionCode>1</versionCode> - <versionName>1.0</versionName> - <path>path/to/wearable_app.apk</path> + <versionCode>1</versionCode> + <versionName>1.0</versionName> + <rawPathResId>wearable_app</rawPathResId> <!-- Do not include the .apk extension --> </wearableApp> </pre> + <p> The <code>package</code>, <code>versionCode</code>, and <code>versionName</code> are the -same as values specified in the wearable app's <code>AndroidManifest.xml</code> file. -The path is the full path of <code>wearable_app.apk</code>, relative to the <code>assets/</code> -directory. +same values specified in the wearable app's <code>AndroidManifest.xml</code> file. +The <code>rawPathResId</code> is the static variable name of the APK resource. For example, +for <code>wearable_app.apk</code>, the static variable name is <code>wearable_app</code>. </p> </li> <li> diff --git a/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java b/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java index 85606854f0c9..1cecef329867 100644 --- a/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java +++ b/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java @@ -208,7 +208,7 @@ public class AnimatedVectorDrawable extends Drawable implements Animatable { R.styleable.AnimatedVectorDrawable_drawable, 0); if (drawableRes != 0) { mAnimatedVectorState.mVectorDrawable = (VectorDrawable) res.getDrawable( - drawableRes, theme); + drawableRes, theme).mutate(); } a.recycle(); } else if (TARGET.equals(tagName)) { diff --git a/graphics/java/android/graphics/drawable/VectorDrawable.java b/graphics/java/android/graphics/drawable/VectorDrawable.java index 150f210c15d9..4ea00461a9cd 100644 --- a/graphics/java/android/graphics/drawable/VectorDrawable.java +++ b/graphics/java/android/graphics/drawable/VectorDrawable.java @@ -136,14 +136,14 @@ public class VectorDrawable extends Drawable { private static final boolean DBG_VECTOR_DRAWABLE = false; - private final VectorDrawableState mVectorState; - - private final ArrayMap<String, Object> mVGTargetsMap = new ArrayMap<String, Object>(); + private VectorDrawableState mVectorState; private PorterDuffColorFilter mTintFilter; + private boolean mMutated; + public VectorDrawable() { - mVectorState = new VectorDrawableState(null); + mVectorState = new VectorDrawableState(); } private VectorDrawable(VectorDrawableState state, Resources res, Theme theme) { @@ -159,13 +159,23 @@ public class VectorDrawable extends Drawable { mVectorState.mVPathRenderer.setColorFilter(mTintFilter); } + @Override + public Drawable mutate() { + if (!mMutated && super.mutate() == this) { + mVectorState = new VectorDrawableState(mVectorState); + mMutated = true; + } + return this; + } + Object getTargetByName(String name) { - return mVGTargetsMap.get(name); + return mVectorState.mVPathRenderer.mVGTargetsMap.get(name); } @Override public ConstantState getConstantState() { - return null; + mVectorState.mChangingConfigurations = getChangingConfigurations(); + return mVectorState; } @Override @@ -298,7 +308,7 @@ public class VectorDrawable extends Drawable { a.recycle(); final VectorDrawableState state = mVectorState; - state.mVPathRenderer = inflateInternal(res, parser, attrs, theme); + inflateInternal(res, parser, attrs, theme); mTintFilter = updateTintFilter(mTintFilter, state.mTint, state.mTintMode); state.mVPathRenderer.setColorFilter(mTintFilter); @@ -324,10 +334,11 @@ public class VectorDrawable extends Drawable { } } - private VPathRenderer inflateInternal(Resources res, XmlPullParser parser, AttributeSet attrs, + 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; @@ -349,7 +360,7 @@ public class VectorDrawable extends Drawable { path.inflate(res, attrs, theme); currentGroup.add(path); if (path.getPathName() != null) { - mVGTargetsMap.put(path.getPathName(), path); + pathRenderer.mVGTargetsMap.put(path.getPathName(), path); } noPathTag = false; state.mChangingConfigurations |= path.mChangingConfigurations; @@ -367,7 +378,8 @@ public class VectorDrawable extends Drawable { currentGroup.mChildGroupList.add(newChildGroup); groupStack.push(newChildGroup); if (newChildGroup.getGroupName() != null) { - mVGTargetsMap.put(newChildGroup.getGroupName(), newChildGroup); + pathRenderer.mVGTargetsMap.put(newChildGroup.getGroupName(), + newChildGroup); } state.mChangingConfigurations |= newChildGroup.mChangingConfigurations; } @@ -408,8 +420,6 @@ public class VectorDrawable extends Drawable { throw new XmlPullParserException("no " + tag + " defined"); } - - return pathRenderer; } private void printGroupTree(VGroup currentGroup, int level) { @@ -427,6 +437,11 @@ public class VectorDrawable extends Drawable { } } + @Override + public int getChangingConfigurations() { + return super.getChangingConfigurations() | mVectorState.mChangingConfigurations; + } + private static class VectorDrawableState extends ConstantState { int[] mThemeAttrs; int mChangingConfigurations; @@ -434,17 +449,21 @@ public class VectorDrawable extends Drawable { ColorStateList mTint; Mode mTintMode; + // Deep copy for mutate() or implicitly mutate. public VectorDrawableState(VectorDrawableState copy) { if (copy != null) { mThemeAttrs = copy.mThemeAttrs; mChangingConfigurations = copy.mChangingConfigurations; - // TODO: Make sure the constant state are handled correctly. mVPathRenderer = new VPathRenderer(copy.mVPathRenderer); mTint = copy.mTint; mTintMode = copy.mTintMode; } } + public VectorDrawableState() { + mVPathRenderer = new VPathRenderer(); + } + @Override public Drawable newDrawable() { return new VectorDrawable(this, null, null); @@ -479,26 +498,29 @@ public class VectorDrawable extends Drawable { * Path Path Path * */ - private final VGroup mRootGroup; - + // Variables that only used temporarily inside the draw() call, so there + // is no need for deep copying. private final Path mPath = new Path(); private final Path mRenderPath = new Path(); private static final Matrix IDENTITY_MATRIX = new Matrix(); + private final Matrix mFinalPathMatrix = new Matrix(); private Paint mStrokePaint; private Paint mFillPaint; private ColorFilter mColorFilter; private PathMeasure mPathMeasure; + ///////////////////////////////////////////////////// + // 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; private int mRootAlpha = 0xFF; - private final Matrix mFinalPathMatrix = new Matrix(); + final ArrayMap<String, Object> mVGTargetsMap = new ArrayMap<String, Object>(); public VPathRenderer() { mRootGroup = new VGroup(); @@ -513,12 +535,13 @@ public class VectorDrawable extends Drawable { } public VPathRenderer(VPathRenderer copy) { - mRootGroup = copy.mRootGroup; + mRootGroup = new VGroup(copy.mRootGroup, mVGTargetsMap); mBaseWidth = copy.mBaseWidth; mBaseHeight = copy.mBaseHeight; mViewportWidth = copy.mViewportHeight; mViewportHeight = copy.mViewportHeight; mChangingConfigurations = copy.mChangingConfigurations; + mRootAlpha = copy.mRootAlpha; } public boolean canApplyTheme() { @@ -742,6 +765,12 @@ public class VectorDrawable extends Drawable { } 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(); + + ///////////////////////////////////////////////////// + // Variables below need to be copied (deep copy if applicable) for mutation. private final ArrayList<VPath> mPathList = new ArrayList<VPath>(); private final ArrayList<VGroup> mChildGroupList = new ArrayList<VGroup>(); @@ -754,17 +783,49 @@ public class VectorDrawable extends Drawable { private float mTranslateY = 0; private float mGroupAlpha = 1; - // mLocalMatrix is parsed from the XML. + // mLocalMatrix is updated based on the update of transformation information, + // either parsed from the XML or by animation. private final Matrix mLocalMatrix = new Matrix(); - // mStackedMatrix is only used when drawing, it combines all the - // parents' local matrices with the current one. - private final Matrix mStackedMatrix = new Matrix(); - private int mChangingConfigurations; private int[] mThemeAttrs; - private String mGroupName = null; + public VGroup(VGroup copy, ArrayMap<String, Object> targetsMap) { + mRotate = copy.mRotate; + mPivotX = copy.mPivotX; + mPivotY = copy.mPivotY; + mScaleX = copy.mScaleX; + mScaleY = copy.mScaleY; + mTranslateX = copy.mTranslateX; + mTranslateY = copy.mTranslateY; + mGroupAlpha = copy.mGroupAlpha; + mThemeAttrs = copy.mThemeAttrs; + mGroupName = copy.mGroupName; + mChangingConfigurations = copy.mChangingConfigurations; + if (mGroupName != null) { + targetsMap.put(mGroupName, this); + } + + mLocalMatrix.set(copy.mLocalMatrix); + + for (int i = 0; i < copy.mPathList.size(); i ++) { + VPath copyPath = copy.mPathList.get(i); + VPath newPath = new VPath(copyPath); + mPathList.add(newPath); + if (newPath.mPathName != null) { + targetsMap.put(copyPath.mPathName, newPath); + } + } + + for (int i = 0; i < copy.mChildGroupList.size(); i ++) { + VGroup currentGroup = copy.mChildGroupList.get(i); + mChildGroupList.add(new VGroup(currentGroup, targetsMap)); + } + } + + public VGroup() { + } + /* Getter and Setter */ public float getRotation() { return mRotate; @@ -931,7 +992,8 @@ public class VectorDrawable extends Drawable { } private static class VPath { - private int mChangingConfigurations; + ///////////////////////////////////////////////////// + // Variables below need to be copied (deep copy if applicable) for mutation. private int[] mThemeAttrs; int mStrokeColor = 0; @@ -949,17 +1011,41 @@ public class VectorDrawable extends Drawable { Paint.Join mStrokeLineJoin = Paint.Join.MITER; float mStrokeMiterlimit = 4; - private PathParser.PathDataNode[] mNode = null; + private PathParser.PathDataNode[] mNodes = null; private String mPathName; + private int mChangingConfigurations; public VPath() { // Empty constructor. } + public VPath(VPath copy) { + mThemeAttrs = copy.mThemeAttrs; + + mStrokeColor = copy.mStrokeColor; + mStrokeWidth = copy.mStrokeWidth; + mStrokeOpacity = copy.mStrokeOpacity; + mFillColor = copy.mFillColor; + mFillRule = copy.mFillRule; + mFillOpacity = copy.mFillOpacity; + mTrimPathStart = copy.mTrimPathStart; + 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 (mNode != null) { - PathParser.PathDataNode.nodesToPath(mNode, path); + if (mNodes != null) { + PathParser.PathDataNode.nodesToPath(mNodes, path); } } @@ -996,16 +1082,16 @@ public class VectorDrawable extends Drawable { /* Setters and Getters, mostly used by animator from AnimatedVectorDrawable. */ @SuppressWarnings("unused") public PathParser.PathDataNode[] getPathData() { - return mNode; + return mNodes; } @SuppressWarnings("unused") - public void setPathData(PathParser.PathDataNode[] node) { - if (!PathParser.canMorph(mNode, node)) { + public void setPathData(PathParser.PathDataNode[] nodes) { + if (!PathParser.canMorph(mNodes, nodes)) { // This should not happen in the middle of animation. - mNode = PathParser.deepCopyNodes(node); + mNodes = PathParser.deepCopyNodes(nodes); } else { - PathParser.updateNodes(mNode, node); + PathParser.updateNodes(mNodes, nodes); } } @@ -1107,9 +1193,11 @@ public class VectorDrawable extends Drawable { mThemeAttrs = a.extractThemeAttrs(); mClip = a.getBoolean(R.styleable.VectorDrawablePath_clipToPath, mClip); + mPathName = a.getString(R.styleable.VectorDrawablePath_name); - mNode = PathParser.createNodesFromPathData(a.getString( + 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( |