Settings changes for Android Dreams (now Screen Candy).

- new preference design
- remove candy-specific timeout
- use new settings keys

Requires Change I31f31b3

Bug: 5591015
Change-Id: I45cb6ea5c68f9932c6d4e65e2b219331d48a62d6
This commit is contained in:
Daniel Sandler
2011-11-17 10:44:51 -08:00
parent cee089b152
commit 6f0ea441e4
7 changed files with 142 additions and 93 deletions

View File

@@ -16,7 +16,7 @@
package com.android.settings;
import static android.provider.Settings.Secure.DREAM_COMPONENT;
import static android.provider.Settings.Secure.SCREENSAVER_COMPONENT;
import android.app.AlertDialog;
import android.content.Context;
@@ -60,13 +60,15 @@ public class DreamTesterPreference extends Preference {
@Override
protected void onClick() {
String component = Settings.Secure.getString(resolver, DREAM_COMPONENT);
String component = Settings.Secure.getString(resolver, SCREENSAVER_COMPONENT);
Log.v(TAG, "component=" + component);
if (component != null) {
ComponentName cn = ComponentName.unflattenFromString(component);
Log.v(TAG, "cn=" + cn);
Intent intent = new Intent(Intent.ACTION_MAIN)
.setComponent(cn)
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK
| Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS
.addFlags(
Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS
)
.putExtra("android.dreams.TEST", true);
getContext().startActivity(intent);