Loading telephony/java/com/android/internal/telephony/CallerInfo.java +7 −0 Original line number Diff line number Diff line Loading @@ -70,6 +70,7 @@ public class CallerInfo { */ public String name; public String phoneNumber; public String nomalizedNumber; public String cnapName; public int numberPresentation; Loading Loading @@ -150,6 +151,12 @@ public class CallerInfo { info.phoneNumber = cursor.getString(columnIndex); } // Look for the normalized number columnIndex = cursor.getColumnIndex(PhoneLookup.NORMALIZED_NUMBER); if (columnIndex != -1) { info.nomalizedNumber = cursor.getString(columnIndex); } // Look for the label/type combo columnIndex = cursor.getColumnIndex(PhoneLookup.LABEL); if (columnIndex != -1) { Loading telephony/java/com/android/internal/telephony/CallerInfoAsyncQuery.java +6 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.content.AsyncQueryHandler; import android.content.Context; import android.database.Cursor; import android.database.SQLException; import android.location.CountryDetector; import android.net.Uri; import android.os.Handler; import android.os.Looper; Loading Loading @@ -229,7 +230,11 @@ public class CallerInfoAsyncQuery { mCallerInfo = CallerInfo.getCallerInfo(mQueryContext, mQueryUri, cursor); // Use the number entered by the user for display. if (!TextUtils.isEmpty(cw.number)) { mCallerInfo.phoneNumber = PhoneNumberUtils.formatNumber(cw.number); CountryDetector detector = (CountryDetector) mQueryContext.getSystemService( Context.COUNTRY_DETECTOR); mCallerInfo.phoneNumber = PhoneNumberUtils.formatNumber(cw.number, mCallerInfo.nomalizedNumber, detector.detectCountry().getCountryIso()); } } Loading Loading
telephony/java/com/android/internal/telephony/CallerInfo.java +7 −0 Original line number Diff line number Diff line Loading @@ -70,6 +70,7 @@ public class CallerInfo { */ public String name; public String phoneNumber; public String nomalizedNumber; public String cnapName; public int numberPresentation; Loading Loading @@ -150,6 +151,12 @@ public class CallerInfo { info.phoneNumber = cursor.getString(columnIndex); } // Look for the normalized number columnIndex = cursor.getColumnIndex(PhoneLookup.NORMALIZED_NUMBER); if (columnIndex != -1) { info.nomalizedNumber = cursor.getString(columnIndex); } // Look for the label/type combo columnIndex = cursor.getColumnIndex(PhoneLookup.LABEL); if (columnIndex != -1) { Loading
telephony/java/com/android/internal/telephony/CallerInfoAsyncQuery.java +6 −1 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.content.AsyncQueryHandler; import android.content.Context; import android.database.Cursor; import android.database.SQLException; import android.location.CountryDetector; import android.net.Uri; import android.os.Handler; import android.os.Looper; Loading Loading @@ -229,7 +230,11 @@ public class CallerInfoAsyncQuery { mCallerInfo = CallerInfo.getCallerInfo(mQueryContext, mQueryUri, cursor); // Use the number entered by the user for display. if (!TextUtils.isEmpty(cw.number)) { mCallerInfo.phoneNumber = PhoneNumberUtils.formatNumber(cw.number); CountryDetector detector = (CountryDetector) mQueryContext.getSystemService( Context.COUNTRY_DETECTOR); mCallerInfo.phoneNumber = PhoneNumberUtils.formatNumber(cw.number, mCallerInfo.nomalizedNumber, detector.detectCountry().getCountryIso()); } } Loading