History log of /frameworks/base/core/java/android/app/Service.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
67324c990c4fbad238119a4667341d5618b2bea2 18-Apr-2016 Dianne Hackborn <hackbod@google.com> Work on issue #28221912: Starting service as foreground might...

...kill previous notification.

Add new platform API to detach a notification from a service
without dismissing it.

Also, while I am here, add some more @IntDefs.

Change-Id: I3bb46d9cd3db7f73716c8ced19c20fea800eb30d
/frameworks/base/core/java/android/app/Service.java
7db73ed198bb52b8b2c3915cef1df0578359b842 20-Feb-2015 Scott Kennedy <skennedy@google.com> Mark Service#onBind() @Nullable

Change-Id: I6e600dd018e1cb2b51b666ec5acf56b2885c0083
/frameworks/base/core/java/android/app/Service.java
ab4a81b3c625e33d04ae8070fcce6b6baee6522c 10-Oct-2014 Dianne Hackborn <hackbod@google.com> Improve some docs, fix some debugging.

- Add docs to Binder, Messenger, ResultReceier to explain their
relation (or lack there-of) to process lifecycle.
- Clarify some aspects of process lifecycle for services.
- Fix help text of am command.
- Fix per-package dumping of battery stats to not include history.
- Fix per-package dumping of proc stats to only include aggregated
and current stats and fix some formatting.
- Fix per-process dumping of meminfo to have an option to interpret
the input as a package, so including all processes that are
running code of that package.
- Fix top-level per-package debug output to correctly include all
of these improvements and give them a little more time (10s) to
complete for timing out.

Change-Id: I2a04c0f862bd47b08329443d722345a13ad9b6e2
/frameworks/base/core/java/android/app/Service.java
b8d07179340b823d32a1a05426e691353903e990 31-Jul-2014 Evan Charlton <evanc@google.com> Fix a small typo in javadocs

Service#START_FLAG_RETRY has an extra word; remove it.

Change-Id: I4743e2ea474c70fe5d31f1a4ef257f9752f8e823
/frameworks/base/core/java/android/app/Service.java
7140a25f0135f473b66d01eb042471b2f0ebc836 11-Sep-2013 Adam Skory <skory@google.com> Revert services assist context in KitKat

Reverts extension to assist context API to query
foreground services for assist context data.

Also hides Intent.ACTION_VOICE_ASSIST because
nobody's actually using it yet.

Bug: 10461702
Change-Id: Idf6836adc659b434e11ebb2b98e8b814c94a7227
/frameworks/base/core/java/android/app/Service.java
365038217553e192d011861422715f8a87b30618 08-Aug-2013 Ben Murdoch <benm@google.com> Fix the build

Change-Id: If34523c4b25b3d60edc00b0f37b636bedfc756c2
/frameworks/base/core/java/android/app/Service.java
dfc7fd7818cda46b914c8a9d69d1ba00443ffe5b 06-Aug-2013 Adam Skory <skory@google.com> Extend assist context to foreground services

Add Service.onProvideAssistData(Bundle) which will be
called on foreground Services that have the new attr
in their manifest of provideAssistData = true;

Rename private reference to e.g. "getTopActivityExtras"
as "getAssistContextExtras" - do not rename the relevant
permission, since it is already public.

In ActivityManagerService, request extras both from the
top activity and from any foreground services with the
above attribute. Extend PendingActivityExtras as
PendingAssistExtras with a list of Services from which
extras are expected.

Reduce the timeout to or reporting extras from 4 sec to
just 500 ms.

Bug: 9526331
Change-Id: Ia03b96e8189033a68ae9c514c8cea0199a19bce8
/frameworks/base/core/java/android/app/Service.java
2e6de8fdccf71dc733864c1ea757182cc13303ab 30-Apr-2013 Scott Main <smain@google.com> add notice to not use 0 in startForeground().
also delete some obsolete back-compat tips for <=donut
bug: 8746126

Change-Id: I3ee966647aa2c9f572e6f02eeabfc2cf925a031f
/frameworks/base/core/java/android/app/Service.java
f6dc1078091f33f231fd30830c618f6a04932f82 30-Mar-2013 kmccormick <kmccormick@google.com> Doc update: clarify dumpsys instructions

"Bug: 8474578"

Change-Id: Ic743de8f41a1b2d38a4d2495148dc07e2f45b8e5
/frameworks/base/core/java/android/app/Service.java
40eee61e25fb887f5267686f8a0a7c5bd9f95769 07-Aug-2012 Scott Main <smain@google.com> docs: fix broken links
and update sitemap text file

Change-Id: I6982c3f029c46135ae856b8484d906c2882bad3a
/frameworks/base/core/java/android/app/Service.java
5554b7082220d37496e30f39a0d9146afc177ab4 12-Apr-2012 Jeff Sharkey <jsharkey@android.com> Make component names visible in javadoc.

