File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
packages/SystemUI/src/com/android/systemui
policy/src/com/android/internal/policy/impl Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -30,12 +30,17 @@ private static void launchDream(Context context) {
3030 com .android .internal .R .string .config_defaultDreamComponent );
3131 }
3232 if (component != null ) {
33+ // dismiss the notification shade, recents, etc.
34+ context .sendBroadcast (new Intent (Intent .ACTION_CLOSE_SYSTEM_DIALOGS ));
35+
3336 ComponentName cn = ComponentName .unflattenFromString (component );
3437 Intent zzz = new Intent (Intent .ACTION_MAIN )
3538 .setComponent (cn )
3639 .addFlags (Intent .FLAG_ACTIVITY_NEW_TASK
37- | Intent .FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS
38- | Intent .FLAG_ACTIVITY_NO_USER_ACTION
40+ | Intent .FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS
41+ | Intent .FLAG_ACTIVITY_NO_USER_ACTION
42+ | Intent .FLAG_FROM_BACKGROUND
43+ | Intent .FLAG_ACTIVITY_NO_HISTORY
3944 );
4045 Slog .v (TAG , "Starting screen saver on dock event: " + component );
4146 context .startActivity (zzz );
Original file line number Diff line number Diff line change @@ -3475,12 +3475,17 @@ public void run() {
34753475 component = mContext .getResources ().getString (R .string .config_defaultDreamComponent );
34763476 }
34773477 if (component != null ) {
3478+ // dismiss the notification shade, recents, etc.
3479+ mContext .sendBroadcast (new Intent (Intent .ACTION_CLOSE_SYSTEM_DIALOGS ));
3480+
34783481 ComponentName cn = ComponentName .unflattenFromString (component );
34793482 Intent intent = new Intent (Intent .ACTION_MAIN )
34803483 .setComponent (cn )
34813484 .addFlags (Intent .FLAG_ACTIVITY_NEW_TASK
34823485 | Intent .FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS
34833486 | Intent .FLAG_ACTIVITY_NO_USER_ACTION
3487+ | Intent .FLAG_FROM_BACKGROUND
3488+ | Intent .FLAG_ACTIVITY_NO_HISTORY
34843489 );
34853490 mContext .startActivity (intent );
34863491 } else {
You can’t perform that action at this time.
0 commit comments