summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorScott Kennedy <skennedy@google.com>2015-02-11 17:53:49 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-02-11 17:53:50 +0000
commit0f5e1975d317a76e5db4c79bf60641733a375a1e (patch)
tree075ba867395417425978044f31c2788efa4acbc1 /core
parent5b4a198abdd24b2b71b4975a9a26fe5b0e6f0b1e (diff)
parent76c382ed6799f11df9d3d8da0f63411dba68a0e2 (diff)
downloadframeworks_base-0f5e1975d317a76e5db4c79bf60641733a375a1e.zip
frameworks_base-0f5e1975d317a76e5db4c79bf60641733a375a1e.tar.gz
frameworks_base-0f5e1975d317a76e5db4c79bf60641733a375a1e.tar.bz2
Merge "Add @Nullable to AttributeSet in a couple constructors"
Diffstat (limited to 'core')
-rw-r--r--core/java/android/view/View.java6
-rw-r--r--core/java/android/widget/ImageView.java7
2 files changed, 7 insertions, 6 deletions
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index f60e2f8..04aafc1 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -3582,7 +3582,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
* @param attrs The attributes of the XML tag that is inflating the view.
* @see #View(Context, AttributeSet, int)
*/
- public View(Context context, AttributeSet attrs) {
+ public View(Context context, @Nullable AttributeSet attrs) {
this(context, attrs, 0);
}
@@ -3603,7 +3603,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
* the view. Can be 0 to not look for defaults.
* @see #View(Context, AttributeSet)
*/
- public View(Context context, AttributeSet attrs, int defStyleAttr) {
+ public View(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
this(context, attrs, defStyleAttr, 0);
}
@@ -3640,7 +3640,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
* to not look for defaults.
* @see #View(Context, AttributeSet, int)
*/
- public View(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
+ public View(Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes) {
this(context);
final TypedArray a = context.obtainStyledAttributes(
diff --git a/core/java/android/widget/ImageView.java b/core/java/android/widget/ImageView.java
index 757038c..dd9bdb6 100644
--- a/core/java/android/widget/ImageView.java
+++ b/core/java/android/widget/ImageView.java
@@ -127,15 +127,16 @@ public class ImageView extends View {
initImageView();
}
- public ImageView(Context context, AttributeSet attrs) {
+ public ImageView(Context context, @Nullable AttributeSet attrs) {
this(context, attrs, 0);
}
- public ImageView(Context context, AttributeSet attrs, int defStyleAttr) {
+ public ImageView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
this(context, attrs, defStyleAttr, 0);
}
- public ImageView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
+ public ImageView(Context context, @Nullable AttributeSet attrs, int defStyleAttr,
+ int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
initImageView();