Loading core/java/android/service/dreams/IDreamManager.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,8 @@ interface IDreamManager { void testDream(int userId, in ComponentName componentName); @UnsupportedAppUsage boolean isDreaming(); @UnsupportedAppUsage boolean isDreamingOrInPreview(); void finishSelf(in IBinder token, boolean immediate); void startDozing(in IBinder token, int screenState, int screenBrightness); void stopDozing(in IBinder token); Loading services/core/java/com/android/server/dreams/DreamManagerService.java +21 −0 Original line number Diff line number Diff line Loading @@ -218,6 +218,7 @@ public final class DreamManagerService extends SystemService { }, pw, "", 200); } /** Whether a real dream is occurring. */ private boolean isDreamingInternal() { synchronized (mLock) { return mCurrentDreamToken != null && !mCurrentDreamIsPreview Loading @@ -225,6 +226,13 @@ public final class DreamManagerService extends SystemService { } } /** Whether a real dream, or a dream preview is occurring. */ private boolean isDreamingOrInPreviewInternal() { synchronized (mLock) { return mCurrentDreamToken != null && !mCurrentDreamIsWaking; } } protected void requestStartDreamFromShell() { requestDreamInternal(); } Loading Loading @@ -694,6 +702,19 @@ public final class DreamManagerService extends SystemService { } } @Override // Binder call public boolean isDreamingOrInPreview() { checkPermission(android.Manifest.permission.READ_DREAM_STATE); final long ident = Binder.clearCallingIdentity(); try { return isDreamingOrInPreviewInternal(); } finally { Binder.restoreCallingIdentity(ident); } } @Override // Binder call public void dream() { checkPermission(android.Manifest.permission.WRITE_DREAM_STATE); Loading Loading
core/java/android/service/dreams/IDreamManager.aidl +2 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,8 @@ interface IDreamManager { void testDream(int userId, in ComponentName componentName); @UnsupportedAppUsage boolean isDreaming(); @UnsupportedAppUsage boolean isDreamingOrInPreview(); void finishSelf(in IBinder token, boolean immediate); void startDozing(in IBinder token, int screenState, int screenBrightness); void stopDozing(in IBinder token); Loading
services/core/java/com/android/server/dreams/DreamManagerService.java +21 −0 Original line number Diff line number Diff line Loading @@ -218,6 +218,7 @@ public final class DreamManagerService extends SystemService { }, pw, "", 200); } /** Whether a real dream is occurring. */ private boolean isDreamingInternal() { synchronized (mLock) { return mCurrentDreamToken != null && !mCurrentDreamIsPreview Loading @@ -225,6 +226,13 @@ public final class DreamManagerService extends SystemService { } } /** Whether a real dream, or a dream preview is occurring. */ private boolean isDreamingOrInPreviewInternal() { synchronized (mLock) { return mCurrentDreamToken != null && !mCurrentDreamIsWaking; } } protected void requestStartDreamFromShell() { requestDreamInternal(); } Loading Loading @@ -694,6 +702,19 @@ public final class DreamManagerService extends SystemService { } } @Override // Binder call public boolean isDreamingOrInPreview() { checkPermission(android.Manifest.permission.READ_DREAM_STATE); final long ident = Binder.clearCallingIdentity(); try { return isDreamingOrInPreviewInternal(); } finally { Binder.restoreCallingIdentity(ident); } } @Override // Binder call public void dream() { checkPermission(android.Manifest.permission.WRITE_DREAM_STATE); Loading