OSDN Git Service

RESTRICT AUTOMERGE: Added an app id security check in isAppForeground.
authorVarun Shah <varunshah@google.com>
Sat, 27 Oct 2018 00:03:23 +0000 (17:03 -0700)
committerandroid-build-team Robot <android-build-team-robot@google.com>
Fri, 7 Dec 2018 21:42:31 +0000 (21:42 +0000)
commitdaec20e5bea445fb764a164e1713efde5628b6f7
tree501167832fa43e0ad4917e716bc944e4fd86d718
parentfeb4e56eb4f832a0de0c42c9319afd8c45e18f6c
RESTRICT AUTOMERGE: Added an app id security check in isAppForeground.

ActivityManagerService#isAppForeground now checks if the caller has the
permission to view if an app is in the foreground.

Bug: 115384617
Test: cts-tradefed run cts -m CtsSecurityTestCases -t android.security.cts.ActivityManagerTest#testIsAppInForegroundNormal
Test: cts-tradefed run cts -m CtsSecurityTestCases -t android.security.cts.ActivityManagerTest#testIsAppInForegroundMalicious
Change-Id: I9602c89b2d40036e525c38960a08326dc74c6682
(cherry picked from commit ad02e59ac2cd3e6180e02fd60e6dedd8177c7b6e)
core/java/android/os/UserHandle.java
services/core/java/com/android/server/am/ActivityManagerService.java