Use proper platform version checks (apigen)
Test: m statslog-docsui-java-gen Bug: 146235828 Change-Id: I5b1a2e0fa356368b91548bd050ec2c493b72f37c
This commit is contained in:
@@ -124,13 +124,7 @@ static int write_java_methods(FILE* out, const SignatureInfoMap& signatureInfoMa
|
||||
// Print method body.
|
||||
string indent("");
|
||||
if (supportQ) {
|
||||
// TODO(b/146235828): Use just SDK_INT check once it is incremented from
|
||||
// Q.
|
||||
fprintf(out, " if (Build.VERSION.SDK_INT > Build.VERSION_CODES.Q\n");
|
||||
fprintf(out,
|
||||
" || (Build.VERSION.SDK_INT == "
|
||||
"Build.VERSION_CODES.Q\n");
|
||||
fprintf(out, " && Build.VERSION.PREVIEW_SDK_INT > 0)) {\n");
|
||||
fprintf(out, " if (Build.VERSION.SDK_INT > Build.VERSION_CODES.Q) {\n");
|
||||
indent = " ";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user