Remove method overloading for combinations of sector+block addressing.
Instead provide methods that more closly match the raw commands, and more
efficient helpers to convert between blocks and sectors.
o fix off-by-one bug in getBlockCountInSector()
o add BLOCK_SIZE
o remove DESFIRE not operating in classic emulation (SAK 0x20)
o hide isEmulated(), there is no use case, and the info is available elsewhere
o getTotalBlockCount() -> getBlockCount()
o getBlockCount(int) -> getBlockCountInSector(int)
o introduce blockToSector() and sectorToBlock()
o remove authenticateBlock()
make it really clear that authentication is per sector, and reduce function
explosion. blockToSector() allows you to use authenticateSector...
o explicit authenticateSectorWithKeyA() / authenticateSectorWithKeyB()
get rid of magic boolean
o remove all (int sector, int block) parameters
always address by absolute block. this makes the API crystal clear, and
helps reduce function explosion
o validation of all sector and block indices
o dont & 0xff when converting to byte - its redundant
o Remove TYPE_OTHER. Mifare Classic types are well-known and stable.
Change-Id: I3c9f8254ff307f31b388b3d7592c862d5de6afa5
This catches possible exceptions caused by attempting to
unregister a receiver that may have already been unregistered.
This is related to the OOM issue workaround in Change I99a7e0c3.
Change-Id: Ib69a8acc6b12659125c958a03efac0a8a68a3859
Commit 15fe2cb added format checking for translatable strings, enforcing
the use of positional args. This check can be disabled on <string>
values with translatable="false" or formatted="false". But they didn't
check for those attributes on <string-array>, so some of CM's strings
fail when they're not really format strings, just because they contain
percent signs. (e.g. brightness widget's "Auto/Dim/40%/100%")
So now the formatted/translatable attributes are checked in string-array
too, and we can restore our proper percent signs.
Change-Id: I3478ab7e0b939e61fe0cec20201ac55096264080
ACL auto connection was removed so other profiles
won't auto connect when priority was auto connect.
Reduced connect other profiles time delay.
Bug: 3281016
Change-Id: Ic56ca6e95f618f02bc316d1f80014e58c4b6c3bc
The owner isn't kept track it URI's writeOwners when
grantUriPermissionUncheckedLocked is invoked to provide both
read and write access to the URI. Fix is to check for both
read and write permissions and add owner to appropriate lists.
Change-Id: Id23688b96aefeb0a4911ee52ad47124bc5904fa0
Wakelock will get released while
1) no request pending to be sent out, in which mRequestMessagesPending increases
before calling EVENT_SEND and decreases while handling EVENT_SEND.
and
2) no waiting requests sent to RIL but no replied, in which mRequestMessagesWaiting
increases while sending request and decreases while handling response.
Both will be cleared while WAKE_LOCK_TIMEOUT occurs to recovery from out of sync situation.
bug: 3369427, 3370827
Change-Id: Ib2fc54db3b155bd3fb1296ad83720b7836708caf
Bug: 3241808
Make sure the directory the caller is trying to open the icon db
in actually exists and create it if it doesn't.
Change-Id: Icc0a67b0ceba03a746ac2cd3b84fc34c2c8b4fe2
The creation of a TextToSpeech object causes the TTS service to
start, and the initialization listener to be called when the
service is connected. But the listener is never called when
the service binding failed to be notified of this error.
The fix consists in checking the result of the bind to service
operation, and notify the listener in case of an error.
More log was added in case speak() and synthesizeToFile() are
called but the service is not known to have started.
Change-Id: I7dcc1fa44be31fee3177ec6215fca3306377b934
EffectModule::process() was copying effect chain input buffer to
output buffer if no effect was active instead of accumulating it.
Change-Id: If4ca75601ea69a088d0f71d88aec53e90a1dec89
InputReader::getSwitchState always returns AKEY_STATE_UNKNOWN
because SwitchInputMapper::getSources() returns 0 which cannot
match any source mask including AINPUT_SOURCE_ANY. As a result
initial lid switch detection is broken.
This change adds a new source constant AINPUT_SOURCE_SWITCH
that indicates that the source has switches.
Change-Id: I5321ecf0ce84f1c2b4535f6c163d3f4dcf9b7a9b
The latter is an operation that otherwise could block on the datasource
for a significant amount of time. During that time we'd be unable to
abort the preparation phase without this prefill.
Change-Id: I3bc889b264f599bfd5c2bbdf48b88ccb55d86172
related-to-bug: 3362836
The cut-off frequency of the lowpass filter was too high
for the sampling rate used by DELAY_NORMAL.
Now we use the same filters used for the gravity vector
(cascaded biquad at 1.5 Hz)
Change-Id: Iac290a716cc47a78337a8f0e45b103e49b4d9d78