summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/DreamTesterPreference.java
diff options
context:
space:
mode:
authorJohn Spurlock <jspurlock@google.com>2012-08-22 09:59:44 -0400
committerJohn Spurlock <jspurlock@google.com>2012-08-23 10:21:50 -0400
commite5a84b2ea19711ac2ce641163acdb6a9a30662ed (patch)
tree9219199524ac5f7f389b28578663894a4ec53eb4 /src/com/android/settings/DreamTesterPreference.java
parent395f5f700718aac811ea8216fdb60bdd08452553 (diff)
downloadpackages_apps_Settings-e5a84b2ea19711ac2ce641163acdb6a9a30662ed.zip
packages_apps_Settings-e5a84b2ea19711ac2ce641163acdb6a9a30662ed.tar.gz
packages_apps_Settings-e5a84b2ea19711ac2ce641163acdb6a9a30662ed.tar.bz2
Settings: Minimal refactor to support new dreams api.
Fix breaking changes to the dreams api. Master toggle and multiple dreams support in Settings will be done in a subsequent change. Bug:7028665 Change-Id: Ia56dd00ec50323fbba06473b1747e5015a3f1898
Diffstat (limited to 'src/com/android/settings/DreamTesterPreference.java')
-rw-r--r--src/com/android/settings/DreamTesterPreference.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/settings/DreamTesterPreference.java b/src/com/android/settings/DreamTesterPreference.java
index fa1d708..1a22d64 100644
--- a/src/com/android/settings/DreamTesterPreference.java
+++ b/src/com/android/settings/DreamTesterPreference.java
@@ -36,7 +36,10 @@ public class DreamTesterPreference extends Preference {
protected void onClick() {
IDreamManager dm = IDreamManager.Stub.asInterface(ServiceManager.getService("dreams"));
try {
- ComponentName cn = dm.getDreamComponent();
+ ComponentName[] dreams = dm.getDreamComponents();
+ if (dreams == null || dreams.length == 0)
+ return;
+ ComponentName cn = dreams[0];
Log.v(TAG, "DreamComponent cn=" + cn);
dm.testDream(cn);
} catch (RemoteException ex) {