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

Commit 1582acbf authored by Dennis Shen's avatar Dennis Shen
Browse files

Catch up change to update the print format

Based on the review feedback, to have the print out to be more explicit.
So now for each flag the print out will be in the following form:

flag:[package].[flag_name] namespace:[namespace] value:[value]

Bug: b/300476709, b/309640824
Change-Id: Ia2e1882ed2c72e691310573dc883f6643c5858c2
parent 524e7ef6
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -235,14 +235,18 @@ public final class DeviceConfigService extends Binder {
        for (String aconfigFlag : aconfigFlagNames) {
          String val = allFlags.get(aconfigFlag);
          if (val != null) {
            // aconfigFlag is in the form of [namespace]/[package].[flag_name]
            int idx = aconfigFlag.indexOf("/");
            if (idx == -1 || idx == aconfigFlag.length() - 1 || idx == 0) {
              log("invalid flag entry in device config: " + aconfigFlag);
              continue;
            }

            // we intend to print out [package].[flag_name] [namespace]=val
            String aconfigFlagNameByPackage = aconfigFlag.substring(idx + 1);
            String namespace = aconfigFlag.substring(0, idx);
            lines.add(aconfigFlagNameByPackage + " " + namespace + "=" + val);
            lines.add("flag:" + aconfigFlagNameByPackage + " namespace:" + namespace +
                " value:" + val);
          }
        }
        Collections.sort(lines);