Change-Id: I3770ea6616b8425c387bcd27d668e3114b14335d
/frameworks/base/core/java/android/app/Service.java
f76a50ce8fdc6aea22cabc77b2977a1a15a79630 09-Mar-2012 Ken Wakasa <kwakasa@google.com> Fix obvious typos under frameworks/base/core

Change-Id: Ia5fc3db1bb51824e7523885553be926bcc42d736
/frameworks/base/core/java/android/app/Service.java
21c241e061de29a538008ca42df9c878184bcfb8 08-Mar-2012 Dianne Hackborn <hackbod@google.com> Add new Intent API for associating a ClipData with an Intent.

Allows applications to propagate multiple URI grants through an
Intent.

Later on, we should probably redefine the share actions to be
based on this ClipData with the old extras-based approach only
there for compatibility. Even if we don't do that, though, this
allows you to do a multi-select share that grants multiple URI
permissions by stuffing the URIs in a ClipData.

Also add some documentation in various places telling people how
they can grant URI permissions.

Change-Id: Id4ba8e72c11caf7e1f1f438cb7af058d1586a37c
/frameworks/base/core/java/android/app/Service.java
b54e7a3d9f60ac605f404f9eb3c5e92ca51bbd23 04-Oct-2011 Joe Fernandez <joefernandez@google.com> docs: add developer guide cross-references, Project ACRE

Change-Id: I5df1c4e13af67ff4c4a5b22f3cb1247bf0103b09
/frameworks/base/core/java/android/app/Service.java
c68c913d357e2955d4bd7ca52829071e531c7825 29-Jul-2011 Dianne Hackborn <hackbod@google.com> Various work on out of memory managment.

- Improve how we handle processes that have shown UI, to take care
of more cases where we want to push them into the background LRU
list.
- New trim memory level for when an application that has done UI
is no longer visible to the user.
- Add APIs to get new trim memory callback.
- Add a host of new bind flags to tweak how the system will adjust
the OOM level of the target process.

Change-Id: I23ba354112f411a9f8773a67426b4dff85fa2439
/frameworks/base/core/java/android/app/Service.java
487c38b842c5244fecd66e1bca5d4b725d572961 19-Jul-2011 Jeff Brown <jeffbrown@google.com> Remove an unnecessary finalizer.

Simply having a finalizer impacts the GC's ability to
reclaim resources in a timely manner.

Change-Id: Ia9e5f6f1dcb50fae8c2819d25d167df751adf451
/frameworks/base/core/java/android/app/Service.java
0c5001d776d56bae02a5cc2663286a125d99bc5e 13-Apr-2011 Dianne Hackborn <hackbod@google.com> Add APIs to remove tasks.

You can remove sub-tasks inside of a task, or an entire task.

When removing an entire task, you can have its process killed
as well.

When the process is killed, any running services will get an
onTaskRemoved() callback for them to do cleanup before their
process is killed (and the service possibly restarted).

Or they can set a new android:stopWithTask attribute to just
have the service automatically (cleanly) stopped at this point.

Change-Id: I1891bc2da006fa53b99c52f9040f1145650e6808
/frameworks/base/core/java/android/app/Service.java
7aee61f5a96e94e158bf5ad3d8e192c4d4f7eff6 08-Feb-2011 Scott Main <smain@google.com> docs: fix links to revised fundamentals documents

Change-Id: Ie2a660cce1d00f924c9fde5c6a00776307e5e1c7
/frameworks/base/core/java/android/app/Service.java
4f3867e3ce92101224ad79b8f2ff446bb4f99108 15-Dec-2010 Dianne Hackborn <hackbod@google.com> Time to remove some old APIs!

Change-Id: I73ca23b0d5c7971a00dfa05357f9b630d9b6ebc8
/frameworks/base/core/java/android/app/Service.java
ee34a49ffc92590cb59f3e17a3df136b67701529 02-Aug-2010 Brad Fitzpatrick <bradfitz@android.com> Add missing word from docs.

My mistaker from an earlier commit.

Change-Id: Ic04b3c411da32f7dca03d23d39182915e3567172
/frameworks/base/core/java/android/app/Service.java
0166c3530535355e7813f54c4e403a21db94a9d2 27-Jul-2010 Brad Fitzpatrick <bradfitz@android.com> Explicitly mention again that startCommand() runs on the main thread.

This is already mentioned at the top of Service.java's javadoc, but
I'm seeing people get confused (myself included the other day) after
getting used to incoming service stub binder calls being on their own
threads and forgetting that startCommand() didn't work that way.

Change-Id: Ib79f48d9368ac0ba2d37b7e4dc98d53804bcd59e
/frameworks/base/core/java/android/app/Service.java
ee3bcc4c6462d1402e48e9d260e16d038d8fe291 15-Apr-2010 Dianne Hackborn <hackbod@google.com> A little more improvement of the Service javadoc.

