From 7ccacaedbe53e7f6560d6e7a2cdfa1bcb2176997 Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Fri, 23 Oct 2020 21:14:20 +0100 Subject: [PATCH] Remove unnecessary properties in GlobalJSONConfig This change removes the properties in GlobalJSONConfig that are used to hold the unmarshalled []string along with the code to convert them into ConfiguredJarList as they are no longer necessary because the ConfiguredJarList.UnmarshalJSON(..) method can handle that automatically. Bug: 171479578 Test: m nothing Change-Id: Ie297cd00cb23d12e544d922454868db6fe9eb77c --- dexpreopt/config.go | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/dexpreopt/config.go b/dexpreopt/config.go index 21f7bb3ee..7d8fbbc90 100644 --- a/dexpreopt/config.go +++ b/dexpreopt/config.go @@ -268,12 +268,8 @@ func ParseGlobalConfig(ctx android.PathContext, data []byte) (*GlobalConfig, err // Copies of entries in GlobalConfig that are not constructable without extra parameters. They will be // used to construct the real value manually below. - BootJars []string - UpdatableBootJars []string - ArtApexJars []string - UpdatableSystemServerJars []string - DirtyImageObjects string - BootImageProfiles []string + DirtyImageObjects string + BootImageProfiles []string } config := GlobalJSONConfig{} @@ -283,10 +279,6 @@ func ParseGlobalConfig(ctx android.PathContext, data []byte) (*GlobalConfig, err } // Construct paths that require a PathContext. - config.GlobalConfig.BootJars = android.CreateConfiguredJarList(ctx, config.BootJars) - config.GlobalConfig.UpdatableBootJars = android.CreateConfiguredJarList(ctx, config.UpdatableBootJars) - config.GlobalConfig.ArtApexJars = android.CreateConfiguredJarList(ctx, config.ArtApexJars) - config.GlobalConfig.UpdatableSystemServerJars = android.CreateConfiguredJarList(ctx, config.UpdatableSystemServerJars) config.GlobalConfig.DirtyImageObjects = android.OptionalPathForPath(constructPath(ctx, config.DirtyImageObjects)) config.GlobalConfig.BootImageProfiles = constructPaths(ctx, config.BootImageProfiles)