| Index: webrtc/examples/androidapp/src/org/appspot/apprtc/CallFragment.java
|
| diff --git a/webrtc/examples/androidapp/src/org/appspot/apprtc/CallFragment.java b/webrtc/examples/androidapp/src/org/appspot/apprtc/CallFragment.java
|
| index 04b563949d96817a38dc6add9d195445d77340f5..6523ffa443074f6f124da0eada037e703055aff4 100644
|
| --- a/webrtc/examples/androidapp/src/org/appspot/apprtc/CallFragment.java
|
| +++ b/webrtc/examples/androidapp/src/org/appspot/apprtc/CallFragment.java
|
| @@ -31,6 +31,7 @@ public class CallFragment extends Fragment {
|
| private ImageButton disconnectButton;
|
| private ImageButton cameraSwitchButton;
|
| private ImageButton videoScalingButton;
|
| + private ImageButton toggleMuteButton;
|
| private TextView captureFormatText;
|
| private SeekBar captureFormatSlider;
|
| private OnCallEvents callEvents;
|
| @@ -45,6 +46,7 @@ public class CallFragment extends Fragment {
|
| public void onCameraSwitch();
|
| public void onVideoScalingSwitch(ScalingType scalingType);
|
| public void onCaptureFormatChange(int width, int height, int framerate);
|
| + public boolean onToggleMic();
|
| }
|
|
|
| @Override
|
| @@ -62,6 +64,8 @@ public class CallFragment extends Fragment {
|
| (ImageButton) controlView.findViewById(R.id.button_call_switch_camera);
|
| videoScalingButton =
|
| (ImageButton) controlView.findViewById(R.id.button_call_scaling_mode);
|
| + toggleMuteButton =
|
| + (ImageButton) controlView.findViewById(R.id.button_call_toggle_mic);
|
| captureFormatText =
|
| (TextView) controlView.findViewById(R.id.capture_format_text_call);
|
| captureFormatSlider =
|
| @@ -99,6 +103,14 @@ public class CallFragment extends Fragment {
|
| });
|
| scalingType = ScalingType.SCALE_ASPECT_FILL;
|
|
|
| + toggleMuteButton.setOnClickListener(new View.OnClickListener() {
|
| + @Override
|
| + public void onClick(View view) {
|
| + boolean enabled = callEvents.onToggleMic();
|
| + toggleMuteButton.setAlpha(enabled ? 1.0f : 0.3f);
|
| + }
|
| + });
|
| +
|
| return controlView;
|
| }
|
|
|
|
|