前景提要
最近编译源码 Android9.0
在 mk 里面遇到一个奇怪的注释:
IoStats are parcelable types (vs. interface types), but the build system uses an initial I as a magic marker to mean "interface", and due to this ends up refusing to compile these files as part of the build process.
A clean solution to this is actively being worked on by the build team, but is not yet available, so for now we just filter the files out by hand. *
car_lib_sources := $(filter-out src/android/car/storagemonitoring/IoStats.aidl,$(car_lib_sources)) car_lib_sources := $(filter-out src/android/car/storagemonitoring/IoStatsEntry.aidl,$(car_lib_sources)) public final class IoStatsEntry implements Parcelable { ...省略代码 } public class IoStats implements Parcelable { ...省略代码 }
为什么在编译的时候,把这两个 I 开头的 aidl 文件过滤掉?这个是系统的规则嘛?