From f93ea13e91cf2e68f50abd3ea96900241bd0b490 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Thu, 5 Oct 2023 20:40:46 +0000 Subject: [PATCH] Exclude REL from preview API levels. Bug: http://b/156513478#comment43 Test: m ndk # barbet-next-userdebug in goog/main Change-Id: I0ff1e45d61d605493c784a118232b839324e066e --- android/config.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/android/config.go b/android/config.go index 524ff2f20..c3396d316 100644 --- a/android/config.go +++ b/android/config.go @@ -1003,12 +1003,18 @@ func (c *config) FinalApiLevels() []ApiLevel { func (c *config) PreviewApiLevels() []ApiLevel { var levels []ApiLevel - for i, codename := range c.PlatformVersionActiveCodenames() { + i := 0 + for _, codename := range c.PlatformVersionActiveCodenames() { + if codename == "REL" { + continue + } + levels = append(levels, ApiLevel{ value: codename, number: i, isPreview: true, }) + i++ } return levels }