Export OsTypeList through a function.

This is a cleanup CL to make the OsTypeList accessor consistent with
ArchTypeList by creating a function that creates a copy of the
underlying slice.

Test: TH
Change-Id: I346c5c3937bbdb8a373e4d7135b896a5274cc1f1
This commit is contained in:
Jingwen Chen
2021-04-05 07:33:05 +00:00
parent 1a6bbbd990
commit 2f6a21e957
2 changed files with 15 additions and 9 deletions

View File

@@ -1350,7 +1350,7 @@ func (s *sdk) createMemberSnapshot(ctx *memberContext, member *sdkMember, bpModu
// Compute the list of possible os types that this sdk could support.
func (s *sdk) getPossibleOsTypes() []android.OsType {
var osTypes []android.OsType
for _, osType := range android.OsTypeList {
for _, osType := range android.OsTypeList() {
if s.DeviceSupported() {
if osType.Class == android.Device && osType != android.Fuchsia {
osTypes = append(osTypes, osType)