Skip to content

Commit

Permalink
Add "Skip Device Validation" checkbox to capture dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
olehkuznetsov committed Nov 26, 2024
1 parent 990afe0 commit d1e74d4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gapic/src/main/com/google/gapid/util/Flags.java
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public boolean isSpecified() {
return specified;
}

void setValue(String value) {
public void setValue(String value) {
this.value = parser.parse(value);
this.specified = true;
}
Expand Down
18 changes: 17 additions & 1 deletion gapic/src/main/com/google/gapid/views/TracerDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ private static class TraceInput extends Composite {
private final Label startUnit;
private final Button useAndroidFrameBoundaryExtension;
private final Button withoutBuffering;
private final Button skipDeviceValidation;
private final Button includeUnsupportedExtensions;
private final Button loadValidationLayer;
private final Button clearCache;
Expand Down Expand Up @@ -425,7 +426,22 @@ public TraceInput(Composite parent, TraceType type, Models models, Widgets widge
logFailure(LOG, Scheduler.EXECUTOR.schedule(refreshDevices, 300, TimeUnit.MILLISECONDS));
});

// Align label with first line of text.
Label skipDeviceValidationLabel = createLabel(mainGroup, "");
Composite skipDeviceValidationComposite = withLayoutData(createComposite(mainGroup,
withMarginOnly(new GridLayout(2, false), 0, 0)),
new GridData(SWT.FILL, SWT.FILL, true, false));

skipDeviceValidation = withLayoutData(createCheckbox(skipDeviceValidationComposite, "Skip Device Validation", Devices.skipDeviceValidation.get()), new GridData(SWT.END, SWT.FILL, false, false));
skipDeviceValidation.addListener(SWT.Selection, e -> {
if(skipDeviceValidation.getSelection()) {
Devices.skipDeviceValidation.setValue("true");
} else {
Devices.skipDeviceValidation.setValue("false");
}
logFailure(LOG, Scheduler.EXECUTOR.schedule(refreshDevices, 300, TimeUnit.MILLISECONDS));
});

// Align label with first line of text.
withLayoutData(createLabel(mainGroup, "Validation:"),
withIndents(new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_BEGINNING), 0, 12));
deviceValidationView = new DeviceValidationView(mainGroup, this.models, widgets);
Expand Down

0 comments on commit d1e74d4

Please sign in to comment.