Skip to content

Commit dbbd37e

Browse files
antonisclaude
andcommitted
fix(feedback): reset isDialogShowing on activity pause to prevent stuck flag
If showDialog silently fails (e.g. activity destroyed between post and execution), isDialogShowing would stay true forever, permanently disabling shake-to-feedback. Reset it in onActivityPaused since the dialog cannot outlive its host activity. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 83eed6d commit dbbd37e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ public void onActivityPaused(final @NotNull Activity activity) {
7474
if (activity == currentActivity) {
7575
stopShakeDetection();
7676
currentActivity = null;
77+
// Reset dialog flag — the dialog cannot outlive the activity, so if
78+
// showDialog silently failed or the activity is finishing, clear the flag
79+
// to avoid permanently blocking shake-to-feedback.
80+
isDialogShowing = false;
7781
}
7882
}
7983

0 commit comments

Comments
 (0)