From c650a147d9fdd297a897898634ef5d1fb22d5ce2 Mon Sep 17 00:00:00 2001 From: Joshua Tsuji Date: Wed, 22 May 2019 11:31:19 -0400 Subject: [PATCH] Mark the stack nullable so IntelliJ will warn about using it without a null check. Also changes the import to androidx.annotation, which is what we use in BubbleStackView. The default config of IntelliJ seems to ignore android.annotation.Nullable. Fixes: 133314397 Bug: 133314397 Test: atest SystemUITests Change-Id: I6887a82787403611ff62cb8bf2e4a2dd9049d5e3 --- .../src/com/android/systemui/bubbles/BubbleController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java index 7e016bb000adf..04637add0ebcb 100644 --- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java +++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java @@ -35,7 +35,6 @@ import static java.lang.annotation.ElementType.LOCAL_VARIABLE; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.RetentionPolicy.SOURCE; -import android.annotation.Nullable; import android.app.ActivityManager; import android.app.ActivityManager.RunningTaskInfo; import android.app.ActivityTaskManager; @@ -61,6 +60,7 @@ import android.widget.FrameLayout; import androidx.annotation.IntDef; import androidx.annotation.MainThread; +import androidx.annotation.Nullable; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.statusbar.IStatusBarService; @@ -139,7 +139,7 @@ public class BubbleController implements ConfigurationController.ConfigurationLi @Nullable private BubbleStackView.SurfaceSynchronizer mSurfaceSynchronizer; private BubbleData mBubbleData; - private BubbleStackView mStackView; + @Nullable private BubbleStackView mStackView; // Bubbles get added to the status bar view private final StatusBarWindowController mStatusBarWindowController;