Skip to content

Commit

Permalink
Add extra crash info for onHostPause
Browse files Browse the repository at this point in the history
Summary: Several apps, (but most affected is Ads Manager) have seen crashes with the assertion on this line. Adding this extra info on these crashes can help us narrow down the root cause.

Differential Revision: D66980806
  • Loading branch information
Maddie Lord authored and facebook-github-bot committed Dec 10, 2024
1 parent d20897f commit 4a6312e
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,10 @@ public void onUserLeaveHint(@Nullable Activity activity) {
@ThreadConfined(UI)
public void onHostPause(@Nullable Activity activity) {
if (mRequireActivity) {
Assertions.assertCondition(mCurrentActivity != null);
Assertions.assertCondition(
mCurrentActivity != null,
"onHostPause called with null activity, expected: "
+ mCurrentActivity.getClass().getSimpleName());
}
if (mCurrentActivity != null) {
Assertions.assertCondition(
Expand Down

0 comments on commit 4a6312e

Please sign in to comment.