From b498b648aec5d1d95fc51c6dd3dc2f43b3efa100 Mon Sep 17 00:00:00 2001 From: Fedor Kudasov Date: Wed, 10 Nov 2021 14:26:00 +0000 Subject: [PATCH] Annotate AttributeSet with @Nullable Bug: 205828770 Test: m LauncherGoResLib Change-Id: Ib8584e1bbcc7061aef2eb4813a8f6aa41d3c7362 (cherry picked from commit 96f8792c04d3bb8154d4699c88d73d006cce9c21) --- .../src/com/android/quickstep/views/FloatingTaskView.java | 6 ++++-- .../src/com/android/quickstep/views/FloatingWidgetView.java | 6 ++++-- .../com/android/quickstep/views/LauncherRecentsView.java | 6 ++++-- .../src/com/android/quickstep/views/TaskThumbnailView.java | 5 +++-- quickstep/src/com/android/quickstep/views/TaskView.java | 4 ++-- 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/quickstep/src/com/android/quickstep/views/FloatingTaskView.java b/quickstep/src/com/android/quickstep/views/FloatingTaskView.java index 5a86464498..e2ffa18315 100644 --- a/quickstep/src/com/android/quickstep/views/FloatingTaskView.java +++ b/quickstep/src/com/android/quickstep/views/FloatingTaskView.java @@ -15,6 +15,8 @@ import android.view.ViewGroup; import android.widget.FrameLayout; import android.widget.ImageView; +import androidx.annotation.Nullable; + import com.android.launcher3.InsettableFrameLayout; import com.android.launcher3.Launcher; import com.android.launcher3.LauncherAnimUtils; @@ -51,11 +53,11 @@ public class FloatingTaskView extends FrameLayout { this(context, null); } - public FloatingTaskView(Context context, AttributeSet attrs) { + public FloatingTaskView(Context context, @Nullable AttributeSet attrs) { this(context, attrs, 0); } - public FloatingTaskView(Context context, AttributeSet attrs, int defStyleAttr) { + public FloatingTaskView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); mLauncher = Launcher.getLauncher(context); mIsRtl = Utilities.isRtl(getResources()); diff --git a/quickstep/src/com/android/quickstep/views/FloatingWidgetView.java b/quickstep/src/com/android/quickstep/views/FloatingWidgetView.java index 88b11a0884..463ed4bd9c 100644 --- a/quickstep/src/com/android/quickstep/views/FloatingWidgetView.java +++ b/quickstep/src/com/android/quickstep/views/FloatingWidgetView.java @@ -30,6 +30,8 @@ import android.view.ViewGroup; import android.view.ViewTreeObserver.OnGlobalLayoutListener; import android.widget.FrameLayout; +import androidx.annotation.Nullable; + import com.android.launcher3.Launcher; import com.android.launcher3.R; import com.android.launcher3.Utilities; @@ -68,11 +70,11 @@ public class FloatingWidgetView extends FrameLayout implements AnimatorListener, this(context, null); } - public FloatingWidgetView(Context context, AttributeSet attrs) { + public FloatingWidgetView(Context context, @Nullable AttributeSet attrs) { this(context, attrs, 0); } - public FloatingWidgetView(Context context, AttributeSet attrs, int defStyleAttr) { + public FloatingWidgetView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); mLauncher = Launcher.getLauncher(context); mListenerView = new ListenerView(context, attrs); diff --git a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java index 715d30e4af..5d6b6563f7 100644 --- a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java +++ b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java @@ -30,6 +30,8 @@ import android.util.AttributeSet; import android.view.MotionEvent; import android.view.Surface; +import androidx.annotation.Nullable; + import com.android.launcher3.BaseQuickstepLauncher; import com.android.launcher3.LauncherState; import com.android.launcher3.statehandlers.DepthController; @@ -49,11 +51,11 @@ public class LauncherRecentsView extends RecentsView