From 751e55114ccdd19e462aa6771b5a0b0ec3ce9c68 Mon Sep 17 00:00:00 2001 From: Artur Satayev Date: Fri, 15 Nov 2019 19:12:49 +0000 Subject: Add @UnsupportedAppUsage annotations for greylist. go/cleanup-greylist-txt These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code. This is partial merge of aosp/Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09. Telephony greylist cleanup has been done separately. Note that annotations outside of frameworks/base/ have been merged from AOSP. Bug: 137350495 Test: m Exempt-From-Owner-Approval: merge Change-Id: I015c466e8b69cc0fed5e9d394ba865aad11d8ba6 --- .../android/internal/location/GpsNetInitiatedHandler.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'location/java') diff --git a/location/java/com/android/internal/location/GpsNetInitiatedHandler.java b/location/java/com/android/internal/location/GpsNetInitiatedHandler.java index e8905143eb37..f9b2fe057995 100644 --- a/location/java/com/android/internal/location/GpsNetInitiatedHandler.java +++ b/location/java/com/android/internal/location/GpsNetInitiatedHandler.java @@ -37,6 +37,8 @@ import com.android.internal.R; import com.android.internal.notification.SystemNotificationChannels; import com.android.internal.telephony.GsmAlphabet; +import dalvik.annotation.compat.UnsupportedAppUsage; + import java.io.UnsupportedEncodingException; import java.util.concurrent.TimeUnit; @@ -115,6 +117,7 @@ public class GpsNetInitiatedHandler { private final INetInitiatedListener mNetInitiatedListener; // Set to true if string from HAL is encoded as Hex, e.g., "3F0039" + @UnsupportedAppUsage static private boolean mIsHexInput = true; // End time of emergency call, and extension, if set @@ -123,6 +126,9 @@ public class GpsNetInitiatedHandler { public static class GpsNiNotification { + @android.annotation.UnsupportedAppUsage + public GpsNiNotification() { + } public int notificationId; public int niType; public boolean needNotify; @@ -130,9 +136,13 @@ public class GpsNetInitiatedHandler { public boolean privacyOverride; public int timeout; public int defaultResponse; + @UnsupportedAppUsage public String requestorId; + @UnsupportedAppUsage public String text; + @UnsupportedAppUsage public int requestorIdEncoding; + @UnsupportedAppUsage public int textEncoding; }; @@ -258,6 +268,7 @@ public class GpsNetInitiatedHandler { } // Handles NI events from HAL + @UnsupportedAppUsage public void handleNiNotification(GpsNiNotification notif) { if (DEBUG) Log.d(TAG, "in handleNiNotification () :" + " notificationId: " + notif.notificationId @@ -539,6 +550,7 @@ public class GpsNetInitiatedHandler { * set to -1, and isHex can be false. * @return the decoded string */ + @UnsupportedAppUsage static private String decodeString(String original, boolean isHex, int coding) { if (coding == GPS_ENC_NONE || coding == GPS_ENC_UNKNOWN) { -- cgit v1.2.3-59-g8ed1b