summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Louis Pullen-Freilich <lpf@google.com> 2019-02-06 14:06:03 +0000
committer Louis Pullen-Freilich <lpf@google.com> 2019-02-06 14:06:03 +0000
commite6f939530c723809911ba4da225e9ea0763608d8 (patch)
tree9e1f1b17df5fc56fb7aef5af7756f852b89cf9ca
parente8c4958b2f1bd08d87506eb6a86065daead2b74c (diff)
Dark-greylists fill() methods in ListView and GridView
These methods shouldn't be reflected on - and I'm not sure that there is a valid reason for doing so. For anything more complex than what ListView / GridView provide out of the box, developers should use and customize RecyclerView. Bug: b/123768638 Bug: b/123768419 Bug: b/123768563 Bug: b/123768501 Bug: b/123768701 Test: n/a Change-Id: Ie13aa728832c085388322828320ba934415bd9e2
-rw-r--r--core/java/android/widget/GridView.java4
-rw-r--r--core/java/android/widget/ListView.java6
2 files changed, 5 insertions, 5 deletions
diff --git a/core/java/android/widget/GridView.java b/core/java/android/widget/GridView.java
index bf65ec0d5de3..16350efe0510 100644
--- a/core/java/android/widget/GridView.java
+++ b/core/java/android/widget/GridView.java
@@ -310,7 +310,7 @@ public class GridView extends AbsListView {
* @return The view that is currently selected, if it happens to be in the
* range that we draw.
*/
- @UnsupportedAppUsage
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
private View fillDown(int pos, int nextTop) {
View selectedView = null;
@@ -410,7 +410,7 @@ public class GridView extends AbsListView {
*
* @return The view that is currently selected
*/
- @UnsupportedAppUsage
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
private View fillUp(int pos, int nextBottom) {
View selectedView = null;
diff --git a/core/java/android/widget/ListView.java b/core/java/android/widget/ListView.java
index 311f8968150c..1970f3a609b9 100644
--- a/core/java/android/widget/ListView.java
+++ b/core/java/android/widget/ListView.java
@@ -780,7 +780,7 @@ public class ListView extends AbsListView {
* @return The view that is currently selected, if it happens to be in the
* range that we draw.
*/
- @UnsupportedAppUsage
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
private View fillDown(int pos, int nextTop) {
View selectedView = null;
@@ -815,7 +815,7 @@ public class ListView extends AbsListView {
*
* @return The view that is currently selected
*/
- @UnsupportedAppUsage
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
private View fillUp(int pos, int nextBottom) {
View selectedView = null;
@@ -1488,7 +1488,7 @@ public class ListView extends AbsListView {
* @return The selected view, or null if the selected view is outside the
* visible area.
*/
- @UnsupportedAppUsage
+ @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P)
private View fillSpecific(int position, int top) {
boolean tempIsSelected = position == mSelectedPosition;
View temp = makeAndAddView(position, top, true, mListPadding.left, tempIsSelected);