Merge "SnapDragan: Changes to enable UI option for ASD mode."
diff --git a/res/values/arrays.xml b/res/values/arrays.xml
index 12eaeec..f06e927 100644
--- a/res/values/arrays.xml
+++ b/res/values/arrays.xml
@@ -420,6 +420,7 @@
         <item>@string/pref_camera_scenemode_entry_night</item>
         <item>@string/pref_camera_scenemode_entry_beach</item>
         <item>@string/pref_camera_scenemode_entry_snow</item>
+        <item>@string/pref_camera_scenemode_entry_asd</item>
     </string-array>
 
     <array name="scenemode_thumbnails" translatable="false">
@@ -437,6 +438,7 @@
         <item>@drawable/ic_scene_mode_night</item>
         <item>@drawable/ic_scene_mode_beach</item>
         <item>@drawable/ic_scene_mode_snow</item>
+        <item>@drawable/ic_scene_mode_smartauto</item>
     </array>
 
     <string-array name="pref_camera_scenemode_labels">
@@ -470,6 +472,7 @@
         <item>night</item>
         <item>beach</item>
         <item>snow</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 b2ddc02..904bdab 100644
--- a/src/com/android/camera/PhotoMenu.java
+++ b/src/com/android/camera/PhotoMenu.java
@@ -950,6 +950,7 @@
         Display display = wm.getDefaultDisplay();
 
         CharSequence[] entries = pref.getEntries();
+        CharSequence[] entryValues = pref.getEntryValues();
 
         int[] thumbnails = pref.getThumbnailIds();
 
@@ -1037,6 +1038,11 @@
             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);
+            }
         }
         previewMenuLayout.addView(basic);
         mPreviewMenu = basic;