Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(608)

Side by Side Diff: media/base/android/java/src/org/chromium/media/MediaDrmBridge.java

Issue 522943003: [Android] Fix findbugs errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixed threading issues in HttpAuthDatabase constructor Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.media; 5 package org.chromium.media;
6 6
7 import android.media.MediaCrypto; 7 import android.media.MediaCrypto;
8 import android.media.MediaDrm; 8 import android.media.MediaDrm;
9 import android.os.AsyncTask; 9 import android.os.AsyncTask;
10 import android.os.Build; 10 import android.os.Build;
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 Log.e(TAG, "Cannot create MediaCrypto Session."); 198 Log.e(TAG, "Cannot create MediaCrypto Session.");
199 return false; 199 return false;
200 } 200 }
201 Log.d(TAG, "MediaCrypto Session created: " + mMediaCryptoSession); 201 Log.d(TAG, "MediaCrypto Session created: " + mMediaCryptoSession);
202 202
203 // Create MediaCrypto object. 203 // Create MediaCrypto object.
204 try { 204 try {
205 if (MediaCrypto.isCryptoSchemeSupported(mSchemeUUID)) { 205 if (MediaCrypto.isCryptoSchemeSupported(mSchemeUUID)) {
206 final byte[] mediaCryptoSession = mMediaCryptoSession.array(); 206 final byte[] mediaCryptoSession = mMediaCryptoSession.array();
207 mMediaCrypto = new MediaCrypto(mSchemeUUID, mediaCryptoSession); 207 mMediaCrypto = new MediaCrypto(mSchemeUUID, mediaCryptoSession);
208 assert mMediaCrypto != null;
209 Log.d(TAG, "MediaCrypto successfully created!"); 208 Log.d(TAG, "MediaCrypto successfully created!");
210 mSessionIds.put(mMediaCryptoSession, INVALID_SESSION_ID); 209 mSessionIds.put(mMediaCryptoSession, INVALID_SESSION_ID);
211 // Notify the native code that MediaCrypto is ready. 210 // Notify the native code that MediaCrypto is ready.
212 nativeOnMediaCryptoReady(mNativeMediaDrmBridge); 211 nativeOnMediaCryptoReady(mNativeMediaDrmBridge);
213 return true; 212 return true;
214 } else { 213 } else {
215 Log.e(TAG, "Cannot create MediaCrypto for unsupported scheme."); 214 Log.e(TAG, "Cannot create MediaCrypto for unsupported scheme.");
216 } 215 }
217 } catch (android.media.MediaCryptoException e) { 216 } catch (android.media.MediaCryptoException e) {
218 Log.e(TAG, "Cannot create MediaCrypto", e); 217 Log.e(TAG, "Cannot create MediaCrypto", e);
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 906
908 private native void nativeOnSessionClosed(long nativeMediaDrmBridge, int ses sionId); 907 private native void nativeOnSessionClosed(long nativeMediaDrmBridge, int ses sionId);
909 908
910 private native void nativeOnSessionError(long nativeMediaDrmBridge, int sess ionId); 909 private native void nativeOnSessionError(long nativeMediaDrmBridge, int sess ionId);
911 910
912 private native void nativeOnResetDeviceCredentialsCompleted( 911 private native void nativeOnResetDeviceCredentialsCompleted(
913 long nativeMediaDrmBridge, boolean success); 912 long nativeMediaDrmBridge, boolean success);
914 913
915 private static native void nativeAddKeySystemUuidMapping(String keySystem, B yteBuffer uuid); 914 private static native void nativeAddKeySystemUuidMapping(String keySystem, B yteBuffer uuid);
916 } 915 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698