Merge "Export runtime dependencies in module-info"
diff --git a/core/Makefile b/core/Makefile
index b9103ab..9314b94 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -5170,6 +5170,11 @@
echo "virtual_ab=true" >> $(1))
$(if $(filter true,$(PRODUCT_VIRTUAL_AB_COMPRESSION)), \
echo "virtual_ab_compression=true" >> $(1))
+# This value controls the compression algorithm used for VABC
+# valid options are defined in system/core/fs_mgr/libsnapshot/cow_writer.cpp
+# e.g. "none", "gz", "brotli"
+ $(if $(PRODUCT_VIRTUAL_AB_COMPRESSION_METHOD), \
+ echo "virtual_ab_compression_method=$(PRODUCT_VIRTUAL_AB_COMPRESSION_METHOD)" >> $(1))
$(if $(filter true,$(PRODUCT_VIRTUAL_AB_OTA_RETROFIT)), \
echo "virtual_ab_retrofit=true" >> $(1))
endef
diff --git a/target/product/base_system.mk b/target/product/base_system.mk
index 3d299fb..55047df 100644
--- a/target/product/base_system.mk
+++ b/target/product/base_system.mk
@@ -78,6 +78,7 @@
device_config \
dmctl \
dnsmasq \
+ dmesgd \
DownloadProvider \
dpm \
dump.erofs \
diff --git a/tools/compliance/cmd/checkshare/checkshare_test.go b/tools/compliance/cmd/checkshare/checkshare_test.go
index 4589595..c9b62e1 100644
--- a/tools/compliance/cmd/checkshare/checkshare_test.go
+++ b/tools/compliance/cmd/checkshare/checkshare_test.go
@@ -259,7 +259,7 @@
if len(ts) < 1 {
continue
}
- if 0 < len(actualStdout) {
+ if len(actualStdout) > 0 {
t.Errorf("checkshare: unexpected multiple output lines %q, want %q", actualStdout+"\n"+ts, tt.expectedStdout)
}
actualStdout = ts
diff --git a/tools/compliance/cmd/htmlnotice/htmlnotice.go b/tools/compliance/cmd/htmlnotice/htmlnotice.go
index 0e3ba09..ffb0585 100644
--- a/tools/compliance/cmd/htmlnotice/htmlnotice.go
+++ b/tools/compliance/cmd/htmlnotice/htmlnotice.go
@@ -204,17 +204,17 @@
fmt.Fprintln(ctx.stdout, "li { padding-left: 1em; }")
fmt.Fprintln(ctx.stdout, ".file-list { margin-left: 1em; }")
fmt.Fprintln(ctx.stdout, "</style>")
- if 0 < len(ctx.title) {
+ if len(ctx.title) > 0 {
fmt.Fprintf(ctx.stdout, "<title>%s</title>\n", html.EscapeString(ctx.title))
- } else if 0 < len(ctx.product) {
+ } else if len(ctx.product) > 0 {
fmt.Fprintf(ctx.stdout, "<title>%s</title>\n", html.EscapeString(ctx.product))
}
fmt.Fprintln(ctx.stdout, "</head>")
fmt.Fprintln(ctx.stdout, "<body>")
- if 0 < len(ctx.title) {
+ if len(ctx.title) > 0 {
fmt.Fprintf(ctx.stdout, " <h1>%s</h1>\n", html.EscapeString(ctx.title))
- } else if 0 < len(ctx.product) {
+ } else if len(ctx.product) > 0 {
fmt.Fprintf(ctx.stdout, " <h1>%s</h1>\n", html.EscapeString(ctx.product))
}
ids := make(map[string]string)
diff --git a/tools/compliance/cmd/htmlnotice/htmlnotice_test.go b/tools/compliance/cmd/htmlnotice/htmlnotice_test.go
index b8bc47f..1b01d16 100644
--- a/tools/compliance/cmd/htmlnotice/htmlnotice_test.go
+++ b/tools/compliance/cmd/htmlnotice/htmlnotice_test.go
@@ -678,7 +678,7 @@
}
if !inBody {
if expectTitle {
- if tl := checkTitle(line); 0 < len(tl) {
+ if tl := checkTitle(line); len(tl) > 0 {
if tl != ttle.t {
t.Errorf("htmlnotice: unexpected title: got %q, want %q", tl, ttle.t)
}
diff --git a/tools/compliance/cmd/textnotice/textnotice.go b/tools/compliance/cmd/textnotice/textnotice.go
index 9e9229f..58afb48 100644
--- a/tools/compliance/cmd/textnotice/textnotice.go
+++ b/tools/compliance/cmd/textnotice/textnotice.go
@@ -192,7 +192,7 @@
return fmt.Errorf("Unable to read license text file(s) for %q: %v\n", files, err)
}
- if 0 < len(ctx.title) {
+ if len(ctx.title) > 0 {
fmt.Fprintf(ctx.stdout, "%s\n\n", ctx.title)
}
for h := range ni.Hashes() {
diff --git a/tools/compliance/noticeindex.go b/tools/compliance/noticeindex.go
index 7bebe3d..00deb41 100644
--- a/tools/compliance/noticeindex.go
+++ b/tools/compliance/noticeindex.go
@@ -337,14 +337,14 @@
}
// remove LICENSE or NOTICE or other filename
li := strings.LastIndex(match, "/")
- if 0 < li {
+ if li > 0 {
match = match[:li]
}
// remove *licenses/ path segment and subdirectory if in path
- if offsets := licensesPathRegexp.FindAllStringIndex(match, -1); offsets != nil && 0 < offsets[len(offsets)-1][0] {
+ if offsets := licensesPathRegexp.FindAllStringIndex(match, -1); offsets != nil && offsets[len(offsets)-1][0] > 0 {
match = match[:offsets[len(offsets)-1][0]]
li = strings.LastIndex(match, "/")
- if 0 < li {
+ if li > 0 {
match = match[:li]
}
}
@@ -366,7 +366,7 @@
// strip off [./]meta_lic from license metadata path and extract base name
n := noticeFor.name[:len(noticeFor.name)-9]
li := strings.LastIndex(n, "/")
- if 0 < li {
+ if li > 0 {
n = n[li+1:]
}
return n
@@ -580,7 +580,7 @@
// the `j`th element.
func (l hashList) Less(i, j int) bool {
var insti, instj int
- if 0 < len(l.libName) {
+ if len(l.libName) > 0 {
insti = len(l.ni.hashLibInstall[(*l.hashes)[i]][l.libName])
instj = len(l.ni.hashLibInstall[(*l.hashes)[j]][l.libName])
} else {
diff --git a/tools/compliance/readgraph_test.go b/tools/compliance/readgraph_test.go
index db52fb1..bcf9f39 100644
--- a/tools/compliance/readgraph_test.go
+++ b/tools/compliance/readgraph_test.go
@@ -94,7 +94,7 @@
}
return
}
- if 0 < len(tt.expectedError) {
+ if len(tt.expectedError) > 0 {
t.Errorf("unexpected success: got no error, want %q err", tt.expectedError)
return
}
diff --git a/tools/releasetools/add_img_to_target_files.py b/tools/releasetools/add_img_to_target_files.py
index 7143775..da7e11a 100644
--- a/tools/releasetools/add_img_to_target_files.py
+++ b/tools/releasetools/add_img_to_target_files.py
@@ -64,7 +64,7 @@
import ota_metadata_pb2
from apex_utils import GetApexInfoFromTargetFiles
-from common import AddCareMapForAbOta
+from common import AddCareMapForAbOta, ZipDelete
if sys.hexversion < 0x02070000:
print("Python 2.7 or newer is required.", file=sys.stderr)
@@ -1034,9 +1034,10 @@
if zinfo.compress_size > zinfo.file_size * 0.80 and zinfo.compress_type != zipfile.ZIP_STORED:
entries_to_store.append(zinfo)
zfp.extract(zinfo, tmpdir)
+ if len(entries_to_store) == 0:
+ return
# Remove these entries, then re-add them as ZIP_STORED
- common.RunAndCheckOutput(
- ["zip", "-d", zipfile_path] + [entry.filename for entry in entries_to_store])
+ ZipDelete(zipfile_path, [entry.filename for entry in entries_to_store])
with zipfile.ZipFile(zipfile_path, "a", allowZip64=True) as zfp:
for entry in entries_to_store:
zfp.write(os.path.join(tmpdir, entry.filename), entry.filename, compress_type=zipfile.ZIP_STORED)
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py
index 686102a..8506199 100644
--- a/tools/releasetools/common.py
+++ b/tools/releasetools/common.py
@@ -2818,6 +2818,9 @@
"""
if isinstance(entries, str):
entries = [entries]
+ # If list is empty, nothing to do
+ if not entries:
+ return
cmd = ["zip", "-d", zip_filename] + entries
RunAndCheckOutput(cmd)
diff --git a/tools/releasetools/sign_target_files_apks.py b/tools/releasetools/sign_target_files_apks.py
index 5b16d80..adba866 100755
--- a/tools/releasetools/sign_target_files_apks.py
+++ b/tools/releasetools/sign_target_files_apks.py
@@ -1521,8 +1521,5 @@
if __name__ == '__main__':
try:
main(sys.argv[1:])
- except common.ExternalError as e:
- print("\n ERROR: %s\n" % (e,))
- raise
finally:
common.Cleanup()