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

Commit ba47b591 authored by Fedor Kudasov's avatar Fedor Kudasov Committed by Android (Google) Code Review
Browse files

Merge "Add @Nullable annotations for simple cases" into sc-v2-dev

parents d5884f1c 2ca545c3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ import com.android.quickstep.util.RecentsOrientedState;
 */
public class GoOverviewActionsView extends OverviewActionsView<OverlayUICallbacksGo> {

    @Nullable
    private ArrowTipView mArrowTipView;

    public GoOverviewActionsView(Context context) {
+2 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;

import androidx.annotation.Nullable;
import androidx.core.graphics.ColorUtils;

import com.android.launcher3.AbstractFloatingView;
@@ -58,6 +59,7 @@ public class AllAppsEduView extends AbstractFloatingView {
    private Launcher mLauncher;
    private AllAppsEduTouchController mTouchController;

    @Nullable
    private AnimatorSet mAnimation;

    private GradientDrawable mCircle;
+4 −2
Original line number Diff line number Diff line
@@ -44,6 +44,7 @@ import android.view.ViewOutlineProvider;
import android.widget.FrameLayout;
import android.widget.TextView;

import androidx.annotation.Nullable;
import androidx.annotation.StringRes;

import com.android.launcher3.BaseActivity;
@@ -69,6 +70,7 @@ public final class DigitalWellBeingToast {
    private Task mTask;
    private boolean mHasLimit;
    private long mAppRemainingTimeMs;
    @Nullable
    private View mBanner;
    private ViewOutlineProvider mOldBannerOutlineProvider;
    private float mBannerOffsetPercentage;
@@ -234,7 +236,7 @@ public final class DigitalWellBeingToast {
                task.titleDescription;
    }

    private void replaceBanner(View view) {
    private void replaceBanner(@Nullable View view) {
        resetOldBanner();
        setBanner(view);
    }
@@ -248,7 +250,7 @@ public final class DigitalWellBeingToast {
        }
    }

    private void setBanner(View view) {
    private void setBanner(@Nullable View view) {
        mBanner = view;
        if (view != null) {
            setupAndAddBanner();
+7 −1
Original line number Diff line number Diff line
@@ -27,6 +27,8 @@ import android.view.View;
import android.view.ViewOutlineProvider;
import android.widget.RemoteViews.RemoteViewOutlineProvider;

import androidx.annotation.Nullable;

import com.android.launcher3.widget.LauncherAppWidgetHostView;
import com.android.launcher3.widget.RoundedCornerEnforcement;

@@ -42,7 +44,9 @@ final class FloatingWidgetBackgroundView extends View {
    private final DrawableProperties mForegroundProperties = new DrawableProperties();
    private final DrawableProperties mBackgroundProperties = new DrawableProperties();

    @Nullable
    private Drawable mOriginalForeground;
    @Nullable
    private Drawable mOriginalBackground;
    private float mFinalRadius;
    private float mInitialOutlineRadius;
@@ -50,7 +54,7 @@ final class FloatingWidgetBackgroundView extends View {
    private boolean mIsUsingFallback;
    private View mSourceView;

    FloatingWidgetBackgroundView(Context context, AttributeSet attrs, int defStyleAttr) {
    FloatingWidgetBackgroundView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        setOutlineProvider(new ViewOutlineProvider() {
            @Override
@@ -161,8 +165,10 @@ final class FloatingWidgetBackgroundView extends View {

    /** Stores and modifies a drawable's properties through an animation. */
    private static class DrawableProperties {
        @Nullable
        private Drawable mDrawable;
        private float mOriginalRadius;
        @Nullable
        private float[] mOriginalRadii;
        private final float[] mTmpRadii = new float[8];

+4 −0
Original line number Diff line number Diff line
@@ -57,10 +57,14 @@ public class FloatingWidgetView extends FrameLayout implements AnimatorListener,
    private LauncherAppWidgetHostView mAppWidgetView;
    private View mAppWidgetBackgroundView;
    private RectF mBackgroundPosition;
    @Nullable
    private GhostView mForegroundOverlayView;

    @Nullable
    private Runnable mEndRunnable;
    @Nullable
    private Runnable mFastFinishRunnable;
    @Nullable
    private Runnable mOnTargetChangeRunnable;
    private boolean mAppTargetIsTranslucent;

Loading