return false;
}
+ if (m_poller.getEvents(m_clientSocket.getFd()) & POLLIN) {
+ NotificationResponse response;
+ if (!recvResponse(response)) {
+ ALOGE("Couldn't receive response");
+ return false;
+ }
+ if (!parseResponse(response)) {
+ ALOGE("Incorrect response received");
+ return false;
+ }
+ m_responseHandler(m_request.id, NResponseTypeToUI(response.response));
+ return true;
+ }
+
if (m_poller.getEvents(m_clientSocket.getFd()) & POLLHUP) {
ALOGE("Service disconnected");
return false;
m_poller.setEvents(m_clientSocket.getFd(), POLLIN | POLLERR);
continue;
}
-
- if (m_poller.getEvents(m_clientSocket.getFd()) & POLLIN) {
- NotificationResponse response;
- if (!recvResponse(response)) {
- ALOGE("Couldn't receive response");
- return false;
- }
- if (!parseResponse(response)) {
- ALOGE("Incorrect response received");
- return false;
- }
- m_responseHandler(m_request.id, NResponseTypeToUI(response.response));
- return true;
- }
}
ALOGD("NotificationBackend loop ended");