diff options
| author | 2020-01-09 01:38:35 +0000 | |
|---|---|---|
| committer | 2020-01-09 01:38:35 +0000 | |
| commit | 0b94e6b49e653dfcb749dd6873a04902633e97ab (patch) | |
| tree | 3d10d2e67fd39a0d8fe8345899cfa47f80f0bcc4 | |
| parent | b023c08b6580acbaef92f88c5dc4e8e6ec1fb91e (diff) | |
| parent | b6f32d9fe2e220bce8395390862dbf1b935881d6 (diff) | |
Merge "Use preview_sdk_int for version code checks"
| -rw-r--r-- | tools/stats_log_api_gen/java_writer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/stats_log_api_gen/java_writer.cpp b/tools/stats_log_api_gen/java_writer.cpp index 7f0872c02613..7fa47f696b50 100644 --- a/tools/stats_log_api_gen/java_writer.cpp +++ b/tools/stats_log_api_gen/java_writer.cpp @@ -85,8 +85,9 @@ static int write_java_methods( 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.CODENAME.equals(\"R\")) {\n"); + 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"); indent = " "; } |