From 4f115e08cb68aaf77693f3f4598f0eb5f7634777 Mon Sep 17 00:00:00 2001 From: Laurent Tu Date: Thu, 14 Feb 2013 16:12:54 -0800 Subject: Tentative fix for aidl import issue Fix issue when aidl generation doesn't use the right type when it is a suffix of a pre-declared type. eg. android.location.Location and foo.android.location.Location. The aidl generation will never use foo.android.location.Location. The tentative fix reverses the order in which Namespace.Search iterates through the known types. A better fix would be to annotate the types that are declared in the aidl import statements to be prioritary in Namespace.Search. Lmk if I you agree with this approach and think that this is worth the work. Thanks! Change-Id: I97dd1a1d417075accf1d61f9aba5aba3dea175c6 --- tools/aidl/Type.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/aidl/Type.cpp b/tools/aidl/Type.cpp index d572af6..c637aee 100644 --- a/tools/aidl/Type.cpp +++ b/tools/aidl/Type.cpp @@ -1348,7 +1348,7 @@ Namespace::Search(const string& name) // would be the place to do it, but I don't think the complexity in // scoping rules is worth it. int N = m_types.size(); - for (int i=0; i=0; i--) { if (m_types[i]->Name() == name) { return m_types[i]; } -- cgit v1.1