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

Commit 6d891937 authored by Mathew Inwood's avatar Mathew Inwood Committed by Gerrit Code Review
Browse files

Merge "Add @UnsupportedAppUsage annotations"

parents 041eb388 a85f4eb6
Loading
Loading
Loading
Loading
+0 −619

File changed.

Preview size limit exceeded, changes collapsed.

+0 −1
Original line number Diff line number Diff line
@@ -251,7 +251,6 @@ Landroid/view/IWindowManager;->getStableInsets(ILandroid/graphics/Rect;)V
Landroid/view/IWindowManager;->overridePendingAppTransitionMultiThumbFuture(Landroid/view/IAppTransitionAnimationSpecsFuture;Landroid/os/IRemoteCallback;Z)V
Landroid/view/IWindowManager;->overridePendingAppTransitionRemote(Landroid/view/RemoteAnimationAdapter;)V
Landroid/view/IWindowManager;->setNavBarVirtualKeyHapticFeedbackEnabled(Z)V
Landroid/widget/ListView;->lookForSelectablePosition(IZ)I
Lcom/android/ims/ImsConfigListener;->onSetFeatureResponse(IIII)V
Lcom/android/ims/internal/IImsCallSessionListener;->callSessionConferenceStateUpdated(Lcom/android/ims/internal/IImsCallSession;Landroid/telephony/ims/ImsConferenceState;)V
Lcom/android/ims/internal/IImsCallSessionListener;->callSessionHandover(Lcom/android/ims/internal/IImsCallSession;IILandroid/telephony/ims/ImsReasonInfo;)V
+53 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ import android.annotation.ColorInt;
import android.annotation.DrawableRes;
import android.annotation.NonNull;
import android.annotation.TestApi;
import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.Intent;
import android.content.res.Configuration;
@@ -248,6 +249,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
    /**
     * Controls CHOICE_MODE_MULTIPLE_MODAL. null when inactive.
     */
    @UnsupportedAppUsage
    ActionMode mChoiceActionMode;

    /**
@@ -276,16 +278,19 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
    /**
     * Controls how the next layout will happen
     */
    @UnsupportedAppUsage
    int mLayoutMode = LAYOUT_NORMAL;

    /**
     * Should be used by subclasses to listen to changes in the dataset
     */
    @UnsupportedAppUsage
    AdapterDataSetObserver mDataSetObserver;

    /**
     * The adapter containing the data to be displayed by this view
     */
    @UnsupportedAppUsage
    ListAdapter mAdapter;

    /**
@@ -311,22 +316,26 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
    /**
     * The drawable used to draw the selector
     */
    @UnsupportedAppUsage
    Drawable mSelector;

    /**
     * The current position of the selector in the list.
     */
    @UnsupportedAppUsage
    int mSelectorPosition = INVALID_POSITION;

    /**
     * Defines the selector's location and dimension at drawing time
     */
    @UnsupportedAppUsage
    Rect mSelectorRect = new Rect();

    /**
     * The data set used to store unused views that should be reused during the next layout
     * to avoid creating new ones
     */
    @UnsupportedAppUsage
    final RecycleBin mRecycler = new RecycleBin();

    /**
@@ -337,6 +346,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
    /**
     * The selection's top padding
     */
    @UnsupportedAppUsage
    int mSelectionTopPadding = 0;

    /**
@@ -347,6 +357,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
    /**
     * The selection's bottom padding
     */
    @UnsupportedAppUsage
    int mSelectionBottomPadding = 0;

    /**
@@ -379,6 +390,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
    /**
     * The position of the view that received the down motion event
     */
    @UnsupportedAppUsage
    int mMotionPosition;

    /**
@@ -399,12 +411,14 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
    /**
     * The Y value associated with the the down motion event
     */
    @UnsupportedAppUsage
    int mMotionY;

    /**
     * One of TOUCH_MODE_REST, TOUCH_MODE_DOWN, TOUCH_MODE_TAP, TOUCH_MODE_SCROLL, or
     * TOUCH_MODE_DONE_WAITING
     */
    @UnsupportedAppUsage
    int mTouchMode = TOUCH_MODE_REST;

    /**
@@ -420,16 +434,19 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
    /**
     * Determines speed during touch scrolling
     */
    @UnsupportedAppUsage
    private VelocityTracker mVelocityTracker;

    /**
     * Handles one frame of a fling
     */
    @UnsupportedAppUsage
    private FlingRunnable mFlingRunnable;

    /**
     * Handles scrolling between positions within the list.
     */
    @UnsupportedAppUsage
    AbsPositionScroller mPositionScroller;

    /**
@@ -463,11 +480,13 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
    /**
     * Optional callback to notify client when scroll position has changed
     */
    @UnsupportedAppUsage
    private OnScrollListener mOnScrollListener;

    /**
     * Keeps track of our accessory window
     */
    @UnsupportedAppUsage
    PopupWindow mPopup;

    /**
@@ -501,6 +520,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
     */
    int mResurrectToPosition = INVALID_POSITION;

    @UnsupportedAppUsage
    private ContextMenuInfo mContextMenuInfo = null;

    /**
@@ -547,11 +567,13 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
    /**
     * The last CheckForLongPress runnable we posted, if any
     */
    @UnsupportedAppUsage
    private CheckForLongPress mPendingCheckForLongPress;

    /**
     * The last CheckForTap runnable we posted, if any
     */
    @UnsupportedAppUsage
    private CheckForTap mPendingCheckForTap;

    /**
@@ -590,6 +612,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
    /**
     * The select child's view (from the adapter's getView) is enabled.
     */
    @UnsupportedAppUsage
    private boolean mIsChildViewEnabled;

    /**
@@ -606,6 +629,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
    /**
     * Helper object that renders and controls the fast scroll thumb.
     */
    @UnsupportedAppUsage
    private FastScroller mFastScroll;

    /**
@@ -616,6 +640,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te

    private boolean mGlobalLayoutListenerAddedFilter;

    @UnsupportedAppUsage
    private int mTouchSlop;
    private float mDensityScale;

@@ -627,6 +652,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
    private Runnable mClearScrollingCache;
    Runnable mPositionScrollAfterLayout;
    private int mMinimumVelocity;
    @UnsupportedAppUsage
    private int mMaximumVelocity;
    private float mVelocityScale = 1.0f;

@@ -651,6 +677,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
     * ID of the active pointer. This is used to retain consistency during
     * drags/flings if multiple pointers are used.
     */
    @UnsupportedAppUsage
    private int mActivePointerId = INVALID_POINTER;

    /**
@@ -662,11 +689,13 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
    /**
     * Maximum distance to overscroll by during edge effects
     */
    @UnsupportedAppUsage
    int mOverscrollDistance;

    /**
     * Maximum distance to overfling during edge effects
     */
    @UnsupportedAppUsage
    int mOverflingDistance;

    // These two EdgeGlows are always set and used together.
