am c9a157d7: am 41314f62: am 82d7f08d: Merge "Migrate noise suppression check to use CarrierConfigManager." into mnc-dev
* commit 'c9a157d7fee3090a3bdd7e23a9a4b6618f2e57eb':
Migrate noise suppression check to use CarrierConfigManager.
diff --git a/src/com/android/phone/PhoneUtils.java b/src/com/android/phone/PhoneUtils.java
index a619701..e1f8036 100644
--- a/src/com/android/phone/PhoneUtils.java
+++ b/src/com/android/phone/PhoneUtils.java
@@ -30,11 +30,13 @@
import android.net.Uri;
import android.os.Handler;
import android.os.Message;
+import android.os.PersistableBundle;
import android.os.RemoteException;
import android.os.SystemProperties;
import android.telecom.PhoneAccount;
import android.telecom.PhoneAccountHandle;
import android.telecom.VideoProfile;
+import android.telephony.CarrierConfigManager;
import android.telephony.PhoneNumberUtils;
import android.telephony.SubscriptionManager;
import android.text.TextUtils;
@@ -1828,7 +1830,8 @@
if (DBG) log("turnOnNoiseSuppression: " + flag);
AudioManager audioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);
- if (!context.getResources().getBoolean(R.bool.has_in_call_noise_suppression)) {
+ PersistableBundle b = PhoneGlobals.getInstance().getCarrierConfig();
+ if (!b.getBoolean(CarrierConfigManager.KEY_HAS_IN_CALL_NOISE_SUPPRESSION_BOOL)) {
return;
}
@@ -1850,7 +1853,8 @@
static void restoreNoiseSuppression(Context context) {
if (DBG) log("restoreNoiseSuppression, restoring to: " + sIsNoiseSuppressionEnabled);
- if (!context.getResources().getBoolean(R.bool.has_in_call_noise_suppression)) {
+ PersistableBundle b = PhoneGlobals.getInstance().getCarrierConfig();
+ if (!b.getBoolean(CarrierConfigManager.KEY_HAS_IN_CALL_NOISE_SUPPRESSION_BOOL)) {
return;
}
@@ -1862,7 +1866,8 @@
static boolean isNoiseSuppressionOn(Context context) {
- if (!context.getResources().getBoolean(R.bool.has_in_call_noise_suppression)) {
+ PersistableBundle b = PhoneGlobals.getInstance().getCarrierConfig();
+ if (!b.getBoolean(CarrierConfigManager.KEY_HAS_IN_CALL_NOISE_SUPPRESSION_BOOL)) {
return false;
}