summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorScott Kennedy <skennedy@google.com>2015-03-06 17:24:58 -0800
committerScott Kennedy <skennedy@google.com>2015-03-06 17:24:58 -0800
commited2b5f8aca703b3d54d11b8d9ba2519a32953e81 (patch)
tree0be2d3eaee1cccee2dd91932ef1e0f2b9d2b218e /core
parent3062e57072145ba5e71ba8b2cf565d3453db04a7 (diff)
downloadframeworks_base-ed2b5f8aca703b3d54d11b8d9ba2519a32953e81.zip
frameworks_base-ed2b5f8aca703b3d54d11b8d9ba2519a32953e81.tar.gz
frameworks_base-ed2b5f8aca703b3d54d11b8d9ba2519a32953e81.tar.bz2
Add more @Nullable annotations
Change-Id: I5b2935eb5e63289d80ebf9bf70741800b1c0934a
Diffstat (limited to 'core')
-rw-r--r--core/java/android/widget/AdapterView.java7
-rw-r--r--core/java/android/widget/FrameLayout.java7
2 files changed, 9 insertions, 5 deletions
diff --git a/core/java/android/widget/AdapterView.java b/core/java/android/widget/AdapterView.java
index 9b977fa..72cb0b5 100644
--- a/core/java/android/widget/AdapterView.java
+++ b/core/java/android/widget/AdapterView.java
@@ -16,6 +16,7 @@
package android.widget;
+import android.annotation.Nullable;
import android.content.Context;
import android.database.DataSetObserver;
import android.os.Parcelable;
@@ -276,7 +277,7 @@ public abstract class AdapterView<T extends Adapter> extends ViewGroup {
*
* @param listener The callback that will be invoked.
*/
- public void setOnItemClickListener(OnItemClickListener listener) {
+ public void setOnItemClickListener(@Nullable OnItemClickListener listener) {
mOnItemClickListener = listener;
}
@@ -284,6 +285,7 @@ public abstract class AdapterView<T extends Adapter> extends ViewGroup {
* @return The callback to be invoked with an item in this AdapterView has
* been clicked, or null id no callback has been set.
*/
+ @Nullable
public final OnItemClickListener getOnItemClickListener() {
return mOnItemClickListener;
}
@@ -394,10 +396,11 @@ public abstract class AdapterView<T extends Adapter> extends ViewGroup {
*
* @param listener The callback that will run
*/
- public void setOnItemSelectedListener(OnItemSelectedListener listener) {
+ public void setOnItemSelectedListener(@Nullable OnItemSelectedListener listener) {
mOnItemSelectedListener = listener;
}
+ @Nullable
public final OnItemSelectedListener getOnItemSelectedListener() {
return mOnItemSelectedListener;
}
diff --git a/core/java/android/widget/FrameLayout.java b/core/java/android/widget/FrameLayout.java
index 57bbc42..dde8604 100644
--- a/core/java/android/widget/FrameLayout.java
+++ b/core/java/android/widget/FrameLayout.java
@@ -104,15 +104,16 @@ public class FrameLayout extends ViewGroup {
super(context);
}
- public FrameLayout(Context context, AttributeSet attrs) {
+ public FrameLayout(Context context, @Nullable AttributeSet attrs) {
this(context, attrs, 0);
}
- public FrameLayout(Context context, AttributeSet attrs, int defStyleAttr) {
+ public FrameLayout(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
this(context, attrs, defStyleAttr, 0);
}
- public FrameLayout(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
+ public FrameLayout(
+ Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
final TypedArray a = context.obtainStyledAttributes(