Whenever a new media button receiver is registered, save it
in the settings.
When the system audio settings are reloaded or when the
AudioService is created, the registered media button receiver
is restored.
Whenever a package is removed from the system, remove
any media button receiver from the same package that are in
the media button receiver stack. If this causes the currently
registered receiver to change (i.e. the top of the stack),
this will cause an update of the receiver stored in the
system settings.
Note that unregistering a media button receiver will not
cause the receiver saved in the settings to be updated,
this is ON PURPOSE. This is to prevent well behaved
application who unregister their receiver at the destruction
of their service, to not receive the intent after a reboot,
and to not encourage applications to never unregister
their receiver.
Change-Id: I941b777debaa56e88de93c3b03aec40331ea9ab1
This adds two methods:
SynthesisRequest.getMaxBufferSize()
SynthesisRequest.completeAudioAvailable()
Change-Id: I1186eed45997ee9a7e51212c8d6706dd324ca949
This removes the old non-public C++ API for TTS
engines and replaces it with a Java API.
The new API is still @hidden, until it has been approved.
Bug: 4148636
Change-Id: I7614ff788e11f897e87052f684f1b4938d539fb7
We now write to the parcel using deltas. For common situations,
it only takes 4 bytes to write a delta (new command, time delta,
significant state changes, flags indicating additional state that
follows).
Increasing the buffer size to 128K, this give us 32,768 samples
if they all fit in the smallest delta. A device that is doing
something every minute (like acquiring a wake lock or doing a
wifi scan) for our max target battery life of 30 days would
generate 43,200 samples.
Also some turning to the maximum time between samples at which
we decide to completely collapse two samples.
Change-Id: I074a698d27ccf9389f9585abfc983af2f5ba7a54
We now write battery history directly into a buffer, instead of
creating objects. This allows for more efficient storage; later
it can be even better because we can only write deltas.
The old code is still there temporarily for validation.
Change-Id: I9707d4d8ff30855be8ebdc93bc078911040d8e0b
This seems simpler and more contained, and I think the comment explaining
why hoop-jumping is necessary is a bit clearer now.
Change-Id: Ief4afd7cbb42188ed835fce23e497520bdb753a8
* commit 'a4b76ff4911538f01e92af2f3fa3f4016ad0e290':
Fix access point parsing: reset static link property after parsing static ip setting Fix removeConfiguredNetwork: add sleep between remove configured network and disable wifi
* commit 'd69ec89f5d31064174d79e2e77504814629cffa6':
Fix access point parsing: reset static link property after parsing static ip setting Fix removeConfiguredNetwork: add sleep between remove configured network and disable wifi
* commit '46b59ef01be530a6bbe3f0e9a2bed27de9985f40':
Fix access point parsing: reset static link property after parsing static ip setting Fix removeConfiguredNetwork: add sleep between remove configured network and disable wifi
Use ScopedUtfChars (fixes a leak in TrafficStats, and fixes a crash in Wifi in
a case where GetStringChars could have been called with a pending exception).
Change-Id: I3465ff392b4038dfdafa6af80ec1314cc6d6a11c
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
Don't keep unused global references to classes, don't throw exceptions
when an exception is already pending, and fix a (harmless) misunderstanding
about how GetStringChars works.
Change-Id: Ie445036f057daa8a1c76aceb7bad2a84fb81d820