| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 331be9a6431d6489f8d1e1b80cb510d0ee073c50.
Reintroducing ag/16366278 since it seems unrelated to b/214053959 (more details on b/214053959#comment55).
Original commit message:
Migrate unsafe parcel APIs in framework-minus-apex
Migrate the following unsafe parcel APIs in framework-minus-apex:
* Parcel.readSerializable()
* Parcel.readArrayList()
* Parcel.readList()
* Parcel.readParcelable()
* Parcel.readParcelableList()
* Parcel.readSparseArray()
This CL was generated by applying lint fixes that infer the expected
type from the caller code and provide that as the type parameter
(ag/16365240).
A few observations:
* In some classes we couldn't migrate because the class also belonged to
another build module whose min SDK wasn't current (as is the case for
framework-minus-apex), hence I suppressed the lint check
(since I'll eventually submit the lint check to the tree).
* In some cases, I needed to do the cast in
https://stackoverflow.com/a/1080525/5765705 to make the compiler happy
since there isn't another way of providing a class of type
Class<MyClassWithGenerics<T>>.
* In the readSerializable() case, the new API also requires the class
loader, that was inferred to by InferredClass.class.getClassLoader().
* Note that automatic formatting and import rely on running hooked up
to the IDE, which wasn't the case here.
Bug: 195622897
Change-Id: I272432e6e082a973f7a50492ec35d79c2b577c93
Test: TH passes
|
| |
|
|
|
|
|
|
| |
This reverts commit 90bb3709dc75f7e44914222114752de5bce133d4.
Reason for revert: b/214053959
Change-Id: Ic271bab1d3eaf677a5989dda9deb944ee2ad6850
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Migrate the following unsafe parcel APIs in framework-minus-apex:
* Parcel.readSerializable()
* Parcel.readArrayList()
* Parcel.readList()
* Parcel.readParcelable()
* Parcel.readParcelableList()
* Parcel.readSparseArray()
This CL was generated by applying lint fixes that infer the expected
type from the caller code and provide that as the type parameter
(ag/16365240).
A few observations:
* In some classes we couldn't migrate because the class also belonged to
another build module whose min SDK wasn't current (as is the case for
framework-minus-apex), hence I suppressed the lint check
(since I'll eventually submit the lint check to the tree).
* In some cases, I needed to do the cast in
https://stackoverflow.com/a/1080525/5765705 to make the compiler happy
since there isn't another way of providing a class of type
Class<MyClassWithGenerics<T>>.
* In the readSerializable() case, the new API also requires the class
loader, that was inferred to by InferredClass.class.getClassLoader().
* Note that automatic formatting and import rely on running hooked up
to the IDE, which wasn't the case here.
Bug: 195622897
Test: TH passes
Change-Id: I11a27b9bdab7959ee86e90aa1e1cbebd7aaf883c
|
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
We want to eventually migrate some of these APIs to be @SystemApi for mainline modules.
The #dumpDebug name is more appropriate than #writeToProto.
Bug: 142279786
Test: Manual
Change-Id: I60793e91cedf6b720d4ecef6a8484f4fed4ff30f
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
If they were null, then the Parcelable would fail to work.
Bug: 126726802
Test: manual
Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014
Exempt-From-Owner-Approval: Trivial API annotations
|
| |
|
|
|
|
|
|
|
|
|
| |
Test: UT and manual
atest .../LooperStatsTest.java
Verified that adb shell cmd looper_stats dump produces data
with dispatch delay
Bug: 113651685
Change-Id: I44550f8c5d71848932733bd02016aa65ce7b75b3
|
| |\
| |
| |
| |
| |
| | |
am: f2183961a9
Change-Id: Icf157b65308e7de18b51aec837b8c29baa5a1918
|
| | |\
| | |
| | |
| | |
| | |
| | | |
am: cd1c75ae4c
Change-Id: I6d8c44be9d156ac2b6a20d3d13972371ee4d741e
|
| | | |
| | |
| | |
| | |
| | |
| | | |
Test: make offline-sdk-docs
Bug: b/116163454
Change-Id: I55de1f71d443713b033ee63fd191bd34b3a52fd2
|
| |/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add ThreadLocalWorkSourceUid and Message.workSourceUid
which will store the UID which caused, directly or
indirectly, the Message to be enqueued.
This was needed because using Binder.getCallingUid() does
not give us enough data since quite a few Binder services
call Binder.clearCallingIdentity() when processing the
call.
Test: UT and manual
Change-Id: I35af3a9ca5193477070990b41ff5d9c52f420069
|
| |/
|
|
|
|
|
| |
Test: make ds-docs
Bug: 36966026
Change-Id: I4eaef8ba2b281451c77c7897af7273e3e8ac8cff
|
| |
|
|
|
|
|
|
|
|
|
| |
This introduces PooledLambda - a way of obtaining lambdas without the
allocations overhead.
See PooledLambda javadoc for a guide and PooledLambdaSample for code samples
of useful usages.
Test: ensure samples of PooledLambdaSample work as described.
Change-Id: I46f8ad27bc1de07e19f6e39f89d2cafe4238497a
|
| |
|
|
|
|
| |
Bug: 34230125
Test: cts-tradefed run cts-dev -m CtsIncidentHostTestCase -t com.android.server.cts.PowerIncidentTest
Change-Id: Ib71563cfc9ca95c297111430d8bbe2ce88d7a41d
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are many cases in real world applications where it is desirable
to continue processing messages on the Looper even when most other
messages have been suspended by a synchronization barrier pending
completion of the next drawing frame on vsync.
Internally the framework is able to mark certain messages as being
independent of these higher level synchronization invariants by
flagging them as asynchronous.
This change exposes the existing function and improves on the
documentation so that it is clearer what is meant by asynchronous.
Bug: 18283959
Change-Id: I775e4c95938123a364b21a9f2c39019bf37e1afd
|
| |
|
|
| |
Change-Id: Idb3976edfae37293ed75cb5b869b4b42d8042bbe
|
| |
|
|
| |
Change-Id: Iaf271c96901c5dba15831681269a49ad4aaa57fd
|
| |\
| |
| |
| |
| |
| |
| | |
Message.java: "arg1" -> "arg2""
* commit '3e5f0229e10be4179f763efd6119b63bcea6d162':
Fix javadoc typo in Message.java: "arg1" -> "arg2"
|
| | |
| |
| |
| | |
Change-Id: I245eadaf322dce9e27af30d8dbb6d97ca0d296ce
|
| | |
| |
| |
| |
| |
| |
| | |
This tell you where the message came from when it was
delivered through a Messenger.
Change-Id: I86a5f521c8ae919b45872dd76b61e83447f397ab
|
| |/
|
|
|
|
|
| |
Throw an exception when an application attempts to recycle or
resend messages that are still in-use.
Change-Id: I7096e8b7bd5bec41b7b8ef0c798c55ce3db6827e
|
| |
|
|
|
| |
Bug: 10948648
Change-Id: I956cce2a0fb516c02f9bbbc021f6238bcb226891
|
| |
|
|
| |
Change-Id: If609c9ffbea800ff6409b0096a82f0b899f29343
|
| |
|
|
|
|
| |
Adds non-drawing execution mode
Change-Id: I82f92cf1b9a3b9ff2ca6d7427c4e02b73e04e6bf
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The synchronization barrier enables selectively blocking
execution of synchronous messages until the barrier is released.
Asynchronous messages may continue running in the meantime.
The barrier is intended to be used to implement more sophisticated
scheduling policies related to view hierarchy traversals. While
traversals are pending, most messages posted to the message queue
must be held up. This is to satisfy the invariant that traversals
will occur before subsequently posted messages are handled.
The exception to this rule are "asynchronous" messages that represent
external events or interrupts that come from other components such
as VSYNC pulses, input events or sensor events. Because these messages
are typically delivered at arbitrary times, they are independent of
traversals or other typical synchronization boundaries.
Messages can now be flagged as asynchronous to indicate that they
are weakly ordered.
Bug: 5721047
Change-Id: I1446dcfbc896f33b48355adc28967ace8c8c9b9b
|
| |
|
|
|
|
|
|
|
|
| |
Clear the Message when it is recycled, even if it will not go
back into the Message pool. This makes the behavior of recycle()
more consistent and ensures that the Message does not hold onto
other object after it has been recycled (useful in case there are
stale references to the Message lingering elsewhere).
Change-Id: I26b6a4b629f9c0b6bed70fdc42734919f30e64c4
|
| |\
| |
| |
| |
| | |
* commit '6af61b843511bc5b669d30b980c4a9e2682da47c':
android.os.Message: respect sPoolSize
|
| | |
| |
| |
| |
| |
| |
| | |
Also rename some static members from mFoo to sFoo.
Bug: http://code.google.com/p/android/issues/detail?id=13866
Change-Id: I5c5075eb6f529d1534c7aa72b6881873cd08676a
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Because the standard Looper.loop code calls Message#recycle it is
imperative that Handler#handleMessage code not attempt to resue
a message it receives. If allowed to do so it will cause bugs that
could be difficult to diagnois.
This change adds Message#flags and uses one bit to reliably detect
a message is in use and throws an error in MessageQueue#enqueueMessage.
This allows early detection of this bug.
Note: This is not new functionality, but the current implementation does
not detect messages that are in use because it uses Message#when != 0
as the detection mechanism. The problem is that a Message#when value of 0
is valid value used to place a message at the front of the queue and is
thus unreliable.
Another option is to change the setting of Message#when in Message#enqueueMessage
so that it is never 0, although that does change subtly a publicly accessible
field.
Yet another option would be to use other fields but all candidates have
similar problems as when in that they are publicly accessible or even
settable such as Message#target.
Change-Id: I040d6e546376f7b1ed1e4daa0d5644cce8bf333a
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 6083d81ce4d67ec632962270fda64ebb9db0d5b1.
Reverting this because it causes runtime to reboot in a loop
if connected to a Bluetooth Headset.
copyFrom() needs to check for the introduced bit too.
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Because the standard Looper.loop code calls Message#recycle it is
imperative that Handler#handleMessage code not attempt to resue
a message it receives. If allowed to do so it will cause bugs that
could be difficult to diagnois.
This change adds Message#flags and uses one bit to reliably detect
a message is in use and throws an error in MessageQueue#enqueueMessage.
This allows early detection of this bug.
Note: This is not new functionality, but the current implementation does
not detect messages that are in use because it uses Message#when != 0
as the detection mechanism. The problem is that a Message#when value of 0
is valid value used to place a message at the front of the queue and is
thus unreliable.
Another option is to change the setting of Message#when in Message#enqueueMessage
so that it is never 0, although that does change subtly a publicly accessible
field.
Yet another option would be to use other fields but all candidates have
similar problems as when in that they are publicly accessible or even
settable such as Message#target.
Change-Id: I2df600537700a3fe206678f38bcae7329751c4e5
|
| |
|
|
|
|
| |
Also improve debug printing of various times.
Change-Id: Ifcc288fd1bcbf44c069875ba97925b9e7ffe9a48
|
| |
|
|
|
| |
Also some small tweaks to the Message API to improve its
use in the MessengerService sample.
|
| | |
|
| | |
|
| |
|