Skip to content

Commit f5de202

Browse files
committed
move isBackgroundAnr() to the AnrHintEnricher since it is only used there.
1 parent 13329e4 commit f5de202

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

sentry-android-core/src/main/java/io/sentry/android/core/ApplicationExitInfoEventProcessor.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -546,15 +546,6 @@ private void setDefaultPlatform(final @NotNull SentryBaseEvent event) {
546546
}
547547
}
548548

549-
// by default we assume that the ANR is foreground, unless abnormalMechanism is "anr_background"
550-
private boolean isBackgroundAnr(final @NotNull Object hint) {
551-
if (hint instanceof AbnormalExit) {
552-
final String abnormalMechanism = ((AbnormalExit) hint).mechanism();
553-
return "anr_background".equals(abnormalMechanism);
554-
}
555-
return false;
556-
}
557-
558549
private void mergeUser(final @NotNull SentryBaseEvent event) {
559550
@Nullable User user = event.getUser();
560551
if (user == null) {
@@ -687,6 +678,15 @@ public boolean supports(@NotNull Object hint) {
687678
return hint instanceof AbnormalExit;
688679
}
689680

681+
// by default we assume that the ANR is foreground, unless abnormalMechanism is "anr_background"
682+
private boolean isBackgroundAnr(final @NotNull Object hint) {
683+
if (hint instanceof AbnormalExit) {
684+
final String abnormalMechanism = ((AbnormalExit) hint).mechanism();
685+
return "anr_background".equals(abnormalMechanism);
686+
}
687+
return false;
688+
}
689+
690690
@Override
691691
public void applyPreEnrichment(
692692
@NotNull SentryEvent event, @NotNull Backfillable hint, @NotNull Object rawHint) {

0 commit comments

Comments
 (0)