To workaround a binary incompatiblity with Motorola's ril.so, I had to
temporarily provide the old constructor for NetlinkListener as well as
a new contructor that takes an additional format argument.
There's still a slight chance of a problem because the size of the
NetlinkListener has changed with the addition of the
mFormat member, but so far I've not seen any obvious problem with that
incompatiblity.
Another way we could have worked around the incompatiblity is to have
netd (the main user of the new format argument to NetlinkListener) keep
track of the format itself in it's NetlinkHandler (derived from NetlinkListener)
and supply it's own version of onDataAvailable() that's almost 100% identical
to NetlinkListener's except for the decode() call. That would allow us
not to modify NetlinkListener at all. Worth considering but I think it's
more properly divided right now and we just have to make Motorola fix their
code (and ideally not use our private APIs).
This change should be reverted when Motorola's has fixed their ril to
either not use our private APIs or to use our updated ones.
Change-Id: I255cca6908444e56cbbbed7eef1fa0cf1d8f0918
Signed-off-by: Mike J. Chen <mjchen@google.com>
To make it easier to be compatible with older existing code, use
default parameters instead of separate functions for setting.
Also, reintroduce the const usage that was not in the original
changes by Stan.
Also fix some indent spacing.
Change-Id: Ice9ec7f0d5c4a0673037e2e04a764d88a98f68eb
Signed-off-by: Mike J. Chen <mjchen@google.com>
This reverts commit 1d504eeb50.
Conflicts:
libsysutils/src/NetlinkEvent.cpp
Bring back the changes from Stan Chesnutt regarding adding NETLINK_ROUTE
processing. The original commit message description was:
Add NETLINK_ROUTE processing to the netlink client code, so that Ethernet
physical-layer up/down events can be tracked. Upper layers will use these
events to enable/disable Ethernet connectivity.
The original change was reverted due to an incompatiblity with Motorola's
ril.so binary. I'll submit a patch to workaround that incompatiblity
separately.
Change-Id: I4e97ac98833b10543e654c63ecae3b9b8c7db44f
Signed-off-by: Mike J. Chen <mjchen@google.com>
Introduces new "net_bw_stats" group which will protect reading
detailed bandwidth statistics. Also introduce "net_bw_acct" group
which will enable specific applications to request that their network
traffic be counted against other UIDs.
Change-Id: Ic0ec04e0d2bb9573f3c2a094ebd6d6a8cae0aae6
Make sure audio_is_valid_format() is true only
for formats supported by AudioTrack and AudioRecord.
Generalized audio_is_linear_pcm().
Added audio_bytes_per_sample() function.
Change-Id: If588af6c08f09796ab04bccbbd6e720f1e914412
This adds a new function to libcutils, partition_wiped().
This is used to determine if a partition is wiped.
Change-Id: Ibb388976c6b5bd3923b62d8f79b2b97748abf6c1
Added formats for 32 bit PCM audio to allow direct use of
common audio formats defined in audio.h by audio effect
API defined in audio_effect.h
Change-Id: I5d58c2db8325ca625ab6d2b10cc0d422ba119ca5
The closing #endif comment is missing the comment delimiters. This
change adds them and fixes a compile warning about extra tokens after
endif.
Change-Id: If8295aa6fbb2b21c2b56fe57a467dcde79c65de3
This patch moves the definition of ANativeWindow from frameworks/base into
system/core. We move ANativeWindow for two reasons.
Firstly, the native-window interface may need to be used by lower-level code
than the framework. Such code (such as the camera HAL) is not allowed to use
definitions from frameworks/base, since the latter is stacked on top of the
former. Thus moving (the interface definition) ANativeWindow under system/core
lowers the level at which we can work with windows.
Secondly, this enables an implementation of ANativeWindow that lies outside of
frameworks, enabling quick initial bringup of graphics.
Change-Id: I851b9bb2834bcec73255b5af82f66411e54bb1a5
Signed-off-by: Iliyan Malchev <malchev@google.com>
This patch moves camera- and graphics-related definitions out of the hardware
HAL layer and into system/core. These definitions are used both by the HAL and
by higher-level code as well. More functionality (e.g., audio definitions)
will be moved here as well.
Change-Id: I225f12374ce54fa393640dce53738267d0d703e9
Signed-off-by: Iliyan Malchev <malchev@google.com>
Digit wrote:
"You probably don't want to close the socket here without updating
c->socket as well. Otherwise, another thread holding a handle to the
client after the c->decRef() could end up sending a message to a
different socket, if the file descriptor index is reused by another
client in the meantime."
Change-Id: Icdefb5ffc0c7607325d7db761e1f04e5d868bfb7
+ Handle EINTR in accept(), write() and select()
+ Fix a memory leak when deleting the mClients list
+ Fix typo in SocketListener.h
Change-Id: Ie68bb3e2dbefe0dfdaa22a5cd06a42dbc4c0f8aa
Digit wrote:
"You probably don't want to close the socket here without updating
c->socket as well. Otherwise, another thread holding a handle to the
client after the c->decRef() could end up sending a message to a
different socket, if the file descriptor index is reused by another
client in the meantime."
Change-Id: Icdefb5ffc0c7607325d7db761e1f04e5d868bfb7