summaryrefslogtreecommitdiffstats
path: root/core/res
diff options
context:
space:
mode:
authorDaniel Sandler <dsandler@android.com>2012-01-30 14:33:52 -0500
committerDaniel Sandler <dsandler@android.com>2012-04-09 15:33:26 -0400
commit7d276c377ce0c56630c06a6da431a6cb9bd76d1e (patch)
treeb5c96c71988ec1a0f3cbd7f64269651e69c8de92 /core/res
parent63c115c4aa2158ea18338a9fb2c2619755958ddc (diff)
downloadframeworks_base-7d276c377ce0c56630c06a6da431a6cb9bd76d1e.zip
frameworks_base-7d276c377ce0c56630c06a6da431a6cb9bd76d1e.tar.gz
frameworks_base-7d276c377ce0c56630c06a6da431a6cb9bd76d1e.tar.bz2
New Android Dreams architecture, disabled for now.
Rather than normal Activities (which have a host of problems when used for this purpose), screen savers are now a special kind of Service that can add views to its own special window (TYPE_DREAM, in the SCREENSAVER layer). Dreams are now launched by the power manager; whenever it is about to turn the screen off, it asks the window manager if it wants to run a screen saver instead. (http://b/5677408) Also, the new config_enableDreams bool allows the entire feature to be switched on or off in one place. It is currently switched off (and the APIs are all @hidden). Change-Id: Idfe9d430568471d15f4b463cb70586a899a331f7
Diffstat (limited to 'core/res')
-rw-r--r--core/res/res/anim/slow_fade_in.xml24
-rwxr-xr-xcore/res/res/values/config.xml2
-rw-r--r--core/res/res/values/public.xml4
-rw-r--r--core/res/res/values/styles.xml6
4 files changed, 35 insertions, 1 deletions
diff --git a/core/res/res/anim/slow_fade_in.xml b/core/res/res/anim/slow_fade_in.xml
new file mode 100644
index 0000000..21a2c78
--- /dev/null
+++ b/core/res/res/anim/slow_fade_in.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/* //device/apps/common/res/anim/fade_in.xml
+**
+** Copyright 2012, 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.
+*/
+-->
+
+<alpha xmlns:android="http://schemas.android.com/apk/res/android"
+ android:interpolator="@interpolator/decelerate_quad"
+ android:fromAlpha="0.0" android:toAlpha="1.0"
+ android:duration="1000" />
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 4fde018..e80e30a 100755
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -837,6 +837,8 @@
<!-- Name of the wimax state tracker clas -->
<string name="config_wimaxStateTrackerClassname" translatable="false"></string>
+ <!-- enable screen saver feature -->
+ <bool name="config_enableDreams">false</bool>
<!-- Name of screensaver components to look for if none has been chosen by the user -->
<string name="config_defaultDreamComponent" translatable="false">com.google.android.deskclock/com.android.deskclock.Screensaver</string>
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index ca0e913..cbfc1a4 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -1110,6 +1110,7 @@
<java-symbol type="style" name="Animation.PopupWindow" />
<java-symbol type="style" name="Animation.TypingFilter" />
<java-symbol type="style" name="Animation.TypingFilterRestore" />
+ <java-symbol type="style" name="Animation.Dream" />
<java-symbol type="style" name="Theme.DeviceDefault.Dialog.Alert" />
<java-symbol type="style" name="Theme.DeviceDefault.Light.Dialog.Alert" />
<java-symbol type="style" name="Theme.Dialog.Alert" />
@@ -1262,7 +1263,6 @@
<java-symbol type="layout" name="screen_title_icons" />
<java-symbol type="string" name="abbrev_wday_month_day_no_year" />
<java-symbol type="string" name="android_upgrading_title" />
- <java-symbol type="string" name="config_defaultDreamComponent" />
<java-symbol type="string" name="faceunlock_multiple_failures" />
<java-symbol type="string" name="global_action_power_off" />
<java-symbol type="string" name="global_actions_airplane_mode_off_status" />
@@ -1480,6 +1480,8 @@
<java-symbol type="style" name="Theme.Dialog.AppError" />
<java-symbol type="style" name="Theme.Toast" />
<java-symbol type="xml" name="storage_list" />
+ <java-symbol type="bool" name="config_enableDreams" />
+ <java-symbol type="string" name="config_defaultDreamComponent" />
<!-- From SystemUI -->
<java-symbol type="anim" name="push_down_in" />
diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml
index baeb9cc..2eeb067 100644
--- a/core/res/res/values/styles.xml
+++ b/core/res/res/values/styles.xml
@@ -219,6 +219,12 @@ please see styles_device_defaults.xml.
<item name="windowExitAnimation">@anim/fade_out</item>
</style>
+ <!-- Window animations for screen savers. {@hide} -->
+ <style name="Animation.Dream">
+ <item name="windowEnterAnimation">@anim/slow_fade_in</item>
+ <item name="windowExitAnimation">@anim/fast_fade_out</item>
+ </style>
+
<!-- Status Bar Styles -->
<style name="TextAppearance.StatusBar">
<item name="android:textAppearance">?android:attr/textAppearanceSmall</item>