Ensure base directory to be specified as an import directory

Compiling the following aidl file now requires `-I base/dir/`:

```
base/dir/pkg/name/IFoo.aidl:

package pkg.name;
interface IFoo {...}
```

Previously, the AIDL compiler didn't mandate this and as a result, users
had to experience an odd looking error from rsync.

```
rsync: [sender] link_stat "...base/dir/pkg/name/IFoo.cpp" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1338) [sender=3.2.7]
```

This happened because the build system basically has no idea about what
the package name of a given AIDL file is. So, it just assumes that the
package name is the relative directory of the input file from the source
root. In the above case, it is assumed to be `base.dir.pkg.name`. As a
result, it expects the output file to be
`base/dir/pkg/name/IFoo.[java|cpp|...], whereas the aidl compiler
actually generates it at `pkg/name/IFoo.[java|cpp]`.

Users need to teach the package name to the build system either by
specifying the base directory of the input path (using the `path`
property in `filegroup`) or specifying the import path (using the
`local_include_dirs` in `aidl_interface`).

This CL makes the error more friendly by failing early in the AIDL
compiler. In the above case, with the updated AIDL compiler, the error
message is as follows:

```
ERROR: <src_root>/base/dir/pkg/name/Foo.aidl:4.11-15: directory base/dir is not found in any of the import paths:
- <src_root>/
```

Bug: 260009392
Test: run aidl_unittests

Change-Id: Iadad10a73c21414030d752fa34f386d25b34262f
5 files changed
tree: f0db61bca2b3f6dbfd3d49b02a9c48e5218857d1
  1. aidl_api/
  2. analyzer/
  3. build/
  4. metadata/
  5. scripts/
  6. tests/
  7. trace/
  8. aidl-format.sh
  9. aidl.cpp
  10. aidl.h
  11. aidl_checkapi.cpp
  12. aidl_checkapi.h
  13. aidl_const_expressions.cpp
  14. aidl_dumpapi.cpp
  15. aidl_dumpapi.h
  16. aidl_language.cpp
  17. aidl_language.h
  18. aidl_language_l.ll
  19. aidl_language_y.yy
  20. aidl_to_common.cpp
  21. aidl_to_common.h
  22. aidl_to_cpp.cpp
  23. aidl_to_cpp.h
  24. aidl_to_cpp_common.cpp
  25. aidl_to_cpp_common.h
  26. aidl_to_java.cpp
  27. aidl_to_java.h
  28. aidl_to_ndk.cpp
  29. aidl_to_ndk.h
  30. aidl_to_rust.cpp
  31. aidl_to_rust.h
  32. aidl_typenames.cpp
  33. aidl_typenames.h
  34. aidl_unittest.cpp
  35. Android.bp
  36. ast_java.cpp
  37. ast_java.h
  38. ast_java_unittest.cpp
  39. check_valid.cpp
  40. check_valid.h
  41. code_writer.cpp
  42. code_writer.h
  43. code_writer_unittest.cpp
  44. comments.cpp
  45. comments.h
  46. diagnostics.cpp
  47. diagnostics.h
  48. diagnostics.inc
  49. diagnostics_unittest.cpp
  50. generate_aidl_mappings.cpp
  51. generate_aidl_mappings.h
  52. generate_cpp.cpp
  53. generate_cpp.h
  54. generate_cpp_analyzer.cpp
  55. generate_cpp_analyzer.h
  56. generate_cpp_unittest.cpp
  57. generate_java.cpp
  58. generate_java.h
  59. generate_java_binder.cpp
  60. generate_ndk.cpp
  61. generate_ndk.h
  62. generate_rust.cpp
  63. generate_rust.h
  64. hiddenapi-greylist
  65. import_resolver.cpp
  66. import_resolver.h
  67. io_delegate.cpp
  68. io_delegate.h
  69. io_delegate_unittest.cpp
  70. location.cpp
  71. location.h
  72. logging.cpp
  73. logging.h
  74. main.cpp
  75. NOTICE
  76. options.cpp
  77. options.h
  78. options_unittest.cpp
  79. os.h
  80. OWNERS
  81. parser.cpp
  82. parser.h
  83. permission.cpp
  84. permission.h
  85. preprocess.cpp
  86. preprocess.h
  87. PREUPLOAD.cfg
  88. README.md
  89. run_integration_tests.sh
  90. TEST_MAPPING
README.md

Documentation for this project is currently maintained here:

https://source.android.com/devices/architecture/aidl/overview