diff options
author | Mike J. Chen <mjchen@google.com> | 2011-06-23 15:04:32 -0700 |
---|---|---|
committer | Mike J. Chen <mjchen@google.com> | 2011-06-23 18:59:45 -0700 |
commit | 2a56688da92fcf22ea8ce996e2a0e7b453d1543b (patch) | |
tree | 4d61a27da2ec17d97c951103405ebea156659bd2 /libsysutils | |
parent | 17260b14682d4fe59dad3de2de8c9370e6ba9a71 (diff) | |
download | system_core-2a56688da92fcf22ea8ce996e2a0e7b453d1543b.zip system_core-2a56688da92fcf22ea8ce996e2a0e7b453d1543b.tar.gz system_core-2a56688da92fcf22ea8ce996e2a0e7b453d1543b.tar.bz2 |
Workaround Motorola ril.so incompatiblity with Netlink changes
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>
Diffstat (limited to 'libsysutils')
-rw-r--r-- | libsysutils/src/NetlinkListener.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libsysutils/src/NetlinkListener.cpp b/libsysutils/src/NetlinkListener.cpp index 80d83c3..e67b5c6 100644 --- a/libsysutils/src/NetlinkListener.cpp +++ b/libsysutils/src/NetlinkListener.cpp @@ -26,6 +26,17 @@ #include <sysutils/NetlinkEvent.h> +#if 1 +/* temporary version until we can get Motorola to update their + * ril.so. Their prebuilt ril.so is using this private class + * so changing the NetlinkListener() constructor breaks their ril. + */ +NetlinkListener::NetlinkListener(int socket) : + SocketListener(socket, false) { + mFormat = NETLINK_FORMAT_ASCII; +} +#endif + NetlinkListener::NetlinkListener(int socket, int format) : SocketListener(socket, false), mFormat(format) { } |