Loading Android.mk +2 −0 Original line number Diff line number Diff line Loading @@ -173,6 +173,8 @@ LOCAL_SRC_FILES += \ core/java/android/hardware/location/IGeofenceHardwareMonitorCallback.aidl \ core/java/android/hardware/soundtrigger/IRecognitionStatusCallback.aidl \ core/java/android/hardware/usb/IUsbManager.aidl \ core/java/android/midi/IMidiListener.aidl \ core/java/android/midi/IMidiManager.aidl \ core/java/android/net/IConnectivityManager.aidl \ core/java/android/net/IEthernetManager.aidl \ core/java/android/net/IEthernetServiceListener.aidl \ Loading core/java/android/app/ContextImpl.java +8 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,8 @@ import android.media.projection.MediaProjectionManager; import android.media.session.MediaSessionManager; import android.media.tv.ITvInputManager; import android.media.tv.TvInputManager; import android.midi.IMidiManager; import android.midi.MidiManager; import android.net.ConnectivityManager; import android.net.IConnectivityManager; import android.net.EthernetManager; Loading Loading @@ -777,6 +779,12 @@ class ContextImpl extends Context { IBinder b = ServiceManager.getService(APPWIDGET_SERVICE); return new AppWidgetManager(ctx, IAppWidgetService.Stub.asInterface(b)); }}); registerService(MIDI_SERVICE, new ServiceFetcher() { public Object createService(ContextImpl ctx) { IBinder b = ServiceManager.getService(MIDI_SERVICE); return new MidiManager(ctx, IMidiManager.Stub.asInterface(b)); }}); } static ContextImpl getImpl(Context context) { Loading core/java/android/content/Context.java +10 −0 Original line number Diff line number Diff line Loading @@ -2143,6 +2143,7 @@ public abstract class Context { MEDIA_SESSION_SERVICE, BATTERY_SERVICE, JOB_SCHEDULER_SERVICE, MIDI_SERVICE, }) @Retention(RetentionPolicy.SOURCE) public @interface ServiceName {} Loading Loading @@ -2915,6 +2916,15 @@ public abstract class Context { */ public static final String MEDIA_PROJECTION_SERVICE = "media_projection"; /** * Use with {@link #getSystemService} to retrieve a * {@link android.midi.MidiManager} for accessing the MIDI service. * * @see #getSystemService * @hide */ public static final String MIDI_SERVICE = "midi"; /** * Determine whether the given permission is allowed for a particular * process and user ID running in the system. Loading core/java/android/midi/IMidiListener.aidl 0 → 100644 +26 −0 Original line number Diff line number Diff line /* * Copyright (C) 2014 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.midi; import android.midi.MidiDeviceInfo; /** @hide */ oneway interface IMidiListener { void onDeviceAdded(in MidiDeviceInfo device); void onDeviceRemoved(in MidiDeviceInfo device); } core/java/android/midi/IMidiManager.aidl 0 → 100644 +46 −0 Original line number Diff line number Diff line /* * Copyright (C) 2014 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.midi; import android.hardware.usb.UsbDevice; import android.midi.IMidiListener; import android.midi.MidiDevice; import android.midi.MidiDeviceInfo; import android.os.Bundle; import android.os.IBinder; import android.os.ParcelFileDescriptor; /** @hide */ interface IMidiManager { MidiDeviceInfo[] getDeviceList(); // for device creation & removal notifications void registerListener(IBinder token, in IMidiListener listener); void unregisterListener(IBinder token, in IMidiListener listener); // for communicating with MIDI devices ParcelFileDescriptor openDevice(IBinder token, in MidiDeviceInfo device); // for implementing virtual MIDI devices MidiDevice registerVirtualDevice(IBinder token, in Bundle properties); void unregisterVirtualDevice(IBinder token, in MidiDeviceInfo device); // for use by UsbAudioManager void alsaDeviceAdded(int card, int device, in UsbDevice usbDevice); void alsaDeviceRemoved(in UsbDevice usbDevice); } Loading
Android.mk +2 −0 Original line number Diff line number Diff line Loading @@ -173,6 +173,8 @@ LOCAL_SRC_FILES += \ core/java/android/hardware/location/IGeofenceHardwareMonitorCallback.aidl \ core/java/android/hardware/soundtrigger/IRecognitionStatusCallback.aidl \ core/java/android/hardware/usb/IUsbManager.aidl \ core/java/android/midi/IMidiListener.aidl \ core/java/android/midi/IMidiManager.aidl \ core/java/android/net/IConnectivityManager.aidl \ core/java/android/net/IEthernetManager.aidl \ core/java/android/net/IEthernetServiceListener.aidl \ Loading
core/java/android/app/ContextImpl.java +8 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,8 @@ import android.media.projection.MediaProjectionManager; import android.media.session.MediaSessionManager; import android.media.tv.ITvInputManager; import android.media.tv.TvInputManager; import android.midi.IMidiManager; import android.midi.MidiManager; import android.net.ConnectivityManager; import android.net.IConnectivityManager; import android.net.EthernetManager; Loading Loading @@ -777,6 +779,12 @@ class ContextImpl extends Context { IBinder b = ServiceManager.getService(APPWIDGET_SERVICE); return new AppWidgetManager(ctx, IAppWidgetService.Stub.asInterface(b)); }}); registerService(MIDI_SERVICE, new ServiceFetcher() { public Object createService(ContextImpl ctx) { IBinder b = ServiceManager.getService(MIDI_SERVICE); return new MidiManager(ctx, IMidiManager.Stub.asInterface(b)); }}); } static ContextImpl getImpl(Context context) { Loading
core/java/android/content/Context.java +10 −0 Original line number Diff line number Diff line Loading @@ -2143,6 +2143,7 @@ public abstract class Context { MEDIA_SESSION_SERVICE, BATTERY_SERVICE, JOB_SCHEDULER_SERVICE, MIDI_SERVICE, }) @Retention(RetentionPolicy.SOURCE) public @interface ServiceName {} Loading Loading @@ -2915,6 +2916,15 @@ public abstract class Context { */ public static final String MEDIA_PROJECTION_SERVICE = "media_projection"; /** * Use with {@link #getSystemService} to retrieve a * {@link android.midi.MidiManager} for accessing the MIDI service. * * @see #getSystemService * @hide */ public static final String MIDI_SERVICE = "midi"; /** * Determine whether the given permission is allowed for a particular * process and user ID running in the system. Loading
core/java/android/midi/IMidiListener.aidl 0 → 100644 +26 −0 Original line number Diff line number Diff line /* * Copyright (C) 2014 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.midi; import android.midi.MidiDeviceInfo; /** @hide */ oneway interface IMidiListener { void onDeviceAdded(in MidiDeviceInfo device); void onDeviceRemoved(in MidiDeviceInfo device); }
core/java/android/midi/IMidiManager.aidl 0 → 100644 +46 −0 Original line number Diff line number Diff line /* * Copyright (C) 2014 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package android.midi; import android.hardware.usb.UsbDevice; import android.midi.IMidiListener; import android.midi.MidiDevice; import android.midi.MidiDeviceInfo; import android.os.Bundle; import android.os.IBinder; import android.os.ParcelFileDescriptor; /** @hide */ interface IMidiManager { MidiDeviceInfo[] getDeviceList(); // for device creation & removal notifications void registerListener(IBinder token, in IMidiListener listener); void unregisterListener(IBinder token, in IMidiListener listener); // for communicating with MIDI devices ParcelFileDescriptor openDevice(IBinder token, in MidiDeviceInfo device); // for implementing virtual MIDI devices MidiDevice registerVirtualDevice(IBinder token, in Bundle properties); void unregisterVirtualDevice(IBinder token, in MidiDeviceInfo device); // for use by UsbAudioManager void alsaDeviceAdded(int card, int device, in UsbDevice usbDevice); void alsaDeviceRemoved(in UsbDevice usbDevice); }