function overloading support in AIDL

2,359 views
Skip to first unread message

RupaSunita n

unread,
Jun 17, 2010, 6:46:11 PM6/17/10
to android-platform
Hi,
I'm getting an error when overloading methods in an AIDL file.
It's complaining that i'm trying to redefine the same method:

frameworks/base/core/java/android/view/IWindowSession.aidl:76 attempt to redefine method relayout,

The methods have different parameters, so it should be ok. Has anybody seen this issue?
any pointers are really useful.


Thanks & Regards,
Sunita.



Dianne Hackborn

unread,
Jun 17, 2010, 6:58:22 PM6/17/10
to android-...@googlegroups.com
Interfaces do not support overloading.




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



--
Dianne Hackborn
Android framework engineer
hac...@android.com

Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails.  All such questions should be posted on public forums, where I and others can see and answer them.

RupaSunita n

unread,
Jun 17, 2010, 7:02:52 PM6/17/10
to android-...@googlegroups.com
thanks Dianne.
But if i want to avoid the interface break and minimize the changes to other components,
is there any other way? other than defining a new interface method?

thanks & Regards,
sunita.

Dianne Hackborn

unread,
Jun 17, 2010, 8:17:11 PM6/17/10
to android-...@googlegroups.com
I'm not sure what overloading has to do with that.

You can add new methods to an AIDL interface; if you add them to the bottom, the generated code will remain compatible with code generated from the old interface.

We are however pretty careful to not expose AIDL interfaces in the SDK, because they tend to be implementation details of the platform and generally there is a lot less flexibility for maintaining compatibility with an AIDL interface.

RupaSunita n

unread,
Jun 17, 2010, 8:48:16 PM6/17/10
to android-...@googlegroups.com
Thanks Dianne.

Regards,
sunita.

Company Techunami

unread,
Jul 21, 2016, 11:54:07 AM7/21/16
to android-platform, rupasu...@gmail.com
Hi,

I am experiencing the same. What do you mean by adding it to the bottom of the interface ? Can you please give me an example. The different ways I tried does not work.

Regards,

Willie

Satish Patel

unread,
Jul 24, 2016, 6:04:41 PM7/24/16
to android-...@googlegroups.com, rupasu...@gmail.com
Hi,

To my knowledge function overloading does not supported in AIDL

--
satish

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-platfo...@googlegroups.com.

To post to this group, send email to android-...@googlegroups.com.



--
Regards,
satish patel
Reply all
Reply to author
Forward
0 new messages