OSDN Git Service

Fix app switch regression
authorWinson Chung <winsonc@google.com>
Tue, 3 Apr 2018 22:21:00 +0000 (15:21 -0700)
committerWinson Chung <winsonc@google.com>
Tue, 3 Apr 2018 22:40:55 +0000 (15:40 -0700)
commita05b6b05c19ca216790d943eca9b5e0b6e682981
tree8be289418946386a22434b9088557b7f3d145651
parente81e6faf080228ac98aa66e848e60fb8d19af680
Fix app switch regression

- SystemUI has STOP_APP_SWITCHES, which meant that
  checkAppSwitchAllowedLocked() would never block the launch of an
  activity after hitting the home button when launching from recents.
  However, Launcher does not have this permission, so quick launches of
  home/launcher-based-recents activity would be blocked (waiting for the
  app switch timeout). This is only apparent when we have the fallback
  3 button nav bar, since we do not stop app switches when swiping up.

  This CL enables the system defined recents activity to manage app
  switches.

Bug: 77152886
Test: Manual, enable three button nav bar, go home, double tap recents and
      then tap again to go home.
Test: atest FrameworksServicesTests:RecentTasksTest

Change-Id: I51959c2b0f8d8b7c5f184a1fdf15294b569f5a50
services/core/java/com/android/server/am/ActivityManagerService.java
services/tests/servicestests/src/com/android/server/am/RecentTasksTest.java