summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuruprasad Gaonkar <ggaonk@codeaurora.org>2015-05-12 11:09:57 -0700
committerSteve Kondik <steve@cyngn.com>2016-07-30 05:03:50 -0700
commit656585dc19087dac8030d8ad90304318dc9aaeb6 (patch)
treee0965b0bd400f7d37a13e56f4a849be2c7f281c6
parent858413dfa74b4e926111a34037a58ee4055e1348 (diff)
downloadandroid_packages_apps_Snap-656585dc19087dac8030d8ad90304318dc9aaeb6.zip
android_packages_apps_Snap-656585dc19087dac8030d8ad90304318dc9aaeb6.tar.gz
android_packages_apps_Snap-656585dc19087dac8030d8ad90304318dc9aaeb6.tar.bz2
SnapDragan: Changes to enable UI option for ASD mode.
ASD menu was not available on latest snapdragon application. Changes provided to enable scene modes. Change-Id: If02e97c4912ade7463055c8fefc35d10009a7c9e
-rw-r--r--res/values/arrays.xml3
-rw-r--r--src/com/android/camera/PhotoMenu.java6
2 files changed, 9 insertions, 0 deletions
diff --git a/res/values/arrays.xml b/res/values/arrays.xml
index 0806385..d2c5494 100644
--- a/res/values/arrays.xml
+++ b/res/values/arrays.xml
@@ -524,6 +524,7 @@
<item>@string/pref_camera_scenemode_entry_text</item>
<item>@string/pref_camera_scenemode_entry_theatre</item>
<item>@string/pref_camera_scenemode_entry_whiteboard</item>
+ <item>@string/pref_camera_scenemode_entry_asd</item>
</string-array>
<array name="scenemode_thumbnails" translatable="false">
@@ -579,6 +580,7 @@
<item>@drawable/ic_scene_mode_entry_text</item>
<item>@drawable/ic_scene_mode_entry_theatre</item>
<item>@drawable/ic_scene_mode_entry_whiteboard</item>
+ <item>@drawable/ic_scene_mode_smartauto</item>
</array>
<string-array name="pref_camera_scenemode_labels">
@@ -650,6 +652,7 @@
<item>text</item>
<item>theatre</item>
<item>white-board</item>
+ <item>asd</item>
</string-array>
<array name="camera_id_entries" translatable="false">
diff --git a/src/com/android/camera/PhotoMenu.java b/src/com/android/camera/PhotoMenu.java
index d6efc06..d77d900 100644
--- a/src/com/android/camera/PhotoMenu.java
+++ b/src/com/android/camera/PhotoMenu.java
@@ -751,6 +751,7 @@ public class PhotoMenu extends MenuController
}
CharSequence[] entries = pref.getEntries();
+ CharSequence[] entryValues = pref.getEntryValues();
int[] thumbnails = pref.getThumbnailIds();
@@ -825,6 +826,11 @@ public class PhotoMenu extends MenuController
imageView.setImageResource(thumbnails[i]);
label.setText(entries[i]);
layout.addView(layout2);
+
+ // ASD only available when developer options are enabled.
+ if(entryValues[i].equals("asd")) {
+ layout2.setVisibility(mActivity.isDeveloperMenuEnabled()?View.VISIBLE:View.GONE);
+ }
}
mPreviewMenu = basic;
}