summaryrefslogtreecommitdiff
path: root/core/java/android/os/IBinder.java
Commit message (Collapse)AuthorAgeFilesLines
* IBinder.transact: clarify returnSteven Moreland2022-02-181-1/+4
| | | | | | | | False can't be returned for a oneway call. Bug: N/A (from email thread) Test: N/A Change-Id: Ie2641877e30d00e7c5e195d763e361fd2992c963
* Merge "IBinder: support FLAG_CLEAR_BUF"Steven Moreland2020-11-111-0/+9
|\
| * IBinder: support FLAG_CLEAR_BUFSteven Moreland2020-10-291-0/+9
| | | | | | | | | | | | | | | | | | | | This is @hide and it isn't expected to be very useful in Java, since, for instance, we would need a corresponding way to clear the data associated with a Java String object. However, it's here for symmetry. Bug: 171501998 Test: aidl_integration_test Change-Id: I9d81f6138c74561b934630a95e86e7e670da5f06
* | Add maxTargetSdk restriction to unused APIs.Mathew Inwood2020-11-041-1/+1
|/ | | | | | | | | | | These are APIs that have @UnsupportedAppUsage but for which we don't have any evidence of them currently being used, so should be safe to remove from the unsupported list. Bug: 170729553 Test: Treehugger Merged-In: I626caf7c1fe46c5ab1f39c2895b42a34319f771a Change-Id: I54e5ecd11e76ca1de3c5893e3a98b0108e735413
* Merge "Document linkToDeath behavior on object cleanup." am: 2608950d10 am: ↵Steven Moreland2020-04-011-4/+7
|\ | | | | | | | | | | f276d0b74d Change-Id: Id8621528331802054b5979edfb4a09c3e44fba61
| * Document linkToDeath behavior on object cleanup.Steven Moreland2020-03-311-4/+7
| | | | | | | | | | | | | | | | In Java, this has always been the case, but it wasn't documented. Bug: 152627219 Test: n/A Change-Id: I8d93d2876bac8f16101a30afdf06699ece653d25
* | Merge "Add getExtension to android.os.IBinder interface" am: 935dfd2ce9 am: ↵Automerger Merge Worker2020-02-041-0/+12
|\| | | | | | | | | | | 84642d37d5 am: fcc3a08dd4 Change-Id: I3e36d8ab9a629377529afbb1c0276c79d3414a00
| * Add getExtension to android.os.IBinder interfaceYo Chiang2020-02-031-0/+12
| | | | | | | | | | | | | | | | | | | | Provide a mechanism to extend and customize a binder interface without having to modify the original (base) interface. See the full motivation here: aosp/1099664 Bug: 147834064 Test: atest FrameworksCoreTests:BinderTest FrameworksCoreTests:BinderProxyTest Change-Id: Idd3595b1302cf7ac0590d064e795ba0b75811af6
| * Use new UnsupportedAppUsage annotation.Artur Satayev2020-01-131-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: I534e3fd1305e2f4af076986770033478448a665c Merged-In: I534e3fd1305e2f4af076986770033478448a665c
| * Add @UnsupportedAppUsage annotationsAndrei Onea2019-03-181-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For packages: android.os 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 Merged-In: I4ece0a3f37f88fc2508cb965092aed7cabc61819 Change-Id: I0d942254f06c1a355fb906640e223ad34cced6ab
* | Supplying the IBinder to binderDiedSuprabh Shukla2020-01-131-0/+7
| | | | | | | | | | | | | | | | | | | | Plugging the binder instance that dies. This helps a single DeathRecipient to listen for multiple binder deaths. Test: atest FrameworksCoreTests:BinderDeathRecipientTest Bug: 135633339 Change-Id: I976ee2a138877830885ee1cbbd2b313ecb87aeb3
* | 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: I534e3fd1305e2f4af076986770033478448a665c
* | Expose @hide APIs needed by ParceledListSliceDavid Su2019-12-161-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Expose @hide APIs referenced by ParceledListSlice/ BaseParceledListSlice as public APIs. ParceledListSlice will not be made a stable API in Android R. Thus, allow it to be copied into modules that need it by ensuring it does not use any @hide APIs. Bug: 145317012 Test: compiles Change-Id: Ife85b66005ba22b03c09bf9446661368dea31945
* | Allow apps to collect which appops were notedPhilip P. Moltmann2019-08-301-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If private user data is send to an app the data provider should note an app-op. This change adds a new API AppOpsManager#setNotedAppOpsCollector that allows an app to get notified every time such an private data access happens. This will allow apps to monitor their own private data usage. Esp. with big, old apps, distributed teams or 3rd party libraries it might not always be clear what subsystems access private data. There are three different situations how private data can be accessed and an app op is noted: 1. Private data access inside a two-way binder call. E.g. LocationManager#getLastKnownLocation. When we start a two way binder transaction, we remember the calling uid via AppOpsManager#collectNotedAppOps. Then when the data providing code calls AppOpsManager#noteOp->AppOpsManager#markAppOpNoted the noted app-op is remembered in AppOpsManager#sAppOpsNotedInThisBinderTransaction. Then when returning from the binder call, we add the list of noted app-ops to the reply-parcel via AppOpsManager#prefixParcelWithAppOpsIfNeeded. On the calling side we check if there were any app-ops noted in AppOpsManager#readAndLogNotedAppops and then call the collector while still in the binder code. This allows the collector e.g. collect a stack trace which can be used to figure out what app code caused the private data access. 2. Very complex apps might do permissions checks internal to themself. I.e. an app notes an op for itself. We detect this case in AppOpsManager#markAppOpNoted and immediately call the collector similar to case (1). 3. Sometimes private data is accessed outside of a two-way binder call. E.g. if an app registers a LocationListener an app-op is noted each time a new location is send to the app. In this case it is not clear to the framework which app-action triggered this app-op-note. Hence the data provider has to describe in a AsyncNotedAppOp object when an why the access happened. These objects are then send to the system server via IAppOpsService#noteAsyncOp and then the collector in the app. There are rare cases where a private data access happens before the app is running (e.g. when a geo-fence is triggered). In this case we cache a small amount of AsyncNotedAppOps (in AppOpsService#mUnforwardedAsyncNotedOps) and deliver them when the app is ready for these events (in AppOpsManager#setNotedAppOpsCollector). Test: atest CtsAppOpsTestCases (includes new tests covering this functionality) Bug: 136505050 Change-Id: I96ded4a8d8d9bcb37a4555d9b1281cb57945ffa9
* | Add @UnsupportedAppUsage annotationsAndrei Onea2019-03-151-0/+2
|/ | | | | | | | | | | | | | | | For packages: android.os 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: I4ece0a3f37f88fc2508cb965092aed7cabc61819
* Merge "Fix issue #64224738: Document return value of IBinder.transact()" ↵Dianne Hackborn2017-08-011-10/+19
|\ | | | | | | into oc-mr1-dev
| * Fix issue #64224738: Document return value of IBinder.transact()Dianne Hackborn2017-07-311-10/+19
| | | | | | | | | | | | | | | | Also add appropriate @NonNull and @Nullable annotations. Test: built Change-Id: I22de48105ef685baf594cfc004dd3e27e2ba09e9
* | Add documentation on oneway transaction ordering.Dianne Hackborn2017-07-311-0/+8
|/ | | | | Test: built Change-Id: I4d2e336327a4ce9c8f76d49037c894e981bdf571
* New infrastructure to switch remaining commands to "cmd" calls.Dianne Hackborn2016-09-291-1/+3
| | | | | | | | | | | | | | | | | This introduces a new feature of the IBinder command protocol to allow the shell command implementation to call back into its caller to ask it to open files in the calling context. This is needed so that commands that have arguments specifying files can open those files as the calling shell, not the system (or whatever) process. To test this all out, move the "am start" implementation over to ActivityManagerShellCommand, in particular along with its option to specify a file in which to write profiling data. Test: Manual Change-Id: I0c1e3857defefbd19a2ac29413aafbb34b1e48a3
* Add new "shell command" feature to Binder objects.Dianne Hackborn2015-10-121-2/+22
| | | | | | | | | | | | | IBinder has a new common interface for sending shell commands to it. This can be implemented by system services to provide a shell interface to the service, without needing to have separate shell java code. This includes changes to DeviceIdleController to implement the shell interface for all of the commands it has been providing through dumpsys. Change-Id: I76518ea6719d1d08a8ad8722a059c7f5fd86813a
* Work on issue #22765972: Binder transactions running out of address...Dianne Hackborn2015-07-281-1/+8
| | | | | | | | | | ...space causing package manager to fail Lower the maximum IPC size we use in various places, to keep it under the threshold of becoming dangerous. Now everything tries to keep not much more than 64k. Change-Id: I814013097966a7843179e5d581bfdb254c5ae318
* Remove unused imports from frameworks/base.John Spurlock2013-11-201-1/+0
| | | | Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
* Docfixes in IBinder, Context, View, and Intent.John Spurlock2013-07-151-4/+4
| | | | | | | Fix links in @throws clauses, typos, redundant "returns" and use @code for true + false in returns. Change-Id: Ic3c4c75d6061732d997a386dc3232475c992c188
* Add callback hack to find out when to load system properties.Dianne Hackborn2012-05-091-0/+3
| | | | | | | | Use this to reload the trace and layout bounds properties. This is ONLY for debugging. Change-Id: I1c4bdb52c823520c352c5bac45fa9ee31160793c
* More social integration.Dianne Hackborn2011-12-011-0/+13
| | | | Change-Id: I9be09e08bda5db6c05f5beabc380708a11ead43b
* We must keep up with the Joneses.Dianne Hackborn2011-06-151-0/+18
| | | | Change-Id: Ifa2ab0167c09ba18b24c8b6c618db807e17519f5
* DO NOT MERGE. Integrate from master: Improve activity manager debug dumps.Dianne Hackborn2011-05-131-0/+10
| | | | | | | | | Activity manager now does all dump requests into apps asynchronously, so it can nicely timeout if there is an app problem. Also lots of general cleanup of the am dump output. Change-Id: I99447b87f77a701af52aeca984d93dfe931f065d
* Fix documentation errorsGlenn Kasten2010-12-201-1/+1
| | | | | | | | Fix typos. Fix javadoc error. Fix wrong instructions about new returning null. Change-Id: I76bca22e386839007fc99667b07649a4ced4180f
* doc change: In fundamentals doc, make statement about synchronous execution ↵Dirk Dougherty2010-03-291-1/+2
| | | | | | | of RPC less strict. Indicate that FLAG_ONEWAY applies only across processes. Bug: 2554090 Change-Id: Ia13b3d156d230609e8296a3b31c2882ba13681f3
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+223
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-223/+0
|
* auto import from //branches/cupcake/...@130745The Android Open Source Project2009-02-101-0/+11
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+212