From 1df0439bb5cd3a2987719015848b2c95d59361c8 Mon Sep 17 00:00:00 2001 From: emancebo Date: Tue, 2 Sep 2014 15:21:49 -0700 Subject: InCallUI CMCC: disable volume boost by default The volume boost button in the InCall UI attempts to boost the volume by setting parameters on the AudioManager. This only works if there is hardware support for the volume_boost=on parameter. If enabling volume boost with setParameters doesn't work, then getParameters will not surface the parameter, which creates a confusing user experience because we will report "volume boost disabled" whenever the user presses the button (when the expected behavior is to toggle it). This should really only be enabled if it is supported, so this disables it by default. Change-Id: I0b0458f63a9d1524c887c5a8d45cff937aceacf1 --- res/layout/primary_call_info.xml | 2 +- res/values/config.xml | 1 + src/com/android/incallui/CallCardFragment.java | 22 +++++++++++++++++----- 3 files changed, 19 insertions(+), 6 deletions(-) diff --git a/res/layout/primary_call_info.xml b/res/layout/primary_call_info.xml index 5dfd734f..4c442b08 100644 --- a/res/layout/primary_call_info.xml +++ b/res/layout/primary_call_info.xml @@ -146,7 +146,7 @@ android:layout_below="@id/primary_call_banner" android:layout_width="80dp" android:layout_height="80dp" - android:visibility="invisible" + android:visibility="gone" android:soundEffectsEnabled="false" android:background="@drawable/volume_in_boost_nor"/> diff --git a/res/values/config.xml b/res/values/config.xml index 434a0c3d..8ec084d4 100644 --- a/res/values/config.xml +++ b/res/values/config.xml @@ -28,4 +28,5 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. true + false diff --git a/src/com/android/incallui/CallCardFragment.java b/src/com/android/incallui/CallCardFragment.java index ce8173a5..d2ae19c6 100644 --- a/src/com/android/incallui/CallCardFragment.java +++ b/src/com/android/incallui/CallCardFragment.java @@ -21,6 +21,7 @@ package com.android.incallui; import android.animation.LayoutTransition; +import android.app.Activity; import android.content.BroadcastReceiver; import android.content.ContentResolver; import android.content.Context; @@ -76,6 +77,7 @@ public class CallCardFragment extends BaseFragment