summaryrefslogtreecommitdiff
path: root/core/java/android/app/Service.java
Commit message (Collapse)AuthorAgeFilesLines
* docs: Fixing broken {docroot} linksAndrew Solovay2023-01-031-2/+2
| | | | | | | | | | | | | | | Fixing a couple of broken links (that used the wrong docroot syntax). No changes to code. Staged to: * go/dac-stage/reference/android/app/Service * go/dac-stage/reference/kotlin/android/app/Service Merged-In: Ib50be686bfdd142f6c5a0d0bfccc7b1b411d5d14 Change-Id: Ib50be686bfdd142f6c5a0d0bfccc7b1b411d5d14 BUG: 252953726 TEST: [local docs build]
* stopForeground(boolean) deprecation & docsChristopher Tate2021-12-061-3/+16
| | | | | | | | Tidy up the reference docs and the deprecated API discussion Bug: 196934059 Test: m offline-sdk-docs Change-Id: Iea9461d6b07207e7e136d59c9b896e4e7343d76c
* Merge "ForegroundServiceDidNotStartInTimeException now has..." into ↵Makoto Onuki2021-11-301-0/+35
|\ | | | | | | | | | | | | | | sc-v2-dev am: b344d33561 am: 9a6b5025ce Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16288923 Change-Id: Icf21bafa8aa64bc7f9dd5234fb4f38c50a3a9aef
| * ForegroundServiceDidNotStartInTimeException now has...Makoto Onuki2021-11-181-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | an inner exception that captures the stacktrace where Context.startForegroundService() was called last time, from the same process. Bug: 124137635 Test: Manual test with a tesapp. 1: when startForegroundService() is called by the same process: ``` 11-17 17:00:12.483 10241 9545 9545 E AndroidRuntime: FATAL EXCEPTION: main 11-17 17:00:12.483 10241 9545 9545 E AndroidRuntime: Process: com.google.omakoto.testapp, PID: 9545 11-17 17:00:12.483 10241 9545 9545 E AndroidRuntime: android.app.RemoteServiceException$ForegroundServiceDidNotStartInTimeException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{e7674af u0 com.google.omakoto.testapp/.MyFgs3} 11-17 17:00:12.483 10241 9545 9545 E AndroidRuntime: at android.app.ActivityThread.generateForegroundServiceDidNotStartInTimeException(ActivityThread.java:1965) 11-17 17:00:12.483 10241 9545 9545 E AndroidRuntime: at android.app.ActivityThread.throwRemoteServiceException(ActivityThread.java:1934) 11-17 17:00:12.483 10241 9545 9545 E AndroidRuntime: at android.app.ActivityThread.access$2700(ActivityThread.java:255) 11-17 17:00:12.483 10241 9545 9545 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2190) 11-17 17:00:12.483 10241 9545 9545 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106) 11-17 17:00:12.483 10241 9545 9545 E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:201) 11-17 17:00:12.483 10241 9545 9545 E AndroidRuntime: at android.os.Looper.loop(Looper.java:288) 11-17 17:00:12.483 10241 9545 9545 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7839) 11-17 17:00:12.483 10241 9545 9545 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 11-17 17:00:12.483 10241 9545 9545 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) 11-17 17:00:12.483 10241 9545 9545 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003) 11-17 17:00:12.483 10241 9545 9545 E AndroidRuntime: Caused by: android.app.StackTrace: Last startServiceCommon() call for this service was made here 11-17 17:00:12.483 10241 9545 9545 E AndroidRuntime: at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1868) 11-17 17:00:12.483 10241 9545 9545 E AndroidRuntime: at android.app.ContextImpl.startForegroundService(ContextImpl.java:1823) 11-17 17:00:12.483 10241 9545 9545 E AndroidRuntime: at android.content.ContextWrapper.startForegroundService(ContextWrapper.java:779) 11-17 17:00:12.483 10241 9545 9545 E AndroidRuntime: at android.content.ContextWrapper.startForegroundService(ContextWrapper.java:779) 11-17 17:00:12.483 10241 9545 9545 E AndroidRuntime: at com.google.omakoto.testapp.MyReceiver.onReceive(MyReceiver.java:53) 11-17 17:00:12.483 10241 9545 9545 E AndroidRuntime: at android.app.ActivityThread.handleReceiver(ActivityThread.java:4345) 11-17 17:00:12.483 10241 9545 9545 E AndroidRuntime: at android.app.ActivityThread.access$1600(ActivityThread.java:255) 11-17 17:00:12.483 10241 9545 9545 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2102) 11-17 17:00:12.483 10241 9545 9545 E AndroidRuntime: ... 7 more ``` Test: Manual test with a tesapp. 1: when startForegroundService() is called by another process: ``` 11-17 16:59:34.456 10241 9432 9432 E AndroidRuntime: FATAL EXCEPTION: main 11-17 16:59:34.456 10241 9432 9432 E AndroidRuntime: Process: com.google.omakoto.testapp:second, PID: 9432 11-17 16:59:34.456 10241 9432 9432 E AndroidRuntime: android.app.RemoteServiceException$ForegroundServiceDidNotStartInTimeException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{dcaa127 u0 com.google.omakoto.testapp/.MyFgs3} 11-17 16:59:34.456 10241 9432 9432 E AndroidRuntime: at android.app.ActivityThread.generateForegroundServiceDidNotStartInTimeException(ActivityThread.java:1965) 11-17 16:59:34.456 10241 9432 9432 E AndroidRuntime: at android.app.ActivityThread.throwRemoteServiceException(ActivityThread.java:1934) 11-17 16:59:34.456 10241 9432 9432 E AndroidRuntime: at android.app.ActivityThread.access$2700(ActivityThread.java:255) 11-17 16:59:34.456 10241 9432 9432 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2190) 11-17 16:59:34.456 10241 9432 9432 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106) 11-17 16:59:34.456 10241 9432 9432 E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:201) 11-17 16:59:34.456 10241 9432 9432 E AndroidRuntime: at android.os.Looper.loop(Looper.java:288) 11-17 16:59:34.456 10241 9432 9432 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7839) 11-17 16:59:34.456 10241 9432 9432 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 11-17 16:59:34.456 10241 9432 9432 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) 11-17 16:59:34.456 10241 9432 9432 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003) ``` Change-Id: I2dd8ec76213d53728eaa8fcc3760813d82a328a5
* | Merge "Clarify how FGS restriction won't apply STICKY FGS restarts" into ↵Makoto Onuki2021-08-111-0/+7
|\| | | | | | | | | | | | | | | sc-dev am: 0c1dc2fc76 am: a434416feb Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15484572 Change-Id: I92b4ef8fe30ea0b404ac3239c9c136c92415053a
| * Clarify how FGS restriction won't apply STICKY FGS restartsMakoto Onuki2021-08-061-0/+7
| | | | | | | | | | | | Fix: 195780554 Test: build Change-Id: Ic627a89ac863729d36554070d04c22254747f014
* | Deprecate stopForeground(boolean)Christopher Tate2021-08-101-17/+32
|/ | | | | | | | | | | | It was superseded in API 24 (Android N), and does not actually behave the way that developers assume. Everyone should use the modern version nowadays, and there's already a ServiceCompat facility provided in Jetpack to handle legacy deployment issues. Bug: 195653704 Test: m offline-sdk-docs (no implementation changes) Test: verify platform build Change-Id: Ia014998b91da732ef26cc796d23e57c727fd067a
* Update the javadoc around FGSMakoto Onuki2021-06-151-0/+24
| | | | | | | | | | | | Fix: 182901904 Test: build Test: m offline-sdk-docs && \ cd /android/sc-dev/out/target/common/docs/offline-sdk/ && \ python3 -m http.server 8000 && \ google-chrome http://localhost:8000/ and check the content Change-Id: Ic9964c929c8b7d4caf1706d2398d0eb8eaddc70a
* Introduce WindowProviderServiceCharles Chen2021-04-151-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A Window Provider Service is a Window-Context-like Service which handles UI components and is able to obtain the latest configuration. The differences between a Window Context and a Window Provider Service is that: 1. It is always associated with the primary display before attachWindowToken() or WM#addView is called. It is suggested to render UI components after calling the APIs mentioned above. 2. A window context registers the listener in constructor and unregisters it in finalize(), while a window provider service registers the listener in onCreate() and unregisters in onDestroy(). 3. Like the API Context#createWindowContext(int windowType, Bundle options), the users of a Window Provider Service need to override provideWindowType and provideOptions to pass the attributes. 4. When there's a configuration updates from the server side, the Service#onConfigurationChanged callback will be invoked.(TBD) It is suggested to use window context when possible. This class is to migrate the Service to show UI components to the window context concept. We can't migrate them to WindowContext directly because developers are used to use this kind of Service as the container of UI components and may change its property at runtime. An example is that keyboard developers may apply a new theme by InputMethodService#getResources#setTheme(newTheme). Bug: 159767464 Test: atest WindowContextTests#testWindowProviderServiceLifecycle Change-Id: I7d537fd2d128efa28aa6e771d77aa105fb497672
* Throw more descriptive exceptions when service start isn't allowed.Makoto Onuki2021-02-191-1/+8
| | | | | | Fix: 180518252 Test: atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java Change-Id: Ia38a159f9ededdc9885ce6b8dc61640c3af5ef72
* BG-FGS-launch restriction exemptions.Hui Yu2020-11-231-0/+4
| | | | | | | | | | | | | | | | | | | | | 1. Add a new permission START_FOREGROUND_SERVICES_FROM_BACKGROUND. 2. Add a new bind flag BIND_ALLOW_FOREGROUND_SERVICE_STARTS_FROM_BACKGROUND 3. BroadcastOptions.setTemporaryAppWhitelistDuration() is currently protected with CHANGE_DEVICE_IDLE_TEMP_WHITELIST permission, also open it for START_ACTIVITIES_FROM_BACKGROUND and START_FOREGROUND_SERVICES_FROM_BACKGROUND permission. 4. Exempt SYSTEM_ALERT_WINDOW permission. 5. if Context.startForegroundService() or Service.startForeground() is restricted by BG-FGS-launch restriction, and app's targetSdkVersion is S and above, throw a IllegalStateException. Bug: 171305836 Test: atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java#testFgsBindingFlagFGS atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java#testFgsBindingFlagActivity atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java#testFgsStartSystemAlertWindow atest cts/tests/app/src/android/app/cts/ActivityManagerFgsBgStartTest.java#testFgsStartFromBGException Change-Id: Iff3ed65e174a8406d4d6045cda42bdde6cecf30d
* Enabled Content Capture in ServiceYara Hassan2020-04-021-1/+25
| | | | | | | Bug: 150451947 Fix: 150451947 Test: Locally Change-Id: Icbcbe4c46c4c5eb39b176b80c01dcce96f9dfbbd
* Revert "Enabled Content Capture in Service"Xianyuan Jia2020-03-171-25/+2
| | | | | | | | | This reverts commit 988f7e0cd47708d9869027d045a4c069b63d574f. Reason for revert: Droidcop: Potential culprit for Bug b/151715362 - verifying through Forrest before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted. Bug: 151715362 Change-Id: I882d6f1a4c43f5331aa1e205a858d20f18ecf72d
* Enabled Content Capture in ServiceYara Hassan2020-03-161-2/+25
| | | | | | | | | In AiAi we require calling the data share ContentCapture API from a Service. Therefore we would like to enable ContentCapture in a Service. We do this by having the Service implement the ContentCaptureClient interface. Bug: 150451947 Fix: 150451947 Test: Locally Change-Id: I4a2c600e7c09a5441dc681d78549cd21abba44cc
* Use new UnsupportedAppUsage annotation.Artur Satayev2019-12-181-1/+1
| | | | | | | | Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library. Bug: 145132366 Test: m && diff unsupportedappusage_index.csv Change-Id: I8789f8499d4dca08580672e9e45ed9a7026dd686
* Deprecate IntentServiceCharles Munger2019-11-221-1/+1
| | | | | | | | | | | | IntentService always had some issues, such as delivering null, adding latency, inconsistently silently dropping tasks scheduled on its thread local handler, etc. But with android O's background task restrictions, it's really not useful anymore, and there are jetpack APIs that provide its same functionality. Bug: 144042891 Test: No behavior changes Change-Id: I1a91afeeb73e270c54a9ec266b15b5d865ef8339
* Add API Service.getForegroundServiceType()Hui Yu2019-02-261-1/+26
| | | | | | | | | | | | | | | | | | | | | To return current foregroundServiceType if the service has become a foreground service. If service become foreground service by calling Service.startForeground(int, Notification, int type), the returned type is the type specified. If the no-type version Service.startForeground(int, Notification) is called. the returned type is foregroundServiceType specified in manifest. If no foregroundServiceType specified in manifest, the returned type is zero. If the service is not a foreground service, the returned type is zero. Bug: 124517685 Test: atest cts/tests/app/src/android/app/cts/ActivityManagerProcessStateTest.java#testFgsLocation Change-Id: Ibcc4431429a90aab92a5533e296fb104b4add9e6
* Add IntDef annotation to parameter foregroundServiceType.Hui Yu2019-02-151-1/+2
| | | | | | | | | | For methods Service.startForeground(int, Notification, int). Also add IntDef annotation on return value of ServiceInfo.getForegroundServiceType(). Change-Id: I3f0df5ff44dfb1b0cf2150d6e40d39ac0cd2b2b5 Fix: 124331268 Test: NA.
* Change foregroundServiceType from enum to flagsHui Yu2019-01-311-8/+45
| | | | | | | | | | | | | | | | | 1. Now the value of manifest attribute foregroundServiceType can be multiple flags ORed together. 2. Add a overloaded version of Service.startForeground() with an additional parameter foregroundServiceType. The flags in parameter foregroundServiceType must be a subset of flags specified in manifest attribute foregroundServiceType, otherwise a IllegalArgumentException is thrown. 3. Add a field foregroundServiceType in ServiceRecord, it is the types that have been started on this foreground sevice. Bug: 111453223 Test: atest frameworks/base/tests/FrameworkPerf Change-Id: I7eb68f696e6bf75720fe9c9388a6c23a529677f7
* Add manifest service attribute foregroundServiceTypeHui Yu2018-12-061-1/+8
| | | | | | | | | | | | | | | | | Foreground service must use attribute foregroundServiceType to specify its foreground service type in <sevice> element of manifest file, otherwise a warning message is printed when startForeground() method is called. (We will replace the warning message with a security exception when the feature is formally activiated.) The manifest attribute is: android:foregroundServiceType="<type>" Allowed types are: "sync", "mediaPlay", "phoneCall", "location", "deviceCompanion", "ongoingProcess". Bug: 111453223 Test: atest frameworks/base/tests/FrameworkPerf Change-Id: I5d2ab203d400f3c549cd153480b6252a2f9adb3c
* Merge "docs: bug 37126744, typos" into pi-devkopriva2018-10-031-5/+5
|\ | | | | | | | | | | am: 58c7bcf12e Change-Id: I5a7b100cc186e92a16e1572a1cbee3f789e8df58
| * docs: bug 37126744, typoskopriva2018-10-031-5/+5
| | | | | | | | | | | | | | | | | | | | | | fixing order of import statements to clear repo hooks Test: make ds-docs Bug: 37126744 Change-Id: I0ebb3d1d2599a411afd9b8ffd6f2497d821deb2b Exempt-From-Owner-Approval: Docs-only change
* | Add @UnsupportedAppUsage annotationsMathew Inwood2018-08-141-0/+9
|/ | | | | | | | | | | | | | | | | | | | | | | | | | For packages: android.app.usage android.app.trust android.app.timezonedetector android.app.timezone android.app.timedetector android.app.job android.app.backup android.app.assist android.app.admin android.app This is an automatically generated CL. See go/UnsupportedAppUsage for more details. Exempted-From-Owner-Approval: Mechanical changes to the codebase which have been approved by Android API council and announced on android-eng@ Bug: 110868826 Test: m Change-Id: I5d15d50344d7178617418846917f693cfabf006b Merged-In: I618c5dc4462ae990d9df45c3e9ed3f092cc5138c
* Fix issue #72116995: Add permission guarding Service#startForegroundDianne Hackborn2018-03-051-8/+4
| | | | | | | | | | | | | | | | | | Now requires permission if targeting P. Note that this is a separate permission from the existing one that is required for instant apps to use foreground services. The reason for this is that their semantics are different (the instant apps permission is associated with an app op for control over what the app is allowed, while the regular app permission is just a normal permission that is always granted and only there for auditing of apps), and there are probably going to be cases where a developer will want to use a foreground service in the full version of their app but not as an instant app. Bug: 72116995 Test: atest CtsAppTestCases Change-Id: I883c9515c307ed8e39f0bf888c4045944c8183ac
* Revert "Fix issue #72116995: Add permission guarding Service#startForeground"Ian Pedowitz2018-02-121-4/+8
| | | | | | | | | | This reverts commit a9da85fde4675ed0b03557e448b1cc67f1d391fe. Reason for revert: b/73224471 Bug: 73224471 Bug: 72116995 Change-Id: I1485305f40d47fdb138cb1e484c329cf20892a6b
* Fix issue #72116995: Add permission guarding Service#startForegroundDianne Hackborn2018-02-071-8/+4
| | | | | | | | | | | | | | | | | | Now requires permission if targeting P. Note that this is a separate permission from the existing one that is required for instant apps to use foreground services. The reason for this is that their semantics are different (the instant apps permission is associated with an app op for control over what the app is allowed, while the regular app permission is just a normal permission that is always granted and only there for auditing of apps), and there are probably going to be cases where a developer will want to use a foreground service in the full version of their app but not as an instant app. Bug: 72116995 Test: atest CtsAppTestCases Change-Id: I95afb7185742b82c525e775ca20bb36015510b43
* Revert "Fix issue #72116995: Add permission guarding Service#startForeground"Dianne Hackborn2018-01-251-4/+8
| | | | | | | | | | This reverts commit 994b5ad737831854ac3ba119abba533adca774fc. Waiting for Chrome prebuilt. Test: NA Bug: 72116995 Change-Id: Ifcfea94ddefda27267640283038c9d0f933ea1d8
* Fix issue #72116995: Add permission guarding Service#startForegroundDianne Hackborn2018-01-241-8/+4
| | | | | | | | | | | | | | | | | | Now requires permission if targeting P. Note that this is a separate permission from the existing one that is required for instant apps to use foreground services. The reason for this is that their semantics are different (the instant apps permission is associated with an app op for control over what the app is allowed, while the regular app permission is just a normal permission that is always granted and only there for auditing of apps), and there are probably going to be cases where a developer will want to use a foreground service in the full version of their app but not as an instant app. Bug: 72116995 Test: atest CtsAppTestCases Change-Id: If5a79e7ed5ab9e0edc77410315eb4d2df8ac850b
* Don't keep a reference to Service objectAmith Yamasani2017-05-231-1/+9
| | | | | | | | | This is a potential fix for a global reference leak in the system process by a JobService in an app. Bug: 38467796 Test: manual Change-Id: I8756c39ac77bead068c88fce750c4024f9ac1c03
* All kinds of little foreground services fixes.Dianne Hackborn2017-05-041-14/+16
| | | | | | | | | | | | | | | | | | | | | | - Better explanations of some strings. - Fix to use the right package when an item is pressed in the foreground services dialog. - Improve java docs on Service.startForeground(). Bug: 37925387 735566 lv - Android - [Source] Context unclear or missing: Apps running in background Bug: 37925888 735566 lv - Android - [Source] Context unclear or missing: Tap for details on battery and data usage Bug: 37897953 735566 gl - Android - [Source] Context unclear or missing: LEFT_SIDE, RIGHT_SIDE Bug: 37943079 Music is dying mid playback Test: manual Change-Id: Ied41932c61f59335bd18dfba3fcb13af28a0bddd
* Auto-generate docs based on annotations.Jeff Sharkey2017-04-201-21/+17
| | | | | | | | | | | | | | | | | | | | | | | We have a handful of annotations that we've been sprinkling across the platform APIs, such as @Nullable, @NonNull, @IntDef, etc. It would be really helpful to surface these contracts to developers through the SDK docs. This change allows annotations like those mentioned above to declare the following new javadoc fields: @memberDoc: docs to append to a field or method definition. @paramDoc: docs to append to a @param definition. @returnDoc: docs to append to a @return definition. This change also builds a docstring to describe the list of all constants listed in an @IntDef annotation. Sadly AnnotationDesc only passes along raw constant values, so we need the help of the new "prefix" annotation argument to help find the field names. Test: builds Bug: 37526420 Change-Id: I4cfc00dd904e5dfa945b406d546e36846b7c0c28
* Revert "Ensure network connectivity on app start."Sudheer Shanka2017-02-221-9/+7
| | | | | | This reverts commit 27e693158398059d00ff20e60640cb105e255625. Change-Id: I4c41ce7c1839d3b91931bc8a8f117f32bf6cd381
* Ensure network connectivity on app start.Sudheer Shanka2017-02-131-7/+9
| | | | | | Bug: 27803922 Test: cts-tradefed run singleCommand cts-dev --module CtsHostsideNetworkTests Change-Id: Ifd7a52924cd6bbc809c9a3f92d52fe2df09b7fe2
* Work on issue #28221912: Starting service as foreground might...Dianne Hackborn2016-04-181-12/+71
| | | | | | | | | | | ...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
* Mark Service#onBind() @NullableScott Kennedy2015-02-191-0/+2
| | | | Change-Id: I6e600dd018e1cb2b51b666ec5acf56b2885c0083
* Improve some docs, fix some debugging.Dianne Hackborn2014-10-091-3/+11
| | | | | | | | | | | | | | | | | | - 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
* Fix a small typo in javadocsEvan Charlton2014-07-311-1/+1
| | | | | | Service#START_FLAG_RETRY has an extra word; remove it. Change-Id: I4743e2ea474c70fe5d31f1a4ef257f9752f8e823
* Revert services assist context in KitKatAdam Skory2013-09-111-13/+0
| | | | | | | | | | | 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
* Fix the buildBen Murdoch2013-08-081-1/+1
| | | | Change-Id: If34523c4b25b3d60edc00b0f37b636bedfc756c2
* Extend assist context to foreground servicesAdam Skory2013-08-071-0/+13
| | | | | | | | | | | | | | | | | | | | | | 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
* add notice to not use 0 in startForeground().Scott Main2013-04-301-1/+1
| | | | | | | also delete some obsolete back-compat tips for <=donut bug: 8746126 Change-Id: I3ee966647aa2c9f572e6f02eeabfc2cf925a031f
* Doc update: clarify dumpsys instructionskmccormick2013-03-291-1/+3
| | | | | | "Bug: 8474578" Change-Id: Ic743de8f41a1b2d38a4d2495148dc07e2f45b8e5
* docs: fix broken linksScott Main2012-08-061-2/+2
| | | | | | and update sitemap text file Change-Id: I6982c3f029c46135ae856b8484d906c2882bad3a
* Make component names visible in javadoc.Jeff Sharkey2012-04-111-2/+2
| | | | Change-Id: I3770ea6616b8425c387bcd27d668e3114b14335d
* Fix obvious typos under frameworks/base/coreKen Wakasa2012-03-091-1/+1
| | | | Change-Id: Ia5fc3db1bb51824e7523885553be926bcc42d736
* Add new Intent API for associating a ClipData with an Intent.Dianne Hackborn2012-03-081-1/+13
| | | | | | | | | | | | | | | | 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
* docs: add developer guide cross-references, Project ACREJoe Fernandez2011-10-041-5/+7
| | | | Change-Id: I5df1c4e13af67ff4c4a5b22f3cb1247bf0103b09
* Various work on out of memory managment.Dianne Hackborn2011-07-291-3/+6
| | | | | | | | | | | | | - 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
* Remove an unnecessary finalizer.Jeff Brown2011-07-181-6/+0
| | | | | | | Simply having a finalizer impacts the GC's ability to reclaim resources in a timely manner. Change-Id: Ia9e5f6f1dcb50fae8c2819d25d167df751adf451
* Add APIs to remove tasks.Dianne Hackborn2011-04-121-0/+20
| | | | | | | | | | | | | | | | 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