Merge "Add flag to disable bluetooth call quality notifications" am: 9eda6aa79a am: 2498587b3a am: b5a2e049c3
Original change: https://android-review.googlesource.com/c/platform/packages/services/Telephony/+/1610276
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: If23a255e6ebb2e248ee7cf7816f2e5abd65ba533
diff --git a/res/values/config.xml b/res/values/config.xml
index 7ce141e..08a84f8 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -310,4 +310,7 @@
<!-- Whether or not to support device to device communication using RTP and DTMF communication
transports. -->
<bool name="config_use_device_to_device_communication">false</bool>
+
+ <!-- Whether or not to show notifications for when bluetooth connection is bad during a call -->
+ <bool name="enable_bluetooth_call_quality_notification">false</bool>
</resources>
diff --git a/src/com/android/services/telephony/CallQualityManager.java b/src/com/android/services/telephony/CallQualityManager.java
index 0e32ddc..c8785d6 100644
--- a/src/com/android/services/telephony/CallQualityManager.java
+++ b/src/com/android/services/telephony/CallQualityManager.java
@@ -90,6 +90,11 @@
}
private void popUpNotification(String title, CharSequence details) {
+ if (!mContext.getResources().getBoolean(
+ R.bool.enable_bluetooth_call_quality_notification)) {
+ Log.d(TAG, "Bluetooth call quality notifications not enabled.");
+ return;
+ }
int iconId = android.R.drawable.stat_notify_error;
Notification notification = new Notification.Builder(mContext)