summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/CaptureUI.java
diff options
context:
space:
mode:
authorzhuw <zhuw@codeaurora.org>2017-12-27 16:42:37 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2018-01-03 19:08:06 -0800
commita65c9f0023fdb5903e701aaaf1b4916743e9c953 (patch)
tree19e198fb73789790dffe8a931a7c720c7911b1a2 /src/com/android/camera/CaptureUI.java
parentd15bf9b4bd431a9a031d3a5e33bf20d51503e04f (diff)
downloadandroid_packages_apps_Snap-a65c9f0023fdb5903e701aaaf1b4916743e9c953.tar.gz
android_packages_apps_Snap-a65c9f0023fdb5903e701aaaf1b4916743e9c953.tar.bz2
android_packages_apps_Snap-a65c9f0023fdb5903e701aaaf1b4916743e9c953.zip
Snapdragon: Add bokeh enable options in dev
add bokeh enable options in dev. value: true->enable false->disable blur->enter int value Change-Id: I4e69a5371b60ce55dee2468634b1e14956811f22 CRs-Fixed: 2164757
Diffstat (limited to 'src/com/android/camera/CaptureUI.java')
-rw-r--r--src/com/android/camera/CaptureUI.java35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/com/android/camera/CaptureUI.java b/src/com/android/camera/CaptureUI.java
index 9a52396dd..200f90e20 100644
--- a/src/com/android/camera/CaptureUI.java
+++ b/src/com/android/camera/CaptureUI.java
@@ -188,6 +188,7 @@ public class CaptureUI implements FocusOverlayManager.FocusUI,
private View mFrontBackSwitcher;
private ImageView mMakeupButton;
private SeekBar mMakeupSeekBar;
+ private SeekBar mBokehSeekBar;
private View mMakeupSeekBarLayout;
private View mSeekbarBody;
private TextView mRecordingTimeView;
@@ -336,6 +337,26 @@ public class CaptureUI implements FocusOverlayManager.FocusUI,
mSettingsManager.setValue(SettingsManager.KEY_SCENE_MODE, "" + SettingsManager.SCENE_MODE_AUTO_INT);
}
});
+ mBokehSeekBar = (SeekBar) mRootView.findViewById(R.id.bokeh_seekbar);
+ mBokehSeekBar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
+ @Override
+ public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
+ module.setBokehBlurDegree(progress);
+ }
+
+ @Override
+ public void onStartTrackingTouch(SeekBar seekBar) {
+
+ }
+
+ @Override
+ public void onStopTrackingTouch(SeekBar seekBar) {
+ final SharedPreferences prefs =
+ PreferenceManager.getDefaultSharedPreferences(mActivity);
+ prefs.edit().putInt(SettingsManager.KEY_BOKEH_BLUR_DEGREE, seekBar.getProgress())
+ .apply();
+ }
+ });
initFilterModeButton();
initSceneModeButton();
initSwitchCamera();
@@ -588,6 +609,20 @@ public class CaptureUI implements FocusOverlayManager.FocusUI,
mVideoButton.setVisibility(View.VISIBLE);
}
+ public void initializeBokehMode(boolean bokehmode) {
+ if (bokehmode) {
+ final SharedPreferences prefs =
+ PreferenceManager.getDefaultSharedPreferences(mActivity);
+ int progress = prefs.getInt(SettingsManager.KEY_BOKEH_BLUR_DEGREE, 50);
+ mBokehSeekBar.setProgress(progress);
+ mBokehSeekBar.setVisibility(View.VISIBLE);
+ mVideoButton.setVisibility(View.INVISIBLE);
+ } else {
+ mBokehSeekBar.setVisibility(View.INVISIBLE);
+ mVideoButton.setVisibility(View.VISIBLE);
+ }
+ }
+
// called from onResume but only the first time
public void initializeFirstTime() {
// Initialize shutter button.