Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ce74eb5a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Dismiss recents after switching users" into oc-mr1-dev

parents afcdba9e 3817fd20
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -182,6 +182,9 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
            if (action.equals(Intent.ACTION_SCREEN_OFF)) {
                // When the screen turns off, dismiss Recents to Home
                dismissRecentsToHomeIfVisible(false);
            } else if (action.equals(Intent.ACTION_USER_SWITCHED)) {
                // When switching users, dismiss Recents to Home similar to screen off
                finish();
            } else if (action.equals(Intent.ACTION_TIME_CHANGED)) {
                // If the time shifts but the currentTime >= lastStackActiveTime, then that boundary
                // is still valid.  Otherwise, we need to reset the lastStackactiveTime to the
@@ -375,6 +378,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
        IntentFilter filter = new IntentFilter();
        filter.addAction(Intent.ACTION_SCREEN_OFF);
        filter.addAction(Intent.ACTION_TIME_CHANGED);
        filter.addAction(Intent.ACTION_USER_SWITCHED);
        registerReceiver(mSystemBroadcastReceiver, filter);

        getWindow().addPrivateFlags(LayoutParams.PRIVATE_FLAG_NO_MOVE_ANIMATION);