summaryrefslogtreecommitdiffstats
path: root/graphics/java/android
diff options
context:
space:
mode:
authorChet Haase <chet@google.com>2014-08-15 18:33:40 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-08-15 08:11:59 +0000
commita4888fbac9ff01242c8fec0b29c27770ff703879 (patch)
tree8e440d24bd35531a7b066d3961fad4e970b963c2 /graphics/java/android
parent3571839cf0f3b37a748bad81be0e9eff9cb05617 (diff)
parent6beeb75723cec42603b47664bce794a2b97d7bac (diff)
downloadframeworks_base-a4888fbac9ff01242c8fec0b29c27770ff703879.zip
frameworks_base-a4888fbac9ff01242c8fec0b29c27770ff703879.tar.gz
frameworks_base-a4888fbac9ff01242c8fec0b29c27770ff703879.tar.bz2
Merge "Minor doc fixes from API council recommendations." into lmp-dev
Diffstat (limited to 'graphics/java/android')
-rw-r--r--graphics/java/android/graphics/drawable/AnimatedStateListDrawable.java6
-rw-r--r--graphics/java/android/graphics/drawable/VectorDrawable.java2
-rw-r--r--graphics/java/android/graphics/drawable/shapes/Shape.java8
3 files changed, 9 insertions, 7 deletions
diff --git a/graphics/java/android/graphics/drawable/AnimatedStateListDrawable.java b/graphics/java/android/graphics/drawable/AnimatedStateListDrawable.java
index fc38e8a..14aa570 100644
--- a/graphics/java/android/graphics/drawable/AnimatedStateListDrawable.java
+++ b/graphics/java/android/graphics/drawable/AnimatedStateListDrawable.java
@@ -119,11 +119,11 @@ public class AnimatedStateListDrawable extends StateListDrawable {
*
* @param fromId Unique identifier of the starting keyframe
* @param toId Unique identifier of the ending keyframe
- * @param transition An animatable drawable to use as a transition, may not be null
+ * @param transition An {@link Animatable} drawable to use as a transition, may not be null
* @param reversible Whether the transition can be reversed
*/
- public void addTransition(int fromId, int toId, @NonNull Drawable transition,
- boolean reversible) {
+ public <T extends Drawable & Animatable> void addTransition(int fromId, int toId,
+ @NonNull T transition, boolean reversible) {
if (transition == null) {
throw new IllegalArgumentException("Transition drawable must not be null");
}
diff --git a/graphics/java/android/graphics/drawable/VectorDrawable.java b/graphics/java/android/graphics/drawable/VectorDrawable.java
index 766e681..9ac6927 100644
--- a/graphics/java/android/graphics/drawable/VectorDrawable.java
+++ b/graphics/java/android/graphics/drawable/VectorDrawable.java
@@ -49,7 +49,7 @@ import java.util.ArrayList;
import java.util.Stack;
/**
- * This lets you create a drawable based on an XML vector graphic It can be
+ * This lets you create a drawable based on an XML vector graphic. It can be
* defined in an XML file with the <code>&lt;vector></code> element.
* <p/>
* The vector drawable has the following elements:
diff --git a/graphics/java/android/graphics/drawable/shapes/Shape.java b/graphics/java/android/graphics/drawable/shapes/Shape.java
index 589fbaa..eab8666 100644
--- a/graphics/java/android/graphics/drawable/shapes/Shape.java
+++ b/graphics/java/android/graphics/drawable/shapes/Shape.java
@@ -16,6 +16,7 @@
package android.graphics.drawable.shapes;
+import android.annotation.NonNull;
import android.graphics.Canvas;
import android.graphics.Outline;
import android.graphics.Paint;
@@ -93,11 +94,12 @@ public abstract class Shape implements Cloneable {
protected void onResize(float width, float height) {}
/**
- * Compute the Outline of the shape.
+ * Compute the Outline of the shape and return it in the supplied Outline
+ * parameter. The default implementation does nothing and {@code outline} is not changed.
*
- * The default implementation does not supply an outline.
+ * @param outline The Outline to be populated with the result. Should not be null.
*/
- public void getOutline(Outline outline) {}
+ public void getOutline(@NonNull Outline outline) {}
@Override
public Shape clone() throws CloneNotSupportedException {