summaryrefslogtreecommitdiffstats
path: root/drm/common
diff options
context:
space:
mode:
authorGloria Wang <gwang@google.com>2011-06-15 10:27:52 -0700
committerGloria Wang <gwang@google.com>2011-06-15 17:32:06 -0700
commitc10ce33302f91896fc2a87c13b00518a4bc26e3a (patch)
tree6a83d35dc96348371134130cc25f08867a2adace /drm/common
parent6771263604cf8e464b5cd1278823b0898af3a2a9 (diff)
downloadframeworks_av-c10ce33302f91896fc2a87c13b00518a4bc26e3a.zip
frameworks_av-c10ce33302f91896fc2a87c13b00518a4bc26e3a.tar.gz
frameworks_av-c10ce33302f91896fc2a87c13b00518a4bc26e3a.tar.bz2
-Fix some typo
-Remove one unnecessary memory allocation Change-Id: Icea21f33d2c7891333e06429d2f382389e5bd27f
Diffstat (limited to 'drm/common')
-rw-r--r--drm/common/IDrmManagerService.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/drm/common/IDrmManagerService.cpp b/drm/common/IDrmManagerService.cpp
index c37b4f8..458f1b6 100644
--- a/drm/common/IDrmManagerService.cpp
+++ b/drm/common/IDrmManagerService.cpp
@@ -37,7 +37,7 @@
using namespace android;
-static void writeDecrptHandleToParcelData(
+static void writeDecryptHandleToParcelData(
const DecryptHandle* handle, Parcel* data) {
data->writeInt32(handle->decryptId);
data->writeString8(handle->mimeType);
@@ -46,14 +46,14 @@ static void writeDecrptHandleToParcelData(
int size = handle->copyControlVector.size();
data->writeInt32(size);
- for(int i = 0; i < size; i++) {
+ for (int i = 0; i < size; i++) {
data->writeInt32(handle->copyControlVector.keyAt(i));
data->writeInt32(handle->copyControlVector.valueAt(i));
}
size = handle->extendedData.size();
data->writeInt32(size);
- for(int i = 0; i < size; i++) {
+ for (int i = 0; i < size; i++) {
data->writeString8(handle->extendedData.keyAt(i));
data->writeString8(handle->extendedData.valueAt(i));
}
@@ -77,14 +77,14 @@ static void readDecryptHandleFromParcelData(
handle->status = data.readInt32();
int size = data.readInt32();
- for (int i = 0; i < size; i ++) {
+ for (int i = 0; i < size; i++) {
DrmCopyControl key = (DrmCopyControl)data.readInt32();
int value = data.readInt32();
handle->copyControlVector.add(key, value);
}
size = data.readInt32();
- for (int i = 0; i < size; i ++) {
+ for (int i = 0; i < size; i++) {
String8 key = data.readString8();
String8 value = data.readString8();
handle->extendedData.add(key, value);
@@ -416,7 +416,7 @@ status_t BpDrmManagerService::consumeRights(
data.writeInterfaceToken(IDrmManagerService::getInterfaceDescriptor());
data.writeInt32(uniqueId);
- writeDecrptHandleToParcelData(decryptHandle, &data);
+ writeDecryptHandleToParcelData(decryptHandle, &data);
data.writeInt32(action);
data.writeInt32(static_cast< int>(reserve));
@@ -433,7 +433,7 @@ status_t BpDrmManagerService::setPlaybackStatus(
data.writeInterfaceToken(IDrmManagerService::getInterfaceDescriptor());
data.writeInt32(uniqueId);
- writeDecrptHandleToParcelData(decryptHandle, &data);
+ writeDecryptHandleToParcelData(decryptHandle, &data);
data.writeInt32(playbackStatus);
data.writeInt64(position);
@@ -646,7 +646,7 @@ status_t BpDrmManagerService::closeDecryptSession(int uniqueId, DecryptHandle* d
data.writeInterfaceToken(IDrmManagerService::getInterfaceDescriptor());
data.writeInt32(uniqueId);
- writeDecrptHandleToParcelData(decryptHandle, &data);
+ writeDecryptHandleToParcelData(decryptHandle, &data);
remote()->transact(CLOSE_DECRYPT_SESSION, data, &reply);
@@ -662,7 +662,7 @@ status_t BpDrmManagerService::initializeDecryptUnit(
data.writeInterfaceToken(IDrmManagerService::getInterfaceDescriptor());
data.writeInt32(uniqueId);
- writeDecrptHandleToParcelData(decryptHandle, &data);
+ writeDecryptHandleToParcelData(decryptHandle, &data);
data.writeInt32(decryptUnitId);
@@ -682,7 +682,7 @@ status_t BpDrmManagerService::decrypt(
data.writeInterfaceToken(IDrmManagerService::getInterfaceDescriptor());
data.writeInt32(uniqueId);
- writeDecrptHandleToParcelData(decryptHandle, &data);
+ writeDecryptHandleToParcelData(decryptHandle, &data);
data.writeInt32(decryptUnitId);
data.writeInt32((*decBuffer)->length);
@@ -715,7 +715,7 @@ status_t BpDrmManagerService::finalizeDecryptUnit(
data.writeInterfaceToken(IDrmManagerService::getInterfaceDescriptor());
data.writeInt32(uniqueId);
- writeDecrptHandleToParcelData(decryptHandle, &data);
+ writeDecryptHandleToParcelData(decryptHandle, &data);
data.writeInt32(decryptUnitId);
@@ -733,7 +733,7 @@ ssize_t BpDrmManagerService::pread(
data.writeInterfaceToken(IDrmManagerService::getInterfaceDescriptor());
data.writeInt32(uniqueId);
- writeDecrptHandleToParcelData(decryptHandle, &data);
+ writeDecryptHandleToParcelData(decryptHandle, &data);
data.writeInt32(numBytes);
data.writeInt64(offset);
@@ -1244,7 +1244,7 @@ status_t BnDrmManagerService::onTransact(
= openDecryptSession(uniqueId, fd, data.readInt64(), data.readInt64());
if (NULL != handle) {
- writeDecrptHandleToParcelData(handle, reply);
+ writeDecryptHandleToParcelData(handle, reply);
clearDecryptHandle(handle);
delete handle; handle = NULL;
}
@@ -1262,7 +1262,7 @@ status_t BnDrmManagerService::onTransact(
DecryptHandle* handle = openDecryptSession(uniqueId, uri.string());
if (NULL != handle) {
- writeDecrptHandleToParcelData(handle, reply);
+ writeDecryptHandleToParcelData(handle, reply);
clearDecryptHandle(handle);
delete handle; handle = NULL;