Introduce a system feature annotation processor
Add a system feature annotation processor that can be used to compute various useful properties for system features, putting them in a single SystemFeaturesMetadata class. To start, generate the number of system features in PackageManager as annotated with @SdkConstant(SdkConstantType.FEATURE). A follow-up change will add this processor as a plugin to the framework, using the feature count as a size hint for the system feature IPC cache. A separate follow-up will augment the codegen such that we can compute a "perfect" indexing of SDK system features to indices. This can then be used to optimize system feature queries without paying a (relatively) high per-process memory cost for a runtime, string-based hash. Bug: 203143243 Test: atest systemfeatures-gen-tests Change-Id: I70f0f148cd644e3f38648f023df13624004766f0
Loading
Please register or sign in to comment