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
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user