diff options
| author | 2019-05-05 00:34:55 -0700 | |
|---|---|---|
| committer | 2019-05-07 17:51:21 -0700 | |
| commit | 8a246a2bce09dccccddd7c734f4f5d96ee57ea14 (patch) | |
| tree | 95b35d41969379825770021fa1581db37df5a5fd /location/java/com | |
| parent | 4f4df1d7555621fe0e89daa1a4dc97f7ee0f7bea (diff) | |
User notification of NFW emergency requests similar to IGnssNi.hal
Fixes: 130892418
Test: Manual
Change-Id: Ie505f4c08ffbabfaba3a072c5e14cf8a732c6860
Diffstat (limited to 'location/java/com')
| -rw-r--r-- | location/java/com/android/internal/location/GpsNetInitiatedHandler.java | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/location/java/com/android/internal/location/GpsNetInitiatedHandler.java b/location/java/com/android/internal/location/GpsNetInitiatedHandler.java index b4be21987cf7..04e7bab0542b 100644 --- a/location/java/com/android/internal/location/GpsNetInitiatedHandler.java +++ b/location/java/com/android/internal/location/GpsNetInitiatedHandler.java @@ -357,8 +357,10 @@ public class GpsNetInitiatedHandler { } } - // Sets the NI notification. - private synchronized void setNiNotification(GpsNiNotification notif) { + /** + * Posts a notification in the status bar using the contents in {@code notif} object. + */ + public synchronized void setNiNotification(GpsNiNotification notif) { NotificationManager notificationManager = (NotificationManager) mContext .getSystemService(Context.NOTIFICATION_SERVICE); if (notificationManager == null) { @@ -539,14 +541,14 @@ public class GpsNetInitiatedHandler { */ static private String decodeString(String original, boolean isHex, int coding) { + if (coding == GPS_ENC_NONE) { + return original; + } + String decoded = original; byte[] input = stringToByteArray(original, isHex); switch (coding) { - case GPS_ENC_NONE: - decoded = original; - break; - case GPS_ENC_SUPL_GSM_DEFAULT: decoded = decodeGSMPackedString(input); break; |