Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c4c58d6 authored by Scott Kennedy's avatar Scott Kennedy Committed by Android (Google) Code Review
Browse files

Merge "Add more @Nullable annotations"

parents 7830c81c ed2b5f8a
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -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;
    }
+4 −3
Original line number Diff line number Diff line
@@ -101,15 +101,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(