summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--res/layout/primary_call_info.xml2
-rw-r--r--res/values/config.xml1
-rw-r--r--src/com/android/incallui/CallCardFragment.java22
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.
<resources>
<!-- Dismiss the Keyguard screen when there is active call. -->
<bool name="config_incall_dismiss_keyguard">true</bool>
+ <bool name="volume_boost_enabled">false</bool>
</resources>
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<CallCardPresenter, CallCardPr
private AudioManager mAudioManager;
private Toast mVBNotify;
private int mVBToastPosition;
+ private boolean mVBEnabled;
// Secondary caller info
private ViewStub mSecondaryCallInfo;
@@ -181,6 +183,11 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
.getSystemService(Context.AUDIO_SERVICE);
}
+ @Override
+ public void onAttach(Activity activity) {
+ super.onAttach(activity);
+ mVBEnabled = activity.getResources().getBoolean(R.bool.volume_boost_enabled);
+ }
@Override
public void onActivityCreated(Bundle savedInstanceState) {
@@ -230,10 +237,13 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
transition.enableTransitionType(LayoutTransition.CHANGING);
transition.setAnimateParentHierarchy(false);
transition.setDuration(200);
-
- mVBButton = (Button) view.findViewById(R.id.volumeBoost);
- if (null != mVBButton) {
- mVBButton.setOnClickListener(mVBListener);
+
+ if (mVBEnabled) {
+ mVBButton = (Button) view.findViewById(R.id.volumeBoost);
+ if (null != mVBButton) {
+ mVBButton.setOnClickListener(mVBListener);
+ mVBButton.setVisibility(View.INVISIBLE);
+ }
}
}
@@ -400,7 +410,9 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
// States other than disconnected not yet supported
callStateLabel = getCallStateLabelFromState(state, cause, isWaitingForRemoteSide);
- updateVBbyCall(state);
+ if (mVBEnabled) {
+ updateVBbyCall(state);
+ }
Log.v(this, "setCallState " + callStateLabel);
Log.v(this, "DisconnectCause " + cause);