summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api/current.txt3
-rw-r--r--core/java/android/service/dreams/Dream.java25
-rwxr-xr-xcore/res/res/values/attrs.xml13
3 files changed, 23 insertions, 18 deletions
diff --git a/api/current.txt b/api/current.txt
index c732c3e..a123620 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -20332,7 +20332,6 @@ package android.service.dreams {
method public boolean isInteractive();
method public boolean isLowProfile();
method public boolean isScreenBright();
- method protected deprecated void lightsOut();
method public void onActionModeFinished(android.view.ActionMode);
method public void onActionModeStarted(android.view.ActionMode);
method public void onAttachedToWindow();
@@ -20360,7 +20359,7 @@ package android.service.dreams {
field public static final java.lang.String ACTION_DREAMING_STARTED = "android.intent.action.DREAMING_STARTED";
field public static final java.lang.String ACTION_DREAMING_STOPPED = "android.intent.action.DREAMING_STOPPED";
field public static final java.lang.String CATEGORY_DREAM = "android.intent.category.DREAM";
- field public static final java.lang.String METADATA_NAME_CONFIG_ACTIVITY = "android.service.dreams.config_activity";
+ field public static final java.lang.String DREAM_META_DATA = "android.service.dream";
}
}
diff --git a/core/java/android/service/dreams/Dream.java b/core/java/android/service/dreams/Dream.java
index dedfb0c..473414c 100644
--- a/core/java/android/service/dreams/Dream.java
+++ b/core/java/android/service/dreams/Dream.java
@@ -59,10 +59,10 @@ import com.android.internal.policy.PolicyManager;
* <category android:name="android.intent.category.DREAM" />
* </intent-filter>
*
- * <!-- Point to configuration activity for this dream (optional) -->
+ * <!-- Point to additional information for this dream (optional) -->
* <meta-data
- * android:name="android.service.dreams.config_activity"
- * android:value="com.example.mypackage/com.example.mypackage.MyDreamSettingsActivity" />
+ * android:name="android.service.dream"
+ * android:resource="@xml/my_dream" />
* </service>
* }
* </pre>
@@ -81,12 +81,12 @@ public class Dream extends Service implements Window.Callback {
"android.intent.category.DREAM";
/**
- * Service meta-data key for declaring an optional configuration activity.
- *
- * @see Dream
- * */
- public static final String METADATA_NAME_CONFIG_ACTIVITY =
- "android.service.dreams.config_activity";
+ * Name under which a Dream publishes information about itself.
+ * This meta-data must reference an XML resource containing
+ * a <code>&lt;{@link android.R.styleable#Dream dream}&gt;</code>
+ * tag.
+ */
+ public static final String DREAM_META_DATA = "android.service.dream";
/**
* Broadcast Action: Sent after the system starts dreaming.
@@ -361,13 +361,6 @@ public class Dream extends Service implements Window.Callback {
return getWindow().findViewById(id);
}
- /** FIXME remove once platform dreams are updated */
- @Deprecated
- protected void lightsOut() {
- setLowProfile(true);
- setFullscreen(true);
- }
-
/**
* Marks this dream as interactive to receive input events.
*
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 0755038..9759bdc 100755
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -5305,6 +5305,19 @@
<attr name="description" />
</declare-styleable>
+ <!-- Use <code>dream</code> as the root tag of the XML resource that
+ describes an
+ {@link android.service.dreams.Dream}, which is
+ referenced from its
+ {@link android.service.dreams.Dream#DREAM_META_DATA}
+ meta-data entry. Described here are the attributes that can be
+ included in that tag. -->
+ <declare-styleable name="Dream">
+ <!-- Component name of an activity that allows the user to modify
+ the settings for this dream. -->
+ <attr name="settingsActivity" />
+ </declare-styleable>
+
<!-- =============================== -->
<!-- Accounts package class attributes -->
<!-- =============================== -->