From b73617de462579f7c12c25a4c2747c576f00f6a2 Mon Sep 17 00:00:00 2001 From: Daniel Sandler Date: Tue, 17 Aug 2010 00:41:00 -0400 Subject: 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 --- .../drawable-land-mdpi/ic_sysbar_rotate_off.png | Bin 0 -> 595 bytes .../res/drawable-mdpi/ic_sysbar_rotate_off.png | Bin 0 -> 548 bytes .../ic_sysbar_rotate_off_lanscape.png | Bin 595 -> 0 bytes .../ic_sysbar_rotate_off_portrait.png | Bin 616 -> 0 bytes .../drawable-port-mdpi/ic_sysbar_rotate_off.png | Bin 0 -> 616 bytes packages/SystemUI/res/values-land/strings.xml | 23 +++++++++++++++++++++ packages/SystemUI/res/values-port/strings.xml | 23 +++++++++++++++++++++ packages/SystemUI/res/values/strings.xml | 6 ++++++ 8 files changed, 52 insertions(+) create mode 100644 packages/SystemUI/res/drawable-land-mdpi/ic_sysbar_rotate_off.png create mode 100644 packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off.png delete mode 100644 packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off_lanscape.png delete mode 100644 packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off_portrait.png create mode 100644 packages/SystemUI/res/drawable-port-mdpi/ic_sysbar_rotate_off.png create mode 100644 packages/SystemUI/res/values-land/strings.xml create mode 100644 packages/SystemUI/res/values-port/strings.xml (limited to 'packages/SystemUI/res') diff --git a/packages/SystemUI/res/drawable-land-mdpi/ic_sysbar_rotate_off.png b/packages/SystemUI/res/drawable-land-mdpi/ic_sysbar_rotate_off.png new file mode 100644 index 0000000..adaadf7 Binary files /dev/null and b/packages/SystemUI/res/drawable-land-mdpi/ic_sysbar_rotate_off.png 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 Binary files /dev/null and b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off.png differ diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off_lanscape.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off_lanscape.png deleted file mode 100644 index adaadf7..0000000 Binary files a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off_lanscape.png and /dev/null differ diff --git a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off_portrait.png b/packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off_portrait.png deleted file mode 100644 index fdc0ac7..0000000 Binary files a/packages/SystemUI/res/drawable-mdpi/ic_sysbar_rotate_off_portrait.png and /dev/null differ diff --git a/packages/SystemUI/res/drawable-port-mdpi/ic_sysbar_rotate_off.png b/packages/SystemUI/res/drawable-port-mdpi/ic_sysbar_rotate_off.png new file mode 100644 index 0000000..fdc0ac7 Binary files /dev/null and b/packages/SystemUI/res/drawable-port-mdpi/ic_sysbar_rotate_off.png 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 @@ + + + + + Screen is now locked in landscape orientation. + 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 @@ + + + + + Screen is now locked in portrait orientation. + 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 @@ --> No recent applications. + + Screen will rotate automatically. + + Screen rotation is now locked. -- cgit v1.1