summaryrefslogtreecommitdiff
path: root/repackaged/geocoder/src/com/android/i18n/phonenumbers
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2018-11-23 16:01:32 +0000
committerPaul Duffin <paulduffin@google.com>2018-11-27 14:35:45 +0000
commit5acd1295169a85eabeef9af83a4c38b521b70608 (patch)
treebd2fb389af023f80012d7d29908ba6ae7786e357 /repackaged/geocoder/src/com/android/i18n/phonenumbers
parente8874970e9dd490105aba5f0ecb7374316329c1f (diff)
downloadlibphonenumber-5acd1295169a85eabeef9af83a4c38b521b70608.tar.gz
Annotate repackaged API with @UnsupportedAppUsage
Adds @UnsupportedAppUsage annotations to the parts of libphonenumber that are in the hidden API. Allows the libphonenumber entries to be removed from the frameworks/base/config/hiddenapi-light-greylist.txt. The build rule had to be changed to depend (by default) on the core.platform.api.stubs as UnsupportedAppUsage annotation is not present in the core_current API. This was tested by making and then manually checking that the generated out/target/common/obj/PACKAGING/hiddenapi-light-greylist.txt was the same (after sorting) before and after this change. Bug: 117818301 Test: see above Change-Id: Ic8c6a424a083b1a6c567126b93f49ce10f4e5f93
Diffstat (limited to 'repackaged/geocoder/src/com/android/i18n/phonenumbers')
-rw-r--r--repackaged/geocoder/src/com/android/i18n/phonenumbers/geocoding/PhoneNumberOfflineGeocoder.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/repackaged/geocoder/src/com/android/i18n/phonenumbers/geocoding/PhoneNumberOfflineGeocoder.java b/repackaged/geocoder/src/com/android/i18n/phonenumbers/geocoding/PhoneNumberOfflineGeocoder.java
index 4070f802..55d41c60 100644
--- a/repackaged/geocoder/src/com/android/i18n/phonenumbers/geocoding/PhoneNumberOfflineGeocoder.java
+++ b/repackaged/geocoder/src/com/android/i18n/phonenumbers/geocoding/PhoneNumberOfflineGeocoder.java
@@ -54,6 +54,7 @@ public class PhoneNumberOfflineGeocoder {
*
* @return a {@link PhoneNumberOfflineGeocoder} instance
*/
+ @dalvik.annotation.compat.UnsupportedAppUsage
public static synchronized PhoneNumberOfflineGeocoder getInstance() {
if (instance == null) {
instance = new PhoneNumberOfflineGeocoder(MAPPING_DATA_DIRECTORY);
@@ -187,6 +188,7 @@ public class PhoneNumberOfflineGeocoder {
* @return a text description for the given language code for the given phone number, or empty
* string if the number passed in is invalid or could belong to multiple countries
*/
+ @dalvik.annotation.compat.UnsupportedAppUsage
public String getDescriptionForNumber(PhoneNumber number, Locale languageCode) {
PhoneNumberType numberType = phoneUtil.getNumberType(number);
if (numberType == PhoneNumberType.UNKNOWN) {