summaryrefslogtreecommitdiff
path: root/location
diff options
context:
space:
mode:
authorTaesu Lee <taesu82.lee@samsung.com>2020-10-07 14:55:25 +0900
committerShuo Qian <shuoq@google.com>2020-10-14 02:31:14 +0000
commitb40a55ccc98d2d1aa14e2d89d8926217880b987e (patch)
treeb531a084df443e18aeb4bfa220905f780d08f6ad /location
parentb65c13a7b9fef2ee2e3e707177d30e412ce99b85 (diff)
Use TelephonyManager#isEmergencyNumber() instead
Replace deprecated PhoneNumberUtils#isLocalEmergencyNumber() and isEmergencyNumber() with TelephonyManager#isEmergencyNumber(). Test: Build Bug: 132703886 Signed-off-by: Taesu Lee <taesu82.lee@samsung.com> Change-Id: I232d7f7d23efd963b6d30938f0fa304c90fca8a8 Merged-In: I232d7f7d23efd963b6d30938f0fa304c90fca8a8
Diffstat (limited to 'location')
-rw-r--r--location/java/com/android/internal/location/GpsNetInitiatedHandler.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/location/java/com/android/internal/location/GpsNetInitiatedHandler.java b/location/java/com/android/internal/location/GpsNetInitiatedHandler.java
index 67a040dba3e7..139474c1c01d 100644
--- a/location/java/com/android/internal/location/GpsNetInitiatedHandler.java
+++ b/location/java/com/android/internal/location/GpsNetInitiatedHandler.java
@@ -28,7 +28,6 @@ import android.location.LocationManager;
import android.os.RemoteException;
import android.os.SystemClock;
import android.os.UserHandle;
-import android.telephony.PhoneNumberUtils;
import android.telephony.PhoneStateListener;
import android.telephony.TelephonyManager;
import android.util.Log;
@@ -161,7 +160,7 @@ public class GpsNetInitiatedHandler {
be set to true when the phone is having emergency call, and then will
be set to false by mPhoneStateListener when the emergency call ends.
*/
- mIsInEmergencyCall = PhoneNumberUtils.isEmergencyNumber(phoneNumber);
+ mIsInEmergencyCall = mTelephonyManager.isEmergencyNumber(phoneNumber);
if (DEBUG) Log.v(TAG, "ACTION_NEW_OUTGOING_CALL - " + getInEmergency());
} else if (action.equals(LocationManager.MODE_CHANGED_ACTION)) {
updateLocationMode();