java.io.FileNotFoundException logged but harmless

'java.io.FileNotFoundException' logged but harmless, properly handling this issue #994
This commit is contained in:
hafizi@dev 2020-01-19 23:59:21 +08:00 committed by GitHub
parent 39356602ed
commit 300503b8d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -71,6 +71,9 @@ public final class Workarounds {
Field mInitialApplicationField = activityThreadClass.getDeclaredField("mInitialApplication");
mInitialApplicationField.setAccessible(true);
mInitialApplicationField.set(activityThread, app);
} catch (java.io.FileNotFoundException exception) {
// this is a workaround, so do not show error when file is not exist
// when file not exist, it means this workaround is not needed
} catch (Throwable throwable) {
// this is a workaround, so failing is not an error
Ln.w("Could not fill app info: " + throwable.getMessage());