You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
UncaughtHandler.uninstall() removes another adapter's handler #262
UncaughtHandler.uninstall() restores previous whenever the current default handler is anyUncaughtHandler, not the caller's own:
if (Thread.getDefaultUncaughtExceptionHandler() instanceofUncaughtHandlerours) {
Thread.setDefaultUncaughtExceptionHandler(ours.previous);
}
If adapter A installs, then adapter B installs, and then A stops, B's handler is removed while B is still running, so uncaught exceptions stop being reported. This only happens when two adapters' lifetimes overlap. A plain stop-then-start is fine.
Fix direction: uninstall removes only the handler that the caller installed.
Activity