Change-Id: I15fb191a26f2ef86a2bf553177cb2d08905adb1c
/frameworks/base/core/java/android/app/Service.java
75288fa1a4ee4886959af7243995d8afd9c3c905 17-Feb-2010 Dianne Hackborn <hackbod@google.com> Improve Service documentation with some samples.

Also some small tweaks to the Message API to improve its
use in the MessengerService sample.
/frameworks/base/core/java/android/app/Service.java
ab8a8ed2eb068b696f6b5519c55a03546a5927ef 30-Jan-2010 Dianne Hackborn <hackbod@google.com> Fix sample code insertion.
/frameworks/base/core/java/android/app/Service.java
0766b2d0f398dcad10e332b695bbc0cbe5011882 05-Dec-2009 Dianne Hackborn <hackbod@google.com> Update service example code.

Switch aidl sample to match the change in ApiDemos, add sample code
to the Service class.
/frameworks/base/core/java/android/app/Service.java
29e4a3c566f435c32f0b95e4ac8e8b33cac6faba 01-Oct-2009 Dianne Hackborn <hackbod@google.com> Update from API review.

Change-Id: I16b1c566f91167aac9615ac59dd297a154c828ea
/frameworks/base/core/java/android/app/Service.java
fed534ee5d47a96c1d104f9bd303e9480102813c 23-Sep-2009 Dianne Hackborn <hackbod@google.com> Fix bug where onStartCommand() was never called with a null intent.

Also clean up some of the service java docs.

Change-Id: I40e7d713e2393f7ee1db9822da8f07fb6304a9e4
/frameworks/base/core/java/android/app/Service.java
f6f9f2d0256930ce0bb4913b2260b8480914edc2 22-Aug-2009 Dianne Hackborn <hackbod@google.com> Add more control over a service's start state.

One of the problems I have been noticing is background services
sitting around running and using resources. Some times this is
due to the app developer doing this when they shouldn't, but there
are also a number of issues with the current Service interaction
model that make it very difficult (or impossible) to avoid
getting services stuck in the started state. This is a
change/enhancement to the Service API to try to address this.

The main change is that Service.onStart() has been deprecated,
replaced with a new Service.onStartCommand() that allows the
service to better control how the system should manage it. The
key part here is a new result code returned by the function, telling
the system what it should do with the service afterwards:

- START_STICKY is basically the same as the previous behavior,
where we usually leave the service running. The only difference
is that it if it gets restarted because its process is killed,
onStartCommand() will be called on the new service with a null
Intent instead of not being called at all.

- START_NOT_STICKY says that, upon returning to the system, if
its process is killed with no remaining start commands to
deliver, then the service will be stopped instead of restarted.
This makes a lot more sense for services that are intended to
only run while executing commands sent to them.

- START_REDELIVER_INTENT is like START_NOT_STICKY, except if
the service's process is killed before it calls stopSelf()
for a given intent, that intent will be re-delivered to it
until it completes (unless after 4 or more tries it still
can't complete, at which point we give up).

Change-Id: I978f5ca420d70023d1b5e7f97de639d09381f8ad
/frameworks/base/core/java/android/app/Service.java
1066cbcac08268e2254ed6818181949d83e9ba1c 19-Aug-2009 Dianne Hackborn <hackbod@google.com> Fix build.
/frameworks/base/core/java/android/app/Service.java
d8a43f61680bacf0d4b52a03ff3c7a07307377fc 18-Aug-2009 Dianne Hackborn <hackbod@google.com> Fix issue #2047139: Remove Service.setForeground()

This API is becoming seriously abused, so now it is deprecated and has
become a no-op.

As an alternative, there is now a new API that allows you to make a service
be in the foreground but requires providing a persistent notification to
go along with this state, allowing the user to know about and control it.
/frameworks/base/core/java/android/app/Service.java
105925376f8d0f6b318c9938c7b83ef7fef094da 19-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake_rel/...@140373
/frameworks/base/core/java/android/app/Service.java
9066cfe9886ac131c34d59ed0e2d287b0e3c0087 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/app/Service.java
d83a98f4ce9cfa908f5c54bbd70f03eec07e7553 04-Mar-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //depot/cupcake/@135843
/frameworks/base/core/java/android/app/Service.java
3001a035439d8134a7d70d796376d1dfbff3cdcd 19-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@132276
/frameworks/base/core/java/android/app/Service.java
d24b8183b93e781080b2c16c487e60d51c12da31 11-Feb-2009 The Android Open Source Project <initial-contribution@android.com> auto import from //branches/cupcake/...@130745
/frameworks/base/core/java/android/app/Service.java
f013e1afd1e68af5e3b868c26a653bbfb39538f8 18-Dec-2008 The Android Open Source Project <initial-contribution@android.com> Code drop from //branches/cupcake/...@124589
/frameworks/base/core/java/android/app/Service.java
54b6cfa9a9e5b861a9930af873580d6dc20f773c 21-Oct-2008 The Android Open Source Project <initial-contribution@android.com> Initial Contribution
/frameworks/base/core/java/android/app/Service.java