diff options
author | Camera Software Integration <camswint@localhost> | 2015-10-30 10:13:25 -0700 |
---|---|---|
committer | Camera Software Integration <camswint@localhost> | 2015-12-22 16:25:32 +0530 |
commit | 488679fccee078348a5fd79d701fdec365199051 (patch) | |
tree | c9b5b7319bdab7e86952f5b0341896c141d40808 /src/com/android/camera/VideoUI.java | |
parent | 956aaa62fec3b4379103515b02eb5459b3fad92f (diff) | |
download | android_packages_apps_Snap-488679fccee078348a5fd79d701fdec365199051.tar.gz android_packages_apps_Snap-488679fccee078348a5fd79d701fdec365199051.tar.bz2 android_packages_apps_Snap-488679fccee078348a5fd79d701fdec365199051.zip |
SnapdragonCamera: Introducing mute button
Introducing audio mute button on video recording
Change-Id: I69ff6fe97c4b8d76a890b5e41667dab534d69ba8
CRs-Fixed: 937239
Diffstat (limited to 'src/com/android/camera/VideoUI.java')
-rw-r--r-- | src/com/android/camera/VideoUI.java | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/com/android/camera/VideoUI.java b/src/com/android/camera/VideoUI.java index db27c7391..b5e7cc3df 100644 --- a/src/com/android/camera/VideoUI.java +++ b/src/com/android/camera/VideoUI.java @@ -51,6 +51,7 @@ import com.android.camera.ui.ListSubMenu; import com.android.camera.ui.ModuleSwitcher; import com.android.camera.ui.PieRenderer; import com.android.camera.ui.RenderOverlay; +import com.android.camera.ui.RotateImageView; import com.android.camera.ui.RotateLayout; import com.android.camera.ui.RotateTextToast; import com.android.camera.ui.ZoomRenderer; @@ -115,6 +116,7 @@ public class VideoUI implements PieRenderer.PieListener, private int mScreenRatio = CameraUtil.RATIO_UNKNOWN; private int mTopMargin = 0; private int mBottomMargin = 0; + private RotateImageView mMuteButton; private OnLayoutChangeListener mLayoutListener = new OnLayoutChangeListener() { @Override @@ -231,6 +233,25 @@ public class VideoUI implements PieRenderer.PieListener, } }); + mMuteButton = (RotateImageView)mRootView.findViewById(R.id.mute_button); + mMuteButton.setVisibility(View.VISIBLE); + if(!((VideoModule)mController).isAudioMute()) { + mMuteButton.setImageResource(R.drawable.ic_unmuted_button); + } else { + mMuteButton.setImageResource(R.drawable.ic_muted_button); + } + mMuteButton.setOnClickListener(new OnClickListener() { + @Override + public void onClick(View v) { + boolean isEnabled = !((VideoModule)mController).isAudioMute(); + ((VideoModule)mController).setMute(isEnabled, true); + if(!isEnabled) + mMuteButton.setImageResource(R.drawable.ic_unmuted_button); + else + mMuteButton.setImageResource(R.drawable.ic_muted_button); + } + }); + initializeMiscControls(); initializeControlByIntent(); initializeOverlay(); |