diff options
| author | Mathew Inwood <mathewi@google.com> | 2018-12-20 13:53:36 +0000 |
|---|---|---|
| committer | Mathew Inwood <mathewi@google.com> | 2018-12-28 11:50:04 +0000 |
| commit | 31755f94e11225df5d59b8f7e535106200fdf32d (patch) | |
| tree | 99d4fd992001fff7b5fd15487c227c88d63936ae /core/java/android/widget/Gallery.java | |
| parent | 2f16d51c993c5957bcecf63b72ae28488355a8be (diff) | |
Limit access to suspected false positives.
Members modified herein are suspected to be false positives: i.e. things
that were added to the greylist in P, but subsequent data analysis
suggests that they are not, in fact, used after all.
Add a maxTargetSdk=P to these APIs. This is lower-risk that simply
removing these things from the greylist, as none of out data sources are
perfect nor complete.
For APIs that are not supported yet by annotations, move them to
hiddenapi-greylist-max-p.txt instead which has the same effect.
Exempted-From-Owner-Approval: Automatic changes to the codebase
affecting only @UnsupportedAppUsage annotations, themselves added
without requiring owners approval earlier.
Bug: 115609023
Test: m
Change-Id: I020a9c09672ebcae64c5357abc4993e07e744687
Diffstat (limited to 'core/java/android/widget/Gallery.java')
| -rw-r--r-- | core/java/android/widget/Gallery.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/java/android/widget/Gallery.java b/core/java/android/widget/Gallery.java index ea1bfc2854c2..d6a0ae48cc13 100644 --- a/core/java/android/widget/Gallery.java +++ b/core/java/android/widget/Gallery.java @@ -22,6 +22,7 @@ import android.annotation.Widget; import android.content.Context; import android.content.res.TypedArray; import android.graphics.Rect; +import android.os.Build; import android.os.Bundle; import android.util.AttributeSet; import android.util.Log; @@ -105,7 +106,7 @@ public class Gallery extends AbsSpinner implements GestureDetector.OnGestureList /** * Helper for detecting touch gestures. */ - @UnsupportedAppUsage + @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) private GestureDetector mGestureDetector; /** @@ -149,7 +150,7 @@ public class Gallery extends AbsSpinner implements GestureDetector.OnGestureList /** * The currently selected item's child. */ - @UnsupportedAppUsage + @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) private View mSelectedChild; /** @@ -480,7 +481,7 @@ public class Gallery extends AbsSpinner implements GestureDetector.OnGestureList /** * @return The center of this Gallery. */ - @UnsupportedAppUsage + @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) private int getCenterOfGallery() { return (getWidth() - mPaddingLeft - mPaddingRight) / 2 + mPaddingLeft; } @@ -488,7 +489,7 @@ public class Gallery extends AbsSpinner implements GestureDetector.OnGestureList /** * @return The center of the given view. */ - @UnsupportedAppUsage + @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023) private static int getCenterOfView(View view) { return view.getLeft() + view.getWidth() / 2; } |
