o Some javadoc updates
o writeBlock -> writePages (Block means something else in NFC Forum).
o validate page offset
Change-Id: Icae54db3397d57aaa451caaa86d56e8ba82507f2
This makes the system more flexible and allows
adding new technology types without having to
update the API.
Change-Id: Iaee6b633965e501a70e8afc3f1d54d9d94a4d05a
Also make sure they are non-negative.
This is not documented in Mifare Classic spec, but based on findings from NXP:
- Operand should be stored in little-endian format in the transceive buffer
- Tag ignores the sign bit on the operand, its effectively 31-bit unsigned
- Overflow and underflow generates an error.
Change-Id: Id3389b3894ded732c4b00d564ca53f5df651359e
When generating a mock tag (after a NDEF exchange over LLCP), one of
the internal fields is set to null. This was causing NullPointerException
when being converted to a Parcel.
This is fixed by not including this field in the Parcel for mock tags.
Change-Id: I000e2faa54d71fd755ba7993e1e258743aad98fb
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
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
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
Fixes a regression from Froyo. Previously, when a scroll view
had no children, its onTouchEvent would return because the scroll
view would only start dragging if the user touched one of its children.
In Gingerbread, the user can drag from anywhere within the scroll
view, not just by touching a child. However, it makes no sense
to drag a scroll view that has no children so an empty scroll view
should just ignore touches like any other empty view group would.
This change fixes applications that for some reason or other happen
to have empty scroll views in strange places.
Bug: 3246230
Change-Id: I76c6136d3cd74968983033014d60deec1718ce30
This reverts commit 6c4d904851772313930f800ac7c323cf90c709bb.
Going with a different tactic that doesn't dump stuff on
PackageManagerService.
Bug: 3214719
Change-Id: I0bbeccf3c21d264deda4256eb53713d2c98284f4
The NPP is only usable by the foregorund
activity to prevent dispatching confusion
on the far end.
Change-Id: I08475a52083fd7f81b79b7fe2faf4e126121a809
- make sure to call onAccuracyChanged only when it actually changes
- only call onAccuracyChanged on Magnetic and Orientation sensors, which
are the only ones to support it.
- for other sensors, call onAccuracyChanged only once with the
SENSOR_STATUS_ACCURACY_HIGH value
Change-Id: Ic861e3d48d3b98dab74ffebe2746576f5b69f371
This works around a bug in the framework where LockScreen wouldn't
get GC'd under certain circumstances which would lead to an OOM
crash. It now uses WeakReferences for observers inside the
DigitalClock container class and unregisters them if the containing
DigitalClock goes away.
Also removed mLive variable which was unused and could potentially
leak the receivers.
Left mAttached for debugging so we can use it to determine if the
calls to onAttachToWindow() and onDetachFromWindow() are grossly
unbalanced which may be the root cause of the original problem.
Have cleanUp() explicitly clear unused references to make
tracing through hprof references easier.
Change-Id: I99a7e0c356001b05eab5aa729564553666febfea
This complements the secure rfcomm API.
The link key is unauthenticated and is subject to MITM attacks.
The link key may be encrypted depending on the type of Bluetooth device.
This helps apps which don't need the extra security or
have their own security layer built on top of the rfcomm link.
Bug: 3352266
Change-Id: I633fd0372e5e23288d6fec950dd1abc2896031f1
Added check avoid a division by zero resulting in NaN which in turn
makes checkFullyTilted to ignore high tilt angles from then on.
If (x, y, z) == (0, 0, 0) then there is no tilt or rotation and
this vector must be ignored. This check is extended to ignore all
small acceleration values where noise can be of big influence.
Low or zero readings can happen when space travelling free falling,
but more commonly when shaking or getting bad readings from the sensor.
The accelerometer is turned off when not used and polling it too soon
after it is turned on may result in (0, 0, 0).
Change-Id: I19aec653abb8ab6f7126778035c8c96449f1326f