Merge "BufferQueue: Test remote producer and consumer"
diff --git a/services/batteryservice/IBatteryPropertiesRegistrar.cpp b/services/batteryservice/IBatteryPropertiesRegistrar.cpp
index 6647122..296bfab 100644
--- a/services/batteryservice/IBatteryPropertiesRegistrar.cpp
+++ b/services/batteryservice/IBatteryPropertiesRegistrar.cpp
@@ -50,7 +50,11 @@
data.writeInterfaceToken(IBatteryPropertiesRegistrar::getInterfaceDescriptor());
data.writeInt32(id);
remote()->transact(GET_PROPERTY, data, &reply);
- status_t ret = reply.readInt32();
+ int32_t ret = reply.readExceptionCode();
+ if (ret != 0) {
+ return ret;
+ }
+ ret = reply.readInt32();
int parcelpresent = reply.readInt32();
if (parcelpresent)
val->readFromParcel(&reply);
diff --git a/services/inputflinger/InputDispatcher.cpp b/services/inputflinger/InputDispatcher.cpp
index 56044ee..95eee06 100644
--- a/services/inputflinger/InputDispatcher.cpp
+++ b/services/inputflinger/InputDispatcher.cpp
@@ -3141,7 +3141,7 @@
dump.append(INDENT3 "Windows:\n");
for (size_t i = 0; i < state.windows.size(); i++) {
const TouchedWindow& touchedWindow = state.windows[i];
- dump.appendFormat(INDENT4 "%d: name='%s', pointerIds=0x%0x, targetFlags=0x%x\n",
+ dump.appendFormat(INDENT4 "%zu: name='%s', pointerIds=0x%0x, targetFlags=0x%x\n",
i, touchedWindow.windowHandle->getName().string(),
touchedWindow.pointerIds.value,
touchedWindow.targetFlags);
@@ -3160,7 +3160,7 @@
const sp<InputWindowHandle>& windowHandle = mWindowHandles.itemAt(i);
const InputWindowInfo* windowInfo = windowHandle->getInfo();
- dump.appendFormat(INDENT2 "%d: name='%s', displayId=%d, "
+ dump.appendFormat(INDENT2 "%zu: name='%s', displayId=%d, "
"paused=%s, hasFocus=%s, hasWallpaper=%s, "
"visible=%s, canReceiveKeys=%s, flags=0x%08x, type=0x%08x, layer=%d, "
"frame=[%d,%d][%d,%d], scale=%f, "
@@ -3190,7 +3190,7 @@
dump.append(INDENT "MonitoringChannels:\n");
for (size_t i = 0; i < mMonitoringChannels.size(); i++) {
const sp<InputChannel>& channel = mMonitoringChannels[i];
- dump.appendFormat(INDENT2 "%d: '%s'\n", i, channel->getName().string());
+ dump.appendFormat(INDENT2 "%zu: '%s'\n", i, channel->getName().string());
}
} else {
dump.append(INDENT "MonitoringChannels: <none>\n");
@@ -3239,7 +3239,7 @@
dump.append(INDENT "Connections:\n");
for (size_t i = 0; i < mConnectionsByFd.size(); i++) {
const sp<Connection>& connection = mConnectionsByFd.valueAt(i);
- dump.appendFormat(INDENT2 "%d: channelName='%s', windowName='%s', "
+ dump.appendFormat(INDENT2 "%zu: channelName='%s', windowName='%s', "
"status=%s, monitor=%s, inputPublisherBlocked=%s\n",
i, connection->getInputChannelName(), connection->getWindowName(),
connection->getStatusLabel(), toString(connection->monitor),
diff --git a/services/inputflinger/InputReader.cpp b/services/inputflinger/InputReader.cpp
index e99f762..66f907a 100644
--- a/services/inputflinger/InputReader.cpp
+++ b/services/inputflinger/InputReader.cpp
@@ -2003,9 +2003,9 @@
dumpParameters(dump);
dump.appendFormat(INDENT3 "KeyboardType: %d\n", mKeyboardType);
dump.appendFormat(INDENT3 "Orientation: %d\n", mOrientation);
- dump.appendFormat(INDENT3 "KeyDowns: %d keys currently down\n", mKeyDowns.size());
+ dump.appendFormat(INDENT3 "KeyDowns: %zu keys currently down\n", mKeyDowns.size());
dump.appendFormat(INDENT3 "MetaState: 0x%0x\n", mMetaState);
- dump.appendFormat(INDENT3 "DownTime: %lld\n", mDownTime);
+ dump.appendFormat(INDENT3 "DownTime: %lld\n", (long long)mDownTime);
}
@@ -2303,7 +2303,7 @@
dump.appendFormat(INDENT3 "Orientation: %d\n", mOrientation);
dump.appendFormat(INDENT3 "ButtonState: 0x%08x\n", mButtonState);
dump.appendFormat(INDENT3 "Down: %s\n", toString(isPointerDown(mButtonState)));
- dump.appendFormat(INDENT3 "DownTime: %lld\n", mDownTime);
+ dump.appendFormat(INDENT3 "DownTime: %lld\n", (long long)mDownTime);
}
void CursorInputMapper::configure(nsecs_t when,
@@ -3409,7 +3409,7 @@
for (size_t i = 0; i < mVirtualKeys.size(); i++) {
const VirtualKey& virtualKey = mVirtualKeys.itemAt(i);
- dump.appendFormat(INDENT4 "%d: scanCode=%d, keyCode=%d, "
+ dump.appendFormat(INDENT4 "%zu: scanCode=%d, keyCode=%d, "
"hitLeft=%d, hitRight=%d, hitTop=%d, hitBottom=%d\n",
i, virtualKey.scanCode, virtualKey.keyCode,
virtualKey.hitLeft, virtualKey.hitRight,
diff --git a/services/inputflinger/main.cpp b/services/inputflinger/main.cpp
index 3209a62..0a517cc 100644
--- a/services/inputflinger/main.cpp
+++ b/services/inputflinger/main.cpp
@@ -19,7 +19,7 @@
using namespace android;
-int main(int argc, char** argv) {
+int main(int, char**) {
ProcessState::self()->setThreadPoolMaxThreadCount(4);
BinderService<InputFlinger>::publishAndJoinThreadPool(true);
return 0;