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

Side by Side Diff: content/public/android/java/src/org/chromium/content/browser/AudioFocusDelegate.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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.content.browser; 5 package org.chromium.content.browser;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.media.AudioManager; 8 import android.media.AudioManager;
9 9
10 import org.chromium.base.Log; 10 import org.chromium.base.Log;
(...skipping 11 matching lines...) Expand all
22 * counterpart and will resume its play using the same type if it were to 22 * counterpart and will resume its play using the same type if it were to
23 * happen, for example, when it got temporarily suspended by a transient sound 23 * happen, for example, when it got temporarily suspended by a transient sound
24 * like a notification. 24 * like a notification.
25 */ 25 */
26 @JNINamespace("content") 26 @JNINamespace("content")
27 public class AudioFocusDelegate implements AudioManager.OnAudioFocusChangeListen er { 27 public class AudioFocusDelegate implements AudioManager.OnAudioFocusChangeListen er {
28 private static final String TAG = "MediaSession"; 28 private static final String TAG = "MediaSession";
29 29
30 private Context mContext; 30 private Context mContext;
31 private int mFocusType; 31 private int mFocusType;
32 private boolean mIsDucking = false; 32 private boolean mIsDucking;
33 33
34 // Native pointer to C++ content::AudioFocusDelegateAndroid. 34 // Native pointer to C++ content::AudioFocusDelegateAndroid.
35 // It will be set to 0 when the native AudioFocusDelegateAndroid object is d estroyed. 35 // It will be set to 0 when the native AudioFocusDelegateAndroid object is d estroyed.
36 private long mNativeAudioFocusDelegateAndroid; 36 private long mNativeAudioFocusDelegateAndroid;
37 37
38 private AudioFocusDelegate(final Context context, long nativeAudioFocusDeleg ateAndroid) { 38 private AudioFocusDelegate(final Context context, long nativeAudioFocusDeleg ateAndroid) {
39 mContext = context; 39 mContext = context;
40 mNativeAudioFocusDelegateAndroid = nativeAudioFocusDelegateAndroid; 40 mNativeAudioFocusDelegateAndroid = nativeAudioFocusDelegateAndroid;
41 } 41 }
42 42
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 break; 106 break;
107 } 107 }
108 } 108 }
109 109
110 private native void nativeOnSuspend(long nativeAudioFocusDelegateAndroid, bo olean temporary); 110 private native void nativeOnSuspend(long nativeAudioFocusDelegateAndroid, bo olean temporary);
111 private native void nativeOnResume(long nativeAudioFocusDelegateAndroid); 111 private native void nativeOnResume(long nativeAudioFocusDelegateAndroid);
112 private native void nativeOnStartDucking(long nativeAudioFocusDelegateAndroi d); 112 private native void nativeOnStartDucking(long nativeAudioFocusDelegateAndroi d);
113 private native void nativeOnStopDucking(long nativeAudioFocusDelegateAndroid ); 113 private native void nativeOnStopDucking(long nativeAudioFocusDelegateAndroid );
114 private native void nativeRecordSessionDuck(long nativeAudioFocusDelegateAnd roid); 114 private native void nativeRecordSessionDuck(long nativeAudioFocusDelegateAnd roid);
115 } 115 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698