mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Refactor FeatureFlags.
This commit is contained in:
@@ -24,11 +24,9 @@ public class LogSectionFeatureFlags implements LogSection {
|
||||
Map<String, Object> memory = FeatureFlags.getDebugMemoryValues();
|
||||
Map<String, Object> disk = FeatureFlags.getDebugDiskValues();
|
||||
Map<String, Object> pending = FeatureFlags.getDebugPendingDiskValues();
|
||||
Map<String, Object> forced = FeatureFlags.getDebugForcedValues();
|
||||
int remoteLength = Stream.of(memory.keySet()).map(String::length).max(Integer::compareTo).orElse(0);
|
||||
int diskLength = Stream.of(disk.keySet()).map(String::length).max(Integer::compareTo).orElse(0);
|
||||
int pendingLength = Stream.of(pending.keySet()).map(String::length).max(Integer::compareTo).orElse(0);
|
||||
int forcedLength = Stream.of(forced.keySet()).map(String::length).max(Integer::compareTo).orElse(0);
|
||||
|
||||
out.append("-- Memory\n");
|
||||
for (Map.Entry<String, Object> entry : memory.entrySet()) {
|
||||
@@ -48,15 +46,6 @@ public class LogSectionFeatureFlags implements LogSection {
|
||||
}
|
||||
out.append("\n");
|
||||
|
||||
out.append("-- Forced\n");
|
||||
if (forced.isEmpty()) {
|
||||
out.append("None\n");
|
||||
} else {
|
||||
for (Map.Entry<String, Object> entry : forced.entrySet()) {
|
||||
out.append(Util.rightPad(entry.getKey(), forcedLength)).append(": ").append(entry.getValue()).append("\n");
|
||||
}
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user