@@ -675,11 +704,13 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
    /**
     * Tracks the state of the top edge glow.
     */
    @UnsupportedAppUsage
    private EdgeEffect mEdgeGlowTop;

    /**
     * Tracks the state of the bottom edge glow.
     */
    @UnsupportedAppUsage
    private EdgeEffect mEdgeGlowBottom;

    /**
@@ -1418,6 +1449,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
     * @hide
     */
    @Override
    @UnsupportedAppUsage
    protected boolean isVerticalScrollBarHidden() {
        return isFastScrollEnabled();
    }
@@ -1469,6 +1501,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
    /**
     * Notify our scroll listener (if there is one) of a change in scroll state
     */
    @UnsupportedAppUsage
    void invokeOnItemScrollListener() {
        if (mFastScroll != null) {
            mFastScroll.onScroll(mFirstPosition, getChildCount(), mItemCount);
@@ -1691,7 +1724,9 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te

    static class SavedState extends BaseSavedState {
        long selectedId;
        @UnsupportedAppUsage
        long firstId;
        @UnsupportedAppUsage
        int viewTop;
        int position;
        int height;
@@ -2228,6 +2263,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
        }
    }

    @UnsupportedAppUsage
    private boolean canScrollUp() {
        boolean canScrollUp;
        // 0th element is not visible
@@ -2244,6 +2280,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
        return canScrollUp;
    }

    @UnsupportedAppUsage
    private boolean canScrollDown() {
        boolean canScrollDown;
        int count = getChildCount();
@@ -2571,6 +2608,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
        positionSelector(position, sel, false, -1, -1);
    }

    @UnsupportedAppUsage
    private void positionSelector(int position, View sel, boolean manageHotspot, float x, float y) {
        final boolean positionChanged = position != mSelectorPosition;
        if (position != INVALID_POSITION) {
@@ -2857,6 +2895,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
        mScrollDown = down;
    }

    @UnsupportedAppUsage
    void updateSelectorState() {
        final Drawable selector = mSelector;
        if (selector != null && selector.isStateful()) {
@@ -3219,6 +3258,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
        return false;
    }

    @UnsupportedAppUsage
    boolean performLongPress(final View child,
            final int longPressPosition, final long longPressId) {
        return performLongPress(
@@ -3229,6 +3269,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
                CheckForLongPress.INVALID_COORD);
    }

    @UnsupportedAppUsage
    boolean performLongPress(final View child,
            final int longPressPosition, final long longPressId, float x, float y) {
        // CHOICE_MODE_MULTIPLE_MODAL takes over long press.
@@ -4555,6 +4596,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
     *
     * @param newState The new scroll state.
     */
    @UnsupportedAppUsage
    void reportScrollStateChange(int newState) {
        if (newState != mLastScrollState) {
            if (mOnScrollListener != null) {
@@ -4574,6 +4616,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
        /**
         * Tracks the decay of a fling scroll
         */
        @UnsupportedAppUsage
        private final OverScroller mScroller;

        /**
@@ -4618,6 +4661,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
            mScroller = new OverScroller(getContext());
        }

        @UnsupportedAppUsage
        void start(int initialVelocity) {
            int initialY = initialVelocity < 0 ? Integer.MAX_VALUE : 0;
            mLastFlingY = initialY;
@@ -4695,6 +4739,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
            postOnAnimation(this);
        }

        @UnsupportedAppUsage
        void endFling() {
            mTouchMode = TOUCH_MODE_REST;

@@ -4949,6 +4994,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
        smoothScrollBy(distance, duration, false, false);
    }

    @UnsupportedAppUsage
    void smoothScrollBy(int distance, int duration, boolean linear,
            boolean suppressEndFlingStateChangeCall) {
        if (mFlingRunnable == null) {
@@ -5091,6 +5137,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
     * @param incrementalDeltaY Change in deltaY from the previous event.
     * @return true if we're already at the beginning/end of the list and have nothing to do.
     */
    @UnsupportedAppUsage
    boolean trackMotionScroll(int deltaY, int incrementalDeltaY) {
        final int childCount = getChildCount();
        if (childCount == 0) {
@@ -5326,6 +5373,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
     * @param y Where the user touched
     * @return The position of the first (or only) item in the row containing y
     */
    @UnsupportedAppUsage
    abstract int findMotionRow(int y);

    /**
@@ -5358,6 +5406,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
     * If there is a selection returns false.
     * Otherwise resurrects the selection and returns true if resurrected.
     */
    @UnsupportedAppUsage
    boolean resurrectSelectionIfNeeded() {
        if (mSelectedPosition < 0 && resurrectSelection()) {
            updateSelectorState();
@@ -6523,6 +6572,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
            @ViewDebug.IntToString(from = ITEM_VIEW_TYPE_IGNORE, to = "ITEM_VIEW_TYPE_IGNORE"),
            @ViewDebug.IntToString(from = ITEM_VIEW_TYPE_HEADER_OR_FOOTER, to = "ITEM_VIEW_TYPE_HEADER_OR_FOOTER")
        })
        @UnsupportedAppUsage
        int viewType;

        /**
@@ -6550,6 +6600,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
         * scrap heap.
         * @hide
         */
        @UnsupportedAppUsage
        int scrappedFromPosition;

        /**
@@ -6619,6 +6670,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
     * @see android.widget.AbsListView.RecyclerListener
     */
    class RecycleBin {
        @UnsupportedAppUsage
        private RecyclerListener mRecyclerListener;

        /**
@@ -6700,6 +6752,7 @@ public abstract class AbsListView extends AdapterView<ListAdapter> implements Te
        /**
         * Clears the scrap heap.
         */
        @UnsupportedAppUsage
        void clear() {
            if (mViewTypeCount == 1) {
                final ArrayList<View> scrap = mCurrentScrap;
+9 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package android.widget;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.TypedArray;
@@ -43,6 +44,7 @@ import com.android.internal.R;
public abstract class AbsSeekBar extends ProgressBar {
    private final Rect mTempRect = new Rect();

    @UnsupportedAppUsage
    private Drawable mThumb;
    private ColorStateList mThumbTintList = null;
    private PorterDuff.Mode mThumbTintMode = null;
@@ -56,17 +58,20 @@ public abstract class AbsSeekBar extends ProgressBar {
    private boolean mHasTickMarkTintMode = false;

    private int mThumbOffset;
    @UnsupportedAppUsage
    private boolean mSplitTrack;

    /**
     * On touch, this offset plus the scaled value from the position of the
     * touch will form the progress value. Usually 0.
     */
    @UnsupportedAppUsage
    float mTouchProgressOffset;

    /**
     * Whether this is user seekable.
     */
    @UnsupportedAppUsage
    boolean mIsUserSeekable = true;

    /**
@@ -76,10 +81,12 @@ public abstract class AbsSeekBar extends ProgressBar {
    private int mKeyProgressIncrement = 1;

    private static final int NO_ALPHA = 0xFF;
    @UnsupportedAppUsage
    private float mDisabledAlpha;

    private int mScaledTouchSlop;
    private float mTouchDownX;
    @UnsupportedAppUsage
    private boolean mIsDragging;

    public AbsSeekBar(Context context) {
@@ -729,6 +736,7 @@ public abstract class AbsSeekBar extends ProgressBar {
    /**
     * Draw the thumb.
     */
    @UnsupportedAppUsage
    void drawThumb(Canvas canvas) {
        if (mThumb != null) {
            final int saveCount = canvas.save();
@@ -834,6 +842,7 @@ public abstract class AbsSeekBar extends ProgressBar {
        }
    }

    @UnsupportedAppUsage
    private void trackTouchEvent(MotionEvent event) {
        final int x = Math.round(event.getX());
        final int y = Math.round(event.getY());
+5 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.UnsupportedAppUsage;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
@@ -586,6 +587,7 @@ public class ActionMenuPresenter extends BaseMenuPresenter
     * Dismiss all popup menus - overflow and submenus.
     * @return true if popups were dismissed, false otherwise. (This can be because none were open.)
     */
    @UnsupportedAppUsage
    public boolean dismissPopupMenus() {
        boolean result = hideOverflowMenu();
        result |= hideSubMenus();
@@ -608,6 +610,7 @@ public class ActionMenuPresenter extends BaseMenuPresenter
    /**
     * @return true if the overflow menu is currently showing
     */
    @UnsupportedAppUsage
    public boolean isOverflowMenuShowing() {
        return mOverflowPopup != null && mOverflowPopup.isShowing();
    }
@@ -766,6 +769,7 @@ public class ActionMenuPresenter extends BaseMenuPresenter
    }

    @Override
    @UnsupportedAppUsage
    public Parcelable onSaveInstanceState() {
        SavedState state = new SavedState();
        state.openSubMenuId = mOpenSubMenuId;
@@ -773,6 +777,7 @@ public class ActionMenuPresenter extends BaseMenuPresenter
    }

    @Override
    @UnsupportedAppUsage
    public void onRestoreInstanceState(Parcelable state) {
        SavedState saved = (SavedState) state;
        if (saved.openSubMenuId > 0) {
Loading