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

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

Issue 2548013002: Remove redundant field initialization in Java code. (Closed)
Patch Set: rebase Created 4 years 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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.content.Context; 7 import android.content.Context;
8 import android.media.MediaPlayer; 8 import android.media.MediaPlayer;
9 9
10 import org.chromium.base.annotations.CalledByNative; 10 import org.chromium.base.annotations.CalledByNative;
(...skipping 14 matching lines...) Expand all
25 private static final int MEDIA_ERROR_DECODE = 1; 25 private static final int MEDIA_ERROR_DECODE = 1;
26 private static final int MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK = 2; 26 private static final int MEDIA_ERROR_NOT_VALID_FOR_PROGRESSIVE_PLAYBACK = 2;
27 private static final int MEDIA_ERROR_INVALID_CODE = 3; 27 private static final int MEDIA_ERROR_INVALID_CODE = 3;
28 private static final int MEDIA_ERROR_SERVER_DIED = 4; 28 private static final int MEDIA_ERROR_SERVER_DIED = 4;
29 29
30 // These values are copied from android media player. 30 // These values are copied from android media player.
31 public static final int MEDIA_ERROR_MALFORMED = -1007; 31 public static final int MEDIA_ERROR_MALFORMED = -1007;
32 public static final int MEDIA_ERROR_TIMED_OUT = -110; 32 public static final int MEDIA_ERROR_TIMED_OUT = -110;
33 33
34 // Used to determine the class instance to dispatch the native call to. 34 // Used to determine the class instance to dispatch the native call to.
35 private long mNativeMediaPlayerListener = 0; 35 private long mNativeMediaPlayerListener;
36 private final Context mContext; 36 private final Context mContext;
37 37
38 private MediaPlayerListener(long nativeMediaPlayerListener, Context context) { 38 private MediaPlayerListener(long nativeMediaPlayerListener, Context context) {
39 mNativeMediaPlayerListener = nativeMediaPlayerListener; 39 mNativeMediaPlayerListener = nativeMediaPlayerListener;
40 mContext = context; 40 mContext = context;
41 } 41 }
42 42
43 @Override 43 @Override
44 public boolean onError(MediaPlayer mp, int what, int extra) { 44 public boolean onError(MediaPlayer mp, int what, int extra) {
45 int errorType; 45 int errorType;
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 int percent); 132 int percent);
133 133
134 private native void nativeOnMediaPrepared(long nativeMediaPlayerListener); 134 private native void nativeOnMediaPrepared(long nativeMediaPlayerListener);
135 135
136 private native void nativeOnPlaybackComplete(long nativeMediaPlayerListener) ; 136 private native void nativeOnPlaybackComplete(long nativeMediaPlayerListener) ;
137 137
138 private native void nativeOnSeekComplete(long nativeMediaPlayerListener); 138 private native void nativeOnSeekComplete(long nativeMediaPlayerListener);
139 139
140 private native void nativeOnMediaInterrupted(long nativeMediaPlayerListener) ; 140 private native void nativeOnMediaInterrupted(long nativeMediaPlayerListener) ;
141 } 141 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698