OSDN Git Service

DO NOT MERGE Stop work challenge freeform bypass
authorRobin Lee <rgl@google.com>
Mon, 8 Aug 2016 13:48:43 +0000 (14:48 +0100)
committerRobin Lee <rgl@google.com>
Fri, 26 Aug 2016 14:39:34 +0000 (14:39 +0000)
commit0737c2b4c2ae6415eced00926235f848d1957bae
tree5668d1470bb06334493d6412ec3fd541081468d2
parentb0ca00431f70bd5ec569d94a88f33cbb585b1787
DO NOT MERGE Stop work challenge freeform bypass

Bypassing work challenge in freeform mode was trivial by just keeping
work apps open in freeform mode and then switching focus to them from
another app.

Because the only interception point is startActivity this never
triggered work challenge.

The solution is to trigger the check on focus change events and also to
allow passing the result back into the freeform stack instead of dumping
our user out into the homescreen.

Change-Id: I141ecf90b5f0e708a21d27141b6fec6074e5d475
Fix: 30693465
services/core/java/com/android/server/am/ActivityManagerService.java
services/core/java/com/android/server/am/ActivityStackSupervisor.java
services/core/java/com/android/server/am/ActivityStarter.java
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java