From 1420a22d5dc0d87f8634980b729a3511e42b6493 Mon Sep 17 00:00:00 2001 From: wangqi Date: Thu, 21 Sep 2017 09:37:40 -0700 Subject: Better handling country iso when getting geo location of phone number. 1. Use existing country iso info instead of guessing current country iso from sim and locale for blocked number. 2. Use country iso of current sim instead of default sim for incall location info. This fixes bug in multi sim device when default sim is out of service and making call with the other sim. Bug: 65399976 Test: manual PiperOrigin-RevId: 169554641 Change-Id: I416d7e2d6bc3c872bfec3eda4005a5a1684f0e40 --- java/com/android/incallui/CallerInfoAsyncQuery.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'java/com/android/incallui/CallerInfoAsyncQuery.java') diff --git a/java/com/android/incallui/CallerInfoAsyncQuery.java b/java/com/android/incallui/CallerInfoAsyncQuery.java index 858d0f4b7..86b1b7f22 100644 --- a/java/com/android/incallui/CallerInfoAsyncQuery.java +++ b/java/com/android/incallui/CallerInfoAsyncQuery.java @@ -162,6 +162,7 @@ public class CallerInfoAsyncQuery { cw.listener = listener; cw.cookie = cookie; cw.number = info.phoneNumber; + cw.countryIso = info.countryIso; // check to see if these are recognized numbers, and use shortcuts if we can. if (PhoneNumberUtils.isLocalEmergencyNumber(context, info.phoneNumber)) { @@ -268,6 +269,7 @@ public class CallerInfoAsyncQuery { public Object cookie; public int event; public String number; + public String countryIso; } /* Directory lookup related code - END */ @@ -493,6 +495,7 @@ public class CallerInfoAsyncQuery { mCallerInfo = newCallerInfo; Log.d(this, "#####async contact look up with numeric username" + mCallerInfo); } + mCallerInfo.countryIso = cw.countryIso; // Final step: look up the geocoded description. if (ENABLE_UNKNOWN_NUMBER_GEO_DESCRIPTION) { -- cgit v1.2.3