summaryrefslogtreecommitdiff
path: root/java/hiddenapi.go
diff options
context:
space:
mode:
author Spandan Das <spandandas@google.com> 2023-03-21 01:36:46 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2023-03-21 01:36:47 +0000
commitb74d1e1d913ffdc883121c962eb5ca661196e460 (patch)
tree192889f627b363e01a20539ec4ba22f04316138e /java/hiddenapi.go
parente773739787394e9632043749e88ca6cfd5a40a67 (diff)
Revert "Update min_sdk_version from SdkSpec to ApiLevel"
Revert submission 2457063 Reason for revert: Broken udc-dev Reverted changes: /q/submissionid:2457063 Change-Id: Id6349fc1318877044af713c914a0afd437d3d2d5
Diffstat (limited to 'java/hiddenapi.go')
-rw-r--r--java/hiddenapi.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/java/hiddenapi.go b/java/hiddenapi.go
index d25096b15..c4fc65f2e 100644
--- a/java/hiddenapi.go
+++ b/java/hiddenapi.go
@@ -73,7 +73,7 @@ type hiddenAPIModule interface {
android.Module
hiddenAPIIntf
- MinSdkVersion(ctx android.EarlyModuleContext) android.ApiLevel
+ MinSdkVersion(ctx android.EarlyModuleContext) android.SdkSpec
}
type hiddenAPIIntf interface {
@@ -157,7 +157,7 @@ func (h *hiddenAPI) hiddenAPIEncodeDex(ctx android.ModuleContext, dexJar android
// Create a copy of the dex jar which has been encoded with hiddenapi flags.
flagsCSV := hiddenAPISingletonPaths(ctx).flags
outputDir := android.PathForModuleOut(ctx, "hiddenapi").OutputPath
- encodedDex := hiddenAPIEncodeDex(ctx, dexJar, flagsCSV, uncompressDex, android.NoneApiLevel, outputDir)
+ encodedDex := hiddenAPIEncodeDex(ctx, dexJar, flagsCSV, uncompressDex, android.SdkSpecNone, outputDir)
// Use the encoded dex jar from here onwards.
return encodedDex
@@ -253,7 +253,7 @@ var hiddenAPIEncodeDexRule = pctx.AndroidStaticRule("hiddenAPIEncodeDex", bluepr
// The encode dex rule requires unzipping, encoding and rezipping the classes.dex files along with
// all the resources from the input jar. It also ensures that if it was uncompressed in the input
// it stays uncompressed in the output.
-func hiddenAPIEncodeDex(ctx android.ModuleContext, dexInput, flagsCSV android.Path, uncompressDex bool, minSdkVersion android.ApiLevel, outputDir android.OutputPath) android.OutputPath {
+func hiddenAPIEncodeDex(ctx android.ModuleContext, dexInput, flagsCSV android.Path, uncompressDex bool, minSdkVersion android.SdkSpec, outputDir android.OutputPath) android.OutputPath {
// The output file has the same name as the input file and is in the output directory.
output := outputDir.Join(ctx, dexInput.Base())
@@ -283,7 +283,7 @@ func hiddenAPIEncodeDex(ctx android.ModuleContext, dexInput, flagsCSV android.Pa
// If the library is targeted for Q and/or R then make sure that they do not
// have any S+ flags encoded as that will break the runtime.
- minApiLevel := minSdkVersion
+ minApiLevel := minSdkVersion.ApiLevel
if !minApiLevel.IsNone() {
if minApiLevel.LessThanOrEqualTo(android.ApiLevelOrPanic(ctx, "R")) {
hiddenapiFlags = hiddenapiFlags + " --max-hiddenapi-level=max-target-r"