Commit c7b098ceb5 has changed
the qemu_pipe_open interface to require the "pipe:" prefix in
the service name.
However in APIs 24 and before, the "pipe:" prefix is not required
This causes quite some confusion and bugs since it is very common
to forget the difference when working across differnet APIs.
This CL is meant to make qemu_pipe_open work in both cases by
doing the following:
1. try the service name as is;
2. if it fails, add 'pipe:' prefix and try the service name again.
Change-Id: If9782396c03780fad1aadeb8374eb308517dc963
(cherry picked from aosp f7d64fd8e1)
Partial read and write happen and it is better to try again
unless there is some hard error. This is meant to fix some
flaky behavior of emulator pipe services, hopefully.
BUG: 35207286
manually tested this on emulator image.
(cherry picked from aosp f099dce4a6)
Change-Id: I26a4560fa34e979939edcc882fcc5190202fe9f6
Traditionally, qemu_pipe has both the declaration and implentation of each
function in one header file--qemu_pipe.h, and it is getting incovenient to
maintain.
This CL separates the implementation of functions from the header file,
and makes qemu_pipe a static library for other modules to link to.
Note that the interface and implementation of qemu_pipe are kept unchanged,
and future CLs will enhance the implementation to make it more reliable and
more compatible with old and new API levels.
Following projects are affected by this refactoring, and they are modified
accordingly:
hardware/ril/reference-ril
Change-Id: I541ecbf0cc7eadeef9d4e37ffd9ca7bfcc5c94c0
(cherry picked from aosp 294d44be33)