summaryrefslogtreecommitdiff
path: root/core/java/android/content/BroadcastReceiver.java
Commit message (Collapse)AuthorAgeFilesLines
* Migrate frameworks/base javadocs references to androidxAlan Viverette2022-02-091-1/+1
| | | | | | | | | | | Does not remove Support Library artifacts from docs classpath (ApiDocs.bp) because they are still used in development/samples, which is not as easy to migrate as javadoc. Bug: 158779503 Test: make docs Exempt-From-Owner-Approval: Mass find/replace for androidx migration Change-Id: Icf7f53ec36a0e970413352e2ebf40ce9d60ed17e
* Fixes NullPointerException.Yandry Perez Clemente2021-12-151-1/+1
| | | | | | | | mPendingResult is not guaranteed to have been initialized at this point. Test: Manual. Bug: 210266601 Change-Id: I84287a068d03dd3aac2b046d1b8fdd8e6e52803f
* Adds trace messages when goAsync and finish are called.Yandry Perez Clemente2021-12-021-0/+16
| | | | | | | | | | | | | | | These will be used to troubleshoot ANRs. In this case calling goAsync and forgetting to call finish on the PendingResult could be the cause. We have existing instrumentation to include these in Perfetto traces and have used the "am" tag to avoid having to allowlist every single app of interest in the Perfetto tracing configuration (the "am" tag is allowlisted). Test: Manual: captured a Perfetto trace and verified the counters are present. Bug: b/207823767 Change-Id: I96aadf4d6d891f3c7d140b9792e7f893243d9943
* 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: I6ab53570aca580fbee1fcc927871caa09780f58f
* System API: Context#registerReceiverForAllUsersMeng Wang2019-11-071-0/+17
| | | | | | Bug: 141193711 Test: make Change-Id: Ie692d2ac27474b9fe11f5548bc504aa00c5ad53c
* Move some members to the "Q blacklist".Mathew Inwood2018-09-141-6/+7
| | | | | | | | | | | | | | Based on some analysis, these fields/methods are likely false positives. Set maxTargetSdk=P so that any apps using them are required to migrate off them in future. See the bug for more details. Exempted-From-Owner-Approval: Automatic changes to the codebase affecting only @UnsupportedAppUsage annotations, themselves added without requiring owners approval earlier. Bug: 115609023 Test: m Change-Id: I719b5c94e5b1f4fa562dd5d655953422958ad37e
* Add @UnsupportedAppUsage annotationsMathew Inwood2018-08-151-0/+16
| | | | | | | | | | | | | | | | | | | | | | For packages: android.content.res android.content.pm.split android.content.pm.permission android.content.pm.dex android.content.pm android.content.om android.content 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: Ia79256a3d04e16dd78331a61af0dcddc5fc1599b
* Fix broken javadocs.Jeff Sharkey2017-08-061-1/+1
| | | | | | Bug: 64337634 Test: make -j32 doc-comment-check-docs Change-Id: I20fdd3dcddef09111d35946c41c596c7689effa6
* Fix issue #38210653: Few more tweaks of job schedulerDianne Hackborn2017-05-121-1/+23
| | | | | | | | | | | | | | | | | | | | - Now keep track of the time a job was enqueued, and order the pending list by that. - Added configuration constants for rescheduling: maximum times to reschedule, minimum backoff times. - Fixed printing of active jobs -- the method to get the current JobStatus was old and didn't require the caller to hold a lock, so made a copy, which didn't contain all the data we were interested in. Now with our simple locking, we can just make that require the caller hold a lock and return the real JobStatus object. - Include oom_adj and procstate when printing information about processes being killed. - Expanded documentation of BroadcastReceiver.goAsync(). Test: bit CtsJobSchedulerTestCases:* Change-Id: I2e45f181e45be9836c74cbff1b844ffdf6e93019
* Revert accidential merge 492a058d58e991445996cb8cc8dcb24494ac20c5Philip P. Moltmann2017-02-141-3/+3
| | | | | Test: Clean revert Change-Id: I61d339bb85936e1d50742be1e4c6dab781f3a4e7
* resolve merge conflicts of d043a840f7f12ce2c54e7d4564a6ac9cfa24dd17 to ↵Philip P. Moltmann2017-02-141-3/+3
|\ | | | | | | | | | | | | | | nyc-mr2-dev-plus-aosp am: b02f8eb241 Change-Id: I1307ea308423c0fd34564d788ab64c023a5be2c5
| * [DO NOT MERGE] Revert "[DO NOT MERGE] Delay SharedPreferences.apply() by 50 ms"Philip P. Moltmann2017-02-131-3/+3
| | | | | | | | | | | | | | This reverts commit 2fc44947dd4f45a23c56985d4c12f01332027a9f. Bug: 30662828 Change-Id: Ia22343c19e155555dff3b0cb58f7b58df0ce6301
| * [DO NOT MERGE] Delay SharedPreferences.apply() by 50 msPhilip P. Moltmann2017-01-311-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... so that multiple applies can be combined into a single write. Do do this I replaces the executor in the QueuedWork by a more Android-y handler. Test: Ran shared preferences CTS tests. Looked at log and saw a lot of skipped writes Bug: 33385963 Bug: 30662828 Change-Id: I8f33df717be7091532930ccf6ca8c48940e4edd4 (cherry picked from commit 3349644872d9b769f4e2d0ec1b91d368a552ff8d)
* | docs: changes to broadcast documentation am: 33ec106d22 am: 377dab8ab3 am: ↵Mark Lu2016-12-161-225/+67
|\| | | | | | | | | | | | | | | fd737791e8 am: 45d6ba7b98 Change-Id: I2dcb6bc7f8ebf385bc7d6a571a760c140a65e9fb
| * docs: changes to broadcast documentationMark Lu2016-12-131-225/+67
| | | | | | | | | | | | | | | | | | | | - move BroadcastReceiver info to developer guide. see cl/140402421 - add usage note to CONNECTIVITY_ACTION broadcast bug:32533262 bug:33106411 Change-Id: Ic2aa517831d29418e0c42aa6fc1e7f9aeb50f802
* | Delay SharedPreferences.apply() by 50 msPhilip P. Moltmann2016-12-141-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | ... so that multiple applies can be combined into a single write. Do do this I replaces the executor in the QueuedWork by a more Android-y handler. Test: Ran shared preferences CTS tests. Looked at log and saw a lot of skipped writes Bug: 33385963 Change-Id: I8f33df717be7091532930ccf6ca8c48940e4edd4
* | Update usage of ActivityManagerNative.Sudheer Shanka2016-11-141-4/+4
|/ | | | | | | | | | | - Remove references to ActivityManagerProxy. - Add isSystemReady to ActivityManager. Bug: 30977067 Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test android.server.cts adb shell am instrument -e class com.android.server.am.ActivityManagerTest,com.android.server.am.TaskStackChangedListenerTest \ -w com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner Change-Id: I07390b6124fb1515821f5c0b37baf6ae74adc8fa
* Exposing file:// beyond your app is bad, m'kay?Jeff Sharkey2016-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For several releases now we've told developers that sharing raw files between apps is a recipe for trouble. There are at least three major problems with sending raw files: -- Apps sending generic intents can't know who is at the other end, so they may not have access to shared storage locations. This is more likely now that runtime permissions require apps to explicitly ask users for permission. -- Apps making files in their private storage world-readable has been deprecated for several releases, and now in N it's fully blocked. If we let these intents through, the receiving app would fail to open the file, when the real blame rests on the sending app. -- Devices with user profiles can't share raw files when using cross-profile intent filters, since filesystem access is fully locked down between users. The time has finally come to communicate clearly that if you're sharing content between apps, you need to use content:// Uris. We added the simple FileProvider several years ago to give apps a clean way to migrate with minimal work on their part. Bug: 26860922, 9069185 Change-Id: I075f627f6a0d6c7fca2c090ca133b9aae9801c64
* Teach receivers, activities, providers, and services app ops.Svet Ganov2015-07-011-1/+1
| | | | | | | | | | | | | Perform app op check in addition to the permisison check for all four paltform components - activities, content providers, broadcast receivers, services - if they are guarded by a permssion that has an associated app op. This ensures that legacy apps will behave correctly if the permission of the caller has been revoked, i.e. the app op for that permission was disabled. bug:22199666 Change-Id: Ia22d1c38d58b3cd6aabdc655cb7c7bddd85da7a2
* [ActivityManager] Distinguish FG or BG receiver finishedriddle_hsu2015-01-031-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Symptom: Assume a foreground broadcast FG and a background BG. If a recevier registers both FG and BG. When sending BG and FG to the receiver, and the receiver BG receiver completes first, its finishReceiver will trigger next FG receiver rather than BG, and also deliver wrong result code/data to the next. More detail and sample: https://code.google.com/p/android/issues/detail?id=92917 Root cause: Due to BroadcastQueue:getMatchingOrderedReceiver will match by receiver(IBinder), so the caller ActivityManagerService: broadcastRecordForReceiverLocked will always match the first queue(fg) if a receiver is both receiving fg and bg. Solution: Add a parameter flags to finishReceiver, then server side could know the finished receiver should belong to which queue. Another general solution but with bigger scope: I60dce4a48e20c1002a61a979e4d78b9b0a8b94a0 Change-Id: I913ca6f101ac8ec6c7a8e42754e6781f80247b7f
* Warn when exposing file:// Uris beyond a process.Jeff Sharkey2013-04-031-1/+1
| | | | | | | | | | | Check for file:// Uris inside Intents, ClipData, Notifications and RemoteViews when StrictMode option is enabled. Also introduces Intent.prepareToLeaveProcess() to uniformly handle Intents about to leave an app process. Bug: 8529070 Change-Id: I8efb43877cbc5f21eb029fc6492b3ee1415059ef
* docs: Fix a bunch of issuesScott Kennedy2013-01-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | External tracker 42609 External tracker 42607 External tracker 42604 External tracker 42600 External tracker 42574 External tracker 42450 External tracker 41050 External tracker 40995 External tracker 40970 External tracker 40935 External tracker 40507 External tracker 40481 External tracker 40435 External tracker 40406 External tracker 40297 External tracker 40281 External tracker 39978 External tracker 39929 External tracker 39803 External tracker 39715 External tracker 39441 Change-Id: If4215cef850ba8e4e8df356a68192566806e7914
* Add registering for explicit users.Dianne Hackborn2012-09-041-3/+15
| | | | | | | | | | | | | New API to register as an explicit user, which allows you to also select ALL to see broadcasts for all users. New BroadcastReceiver API to find out which user the broadcast was sent to. Use this in app widget service to handle per-user package broadcasts and boot completed broadcasts correctly. Change-Id: Ibbe28993bd4aa93900c79e412026c27863019eb8
* Fix several cases of broken droiddoc syntaxJeff Smith2012-07-251-1/+1
| | | | | | | | external issue 35214 patch contributed by Jeff Smith <whydoubt@yahoo.com> Change-Id: I70dcee88a140699bf3e1ab369bed6dcd2fdd3d83
* Clarify docs for the thread used in BroadcastReceiver.onReceive()Nick Pelly2012-03-021-3/+7
| | | | Change-Id: Ib6c0da5d0ca2fc95b26b230b306f205a9942cf03
* SDK only: now that support lib is in SDK, we can link to it.Dianne Hackborn2011-12-121-30/+67
| | | | | | | | | | | Update some of the platform documentation to directly link to relevent support lib docs. Yay! Also improve BroadcastReceiver documentation to more clearly discussion security around receivers, and how the support lib's LocalBroadcastManager can help. Change-Id: I563c7516d5fbf91ab884c86bc411aff726249e42
* Merge "docs: add developer guide cross-references, Project ACRE"Joe Fernandez2011-10-041-1/+8
|\
| * docs: add developer guide cross-references, Project ACREJoe Fernandez2011-10-041-1/+8
| | | | | | | | Change-Id: I5df1c4e13af67ff4c4a5b22f3cb1247bf0103b09
* | Add mechanism for Parcel to not allow FDs to be written to it.Dianne Hackborn2011-10-031-0/+4
|/ | | | | | This is to help implement issue #5224703. Change-Id: I026a5890495537d15b57fe61227a640aac806d46
* Fix a bunch of API review bugs.Dianne Hackborn2011-01-171-0/+10
| | | | | | | | | | 3362464 API REVIEW: android.content potpourri 3362445 API REVIEW: Fragment transaction stuff 3362428 API REVIEW: Fragment stuff 3362418 API REVIEW: Loader stuff 3362414 API REVIEW: android.content.pm.ActivityInfo Change-Id: I6475421a4735759b458acb67df4380cc6234f147
* Add facility for broadcasts receives to do work asynchronously.Dianne Hackborn2010-10-271-31/+281
| | | | | | | | | | You can now call goAsync() and move your work to a background thread. If you are that kind of receiver. You weirdo. Also allows SharedPreferences.apply() to be committed off the main thread after returning from onReceive(). Change-Id: I27f975910e28f230ababcaeb551eb9a78ec4fc76
* Fix issue #2166755: BroadcastReceiver trying to return result during a ↵Dianne Hackborn2009-10-051-1/+31
| | | | | | | | | | | | non-ordered broadcast Tell the broadcast receiver whether it is getting an initial sticky value, so it will be quiet about attempts to do ordered broadcast stuff. Note that the original bug being reported was not actually a crash, just an error log. So all we are doing here is making the log quieter. Change-Id: Iaf1b718d82093ec1197142410a64feff47eb3859
* AI 144405: am: CL 144307 am: CL 144306 Fix SDK issue 1716562 - Broadcast ↵Chris Tate2009-04-021-7/+15
| | | | | | | | | | mechanism documentation should be improved. Original author: ctate Merged from: //branches/cupcake/... Original author: android-build Automated import of CL 144405
* auto import from //branches/cupcake_rel/...@140373The Android Open Source Project2009-03-181-4/+4
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+425
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-425/+0
|
* auto import from //branches/cupcake/...@132276The Android Open Source Project2009-02-191-2/+2
|
* auto import from //branches/cupcake/...@130745The Android Open Source Project2009-02-101-1/+27
|
* Code drop from //branches/cupcake/...@124589The Android Open Source Project2008-12-171-1/+1
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+399