package android.hardware.location;
public interface IActivityRecognitionHardware extends android.os.IInterface
{
public static abstract class Stub extends android.os.Binder implements android.hardware.location.IActivityRecognitionHardware
{
private static final java.lang.String DESCRIPTOR = "android.hardware.location.IActivityRecognitionHardware";
public Stub()
{
this.attachInterface(this, DESCRIPTOR);
}
public static android.hardware.location.IActivityRecognitionHardware asInterface(android.os.IBinder obj)
{
if ((obj==null)) {
return null;
}
android.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);
if (((iin!=null)&&(iin instanceof android.hardware.location.IActivityRecognitionHardware))) {
return ((android.hardware.location.IActivityRecognitionHardware)iin);
}
return new android.hardware.location.IActivityRecognitionHardware.Stub.Proxy(obj);
}
@Override 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
{
java.lang.String descriptor = DESCRIPTOR;
switch (code)
{
case INTERFACE_TRANSACTION:
{
reply.writeString(descriptor);
return true;
}
case TRANSACTION_getSupportedActivities:
{
data.enforceInterface(descriptor);
java.lang.String[] _result = this.getSupportedActivities();
reply.writeNoException();
reply.writeStringArray(_result);
return true;
}
case TRANSACTION_isActivitySupported:
{
data.enforceInterface(descriptor);
java.lang.String _arg0;
_arg0 = data.readString();
boolean _result = this.isActivitySupported(_arg0);
reply.writeNoException();
reply.writeInt(((_result)?(1):(0)));
return true;
}
case TRANSACTION_registerSink:
{
data.enforceInterface(descriptor);
android.hardware.location.IActivityRecognitionHardwareSink _arg0;
_arg0 = android.hardware.location.IActivityRecognitionHardwareSink.Stub.asInterface(data.readStrongBinder());
boolean _result = this.registerSink(_arg0);
reply.writeNoException();
reply.writeInt(((_result)?(1):(0)));
return true;
}
case TRANSACTION_unregisterSink:
{
data.enforceInterface(descriptor);
android.hardware.location.IActivityRecognitionHardwareSink _arg0;
_arg0 = android.hardware.location.IActivityRecognitionHardwareSink.Stub.asInterface(data.readStrongBinder());
boolean _result = this.unregisterSink(_arg0);
reply.writeNoException();
reply.writeInt(((_result)?(1):(0)));
return true;
}
case TRANSACTION_enableActivityEvent:
{
data.enforceInterface(descriptor);
java.lang.String _arg0;
_arg0 = data.readString();
int _arg1;
_arg1 = data.readInt();
long _arg2;
_arg2 = data.readLong();
boolean _result = this.enableActivityEvent(_arg0, _arg1, _arg2);
reply.writeNoException();
reply.writeInt(((_result)?(1):(0)));
return true;
}
case TRANSACTION_disableActivityEvent:
{
data.enforceInterface(descriptor);
java.lang.String _arg0;
_arg0 = data.readString();
int _arg1;
_arg1 = data.readInt();
boolean _result = this.disableActivityEvent(_arg0, _arg1);
reply.writeNoException();
reply.writeInt(((_result)?(1):(0)));
return true;
}
case TRANSACTION_flush:
{
data.enforceInterface(descriptor);
boolean _result = this.flush();
reply.writeNoException();
reply.writeInt(((_result)?(1):(0)));
return true;
}
default:
{
return super.onTransact(code, data, reply, flags);
}
}
}
private static class Proxy implements android.hardware.location.IActivityRecognitionHardware
{
private android.os.IBinder mRemote;
Proxy(android.os.IBinder remote)
{
mRemote = remote;
}
@Override public android.os.IBinder asBinder()
{
return mRemote;
}
public java.lang.String getInterfaceDescriptor()
{
return DESCRIPTOR;
}
@Override public java.lang.String[] getSupportedActivities() throws android.os.RemoteException
{
android.os.Parcel _data = android.os.Parcel.obtain();
android.os.Parcel _reply = android.os.Parcel.obtain();
java.lang.String[] _result;
try {
_data.writeInterfaceToken(DESCRIPTOR);
mRemote.transact(Stub.TRANSACTION_getSupportedActivities, _data, _reply, 0);
_reply.readException();
_result = _reply.createStringArray();
}
finally {
_reply.recycle();
_data.recycle();
}
return _result;
}
@Override public boolean isActivitySupported(java.lang.String activityType) 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);
_data.writeString(activityType);
mRemote.transact(Stub.TRANSACTION_isActivitySupported, _data, _reply, 0);
_reply.readException();
_result = (0!=_reply.readInt());
}
finally {
_reply.recycle();
_data.recycle();
}
return _result;
}
@Override public boolean registerSink(android.hardware.location.IActivityRecognitionHardwareSink sink) 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);
_data.writeStrongBinder((((sink!=null))?(sink.asBinder()):(null)));
mRemote.transact(Stub.TRANSACTION_registerSink, _data, _reply, 0);
_reply.readException();
_result = (0!=_reply.readInt());
}
finally {
_reply.recycle();
_data.recycle();
}
return _result;
}
@Override public boolean unregisterSink(android.hardware.location.IActivityRecognitionHardwareSink sink) 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);
_data.writeStrongBinder((((sink!=null))?(sink.asBinder()):(null)));
mRemote.transact(Stub.TRANSACTION_unregisterSink, _data, _reply, 0);
_reply.readException();
_result = (0!=_reply.readInt());
}
finally {
_reply.recycle();
_data.recycle();
}
return _result;
}
@Override public boolean enableActivityEvent(java.lang.String activityType, int eventType, long reportLatencyNs) 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);
_data.writeString(activityType);
_data.writeInt(eventType);
_data.writeLong(reportLatencyNs);
mRemote.transact(Stub.TRANSACTION_enableActivityEvent, _data, _reply, 0);
_reply.readException();
_result = (0!=_reply.readInt());
}
finally {
_reply.recycle();
_data.recycle();
}
return _result;
}
@Override public boolean disableActivityEvent(java.lang.String activityType, int eventType) 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);
_data.writeString(activityType);
_data.writeInt(eventType);
mRemote.transact(Stub.TRANSACTION_disableActivityEvent, _data, _reply, 0);
_reply.readException();
_result = (0!=_reply.readInt());
}
finally {
_reply.recycle();
_data.recycle();
}
return _result;
}
@Override public boolean flush() 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_flush, _data, _reply, 0);
_reply.readException();
_result = (0!=_reply.readInt());
}
finally {
_reply.recycle();
_data.recycle();
}
return _result;
}
}
static final int TRANSACTION_getSupportedActivities = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0);
static final int TRANSACTION_isActivitySupported = (android.os.IBinder.FIRST_CALL_TRANSACTION + 1);
static final int TRANSACTION_registerSink = (android.os.IBinder.FIRST_CALL_TRANSACTION + 2);
static final int TRANSACTION_unregisterSink = (android.os.IBinder.FIRST_CALL_TRANSACTION + 3);
static final int TRANSACTION_enableActivityEvent = (android.os.IBinder.FIRST_CALL_TRANSACTION + 4);
static final int TRANSACTION_disableActivityEvent = (android.os.IBinder.FIRST_CALL_TRANSACTION + 5);
static final int TRANSACTION_flush = (android.os.IBinder.FIRST_CALL_TRANSACTION + 6);
}
public java.lang.String[] getSupportedActivities() throws android.os.RemoteException;
public boolean isActivitySupported(java.lang.String activityType) throws android.os.RemoteException;
public boolean registerSink(android.hardware.location.IActivityRecognitionHardwareSink sink) throws android.os.RemoteException;
public boolean unregisterSink(android.hardware.location.IActivityRecognitionHardwareSink sink) throws android.os.RemoteException;
public boolean enableActivityEvent(java.lang.String activityType, int eventType, long reportLatencyNs) throws android.os.RemoteException;
public boolean disableActivityEvent(java.lang.String activityType, int eventType) throws android.os.RemoteException;
public boolean flush() throws android.os.RemoteException;
}