Use new SdkController communication protocol for emulation ports
android/sdk-control-socket.* has replaced android/android-device.* as the back-bone
of communicating with SDK controller on the device. The major differences are:
- New communication protocol uses just one (async) socket connection to communicate
with the device (the old one used two sockets: one sync, and another - async).
- New communication protocol connects to one TCP port (1970 in this CL) for all emulation
ports. Channel multiplexing is done by using port names, and assigning a separate socket
for communication inside each separate port. The old protocol had separate TCP ports for
each emulation ports (1968 for sensors, and 1969 for multi-touch)
Change-Id: I779fcbdfba2f9b4c433a9d76a567975708b00469
diff --git a/android/hw-sensors.c b/android/hw-sensors.c
index 17b2491..a7daea5 100644
--- a/android/hw-sensors.c
+++ b/android/hw-sensors.c
@@ -438,7 +438,7 @@
}
/* If emulating device is connected update sensor state there too. */
- if (hw->sensors_port != NULL && sensors_port_is_connected(hw->sensors_port)) {
+ if (hw->sensors_port != NULL) {
if (enabled) {
sensors_port_enable_sensor(hw->sensors_port, (const char*)msg);
} else {
@@ -692,11 +692,6 @@
h->sensors[ANDROID_SENSOR_TEMPERATURE].enabled = 1;
}
- if (h->sensors_port != NULL) {
- /* Init sensors on the attached device. */
- sensors_port_init_sensors(h->sensors_port);
- }
-
/* XXX: TODO: Add other tests when we add the corresponding
* properties to hardware-properties.ini et al. */