Merge "dump method should accept --proto and --debug flag regardless of the order Bug:69006241" into ub-launcher3-master
This commit is contained in:
committed by
Android (Google) Code Review
commit
a3921c7ba8
@@ -118,9 +118,9 @@ public class BgDataModel {
|
||||
deepShortcutMap.clear();
|
||||
}
|
||||
|
||||
public synchronized void dump(String prefix, FileDescriptor fd, PrintWriter writer,
|
||||
String[] args) {
|
||||
if (args.length > 0 && TextUtils.equals(args[0], "--proto")) {
|
||||
public synchronized void dump(String prefix, FileDescriptor fd, PrintWriter writer,
|
||||
String[] args) {
|
||||
if (Arrays.asList(args).contains("--proto")) {
|
||||
dumpProto(prefix, fd, writer, args);
|
||||
return;
|
||||
}
|
||||
@@ -219,7 +219,7 @@ public class BgDataModel {
|
||||
targetList.addAll(workspaces.valueAt(i).getFlattenedList());
|
||||
}
|
||||
|
||||
if (args.length > 1 && TextUtils.equals(args[1], "--debug")) {
|
||||
if (Arrays.asList(args).contains("--debug")) {
|
||||
for (int i = 0; i < targetList.size(); i++) {
|
||||
writer.println(prefix + DumpTargetWrapper.getDumpTargetStr(targetList.get(i)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user