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

Commit b69afc13 authored by Lucas Dupin's avatar Lucas Dupin Committed by Android (Google) Code Review
Browse files

Merge "Add more annotations"

parents b6e868e0 85a7a4c3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.systemui.qs;

import android.annotation.Nullable;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.drawable.Drawable;
@@ -73,7 +74,7 @@ public class AlphaControlledSignalTileView extends SignalTileView {
        }

        @Override
        protected void setDrawableTintList(ColorStateList tint) {
        protected void setDrawableTintList(@Nullable ColorStateList tint) {
        }

        /**
+4 −0
Original line number Diff line number Diff line
@@ -27,6 +27,8 @@ import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import androidx.annotation.Nullable;

import com.android.systemui.R;

import java.util.Objects;
@@ -48,6 +50,7 @@ public class QSDualTileLabel extends LinearLayout {
    private final TextView mSecondLine;
    private final int mHorizontalPaddingPx;

    @Nullable
    private String mText;

    public QSDualTileLabel(Context context) {
@@ -122,6 +125,7 @@ public class QSDualTileLabel extends LinearLayout {
        rescheduleUpdateText();
    }

    @Nullable
    public String getText() {
        return mText;
    }
+9 −3
Original line number Diff line number Diff line
@@ -48,6 +48,7 @@ import com.android.systemui.tuner.TunerService.Tunable;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/** View that represents the quick settings tile panel (when expanded/pulled down). **/
public class QSPanel extends LinearLayout implements Tunable {
@@ -78,7 +79,7 @@ public class QSPanel extends LinearLayout implements Tunable {
    protected boolean mExpanded;
    protected boolean mListening;

    protected QSTileHost mHost;
    @Nullable protected QSTileHost mHost;
    private final List<OnConfigurationChangedListener> mOnConfigurationChangedListeners =
            new ArrayList<>();

@@ -92,14 +93,18 @@ public class QSPanel extends LinearLayout implements Tunable {

    @Nullable
    private ViewGroup mHeaderContainer;
    @Nullable
    private PageIndicator mFooterPageIndicator;
    private int mContentMarginStart;
    private int mContentMarginEnd;
    private boolean mUsingHorizontalLayout;

    @Nullable
    private LinearLayout mHorizontalLinearLayout;
    @Nullable
    protected LinearLayout mHorizontalContentContainer;

    @Nullable
    protected QSTileLayout mTileLayout;
    private float mSquishinessFraction = 1f;
    private final ArrayMap<View, Integer> mChildrenLayoutTop = new ArrayMap<>();
@@ -284,7 +289,7 @@ public class QSPanel extends LinearLayout implements Tunable {
        for (int i = 0; i < getChildCount(); i++) {
            View child = getChildAt(i);
            if (move) {
                int top = mChildrenLayoutTop.get(child);
                int top = Objects.requireNonNull(mChildrenLayoutTop.get(child));
                child.setLeftTopRightBottom(child.getLeft(), top + tileHeightOffset,
                        child.getRight(), top + tileHeightOffset + child.getHeight());
            }
@@ -337,6 +342,7 @@ public class QSPanel extends LinearLayout implements Tunable {
        }
    }

    @Nullable
    public QSTileHost getHost() {
        return mHost;
    }
@@ -501,7 +507,6 @@ public class QSPanel extends LinearLayout implements Tunable {
        mListening = listening;
    }


    protected void drawTile(QSPanelControllerBase.TileRecord r, QSTile.State state) {
        r.tileView.onStateChanged(state);
    }
@@ -548,6 +553,7 @@ public class QSPanel extends LinearLayout implements Tunable {
        return getMeasuredHeight();
    }

    @Nullable
    QSTileLayout getTileLayout() {
        return mTileLayout;
    }
+5 −0
Original line number Diff line number Diff line
@@ -76,6 +76,7 @@ public abstract class QSPanelControllerBase<T extends QSPanel> extends ViewContr
    private Consumer<Boolean> mMediaVisibilityChangedListener;
    private int mLastOrientation;
    private String mCachedSpecs = "";
    @Nullable
    private QSTileRevealController mQsTileRevealController;
    private float mRevealExpansion;

@@ -185,6 +186,7 @@ public abstract class QSPanelControllerBase<T extends QSPanel> extends ViewContr
        mDumpManager.unregisterDumpable(mView.getDumpableTag());
    }

    @Nullable
    protected QSTileRevealController createTileRevealController() {
        return null;
    }
@@ -250,6 +252,7 @@ public abstract class QSPanelControllerBase<T extends QSPanel> extends ViewContr
        return !mRecords.isEmpty();
    }

    @Nullable
    QSTileView getTileView(QSTile tile) {
        for (QSPanelControllerBase.TileRecord r : mRecords) {
            if (r.tile == tile) {
@@ -411,6 +414,7 @@ public abstract class QSPanelControllerBase<T extends QSPanel> extends ViewContr
        mUsingHorizontalLayoutChangedListener = listener;
    }

    @Nullable
    public View getBrightnessView() {
        return mView.getBrightnessView();
    }
@@ -425,6 +429,7 @@ public abstract class QSPanelControllerBase<T extends QSPanel> extends ViewContr
        public QSTile tile;
        public com.android.systemui.plugins.qs.QSTileView tileView;
        public boolean scanState;
        @Nullable
        public QSTile.Callback callback;
    }
}
+4 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import static android.view.View.IMPORTANT_FOR_ACCESSIBILITY_YES;

import android.annotation.MainThread;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.content.Context;
import android.content.Intent;
import android.os.Handler;
@@ -81,6 +82,7 @@ public class QSCarrierGroupController {
    private final CarrierConfigTracker mCarrierConfigTracker;

    private boolean mIsSingleCarrier;
    @Nullable
    private OnSingleCarrierChangedListener mOnSingleCarrierChangedListener;

    private final SlotIndexResolver mSlotIndexResolver;
@@ -294,7 +296,8 @@ public class QSCarrierGroupController {
     * This will get notified when the number of carriers changes between 1 and "not one".
     * @param listener
     */
    public void setOnSingleCarrierChangedListener(OnSingleCarrierChangedListener listener) {
    public void setOnSingleCarrierChangedListener(
            @Nullable OnSingleCarrierChangedListener listener) {
        mOnSingleCarrierChangedListener = listener;
    }

Loading