data,
&reply);
if (status == OK) {
- *valid = reply.readInt32();
- *timelineID = reply.readInt32();
+ status = reply.readInt32();
+ if (status == OK) {
+ *valid = reply.readInt32();
+ *timelineID = reply.readInt32();
+ }
}
return status;
}
status_t status = remote()->transact(COMMON_TIME_TO_LOCAL_TIME,
data, &reply);
if (status == OK) {
- *localTime = reply.readInt64();
+ status = reply.readInt32();
+ if (status == OK) {
+ *localTime = reply.readInt64();
+ }
}
return status;
}
status_t status = remote()->transact(LOCAL_TIME_TO_COMMON_TIME,
data, &reply);
if (status == OK) {
- *commonTime = reply.readInt64();
+ status = reply.readInt32();
+ if (status == OK) {
+ *commonTime = reply.readInt64();
+ }
}
return status;
}
data.writeInterfaceToken(ICommonClock::getInterfaceDescriptor());
status_t status = remote()->transact(GET_COMMON_TIME, data, &reply);
if (status == OK) {
- *commonTime = reply.readInt64();
+ status = reply.readInt32();
+ if (status == OK) {
+ *commonTime = reply.readInt64();
+ }
}
return status;
}
data.writeInterfaceToken(ICommonClock::getInterfaceDescriptor());
status_t status = remote()->transact(GET_COMMON_FREQ, data, &reply);
if (status == OK) {
- *freq = reply.readInt64();
+ status = reply.readInt32();
+ if (status == OK) {
+ *freq = reply.readInt64();
+ }
}
return status;
}
data.writeInterfaceToken(ICommonClock::getInterfaceDescriptor());
status_t status = remote()->transact(GET_LOCAL_TIME, data, &reply);
if (status == OK) {
- *localTime = reply.readInt64();
+ status = reply.readInt32();
+ if (status == OK) {
+ *localTime = reply.readInt64();
+ }
}
return status;
}
data.writeInterfaceToken(ICommonClock::getInterfaceDescriptor());
status_t status = remote()->transact(GET_LOCAL_FREQ, data, &reply);
if (status == OK) {
- *freq = reply.readInt64();
+ status = reply.readInt32();
+ if (status == OK) {
+ *freq = reply.readInt64();
+ }
}
return status;
}
Parcel data, reply;
data.writeInterfaceToken(ICommonClock::getInterfaceDescriptor());
data.writeStrongBinder(listener->asBinder());
- return remote()->transact(REGISTER_LISTENER, data, &reply);
+
+ status_t status = remote()->transact(REGISTER_LISTENER, data, &reply);
+
+ if (status == OK) {
+ status = reply.readInt32();
+ }
+
+ return status;
}
virtual status_t unregisterListener(
Parcel data, reply;
data.writeInterfaceToken(ICommonClock::getInterfaceDescriptor());
data.writeStrongBinder(listener->asBinder());
- return remote()->transact(UNREGISTER_LISTENER, data, &reply);
+ status_t status = remote()->transact(UNREGISTER_LISTENER, data, &reply);
+
+ if (status == OK) {
+ status = reply.readInt32();
+ }
+
+ return status;
}
};
bool valid;
uint32_t timelineID;
status_t status = isCommonTimeValid(&valid, &timelineID);
+ reply->writeInt32(status);
if (status == OK) {
reply->writeInt32(valid);
reply->writeInt32(timelineID);
}
- return status;
+ return OK;
} break;
case COMMON_TIME_TO_LOCAL_TIME: {
int64_t commonTime = data.readInt64();
int64_t localTime;
status_t status = commonTimeToLocalTime(commonTime, &localTime);
+ reply->writeInt32(status);
if (status == OK) {
reply->writeInt64(localTime);
}
- return status;
+ return OK;
} break;
case LOCAL_TIME_TO_COMMON_TIME: {
int64_t localTime = data.readInt64();
int64_t commonTime;
status_t status = localTimeToCommonTime(localTime, &commonTime);
+ reply->writeInt32(status);
if (status == OK) {
reply->writeInt64(commonTime);
}
- return status;
+ return OK;
} break;
case GET_COMMON_TIME: {
CHECK_INTERFACE(ICommonClock, data, reply);
int64_t commonTime;
status_t status = getCommonTime(&commonTime);
+ reply->writeInt32(status);
if (status == OK) {
reply->writeInt64(commonTime);
}
- return status;
+ return OK;
} break;
case GET_COMMON_FREQ: {
CHECK_INTERFACE(ICommonClock, data, reply);
uint64_t freq;
status_t status = getCommonFreq(&freq);
+ reply->writeInt32(status);
if (status == OK) {
reply->writeInt64(freq);
}
- return status;
+ return OK;
} break;
case GET_LOCAL_TIME: {
CHECK_INTERFACE(ICommonClock, data, reply);
int64_t localTime;
status_t status = getLocalTime(&localTime);
+ reply->writeInt32(status);
if (status == OK) {
reply->writeInt64(localTime);
}
- return status;
+ return OK;
} break;
case GET_LOCAL_FREQ: {
CHECK_INTERFACE(ICommonClock, data, reply);
uint64_t freq;
status_t status = getLocalFreq(&freq);
+ reply->writeInt32(status);
if (status == OK) {
reply->writeInt64(freq);
}
- return status;
+ return OK;
} break;
case REGISTER_LISTENER: {
CHECK_INTERFACE(ICommonClock, data, reply);
sp<ICommonClockListener> listener =
interface_cast<ICommonClockListener>(data.readStrongBinder());
- return registerListener(listener);
+ status_t status = registerListener(listener);
+ reply->writeInt32(status);
+ return OK;
} break;
case UNREGISTER_LISTENER: {
CHECK_INTERFACE(ICommonClock, data, reply);
sp<ICommonClockListener> listener =
interface_cast<ICommonClockListener>(data.readStrongBinder());
- return unregisterListener(listener);
+ status_t status = unregisterListener(listener);
+ reply->writeInt32(status);
+ return OK;
} break;
}
return BBinder::onTransact(code, data, reply, flags);