Skip to content

Commit 6318857

Browse files
dsandlerAndroid (Google) Code Review
authored andcommitted
Merge "Dismiss system windows when screen savers start." into ics-mr1
2 parents 8d03007 + 5207d9c commit 6318857

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

packages/SystemUI/src/com/android/systemui/DreamsDockLauncher.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff 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);

policy/src/com/android/internal/policy/impl/PhoneWindowManager.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff 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 {

0 commit comments

Comments
 (0)