/* * This file is auto-generated. DO NOT MODIFY. * Original file: frameworks/base/core/java/android/os/IVibratorService.aidl */ package android.os; /** {@hide} */ public interface IVibratorService extends android.os.IInterface { /** Local-side IPC implementation stub class. */ public static abstract class Stub extends android.os.Binder implements android.os.IVibratorService { private static final java.lang.String DESCRIPTOR = "android.os.IVibratorService"; /** Construct the stub at attach it to the interface. */ public Stub() { this.attachInterface(this, DESCRIPTOR); } /** * Cast an IBinder object into an android.os.IVibratorService interface, * generating a proxy if needed. */ public static android.os.IVibratorService asInterface(android.os.IBinder obj) { if ((obj==null)) { return null; } android.os.IInterface iin = (android.os.IInterface)obj.queryLocalInterface(DESCRIPTOR); if (((iin!=null)&&(iin instanceof android.os.IVibratorService))) { return ((android.os.IVibratorService)iin); } return new android.os.IVibratorService.Stub.Proxy(obj); } public android.os.IBinder asBinder() { return this; } @Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException { switch (code) { case INTERFACE_TRANSACTION: { reply.writeString(DESCRIPTOR); return true; } case TRANSACTION_hasVibrator: { data.enforceInterface(DESCRIPTOR); boolean _result = this.hasVibrator(); reply.writeNoException(); reply.writeInt(((_result)?(1):(0))); return true; } case TRANSACTION_vibrate: { data.enforceInterface(DESCRIPTOR); long _arg0; _arg0 = data.readLong(); android.os.IBinder _arg1; _arg1 = data.readStrongBinder(); this.vibrate(_arg0, _arg1); reply.writeNoException(); return true; } case TRANSACTION_vibratePattern: { data.enforceInterface(DESCRIPTOR); long[] _arg0; _arg0 = data.createLongArray(); int _arg1; _arg1 = data.readInt(); android.os.IBinder _arg2; _arg2 = data.readStrongBinder(); this.vibratePattern(_arg0, _arg1, _arg2); reply.writeNoException(); return true; } case TRANSACTION_cancelVibrate: { data.enforceInterface(DESCRIPTOR); android.os.IBinder _arg0; _arg0 = data.readStrongBinder(); this.cancelVibrate(_arg0); reply.writeNoException(); return true; } } return super.onTransact(code, data, reply, flags); } private static class Proxy implements android.os.IVibratorService { private android.os.IBinder mRemote; Proxy(android.os.IBinder remote) { mRemote = remote; } public android.os.IBinder asBinder() { return mRemote; } public java.lang.String getInterfaceDescriptor() { return DESCRIPTOR; } public boolean hasVibrator() throws android.os.RemoteException { android.os.Parcel _data = android.os.Parcel.obtain(); android.os.Parcel _reply = android.os.Parcel.obtain(); boolean _result; try { _data.writeInterfaceToken(DESCRIPTOR); mRemote.transact(Stub.TRANSACTION_hasVibrator, _data, _reply, 0); _reply.readException(); _result = (0!=_reply.readInt()); } finally { _reply.recycle(); _data.recycle(); } return _result; } public void vibrate(long milliseconds, android.os.IBinder token) throws android.os.RemoteException { android.os.Parcel _data = android.os.Parcel.obtain(); android.os.Parcel _reply = android.os.Parcel.obtain(); try { _data.writeInterfaceToken(DESCRIPTOR); _data.writeLong(milliseconds); _data.writeStrongBinder(token); mRemote.transact(Stub.TRANSACTION_vibrate, _data, _reply, 0); _reply.readException(); } finally { _reply.recycle(); _data.recycle(); } } public void vibratePattern(long[] pattern, int repeat, android.os.IBinder token) throws android.os.RemoteException { android.os.Parcel _data = android.os.Parcel.obtain(); android.os.Parcel _reply = android.os.Parcel.obtain(); try { _data.writeInterfaceToken(DESCRIPTOR); _data.writeLongArray(pattern); _data.writeInt(repeat); _data.writeStrongBinder(token); mRemote.transact(Stub.TRANSACTION_vibratePattern, _data, _reply, 0); _reply.readException(); } finally { _reply.recycle(); _data.recycle(); } } public void cancelVibrate(android.os.IBinder token) throws android.os.RemoteException { android.os.Parcel _data = android.os.Parcel.obtain(); android.os.Parcel _reply = android.os.Parcel.obtain(); try { _data.writeInterfaceToken(DESCRIPTOR); _data.writeStrongBinder(token); mRemote.transact(Stub.TRANSACTION_cancelVibrate, _data, _reply, 0); _reply.readException(); } finally { _reply.recycle(); _data.recycle(); } } } static final int TRANSACTION_hasVibrator = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0); static final int TRANSACTION_vibrate = (android.os.IBinder.FIRST_CALL_TRANSACTION + 1); static final int TRANSACTION_vibratePattern = (android.os.IBinder.FIRST_CALL_TRANSACTION + 2); static final int TRANSACTION_cancelVibrate = (android.os.IBinder.FIRST_CALL_TRANSACTION + 3); } public boolean hasVibrator() throws android.os.RemoteException; public void vibrate(long milliseconds, android.os.IBinder token) throws android.os.RemoteException; public void vibratePattern(long[] pattern, int repeat, android.os.IBinder token) throws android.os.RemoteException; public void cancelVibrate(android.os.IBinder token) throws android.os.RemoteException; }