summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/res
diff options
context:
space:
mode:
authorDaniel Sandler <dsandler@google.com>2010-08-17 00:41:00 -0400
committerDaniel Sandler <dsandler@google.com>2010-11-04 16:55:29 -0400
commitb73617de462579f7c12c25a4c2747c576f00f6a2 (patch)
tree1f070d8a32c97062feca491ed9675af8d7c874dc /packages/SystemUI/res
parent1ab022b8c8b063d95a591bf40109986c5b1bbb11 (diff)
downloadframeworks_base-b73617de462579f7c12c25a4c2747c576f00f6a2.zip
frameworks_base-b73617de462579f7c12c25a4c2747c576f00f6a2.tar.gz
frameworks_base-b73617de462579f7c12c25a4c2747c576f00f6a2.tar.bz2
Rotation lock.
IWindowManager now supports two new methods, freezeRotation() and thawRotation(), that allow a caller to temporarily stash the device's current rotation as the default rotation (when no other constraints are present). The system bar uses this to implement a user-accessible rotation lock by calling freezeRotation() and then turning off accelerometer-based display rotation; unless overridden by an app, the display will continue to appear in the frozen rotation until the rotation is unlocked by the user (either via the rotation lock icon in the system bar or by checking "rotate screen automatically" in Settings). Bug: 2949639 Change-Id: Icd21c169d1053719590e72401f229424b254622f
Diffstat (limited to 'packages/SystemUI/res')
-rw-r--r--packages/SystemUI/res/drawable-land-mdpi/ic_sysbar_rotate_off.png (renamed from packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off_lanscape.png)bin595 -> 595 bytes
-rw-r--r--packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off.pngbin0 -> 548 bytes
-rw-r--r--packages/SystemUI/res/drawable-port-mdpi/ic_sysbar_rotate_off.png (renamed from packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off_portrait.png)bin616 -> 616 bytes
-rw-r--r--packages/SystemUI/res/values-land/strings.xml23
-rw-r--r--packages/SystemUI/res/values-port/strings.xml23
-rw-r--r--packages/SystemUI/res/values/strings.xml6
6 files changed, 52 insertions, 0 deletions
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off_lanscape.png b/packages/SystemUI/res/drawable-land-mdpi/ic_sysbar_rotate_off.png
index adaadf7..adaadf7 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off_lanscape.png
+++ b/packages/SystemUI/res/drawable-land-mdpi/ic_sysbar_rotate_off.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off.png
new file mode 100644
index 0000000..9e6793a
--- /dev/null
+++ b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off.png
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off_portrait.png b/packages/SystemUI/res/drawable-port-mdpi/ic_sysbar_rotate_off.png
index fdc0ac7..fdc0ac7 100644
--- a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off_portrait.png
+++ b/packages/SystemUI/res/drawable-port-mdpi/ic_sysbar_rotate_off.png
Binary files differ
diff --git a/packages/SystemUI/res/values-land/strings.xml b/packages/SystemUI/res/values-land/strings.xml
new file mode 100644
index 0000000..e05e36b
--- /dev/null
+++ b/packages/SystemUI/res/values-land/strings.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright (c) 2010, 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- Rotation lock toast text: shown when rotation lock is turned on in landscape orientation.
+ -->
+ <string name="toast_rotation_locked">Screen is now locked in landscape orientation.</string>
+</resources>
diff --git a/packages/SystemUI/res/values-port/strings.xml b/packages/SystemUI/res/values-port/strings.xml
new file mode 100644
index 0000000..d3ab67b
--- /dev/null
+++ b/packages/SystemUI/res/values-port/strings.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/**
+ * Copyright (c) 2010, 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+-->
+<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <!-- Rotation lock toast text: shown when rotation lock is turned on in portrait orientation.
+ -->
+ <string name="toast_rotation_locked">Screen is now locked in portrait orientation.</string>
+</resources>
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index 701aa9f..f34dc22 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -84,5 +84,11 @@
-->
<string name="recent_tasks_empty">No recent applications.</string>
+ <!-- Rotation lock toast text: shown when rotation lock is turned off (and the screen will
+ auto-rotate based on the accelerometer). -->
+ <string name="toast_rotation_free">Screen will rotate automatically.</string>
+ <!-- Rotation lock toast text: shown when rotation lock is turned on and the orientation is
+ undefined. -->
+ <string name="toast_rotation_locked">Screen rotation is now locked.</string>
</resources>