summaryrefslogtreecommitdiffstats
path: root/src/com/android/camera/VideoMenu.java
diff options
context:
space:
mode:
authorMichael Bestas <mikeioannina@cyanogenmod.org>2016-08-04 21:28:53 +0300
committerChippa-a <vusal1372@gmail.com>2019-10-25 15:55:25 +0300
commit168fc5ac181d474ba64976c61c64a1a772f1a3b7 (patch)
treee231227c91d06056959d71a129b5c10f4cfeb2d8 /src/com/android/camera/VideoMenu.java
parent9c2dfa23bf3590f0325ba586fb693a284972568b (diff)
downloadandroid_packages_apps_Snap-168fc5ac181d474ba64976c61c64a1a772f1a3b7.tar.gz
android_packages_apps_Snap-168fc5ac181d474ba64976c61c64a1a772f1a3b7.tar.bz2
android_packages_apps_Snap-168fc5ac181d474ba64976c61c64a1a772f1a3b7.zip
Snap: Make developer menu more accessible
* Not all devices have red eye reduction, which made it impossible to enable advanced options. Move the toggle to max brightness option which is present in all devices. * Allow enabling advanced options through camcorder settings. * Move hardcoded strings to cm_strings for translations. * Close menus when developer mode is toggled so we can see the extra options when the menu is reopened. * Decrease taps to 7, matching Settings tap-to-enable. * Properly reset tap counter. Change-Id: Iac39b9309388b92bf75a49a6091b483b13bd9154
Diffstat (limited to 'src/com/android/camera/VideoMenu.java')
-rw-r--r--src/com/android/camera/VideoMenu.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/com/android/camera/VideoMenu.java b/src/com/android/camera/VideoMenu.java
index 4465292b8..ad68d01e2 100644
--- a/src/com/android/camera/VideoMenu.java
+++ b/src/com/android/camera/VideoMenu.java
@@ -78,6 +78,7 @@ public class VideoMenu extends MenuController
private static final int PREVIEW_MENU_IN_ANIMATION = 1;
private static final int PREVIEW_MENU_ON = 2;
private static final int MODE_FILTER = 1;
+ private static final int DEVELOPER_MENU_TOUCH_COUNT = 7;
private int mSceneStatus;
private View mFrontBackSwitcher;
private View mFilterModeSwitcher;
@@ -87,6 +88,7 @@ public class VideoMenu extends MenuController
private String mPrevSavedVideoCDS;
private boolean mIsVideoTNREnabled = false;
private boolean mIsVideoCDSUpdated = false;
+ private int mPrivateCounter = 0;
private static final int ANIMATION_DURATION = 300;
private static final int CLICK_THRESHOLD = 200;
private int previewMenuSize;
@@ -895,6 +897,31 @@ public class VideoMenu extends MenuController
mUI.showPopup(mListSubMenu, 2, true);
}
mPopupStatus = POPUP_SECOND_LEVEL;
+
+ // Developer menu
+ if (pref.getKey().equals(CameraSettings.KEY_MAX_BRIGHTNESS)) {
+ mPrivateCounter++;
+ if (mPrivateCounter >= DEVELOPER_MENU_TOUCH_COUNT) {
+ SharedPreferences prefs = PreferenceManager
+ .getDefaultSharedPreferences(mActivity);
+ if (!mActivity.isDeveloperMenuEnabled()) {
+ mActivity.enableDeveloperMenu();
+ prefs.edit().putBoolean(CameraSettings.KEY_DEVELOPER_MENU, true).apply();
+ closeAllView();
+ RotateTextToast.makeText(mActivity,
+ R.string.developer_menu_enabled, Toast.LENGTH_SHORT).show();
+ } else {
+ mActivity.disableDeveloperMenu();
+ prefs.edit().putBoolean(CameraSettings.KEY_DEVELOPER_MENU, false).apply();
+ closeAllView();
+ RotateTextToast.makeText(mActivity,
+ R.string.developer_menu_disabled, Toast.LENGTH_SHORT).show();
+ }
+ mPrivateCounter = 0;
+ }
+ } else {
+ mPrivateCounter = 0;
+ }
}
public void onListMenuTouched() {