diff options
author | Byunghun Jeon <bjeon@codeaurora.org> | 2016-06-08 14:41:47 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-06-29 10:32:03 -0700 |
commit | 3edd94c1f1fae0e89359a41abbb61858cafa4125 (patch) | |
tree | bcd72ee664f44b07873828926b8f3184c4d77341 /res | |
parent | f16a9497a188f42c5a5ad4f9710a6c44f79a0e28 (diff) | |
download | android_packages_apps_Snap-3edd94c1f1fae0e89359a41abbb61858cafa4125.tar.gz android_packages_apps_Snap-3edd94c1f1fae0e89359a41abbb61858cafa4125.tar.bz2 android_packages_apps_Snap-3edd94c1f1fae0e89359a41abbb61858cafa4125.zip |
SnapdragonCamera: Add face detection to camera2
Add face detection to camera2.
Receive face data from camera2 and use faceView UI to draw it
Change-Id: Id9c49ab6dd73de316398c57981cc0b9df0400b45
CRs-Fixed: 1025797
Diffstat (limited to 'res')
-rw-r--r-- | res/layout/capture_module.xml | 11 | ||||
-rw-r--r-- | res/values/camera2arrays.xml | 10 | ||||
-rw-r--r-- | res/xml/capture_preferences.xml | 8 |
3 files changed, 29 insertions, 0 deletions
diff --git a/res/layout/capture_module.xml b/res/layout/capture_module.xml index 3b4f025bf..07594cef3 100644 --- a/res/layout/capture_module.xml +++ b/res/layout/capture_module.xml @@ -51,6 +51,17 @@ android:layout_height="match_parent" android:background="@android:color/black" /> + <FrameLayout + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <com.android.camera.ui.Camera2FaceView + android:id="@+id/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" diff --git a/res/values/camera2arrays.xml b/res/values/camera2arrays.xml index b2cb97958..ac569f473 100644 --- a/res/values/camera2arrays.xml +++ b/res/values/camera2arrays.xml @@ -785,4 +785,14 @@ for time lapse recording --> <item>@string/pref_video_time_lapse_frame_interval_54000000</item> <item>@string/pref_video_time_lapse_frame_interval_86400000</item> </string-array> + + <string-array name="pref_camera2_facedetection_entries" translatable="false"> + <item>@string/pref_camera_facedetection_entry_off</item> + <item>@string/pref_camera_facedetection_entry_on</item> + </string-array> + + <string-array name="pref_camera2_facedetection_entryvalues" translatable="false"> + <item>off</item> + <item>on</item> + </string-array> </resources> diff --git a/res/xml/capture_preferences.xml b/res/xml/capture_preferences.xml index 697770b04..06f816c7f 100644 --- a/res/xml/capture_preferences.xml +++ b/res/xml/capture_preferences.xml @@ -258,4 +258,12 @@ camera:entryValues="@array/pref_camera2_video_time_lapse_frame_interval_entryvalues" camera:key="pref_camera2_video_time_lapse_frame_interval_key" camera:title="@string/pref_video_time_lapse_frame_interval_title"/> + + <IconListPreference + camera:defaultValue="@string/pref_camera_facedetection_default" + camera:entries="@array/pref_camera2_facedetection_entries" + camera:entryValues="@array/pref_camera2_facedetection_entryvalues" + camera:key="pref_camera2_facedetection_key" + camera:singleIcon="@drawable/ic_settings_facerec" + camera:title="@string/pref_camera_facedetection_title"/> </PreferenceGroup> |