diff options
author | Christopher Tate <ctate@google.com> | 2017-03-21 11:37:06 -0700 |
---|---|---|
committer | Chris Tate <ctate@android.com> | 2017-03-30 18:31:24 +0000 |
commit | 08992ac57e973d6bf32693725ebb341a481e5944 (patch) | |
tree | b766c88e226f2b7705993eeef88984f4a04f5183 /rs/java/android/renderscript/ProgramFragmentFixedFunction.java | |
parent | 217ecd0729809508c731dc5f49b437fd9681b65e (diff) |
API refactor: context.startForegroundService()
Rather than require an a-priori Notification be supplied in order to
start a service directly into the foreground state, we adopt a two-stage
compound operation for undertaking ongoing service work even from a
background execution state. Context#startForegroundService() is not
subject to background restrictions, with the requirement that the
service formally enter the foreground state via startForeground() within
5 seconds. If the service does not do so, it is stopped by the OS and
the app is blamed with a service ANR.
We also introduce a new flavor of PendingIntent that starts a service
into this two-stage "promises to call startForeground()" sequence, so
that deferred and second-party launches can take advantage of it.
Bug 36130212
Test: CTS
Change-Id: I96d6b23fcfc27d8fa606827b7d48a093611b2345
(cherry picked from commit 79047c62b58fb0a0ddf28e2b90fe4d17e05bc528)
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions