Catch All Exception to fix DeadSystemException#1902
Catch All Exception to fix DeadSystemException#1902puderty wants to merge 5 commits intoOneSignal:mainfrom
Conversation
# Conflicts: # OneSignalSDK/onesignal/maven-push.gradle
There was a problem hiding this comment.
Adding some technical background here for reference. Android's documentation notes that the DeadSystemException is:
The core Android system has died and is going through a runtime restart. All running apps will be promptly killed.
Since this exception is not the fault of the app (or SDK) there isn't anything the app (or SDK) can do to recover from such a state. Catching and ignoring these won't improve the end-user experience since the app is already being killed, however doing so will clean up the noise from crash statistics.
jkasten2
left a comment
There was a problem hiding this comment.
Catching Exception (or Throwable) can hide other issues which could result in broken states that make finding root issues difficult. Can you add catches for DeadSystemException here instead of changing all these to catch all exceptions?
Description
One Line Summary
On some device like Huawei, there's a lot of DeadSystemException when calling getPackageInfo, we can just ignore it.
Details
Motivation
We can all ignore that exception, by merge this PR, we don't need to compile this library by ourself anymore.
Scope
Testing
Unit testing
Not answered
Manual testing
Not answered
Affected code checklist
Checklist
Overview
Testing
Final pass
This change is