Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e63a4a28 authored by Mårten Kongstad's avatar Mårten Kongstad Committed by Todd Kennedy
Browse files

idmap2: silence irrelevant warning during 'idmap2 scan'

Even if an idmap file fails the is-up-to-date check during 'idmap2
scan', there is no need to print a warning: this is an expected scenario
and just means that the idmap file needs to be re-created. Remove the
print.

Useful commands for testing:

  1. adb shell rm -f /data/resource-cache/*
  2. adb shell idmap2 scan                                         \
             --recursive                                           \
             --target-package-name android                         \
             --target-apk-path /system/framework/framework-res.apk \
             --output-directory /data/resource-cache               \
             --input-directory /vendor/overlay

Test: manual: put an overlay package with isStatic="true" and       \
              targetPackage="android" in /vendor/overlay/<dir>, run \
              the commands above, verify that nothing is printed    \
              on stderr
Change-Id: I9a458a805936d0c1f6d64b0c3983365e0f0c4696
parent b4c2dc0c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -138,7 +138,8 @@ bool Scan(const std::vector<std::string>& args, std::ostream& out_error) {
  std::stringstream stream;
  for (auto iter = interesting_apks.cbegin(); iter != interesting_apks.cend(); ++iter) {
    const std::string idmap_path = Idmap::CanonicalIdmapPathFor(output_directory, *iter);
    if (!Verify(std::vector<std::string>({"--idmap-path", idmap_path}), out_error) &&
    std::stringstream dev_null;
    if (!Verify(std::vector<std::string>({"--idmap-path", idmap_path}), dev_null) &&
        !Create(std::vector<std::string>({
                    "--target-apk-path",
                    target_apk_path,