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

Side by Side Diff: media/midi/java/src/org/chromium/midi/MidiManagerAndroid.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.midi; 5 package org.chromium.midi;
6 6
7 import android.annotation.TargetApi; 7 import android.annotation.TargetApi;
8 import android.content.Context; 8 import android.content.Context;
9 import android.media.midi.MidiDevice; 9 import android.media.midi.MidiDevice;
10 import android.media.midi.MidiDeviceInfo; 10 import android.media.midi.MidiDeviceInfo;
(...skipping 12 matching lines...) Expand all
23 23
24 /** 24 /**
25 * A Java class implementing midi::MidiManagerAndroid functionality. 25 * A Java class implementing midi::MidiManagerAndroid functionality.
26 */ 26 */
27 @JNINamespace("midi") 27 @JNINamespace("midi")
28 @TargetApi(Build.VERSION_CODES.M) 28 @TargetApi(Build.VERSION_CODES.M)
29 class MidiManagerAndroid { 29 class MidiManagerAndroid {
30 /** 30 /**
31 * Set true when this instance is successfully initialized. 31 * Set true when this instance is successfully initialized.
32 */ 32 */
33 private boolean mIsInitialized = false; 33 private boolean mIsInitialized;
34 /** 34 /**
35 * The devices held by this manager. 35 * The devices held by this manager.
36 */ 36 */
37 private final List<MidiDeviceAndroid> mDevices = new ArrayList<>(); 37 private final List<MidiDeviceAndroid> mDevices = new ArrayList<>();
38 /** 38 /**
39 * The device information instances which are being initialized. 39 * The device information instances which are being initialized.
40 */ 40 */
41 private final Set<MidiDeviceInfo> mPendingDevices = new HashSet<>(); 41 private final Set<MidiDeviceInfo> mPendingDevices = new HashSet<>();
42 /** 42 /**
43 * The underlying MidiManager. 43 * The underlying MidiManager.
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 mIsInitialized = true; 166 mIsInitialized = true;
167 } 167 }
168 } 168 }
169 169
170 static native void nativeOnInitialized( 170 static native void nativeOnInitialized(
171 long nativeMidiManagerAndroid, MidiDeviceAndroid[] devices); 171 long nativeMidiManagerAndroid, MidiDeviceAndroid[] devices);
172 static native void nativeOnInitializationFailed(long nativeMidiManagerAndroi d); 172 static native void nativeOnInitializationFailed(long nativeMidiManagerAndroi d);
173 static native void nativeOnAttached(long nativeMidiManagerAndroid, MidiDevic eAndroid device); 173 static native void nativeOnAttached(long nativeMidiManagerAndroid, MidiDevic eAndroid device);
174 static native void nativeOnDetached(long nativeMidiManagerAndroid, MidiDevic eAndroid device); 174 static native void nativeOnDetached(long nativeMidiManagerAndroid, MidiDevic eAndroid device);
175 } 175 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698