Skip to content

Commit 3f3eb00

Browse files
committed
restored old policy in finally block
1 parent 683bb3b commit 3f3eb00

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,10 @@ public static void init(
214214
logger.log(SentryLevel.FATAL, "Fatal error during SentryAndroid.init(...)", e);
215215

216216
throw new RuntimeException("Failed to initialize Sentry's SDK", e);
217+
} finally {
218+
StrictMode.setThreadPolicy(oldPolicy);
219+
StrictMode.setVmPolicy(oldVmPolicy);
217220
}
218-
219-
StrictMode.setThreadPolicy(oldPolicy);
220-
StrictMode.setVmPolicy(oldVmPolicy);
221221
}
222222

223223
/**

0 commit comments

Comments
 (0)