OSDN Git Service

Guard pre-O apps from malicious startForegroundService()
authorChristopher Tate <ctate@google.com>
Fri, 25 May 2018 22:15:44 +0000 (15:15 -0700)
committerChris Tate <ctate@android.com>
Tue, 29 May 2018 22:00:48 +0000 (22:00 +0000)
commit0a82690868b58fde22d6aaaebe1d01b7bb9b8658
tree4f9a77ad23855397d6ea7f61189b7ad8a1f406cb
parent3ec17d31c5eed1730d3ea1e2d03763b03b2b6820
Guard pre-O apps from malicious startForegroundService()

Don't enforce the startForegroundService() requirement to transition to
foreground when the app hosting the service doesn't yet target the API
level at which this semantic was introduced.

Bug: 79377529
Test: manual (ApiDemos is pre-O)
Test: atest CtsAndroidAppTestCases
Change-Id: Ib0b970211d4ee6a86e22c89aff47b05403907ed5
services/core/java/com/android/server/am/ActiveServices.java