summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamera Software Integration <camswint@localhost>2015-11-10 10:06:42 -0800
committerCamera Software Integration <camswint@localhost>2015-12-22 16:24:43 +0530
commit956aaa62fec3b4379103515b02eb5459b3fad92f (patch)
tree0556ed02b6f633e95782b1b840a8507c9d21bc2b
parentd074a0ed7d81cbad424f738df27766bbba496ffa (diff)
downloadandroid_packages_apps_Snap-956aaa62fec3b4379103515b02eb5459b3fad92f.zip
android_packages_apps_Snap-956aaa62fec3b4379103515b02eb5459b3fad92f.tar.gz
android_packages_apps_Snap-956aaa62fec3b4379103515b02eb5459b3fad92f.tar.bz2
SnapdragonCamera: Moving Image Stabilization option to the menu
Moving Image Stabilization option to the menu Change-Id: I7fb025a3d1909af436e7a52ee9d602b2ce2dc68b CRs-Fixed: 937237
-rw-r--r--res/drawable-hdpi/ic_eis_menu.pngbin0 -> 3364 bytes
-rw-r--r--res/drawable-xhdpi/ic_eis_menu.pngbin0 -> 4387 bytes
-rw-r--r--res/drawable-xxhdpi/ic_eis_menu.pngbin0 -> 6783 bytes
-rw-r--r--res/values/qcomstrings.xml6
-rw-r--r--res/values/strings.xml2
-rw-r--r--res/xml/video_preferences.xml3
-rw-r--r--src/com/android/camera/VideoMenu.java20
-rw-r--r--src/com/android/camera/VideoModule.java3
-rw-r--r--src/com/android/camera/VideoUI.java7
9 files changed, 34 insertions, 7 deletions
diff --git a/res/drawable-hdpi/ic_eis_menu.png b/res/drawable-hdpi/ic_eis_menu.png
new file mode 100644
index 0000000..292be7a
--- /dev/null
+++ b/res/drawable-hdpi/ic_eis_menu.png
Binary files differ
diff --git a/res/drawable-xhdpi/ic_eis_menu.png b/res/drawable-xhdpi/ic_eis_menu.png
new file mode 100644
index 0000000..01c0a6d
--- /dev/null
+++ b/res/drawable-xhdpi/ic_eis_menu.png
Binary files differ
diff --git a/res/drawable-xxhdpi/ic_eis_menu.png b/res/drawable-xxhdpi/ic_eis_menu.png
new file mode 100644
index 0000000..62746e1
--- /dev/null
+++ b/res/drawable-xxhdpi/ic_eis_menu.png
Binary files differ
diff --git a/res/values/qcomstrings.xml b/res/values/qcomstrings.xml
index 414d8f9..388ac0a 100644
--- a/res/values/qcomstrings.xml
+++ b/res/values/qcomstrings.xml
@@ -314,13 +314,13 @@
<string name="pref_camera_mce_default">enable</string>
<!-- The message is shown in toast when the app encounters an unsupported selection for HFR/HSR mode -->
- <string name="error_app_unsupported_hfr_selection">HFR/HSR is not supported for DIS/TimeLapse/HDR</string>
+ <string name="error_app_unsupported_hfr_selection">HFR/HSR is not supported for Image Stabilization/TimeLapse/HDR</string>
<!-- The message is shown in dialog when the app encounters an unsupported resolution for HFR mode -->
<string name="error_app_unsupported_hfr">HFR is not supported for selected resolution</string>
<!-- The message is shown in toast when the app encounters an unsupported resolution for DIS mode -->
- <string name="error_app_unsupported_dis">Unsupported video resolution for Display Image Stabilization(DIS)</string>
+ <string name="error_app_unsupported_dis">Unsupported video resolution for Image Stabilization</string>
<!-- The message is shown in dialog when the app
encounters an unsupported resolution for HSR mode -->
@@ -504,7 +504,7 @@
<string name="pref_camera_touchafaec_entry_on">On</string>
<!-- Select IS title -->
- <string name="pref_camera_dis_title">IS</string>
+ <string name="pref_camera_dis_title">Image Stabilization</string>
<string name="pref_camera_dis_default">disable</string>
<!-- DIS choices -->
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 1fe80ab..a676d9c 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -437,7 +437,7 @@
<string name="advanced_capture_disable_continuous_shot">Enable Advanced Capture will disable Continuous Shot.</string>
<!-- Toast after enable 2k4k video quality to inform IS has disabled -->
- <string name="video_quality_4k_disable_IS">Enable 4k video quality will disable IS.</string>
+ <string name="video_quality_4k_disable_IS">Enable 4k video quality will disable Image Stabilization.</string>
<!-- Toast after 2k4k video is enabled to inform SeeMore has been disabled -->
<string name="video_quality_4k_disable_SeeMore">SeeMore cannot be enabled during 4k video.</string>
diff --git a/res/xml/video_preferences.xml b/res/xml/video_preferences.xml
index 63346a0..f9949d4 100644
--- a/res/xml/video_preferences.xml
+++ b/res/xml/video_preferences.xml
@@ -111,11 +111,12 @@
camera:title="@string/pref_camera_powermode_title"
camera:entries="@array/pref_camera_powermode_entries"
camera:entryValues="@array/pref_camera_powermode_entryvalues" />
- <ListPreference
+ <IconListPreference
camera:key="pref_camera_dis_key"
camera:defaultValue="@string/pref_camera_dis_default"
camera:title="@string/pref_camera_dis_title"
camera:entries="@array/pref_camera_dis_entries"
+ camera:singleIcon="@drawable/ic_eis_menu"
camera:entryValues="@array/pref_camera_dis_entryvalues" />
<IconListPreference
camera:key="pref_camera_coloreffect_key"
diff --git a/src/com/android/camera/VideoMenu.java b/src/com/android/camera/VideoMenu.java
index 3d45bd1..6ff4d2d 100644
--- a/src/com/android/camera/VideoMenu.java
+++ b/src/com/android/camera/VideoMenu.java
@@ -113,7 +113,8 @@ public class VideoMenu extends MenuController
CameraSettings.KEY_RECORD_LOCATION,
CameraSettings.KEY_CAMERA_SAVEPATH,
CameraSettings.KEY_WHITE_BALANCE,
- CameraSettings.KEY_VIDEO_HIGH_FRAME_RATE
+ CameraSettings.KEY_VIDEO_HIGH_FRAME_RATE,
+ CameraSettings.KEY_DIS
};
mOtherKeys2 = new String[] {
CameraSettings.KEY_VIDEOCAMERA_FLASH_MODE,
@@ -653,6 +654,21 @@ public class VideoMenu extends MenuController
}
}
+ private void overrideMenuFor4K() {
+ if(mListMenu != null && mUI.is4KEnabled())
+ {
+ mListMenu.setPreferenceEnabled(
+ CameraSettings.KEY_DIS,false);
+ mListMenu.overrideSettings(
+ CameraSettings.KEY_DIS, "disable");
+
+ mListMenu.setPreferenceEnabled(
+ CameraSettings.KEY_SEE_MORE, false);
+ mListMenu.overrideSettings(
+ CameraSettings.KEY_SEE_MORE, mActivity.getString(R.string.pref_camera_see_more_value_off));
+ }
+ }
+
public void overrideCDSMode() {
if (mListMenu != null) {
ListPreference pref_tnr = mPreferenceGroup.
@@ -700,6 +716,7 @@ public class VideoMenu extends MenuController
initializePopup();
} else {
overrideCDSMode();
+ overrideMenuFor4K();
}
mListMenu.overrideSettings(keyvalues);
@@ -731,6 +748,7 @@ public class VideoMenu extends MenuController
mListMenu = popup1;
overrideCDSMode();
+ overrideMenuFor4K();
}
public void popupDismissed(boolean topPopupOnly) {
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index abd19e5..f6ff881 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -871,7 +871,7 @@ public class VideoModule implements CameraModule,
mPreferenceRead = true;
}
- private boolean is4KEnabled() {
+ public boolean is4KEnabled() {
if (mProfile.quality == CamcorderProfile.QUALITY_2160P ||
mProfile.quality == CamcorderProfile.QUALITY_4KDCI) {
return true;
@@ -2128,6 +2128,7 @@ public class VideoModule implements CameraModule,
mActivity.getString(R.string.pref_camera_dis_value_disable));
mUI.overrideSettings(CameraSettings.KEY_DIS,
mActivity.getString(R.string.pref_camera_dis_value_disable));
+ mIsDISEnabled = false;
} else {
Log.e(TAG, "Not supported IS mode = " +
mActivity.getString(R.string.pref_camera_dis_value_disable));
diff --git a/src/com/android/camera/VideoUI.java b/src/com/android/camera/VideoUI.java
index bac1e3c..db27c73 100644
--- a/src/com/android/camera/VideoUI.java
+++ b/src/com/android/camera/VideoUI.java
@@ -666,6 +666,13 @@ public class VideoUI implements PieRenderer.PieListener,
}
}
+ public boolean is4KEnabled() {
+ if(mController != null)
+ return ((VideoModule)mController).is4KEnabled();
+ else
+ return false;
+ }
+
private void popupDismissed() {
mPopup = null;
}