Skip to content

Commit 591a9e8

Browse files
author
John Spurlock
committed
Close the notification shade when starting dream.
Bug:7205491 Change-Id: I17d2b75bc502ff8fb739a6cbb4d0219681fa4e8a
1 parent 195b6e1 commit 591a9e8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

services/java/com/android/server/dreams/DreamController.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ final class DreamController {
5353
private final Intent mDreamingStoppedIntent = new Intent(Dream.ACTION_DREAMING_STOPPED)
5454
.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);
5555

56+
private final Intent mCloseNotificationShadeIntent = new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
57+
5658
private DreamRecord mCurrentDream;
5759

5860
public DreamController(Context context, Handler handler, Listener listener) {
@@ -81,6 +83,9 @@ public void dump(PrintWriter pw) {
8183
public void startDream(Binder token, ComponentName name, boolean isTest, int userId) {
8284
stopDream();
8385

86+
// Close the notification shade
87+
mContext.sendBroadcast(mCloseNotificationShadeIntent);
88+
8489
Slog.i(TAG, "Starting dream: name=" + name + ", isTest=" + isTest + ", userId=" + userId);
8590

8691
mCurrentDream = new DreamRecord(token, name, isTest, userId);

0 commit comments

Comments
 (0)