diff options
author | Mark Salyzyn <salyzyn@google.com> | 2014-04-15 14:55:53 -0700 |
---|---|---|
committer | Mark Salyzyn <salyzyn@google.com> | 2014-04-15 14:57:31 -0700 |
commit | 3ab368e0810d894dcbc0971350c095049478a055 (patch) | |
tree | a50053c391da8c02797158395f2ecfec83218855 /drm/drmserver | |
parent | db43b34c3428e480f8c4c66e7e88f4001f37f91e (diff) | |
download | frameworks_av-3ab368e0810d894dcbc0971350c095049478a055.zip frameworks_av-3ab368e0810d894dcbc0971350c095049478a055.tar.gz frameworks_av-3ab368e0810d894dcbc0971350c095049478a055.tar.bz2 |
media: use size_t for integer iterator to Vector::size()
Change-Id: I0a744dc7815a86a993df9b0623440be620ec8903
Diffstat (limited to 'drm/drmserver')
-rw-r--r-- | drm/drmserver/DrmManager.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drm/drmserver/DrmManager.cpp b/drm/drmserver/DrmManager.cpp index dccd23d..d8aeb0c 100644 --- a/drm/drmserver/DrmManager.cpp +++ b/drm/drmserver/DrmManager.cpp @@ -101,7 +101,7 @@ status_t DrmManager::loadPlugIns() { status_t DrmManager::loadPlugIns(const String8& plugInDirPath) { mPlugInManager.loadPlugIns(plugInDirPath); Vector<String8> plugInPathList = mPlugInManager.getPlugInIdList(); - for (unsigned int i = 0; i < plugInPathList.size(); ++i) { + for (size_t i = 0; i < plugInPathList.size(); ++i) { String8 plugInPath = plugInPathList[i]; DrmSupportInfo* info = mPlugInManager.getPlugIn(plugInPath).getSupportInfo(0); if (NULL != info) { @@ -138,7 +138,7 @@ void DrmManager::addClient(int uniqueId) { Mutex::Autolock _l(mLock); if (!mSupportInfoToPlugInIdMap.isEmpty()) { Vector<String8> plugInIdList = mPlugInManager.getPlugInIdList(); - for (unsigned int index = 0; index < plugInIdList.size(); index++) { + for (size_t index = 0; index < plugInIdList.size(); index++) { IDrmEngine& rDrmEngine = mPlugInManager.getPlugIn(plugInIdList.itemAt(index)); rDrmEngine.initialize(uniqueId); rDrmEngine.setOnInfoListener(uniqueId, this); @@ -149,7 +149,7 @@ void DrmManager::addClient(int uniqueId) { void DrmManager::removeClient(int uniqueId) { Mutex::Autolock _l(mLock); Vector<String8> plugInIdList = mPlugInManager.getPlugInIdList(); - for (unsigned int index = 0; index < plugInIdList.size(); index++) { + for (size_t index = 0; index < plugInIdList.size(); index++) { IDrmEngine& rDrmEngine = mPlugInManager.getPlugIn(plugInIdList.itemAt(index)); rDrmEngine.terminate(uniqueId); } @@ -208,7 +208,7 @@ bool DrmManager::canHandle(int uniqueId, const String8& path) { bool result = false; Vector<String8> plugInPathList = mPlugInManager.getPlugInIdList(); - for (unsigned int i = 0; i < plugInPathList.size(); ++i) { + for (size_t i = 0; i < plugInPathList.size(); ++i) { IDrmEngine& rDrmEngine = mPlugInManager.getPlugIn(plugInPathList[i]); result = rDrmEngine.canHandle(uniqueId, path); @@ -318,7 +318,7 @@ status_t DrmManager::removeRights(int uniqueId, const String8& path) { status_t DrmManager::removeAllRights(int uniqueId) { Vector<String8> plugInIdList = mPlugInManager.getPlugInIdList(); status_t result = DRM_ERROR_UNKNOWN; - for (unsigned int index = 0; index < plugInIdList.size(); index++) { + for (size_t index = 0; index < plugInIdList.size(); index++) { IDrmEngine& rDrmEngine = mPlugInManager.getPlugIn(plugInIdList.itemAt(index)); result = rDrmEngine.removeAllRights(uniqueId); if (DRM_NO_ERROR != result) { @@ -412,7 +412,7 @@ DecryptHandle* DrmManager::openDecryptSession( if (NULL != handle) { handle->decryptId = mDecryptSessionId + 1; - for (unsigned int index = 0; index < plugInIdList.size(); index++) { + for (size_t index = 0; index < plugInIdList.size(); index++) { String8 plugInId = plugInIdList.itemAt(index); IDrmEngine& rDrmEngine = mPlugInManager.getPlugIn(plugInId); result = rDrmEngine.openDecryptSession(uniqueId, handle, fd, offset, length, mime); @@ -440,7 +440,7 @@ DecryptHandle* DrmManager::openDecryptSession( if (NULL != handle) { handle->decryptId = mDecryptSessionId + 1; - for (unsigned int index = 0; index < plugInIdList.size(); index++) { + for (size_t index = 0; index < plugInIdList.size(); index++) { String8 plugInId = plugInIdList.itemAt(index); IDrmEngine& rDrmEngine = mPlugInManager.getPlugIn(plugInId); result = rDrmEngine.openDecryptSession(uniqueId, handle, uri, mime); @@ -565,7 +565,7 @@ String8 DrmManager::getSupportedPlugInId(const String8& mimeType) { String8 plugInId(""); if (EMPTY_STRING != mimeType) { - for (unsigned int index = 0; index < mSupportInfoToPlugInIdMap.size(); index++) { + for (size_t index = 0; index < mSupportInfoToPlugInIdMap.size(); index++) { const DrmSupportInfo& drmSupportInfo = mSupportInfoToPlugInIdMap.keyAt(index); if (drmSupportInfo.isSupportedMimeType(mimeType)) { @@ -581,7 +581,7 @@ String8 DrmManager::getSupportedPlugInIdFromPath(int uniqueId, const String8& pa String8 plugInId(""); const String8 fileSuffix = path.getPathExtension(); - for (unsigned int index = 0; index < mSupportInfoToPlugInIdMap.size(); index++) { + for (size_t index = 0; index < mSupportInfoToPlugInIdMap.size(); index++) { const DrmSupportInfo& drmSupportInfo = mSupportInfoToPlugInIdMap.keyAt(index); if (drmSupportInfo.isSupportedFileSuffix(fileSuffix)) { @@ -599,7 +599,7 @@ String8 DrmManager::getSupportedPlugInIdFromPath(int uniqueId, const String8& pa void DrmManager::onInfo(const DrmInfoEvent& event) { Mutex::Autolock _l(mListenerLock); - for (unsigned int index = 0; index < mServiceListeners.size(); index++) { + for (size_t index = 0; index < mServiceListeners.size(); index++) { int uniqueId = mServiceListeners.keyAt(index); if (uniqueId == event.getUniqueId()) { |