From 0693ff6d0e13e45ced6e7a52e129f3b61a06a133 Mon Sep 17 00:00:00 2001 From: Suprabh Shukla Date: Thu, 23 Mar 2017 16:09:27 -0700 Subject: [PATCH] Removing unused method indexOfValueByValue The method was confusing and not used by anyone. Same functionality can be implemented trivially in the client code. Test: N/A Bug: 35765468 Change-Id: Ia019088cd023c62d83760d9ebe883f7559a43375 --- api/current.txt | 2 -- api/system-current.txt | 2 -- api/test-current.txt | 2 -- core/java/android/util/LongSparseArray.java | 1 + core/java/android/util/SparseArray.java | 1 + 5 files changed, 2 insertions(+), 6 deletions(-) diff --git a/api/current.txt b/api/current.txt index 235a4a6c3d4d3..84ceecc129e29 100644 --- a/api/current.txt +++ b/api/current.txt @@ -43205,7 +43205,6 @@ package android.util { method public E get(long, E); method public int indexOfKey(long); method public int indexOfValue(E); - method public int indexOfValueByValue(E); method public long keyAt(int); method public void put(long, E); method public void remove(long); @@ -43408,7 +43407,6 @@ package android.util { method public E get(int, E); method public int indexOfKey(int); method public int indexOfValue(E); - method public int indexOfValueByValue(E); method public int keyAt(int); method public void put(int, E); method public void remove(int); diff --git a/api/system-current.txt b/api/system-current.txt index abdcaaa6c1b42..f327d86a7d94a 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -46668,7 +46668,6 @@ package android.util { method public E get(long, E); method public int indexOfKey(long); method public int indexOfValue(E); - method public int indexOfValueByValue(E); method public long keyAt(int); method public void put(long, E); method public void remove(long); @@ -46871,7 +46870,6 @@ package android.util { method public E get(int, E); method public int indexOfKey(int); method public int indexOfValue(E); - method public int indexOfValueByValue(E); method public int keyAt(int); method public void put(int, E); method public void remove(int); diff --git a/api/test-current.txt b/api/test-current.txt index 3fb42a400835b..7a69eb13d5ada 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -43401,7 +43401,6 @@ package android.util { method public E get(long, E); method public int indexOfKey(long); method public int indexOfValue(E); - method public int indexOfValueByValue(E); method public long keyAt(int); method public void put(long, E); method public void remove(long); @@ -43604,7 +43603,6 @@ package android.util { method public E get(int, E); method public int indexOfKey(int); method public int indexOfValue(E); - method public int indexOfValueByValue(E); method public int keyAt(int); method public void put(int, E); method public void remove(int); diff --git a/core/java/android/util/LongSparseArray.java b/core/java/android/util/LongSparseArray.java index 58ad2fd0c5867..9ba0f5da135e5 100644 --- a/core/java/android/util/LongSparseArray.java +++ b/core/java/android/util/LongSparseArray.java @@ -315,6 +315,7 @@ public class LongSparseArray implements Cloneable { * and that multiple keys can map to the same value and this will * find only one of them. *

Note also that this method uses {@code equals} unlike {@code indexOfValue}. + * @hide */ public int indexOfValueByValue(E value) { if (mGarbage) { diff --git a/core/java/android/util/SparseArray.java b/core/java/android/util/SparseArray.java index c76666069d18d..b3400ef538b89 100644 --- a/core/java/android/util/SparseArray.java +++ b/core/java/android/util/SparseArray.java @@ -363,6 +363,7 @@ public class SparseArray implements Cloneable { * and that multiple keys can map to the same value and this will * find only one of them. *

Note also that this method uses {@code equals} unlike {@code indexOfValue}. + * @hide */ public int indexOfValueByValue(E value) { if (mGarbage) {