summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorByunghun Jeon <bjeon@codeaurora.org>2015-11-17 14:20:30 -0800
committerJay Wang <jaywang@codeaurora.org>2016-03-30 15:54:11 -0700
commit3618eb79912c36216b197580e54e366ab19d2a61 (patch)
treed3157d73b7a15382a5562e25e6cb72f073228835 /res
parentbdabec40fc13076c07fba8bb5d04a104cab2ddce (diff)
downloadandroid_packages_apps_Snap-3618eb79912c36216b197580e54e366ab19d2a61.tar.gz
android_packages_apps_Snap-3618eb79912c36216b197580e54e366ab19d2a61.tar.bz2
android_packages_apps_Snap-3618eb79912c36216b197580e54e366ab19d2a61.zip
SnapdragonCamera: Add Camera2 mode
Use camera2 API to show preview and take snapshot CRs-Fixed: 989750 Change-Id: I07e2d6743529b3d3d5acecf667e9493465a094c9
Diffstat (limited to 'res')
-rw-r--r--res/layout/camera.xml5
-rw-r--r--res/layout/capture_module.xml89
-rw-r--r--res/values/qcomarrays.xml22
-rw-r--r--res/values/qcomstrings.xml19
-rw-r--r--res/xml/camera_preferences.xml13
5 files changed, 79 insertions, 69 deletions
diff --git a/res/layout/camera.xml b/res/layout/camera.xml
index 781ff9ce2..a71460066 100644
--- a/res/layout/camera.xml
+++ b/res/layout/camera.xml
@@ -32,4 +32,9 @@
android:layout_width="match_parent"
android:layout_height="match_parent" >
</com.android.camera.ui.CameraRootView>
+ <com.android.camera.ui.CameraRootView
+ android:id="@+id/camera_capture_root"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" >
+ </com.android.camera.ui.CameraRootView>
</FrameLayout>
diff --git a/res/layout/capture_module.xml b/res/layout/capture_module.xml
index 10017192b..2715dcbe2 100644
--- a/res/layout/capture_module.xml
+++ b/res/layout/capture_module.xml
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2013 The Android Open Source Project
+<!-- Copyright (c) 2016, The Linux Foundation. All rights reserved.
+ Not a Contribution.
+
+ Copyright (C) 2013 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -23,89 +26,37 @@
<merge xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:layout_gravity="center" >
- <include layout="@layout/count_down_to_capture" />
- <include layout="@layout/selfie_flash_view" />
+ android:layout_gravity="center">
+
<FrameLayout
- android:id="@+id/preview_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:layout_gravity="center_vertical|center_horizontal" >
+ android:layout_gravity="center_vertical|center_horizontal">
+
<SurfaceView
android:id="@+id/mdp_preview_content"
android:layout_width="match_parent"
android:layout_height="match_parent" />
+
+ <SurfaceView
+ android:id="@+id/mdp_preview_content2"
+ android:layout_width="100dp"
+ android:layout_height="100dp" />
</FrameLayout>
+
<View
android:id="@+id/preview_cover"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/black" />
- <RelativeLayout android:id="@+id/linear"
- android:orientation="vertical"
- android:layout_width="match_parent"
- android:layout_height="match_parent">
- <ProgressBar
- style="?android:attr/progressBarStyleHorizontal"
- android:id="@+id/progress"
- android:orientation="vertical"
- android:layout_width="200dip"
- android:layout_height="wrap_content"
- android:layout_marginTop="14dip"
- android:layout_marginBottom="14dip"
- android:layout_marginLeft="30dip"
- android:layout_marginRight="30dip" />
- <com.android.camera.GraphView
- android:id="@+id/graph_view"
- android:layout_width="200dip"
- android:layout_height="200dip"
- android:layout_marginTop="60dip"
- android:layout_marginLeft="90dip" />
- <com.android.camera.DrawAutoHDR
- android:id="@+id/autohdr_view"
- android:layout_width="200dip"
- android:layout_height="200dip"
- android:layout_marginTop="15dip"
- android:layout_marginLeft="15dip" />
- </RelativeLayout>
- <ImageView
- android:id="@+id/review_image"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:visibility="gone"
- android:clickable="true"
- android:background="@android:color/black"
- android:scaleType="fitCenter"/>
- <View
- android:id="@+id/flash_overlay"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:background="@android:color/white"
- android:visibility="gone"
- android:alpha="0" />
- <FrameLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent">
- <ViewStub android:id="@+id/face_view_stub"
- android:inflatedId="@+id/face_view"
- android:layout="@layout/face_view"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:visibility="gone"/>
- </FrameLayout>
+
<com.android.camera.ui.RenderOverlay
android:id="@+id/render_overlay"
android:layout_width="match_parent"
android:layout_height="match_parent" />
- <include layout="@layout/camera_controls"
- android:layout_gravity="center"
- style="@style/CameraControls"/>
- <include layout="@layout/menu_help"
- android:layout_gravity="center"
- style="@style/CameraControls"/>
- <RelativeLayout
- android:id="@+id/id_tsmakeup_level_layout_root"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:visibility="gone" />
+
+ <include
+ style="@style/CameraControls"
+ layout="@layout/camera_controls"
+ android:layout_gravity="center" />
</merge>
diff --git a/res/values/qcomarrays.xml b/res/values/qcomarrays.xml
index c4c7be482..a4c463735 100644
--- a/res/values/qcomarrays.xml
+++ b/res/values/qcomarrays.xml
@@ -841,5 +841,27 @@
<item>@string/pref_camera_instant_capture_value_enable</item>
<item>@string/pref_camera_instant_capture_value_disable</item>
</string-array>
+
+ <string-array name="pref_camera_camera2_entries" translatable="true">
+ <item>@string/pref_camera_camera2_entry_enable</item>
+ <item>@string/pref_camera_camera2_entry_disable</item>
+ </string-array>
+
+ <string-array name="pref_camera_camera2_entryvalues" translatable="false">
+ <item>@string/pref_camera_camera2_value_enable</item>
+ <item>@string/pref_camera_camera2_value_disable</item>
+ </string-array>
+
+ <string-array name="pref_camera_dual_camera_entries" translatable="true">
+ <item>@string/pref_camera_dual_camera_entry_dual</item>
+ <item>@string/pref_camera_dual_camera_entry_bayer</item>
+ <item>@string/pref_camera_dual_camera_entry_mono</item>
+ </string-array>
+
+ <string-array name="pref_camera_dual_camera_entryvalues" translatable="false">
+ <item>@string/pref_camera_dual_camera_value_dual</item>
+ <item>@string/pref_camera_dual_camera_value_bayer</item>
+ <item>@string/pref_camera_dual_camera_value_mono</item>
+ </string-array>
</resources>
diff --git a/res/values/qcomstrings.xml b/res/values/qcomstrings.xml
index e724dbb8c..0e21bb5e6 100644
--- a/res/values/qcomstrings.xml
+++ b/res/values/qcomstrings.xml
@@ -944,5 +944,24 @@
<string name="help_menu_switcher_1" translatable="true">Switch</string>
<string name="help_menu_switcher_2" translatable="true">between</string>
<string name="help_menu_switcher_3" translatable="true">camera, video, and panorama</string>
+
+ <string name="pref_camera_camera2_title">Camera2 Mode</string>
+ <string name="pref_camera_camera2_default">disable</string>
+ <string name="pref_camera_camera2_entry_enable">Enable</string>
+ <string name="pref_camera_camera2_entry_disable">Disable</string>
+
+ <string name="pref_camera_camera2_value_enable">enable</string>
+ <string name="pref_camera_camera2_value_disable">disable</string>
+
+
+ <string name="pref_camera_dual_camera_title">Dual Camera Mode</string>
+ <string name="pref_camera_dual_camera_default">bayer</string>
+ <string name="pref_camera_dual_camera_entry_dual">Dual-camera Linked</string>
+ <string name="pref_camera_dual_camera_entry_bayer">Single Bayer Camera</string>
+ <string name="pref_camera_dual_camera_entry_mono">Single Mono Camera</string>
+
+ <string name="pref_camera_dual_camera_value_dual">dual</string>
+ <string name="pref_camera_dual_camera_value_bayer">bayer</string>
+ <string name="pref_camera_dual_camera_value_mono">mono</string>
</resources>
diff --git a/res/xml/camera_preferences.xml b/res/xml/camera_preferences.xml
index a0d06f59f..028ff4dbf 100644
--- a/res/xml/camera_preferences.xml
+++ b/res/xml/camera_preferences.xml
@@ -366,4 +366,17 @@
camera:entries="@array/pref_camera_instant_capture_entries"
camera:entryValues="@array/pref_camera_instant_capture_entry_values" />
+ <ListPreference
+ camera:key="pref_camera_camera2_key"
+ camera:defaultValue="@string/pref_camera_camera2_default"
+ camera:title="@string/pref_camera_camera2_title"
+ camera:entries="@array/pref_camera_camera2_entries"
+ camera:entryValues="@array/pref_camera_camera2_entryvalues" />
+
+ <ListPreference
+ camera:key="pref_camera_dual_camera_key"
+ camera:defaultValue="@string/pref_camera_dual_camera_default"
+ camera:title="@string/pref_camera_dual_camera_title"
+ camera:entries="@array/pref_camera_dual_camera_entries"
+ camera:entryValues="@array/pref_camera_dual_camera_entryvalues" />
</PreferenceGroup>