Files
sousa-gecko/toolkit/crashreporter/annotations/CrashAnnotations.java.in
T
Alex Franchuk b71bcebac0 Bug 1989417 - Add support for ping-only crash annotations r=gsvelto
This is needed to exclude the `StackTraces` annotation from reports
(though in the future we may include it). We previously classified it as
a `client` scope, but it _is_ sent in the crash ping, albeit not
verbatim.

Differential Revision: https://phabricator.services.mozilla.com/D265512
2025-11-04 17:34:41 +00:00

38 lines
1005 B
Plaintext

package ${package};
import androidx.annotation.AnyThread;
/**
* Constants used by the crash reporter. These are generated so that they
* are kept in sync with the other C++ and JS users.
*/
final class ${class} {
/** Crash Annotations */
@AnyThread
public enum Annotation {
${enum};
private final String s;
private final String scope;
private Annotation(String s, String scope) {
this.s = s;
this.scope = scope;
}
public String toString() {
return this.s;
}
/** @return Whether the annotation should be included in crash pings. */
public boolean allowedInPing() {
return this.scope.equals("ping") || this.scope.equals("ping-only");
}
/** @return Whether the annotation should be included in crash reports. */
public boolean allowedInReport() {
return this.scope.equals("ping") || this.scope.equals("report");
}
}
}