Hi

This is my aidl file.
----------------------------IRemoteCounterServiceCallback.aidl
----------------------------
package com.training;

import com.training.IRemoteCounterServiceCallback;
import com.training.myCounter;

interface IRemoteCounterService {
  // Remote service interfaces
  int StartCounters(in myCounter counter);

  void registerCallback(IRemoteCounterServiceCallback cb);
  void unregisterCallback(IRemoteCounterServiceCallback cb);
}
-------------------------------------------------------------------------------------------

The aidl generates

public static abstract class Stub extends android.os.Binder implements
com.training.IRemoteCounterService
{

}

containing an inner class

public static abstract class Stub extends android.os.Binder implements
com.training.IRemoteCounterService
{

}

here the abstract class Stub contains:
1. Impl for public boolean onTransact(int code, android.os.Parcel
data, android.os.Parcel reply, int flags) throws
android.os.RemoteException
(this is never invoked)

2. an inner class, private static class Proxy implements
com.training.IRemoteCounterService, which implemeted the following the
methods which are never invoked whent the program is run:
              a. public int StartCounters(com.training.myCounter
counter) throws android.os.RemoteException

              b. public void registerCallback
(com.training.IRemoteCounterServiceCallback cb) throws
android.os.RemoteException
              c. public void unregisterCallback
(com.training.IRemoteCounterServiceCallback cb) throws
android.os.RemoteException


My Application runs fine even if I remove the above mentioned unused
code from Stub class.

Now the Stub has just 3 methods,

public abstract class Stub extends android.os.Binder implements
IRemoteCounterService
{
        public Stub()
        {
                this.attachInterface(this, DESCRIPTOR);
        }
        public static IRemoteCounterService 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
com.training.IRemoteCounterService))) {
                        return ((com.training.IRemoteCounterService)iin);
                }
                return null;
        }
        public android.os.IBinder asBinder()
        {
                return this;
        }
}

Why does the aidl generate code for

1. onTransact() inside Stub class??
2. inner class Proxy ??

Pls clarify. Thansk in advance.

Regards,
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to