aconfig: Add API level check to exported mode.
API level check means that for exported flags guarding a finalized API, we consider the flag always true on Android builds where the API is finalized (so, the SDK version is high enough). In other words, we check the SDK level in the flag accessor compared against the SDK level in which the API the flag was guarding is finalized. If it's high enough, we return true without actually performing the flag lookup because the guarantee of finalization is that this API will now always be available (so the flag should always be true). This is more performant. Changes: -add flag to aconfig binary (sdk-check) to toggle the API level check in codegen, default to false and can be toggled via build flag -pipe bool through to the codegen -add api level check in new exported codegen Next steps: -add build flag -generate proto <flag, API level> map from text list of finalized flags -read artifact to set finalized_sdk_value in FlagElement Flag: see above, guarding from binary, build flag TODO Test: atest aconfig.test Change-Id: I9bd4ee3e4d005acb812bd4010dd5cb301fa8de58
Loading
Please register or sign in to comment