OSDN Git Service

Kill foreground apps when turning off work
authorRubin Xu <rubinxu@google.com>
Fri, 1 Apr 2016 14:50:58 +0000 (15:50 +0100)
committerRubin Xu <rubinxu@google.com>
Tue, 19 Apr 2016 13:23:33 +0000 (14:23 +0100)
commitf8451b98150564b340207327d0951f44753338d1
tree3c3a0aa3846baebe389eff6f998f2ebe0112c71f
parent3da3d7f455761b73309bf5a02bef5eba816df5cd
Kill foreground apps when turning off work

While work apps will all be killed as we stop the profile user when
turning off work, this can sometimes take a while. So let's kill the
foreground apps as soon as work profile is being turned off to make
the user experience nicer.

Bug: 27631526
Change-Id: Icdd3799385a98ee531b0b4247e8ede78f6f10da8
core/java/android/app/ActivityManagerInternal.java
services/core/java/com/android/server/am/ActivityManagerService.java
services/core/java/com/android/server/pm/UserManagerService.java