Several cleanups to BluetoothService:
- Move BluetoothService.BondState inner class to top level.
- Extract adapter and remote device properties cache management
logic into two new classes: BluetoothAdapterProperties and
BluetoothDeviceProperties.
- Add getter methods for other classes in the package to access
the new properties cache objects for multi-part operations.
- Inline log() method in BluetoothService and selected the
appropriate Log method (Log.d, Log.w, Log.e) for each message.
- Refactor dump() method into smaller sized pieces.
- Clean up logic of updateCountersAndCheckForConnectionStateChange()
method for better readability.
- Change sendConnectionStateChange() to return instead of sending
an intent if the current or previous state values are invalid.
Previously the code sent an intent with -1 for the invalid state.
- Added Javadoc comments to document the methods that are called from
native Bluez code.
- Fixed some typos and code style issues.
Original Change by: Jake Hamby
Modified by: Jaikumar Ganesh
Change-Id: I76ebac00ecd29566dcb2d1ad3e7a486b7530ce24
There are two areas that have changed to eliminate the assumption that
local jobject references are both canonical and persistent:
1. JavaBBinderHolder no longer holds onto and reuses it parent object
reference per se. Since the underlying JavaBBinder object holds a
real global ref, this was redundant anyway. Now, for purposes of its
transient need to perform JNI operations, it simply uses the current
jobject ref(s) passed during method invocation, and no longer attempts
to hold these refs beyond the scope of a single invocation.
2. Binder obituaries no longer assume that a jobject reference to a
recipient will always compare == as a 32-bit value with any future
reference to the same object. The implementation now asks Dalvik
whether object references match.
Bug 2090115
Change-Id: If62edd554d0a9fbb2d2977b0cbf8ad7cc8e2e68d
If a tap is close to, but not on a node, slop allows the tap
to find the node. Pass the slop-corrected values to
requestFocusNodeHref() as well.
bug:3412519
Change-Id: I7543354b6270976e1f99518581de23c567432b98
When extractAlpha() native method in Skia fails to allocate pixels,
it resets target bitmap. This change detects when such empty bitmap
is returned, and throws a OutOfMemory Java exception.
Depends on https://android-git.corp.google.com/g/97793
Bug: 3418381
Change-Id: I65a84998be089c49ed5005f6995bdc4f4d1669bc
In viewport setup time, pre-calculate the more likely view scale
and text wrap scale instead of waiting until ZoomManager's FirstLayout
time. This is to give webkit better and more correct information, such
as window width/height and inner width/height, when it is doing first layout.
issue: 3382398
Change-Id: I53fb15da43fbede6c03a4f51ec1c50e9a94f0236
When the temp buffer wraps around, the next read position should start
from what have been read to avoid reading the same remaining bytes in
the buffer again.
o also fix some of the formatting string for logging
bug - 3482444
Change-Id: Ie0b56f4691ff9e80a48a57f1b7d0d28c78cfb313