Skip to content

Commit bdb8e1c

Browse files
committed
Remove redundant MemoryLimiter timestamp branch from app-exit event processor + address bugbot issue.
1 parent add01eb commit bdb8e1c

3 files changed

Lines changed: 16 additions & 7 deletions

File tree

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,8 +587,6 @@ private void setDist(
587587
timestamp = ((AbnormalExit) hint).timestamp();
588588
} else if (hint instanceof NativeCrashExit) {
589589
timestamp = ((NativeCrashExit) hint).timestamp();
590-
} else if (hint instanceof MemoryLimiterIntegration.MemoryLimiterHint) {
591-
timestamp = ((MemoryLimiterIntegration.MemoryLimiterHint) hint).timestamp();
592590
} else {
593591
timestamp = null;
594592
}

‎sentry-android-core/src/main/java/io/sentry/android/core/MemoryLimiterIntegration.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ public MemoryLimiterHint(
398398

399399
@Override
400400
public boolean ignoreCurrentThread() {
401-
return true;
401+
return false;
402402
}
403403

404404
@Override

‎sentry/src/main/java/io/sentry/hints/AbnormalExit.java‎

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
/**
66
* Marker interface for Sessions experiencing abnormal status.
77
*
8-
* <p>This includes exits that were not classified as normal terminations or crashes, such as
9-
* Android ANRs and MemoryLimiter process deaths.
8+
* <p>Includes exits that were not classified as normal terminations or crashes, such as Android
9+
* ANRs and MemoryLimiter process deaths.
1010
*
1111
* <p><b>Note:</b> Some existing discriminator code (`instanceof AbnormalExit`) is shaped by the
1212
* historical ANR-only usage of this interface. New implementations should review all of those call
@@ -18,10 +18,21 @@ public interface AbnormalExit {
1818
@Nullable
1919
String mechanism();
2020

21-
/** Whether the current thread should be ignored from being marked as crashed, e.g. a watchdog */
21+
/**
22+
* Whether the current thread (e.g., a watchdog) should be ignored by the `MainEventProcessor`
23+
* when deciding which threads should from the current process should be bound to the Sentry event
24+
* associated with this `AbnormalExit`.
25+
*
26+
* <p>This method effectively no-ops for types implementing both {@link AbnormalExit} and {@link
27+
* Backfillable}, as implementors of `Backfillable` are not sent to the `MainEventProcessor`.
28+
*/
2229
boolean ignoreCurrentThread();
2330

24-
/** When exactly the abnormal exit happened */
31+
/**
32+
* When exactly the abnormal exit happened.
33+
*
34+
* <p>Epoch time in milliseconds, or null.
35+
*/
2536
@Nullable
2637
Long timestamp();
2738
}

0 commit comments

Comments
 (0)