Support multiple types in an AIDL file / multiple AIDL files

AIDL compiler now accepts multiple types in a single AIDL file and also
handles multiple input AIDL files in a single run.

Multiple types in a single AIDL file can be defined as follows:

package foo.bar;
interface IFoo { void doSomething(IBar bar);}
interface IBar { void doAnotherThing(IFoo foo, Data, d);}
parcelable Data { int x; IFoo foo; IBar bar;}

The types must be within the same package. And they can reference with
each other without using the import statement.

When multiple types exist in a single AIDL file, the output files are
created by their type names. For example, for an interface IFoo in
foo.bar. package,

<out>/foo/bar/IFoo.java

is created for Java and

<out>/IFoo.cpp
<header>/foo/bar/IFoo.h, BpFoo.h, BnFoo.h

are created for C++ where <out> is the directory specified with -o or
--out and <header> is the directory specified with -h or --header_out
options.

It is also possible to give multiple input AIDL files each of which can
have multiple types. In order to give multiple input files, the new
cmdline syntax should be used:

aidl --lang=[java|cpp] [option]... input1.aidl input2.aidl ...

In this case, the input files are automatically added to the import
path, so one can reference types defined in other input file just by
using the import statement and there is no need to explicitly set
the import path via -I or --include option.

Bug: 112017361
Test: m -j
Test: runtests.sh

Change-Id: Ifc970ca19ac6b7178ef2846996ada3178972fd98
18 files changed