summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorJay Wang <jaywang@codeaurora.org>2015-05-05 10:37:52 -0700
committerByunghun Jeon <bjeon@codeaurora.org>2015-09-16 17:15:18 -0700
commit59b05fd1d75943f037aec41def16cdceb6443ecf (patch)
treebdc41665161e398f9992e7baff76243e1c1f3f9e /res
parent465c11e451e18b7f3e8109fdbbc56b866f7f8a56 (diff)
downloadandroid_packages_apps_Snap-59b05fd1d75943f037aec41def16cdceb6443ecf.tar.gz
android_packages_apps_Snap-59b05fd1d75943f037aec41def16cdceb6443ecf.tar.bz2
android_packages_apps_Snap-59b05fd1d75943f037aec41def16cdceb6443ecf.zip
SnapdragonCamera: Use floating components during video record.
During recording, there are only 2 widgets on UI. Directly attaching them to window manager and making main UI layer fully transparent can reduce power consumption. Change-Id: I8c4f4768ab91d50fc72080f0f6d7316ee2e60ef4
Diffstat (limited to 'res')
-rw-r--r--res/layout/floating_recording_time.xml41
-rw-r--r--res/layout/floating_shutter_icon.xml39
-rw-r--r--res/values/qcomarrays.xml10
-rw-r--r--res/values/qcomstrings.xml14
-rw-r--r--res/values/styles.xml6
-rw-r--r--res/xml/video_preferences.xml6
6 files changed, 113 insertions, 3 deletions
diff --git a/res/layout/floating_recording_time.xml b/res/layout/floating_recording_time.xml
new file mode 100644
index 000000000..6c23a2182
--- /dev/null
+++ b/res/layout/floating_recording_time.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2015, The Linux Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="horizontal"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content">
+ <com.android.camera.PauseButton android:id="@+id/video_pause"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:padding="23dp"
+ android:src="@drawable/btn_pause_recording"/>
+ <include layout="@layout/viewfinder_labels_video"
+ android:id="@+id/labels" />
+</LinearLayout>
+
diff --git a/res/layout/floating_shutter_icon.xml b/res/layout/floating_shutter_icon.xml
new file mode 100644
index 000000000..59fc72896
--- /dev/null
+++ b/res/layout/floating_shutter_icon.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (c) 2015, The Linux Foundation. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are
+ met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of The Linux Foundation nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
+ WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+ BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-->
+<com.android.camera.ShutterButton xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/shutter_button"
+ android:layout_width="@dimen/shutter_size"
+ android:layout_height="@dimen/shutter_size"
+ android:layout_gravity="bottom|center_horizontal"
+ android:layout_marginBottom="@dimen/shutter_offset"
+ android:clickable="true"
+ android:contentDescription="@string/accessibility_shutter_button"
+ android:focusable="true"
+ android:scaleType="fitCenter"
+ android:src="@drawable/shutter_button_video_stop" />
diff --git a/res/values/qcomarrays.xml b/res/values/qcomarrays.xml
index 78d796dd3..02686864e 100644
--- a/res/values/qcomarrays.xml
+++ b/res/values/qcomarrays.xml
@@ -811,5 +811,15 @@
<item>@drawable/ic_ts_makeup_on</item>
</string-array>
+ <!-- VideoCamera Preferences partial ui recording entry-->
+ <string-array name="pref_camera_video_partial_ui_entries" translatable="false">
+ <item>@string/pref_camera_video_partial_ui_entry_false</item>
+ <item>@string/pref_camera_video_partial_ui_entry_true</item>
+ </string-array>
+
+ <string-array name="pref_camera_video_partial_ui_entryvalues" translatable="false">
+ <item>@string/pref_video_partial_ui_value_false</item>
+ <item>@string/pref_video_partial_ui_value_true</item>
+ </string-array>
</resources>
diff --git a/res/values/qcomstrings.xml b/res/values/qcomstrings.xml
index 9e5e152d0..eace72dad 100644
--- a/res/values/qcomstrings.xml
+++ b/res/values/qcomstrings.xml
@@ -862,6 +862,20 @@
<string name="pref_camera_video_rotation_entry_180">180</string>
<string name="pref_camera_video_rotation_entry_270">270</string>
+ <!-- Settings screen, Partial UI recording default value -->
+ <string name="pref_camera_video_partial_ui_default">@string/pref_video_partial_ui_value_false</string>
+
+ <!-- Settings screen, partial ui recording title -->
+ <string name="pref_camera_video_partial_ui_title">Partial UI Recording</string>
+
+ <!-- Settings screen, partial ui recording radio button choices -->
+ <string name="pref_camera_video_partial_ui_entry_false">@string/setting_off</string>
+ <string name="pref_camera_video_partial_ui_entry_true">@string/setting_on</string>
+
+ <!-- Partial ui recording values. Do not translate. -->
+ <string name="pref_video_partial_ui_value_false">false</string>
+ <string name="pref_video_partial_ui_value_true">true</string>
+
<!-- The message is shown in toast when click showOnMap Menu and there is no map app -->
<string name="map_activity_not_found_err">There is no map app for show location.</string>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index c6b99624e..b1d3843ca 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -24,9 +24,9 @@
<item name="android:windowActionBar">false</item>
<item name="android:windowTitleSize">0dp</item>
<item name="android:windowActionBarOverlay">true</item>
- <item name="android:windowBackground">@android:color/black</item>
- <item name="android:colorBackground">@android:color/black</item>
- <item name="android:colorBackgroundCacheHint">@android:color/black</item>
+ <item name="android:windowBackground">@null</item>
+ <item name="android:colorBackground">@null</item>
+ <item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:actionBarStyle">@style/Holo.ActionBar</item>
</style>
<style name="Theme.CameraBase" parent="android:Theme.Holo"/>
diff --git a/res/xml/video_preferences.xml b/res/xml/video_preferences.xml
index 31b2d4c31..99786ce26 100644
--- a/res/xml/video_preferences.xml
+++ b/res/xml/video_preferences.xml
@@ -163,4 +163,10 @@
camera:title="@string/pref_camera_video_rotation_title"
camera:entries="@array/pref_camera_video_rotation_entries"
camera:entryValues="@array/pref_camera_video_rotation_entryvalues" />
+ <ListPreference
+ camera:key="pref_camera_video_partial_ui_key"
+ camera:defaultValue="@string/pref_camera_video_partial_ui_default"
+ camera:title="@string/pref_camera_video_partial_ui_title"
+ camera:entries="@array/pref_camera_video_partial_ui_entries"
+ camera:entryValues="@array/pref_camera_video_partial_ui_entryvalues" />
</PreferenceGroup>