Loading android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java +5 −2 Original line number Diff line number Diff line Loading @@ -1709,9 +1709,12 @@ public class HeadsetStateMachine extends StateMachine { String operatorName = null; ServiceState serviceState = mSystemInterface.getHeadsetPhoneState().getServiceState(); if (serviceState != null) { operatorName = serviceState.getOperatorAlpha(); operatorName = serviceState.getOperatorAlphaLong(); if (TextUtils.isEmpty(operatorName)) { operatorName = serviceState.getOperatorAlphaShort(); } if (mSystemInterface.isInCall() || operatorName == null || operatorName.equals("")) { } if (mSystemInterface.isInCall() || TextUtils.isEmpty(operatorName)) { // Get operator name suggested by Telecom operatorName = mSystemInterface.getNetworkOperator(); } Loading android/app/src/com/android/bluetooth/mapclient/MapClientContent.java +5 −2 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import android.provider.Telephony.Threads; import android.telephony.PhoneNumberUtils; import android.telephony.SubscriptionInfo; import android.telephony.SubscriptionManager; import android.telephony.TelephonyManager; import android.util.ArraySet; import android.util.Log; Loading Loading @@ -65,6 +66,7 @@ class MapClientContent { String mPhoneNumber = null; private int mSubscriptionId = SubscriptionManager.INVALID_SUBSCRIPTION_ID; private SubscriptionManager mSubscriptionManager; private TelephonyManager mTelephonyManager; private HashMap<String, Uri> mHandleToUriMap = new HashMap<>(); private HashMap<Uri, MessageStatus> mUriToHandleMap = new HashMap<>(); Loading Loading @@ -95,6 +97,7 @@ class MapClientContent { mResolver = mContext.getContentResolver(); mSubscriptionManager = mContext.getSystemService(SubscriptionManager.class); mTelephonyManager = mContext.getSystemService(TelephonyManager.class); mSubscriptionManager .addSubscriptionInfoRecord(mDevice.getAddress(), mDevice.getName(), 0, SubscriptionManager.SUBSCRIPTION_TYPE_REMOTE_SIM); Loading Loading @@ -457,8 +460,8 @@ class MapClientContent { if (messageContacts.isEmpty()) { return Telephony.Threads.COMMON_THREAD; } else if (messageContacts.size() > 1) { messageContacts.removeIf(number -> (PhoneNumberUtils.compareLoosely(number, mPhoneNumber))); messageContacts.removeIf(number -> (PhoneNumberUtils.areSamePhoneNumber(number, mPhoneNumber, mTelephonyManager.getNetworkCountryIso()))); } logV("Contacts = " + messageContacts.toString()); Loading android/app/src/com/android/bluetooth/util/GsmAlphabet.java +10 −10 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ package com.android.bluetooth.util; import android.content.res.Resources; import android.telephony.Rlog; import android.util.Log; import android.util.SparseIntArray; import com.android.internal.R; Loading Loading @@ -145,11 +145,11 @@ public class GsmAlphabet { StringBuilder ret = new StringBuilder(lengthSeptets); if (languageTable < 0 || languageTable > sLanguageTables.length) { Rlog.w(TAG, "unknown language table " + languageTable + ", using default"); Log.w(TAG, "unknown language table " + languageTable + ", using default"); languageTable = 0; } if (shiftTable < 0 || shiftTable > sLanguageShiftTables.length) { Rlog.w(TAG, "unknown single shift table " + shiftTable + ", using default"); Log.w(TAG, "unknown single shift table " + shiftTable + ", using default"); shiftTable = 0; } Loading @@ -159,11 +159,11 @@ public class GsmAlphabet { String shiftTableToChar = sLanguageShiftTables[shiftTable]; if (languageTableToChar.isEmpty()) { Rlog.w(TAG, "no language table for code " + languageTable + ", using default"); Log.w(TAG, "no language table for code " + languageTable + ", using default"); languageTableToChar = sLanguageTables[0]; } if (shiftTableToChar.isEmpty()) { Rlog.w(TAG, "no single shift table for code " + shiftTable + ", using default"); Log.w(TAG, "no single shift table for code " + shiftTable + ", using default"); shiftTableToChar = sLanguageShiftTables[0]; } Loading Loading @@ -203,7 +203,7 @@ public class GsmAlphabet { } } } catch (RuntimeException ex) { Rlog.e(TAG, "Error GSM 7 bit packed: ", ex); Log.e(TAG, "Error GSM 7 bit packed: " + '\n' + Log.getStackTraceString(ex)); return null; } Loading Loading @@ -293,7 +293,7 @@ public class GsmAlphabet { for (int i = 0; i < sz; i++) { char c = s.charAt(i); if (c == GSM_EXTENDED_ESCAPE) { Rlog.w(TAG, "countGsmSeptets() string contains Escape character, skipping."); Log.w(TAG, "countGsmSeptets() string contains Escape character, skipping."); continue; } if (charToLanguageTable.get(c, -1) != -1) { Loading Loading @@ -676,7 +676,7 @@ public class GsmAlphabet { int numTables = sLanguageTables.length; int numShiftTables = sLanguageShiftTables.length; if (numTables != numShiftTables) { Rlog.e(TAG, "Error: language tables array length " + numTables Log.e(TAG, "Error: language tables array length " + numTables + " != shift tables array length " + numShiftTables); } Loading @@ -686,7 +686,7 @@ public class GsmAlphabet { int tableLen = table.length(); if (tableLen != 0 && tableLen != 128) { Rlog.e(TAG, "Error: language tables index " + i Log.e(TAG, "Error: language tables index " + i + " length " + tableLen + " (expected 128 or 0)"); } Loading @@ -704,7 +704,7 @@ public class GsmAlphabet { int shiftTableLen = shiftTable.length(); if (shiftTableLen != 0 && shiftTableLen != 128) { Rlog.e(TAG, "Error: language shift tables index " + i Log.e(TAG, "Error: language shift tables index " + i + " length " + shiftTableLen + " (expected 128 or 0)"); } Loading Loading
android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java +5 −2 Original line number Diff line number Diff line Loading @@ -1709,9 +1709,12 @@ public class HeadsetStateMachine extends StateMachine { String operatorName = null; ServiceState serviceState = mSystemInterface.getHeadsetPhoneState().getServiceState(); if (serviceState != null) { operatorName = serviceState.getOperatorAlpha(); operatorName = serviceState.getOperatorAlphaLong(); if (TextUtils.isEmpty(operatorName)) { operatorName = serviceState.getOperatorAlphaShort(); } if (mSystemInterface.isInCall() || operatorName == null || operatorName.equals("")) { } if (mSystemInterface.isInCall() || TextUtils.isEmpty(operatorName)) { // Get operator name suggested by Telecom operatorName = mSystemInterface.getNetworkOperator(); } Loading
android/app/src/com/android/bluetooth/mapclient/MapClientContent.java +5 −2 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import android.provider.Telephony.Threads; import android.telephony.PhoneNumberUtils; import android.telephony.SubscriptionInfo; import android.telephony.SubscriptionManager; import android.telephony.TelephonyManager; import android.util.ArraySet; import android.util.Log; Loading Loading @@ -65,6 +66,7 @@ class MapClientContent { String mPhoneNumber = null; private int mSubscriptionId = SubscriptionManager.INVALID_SUBSCRIPTION_ID; private SubscriptionManager mSubscriptionManager; private TelephonyManager mTelephonyManager; private HashMap<String, Uri> mHandleToUriMap = new HashMap<>(); private HashMap<Uri, MessageStatus> mUriToHandleMap = new HashMap<>(); Loading Loading @@ -95,6 +97,7 @@ class MapClientContent { mResolver = mContext.getContentResolver(); mSubscriptionManager = mContext.getSystemService(SubscriptionManager.class); mTelephonyManager = mContext.getSystemService(TelephonyManager.class); mSubscriptionManager .addSubscriptionInfoRecord(mDevice.getAddress(), mDevice.getName(), 0, SubscriptionManager.SUBSCRIPTION_TYPE_REMOTE_SIM); Loading Loading @@ -457,8 +460,8 @@ class MapClientContent { if (messageContacts.isEmpty()) { return Telephony.Threads.COMMON_THREAD; } else if (messageContacts.size() > 1) { messageContacts.removeIf(number -> (PhoneNumberUtils.compareLoosely(number, mPhoneNumber))); messageContacts.removeIf(number -> (PhoneNumberUtils.areSamePhoneNumber(number, mPhoneNumber, mTelephonyManager.getNetworkCountryIso()))); } logV("Contacts = " + messageContacts.toString()); Loading
android/app/src/com/android/bluetooth/util/GsmAlphabet.java +10 −10 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ package com.android.bluetooth.util; import android.content.res.Resources; import android.telephony.Rlog; import android.util.Log; import android.util.SparseIntArray; import com.android.internal.R; Loading Loading @@ -145,11 +145,11 @@ public class GsmAlphabet { StringBuilder ret = new StringBuilder(lengthSeptets); if (languageTable < 0 || languageTable > sLanguageTables.length) { Rlog.w(TAG, "unknown language table " + languageTable + ", using default"); Log.w(TAG, "unknown language table " + languageTable + ", using default"); languageTable = 0; } if (shiftTable < 0 || shiftTable > sLanguageShiftTables.length) { Rlog.w(TAG, "unknown single shift table " + shiftTable + ", using default"); Log.w(TAG, "unknown single shift table " + shiftTable + ", using default"); shiftTable = 0; } Loading @@ -159,11 +159,11 @@ public class GsmAlphabet { String shiftTableToChar = sLanguageShiftTables[shiftTable]; if (languageTableToChar.isEmpty()) { Rlog.w(TAG, "no language table for code " + languageTable + ", using default"); Log.w(TAG, "no language table for code " + languageTable + ", using default"); languageTableToChar = sLanguageTables[0]; } if (shiftTableToChar.isEmpty()) { Rlog.w(TAG, "no single shift table for code " + shiftTable + ", using default"); Log.w(TAG, "no single shift table for code " + shiftTable + ", using default"); shiftTableToChar = sLanguageShiftTables[0]; } Loading Loading @@ -203,7 +203,7 @@ public class GsmAlphabet { } } } catch (RuntimeException ex) { Rlog.e(TAG, "Error GSM 7 bit packed: ", ex); Log.e(TAG, "Error GSM 7 bit packed: " + '\n' + Log.getStackTraceString(ex)); return null; } Loading Loading @@ -293,7 +293,7 @@ public class GsmAlphabet { for (int i = 0; i < sz; i++) { char c = s.charAt(i); if (c == GSM_EXTENDED_ESCAPE) { Rlog.w(TAG, "countGsmSeptets() string contains Escape character, skipping."); Log.w(TAG, "countGsmSeptets() string contains Escape character, skipping."); continue; } if (charToLanguageTable.get(c, -1) != -1) { Loading Loading @@ -676,7 +676,7 @@ public class GsmAlphabet { int numTables = sLanguageTables.length; int numShiftTables = sLanguageShiftTables.length; if (numTables != numShiftTables) { Rlog.e(TAG, "Error: language tables array length " + numTables Log.e(TAG, "Error: language tables array length " + numTables + " != shift tables array length " + numShiftTables); } Loading @@ -686,7 +686,7 @@ public class GsmAlphabet { int tableLen = table.length(); if (tableLen != 0 && tableLen != 128) { Rlog.e(TAG, "Error: language tables index " + i Log.e(TAG, "Error: language tables index " + i + " length " + tableLen + " (expected 128 or 0)"); } Loading @@ -704,7 +704,7 @@ public class GsmAlphabet { int shiftTableLen = shiftTable.length(); if (shiftTableLen != 0 && shiftTableLen != 128) { Rlog.e(TAG, "Error: language shift tables index " + i Log.e(TAG, "Error: language shift tables index " + i + " length " + shiftTableLen + " (expected 128 or 0)"); } Loading