diff --git a/app/src/main/java/com/etesync/syncadapter/App.java b/app/src/main/java/com/etesync/syncadapter/App.java index d2d3b55d..3dc388ce 100644 --- a/app/src/main/java/com/etesync/syncadapter/App.java +++ b/app/src/main/java/com/etesync/syncadapter/App.java @@ -134,8 +134,8 @@ public class App extends Application { } private void loadLanguage() { - String lang = new Settings(new ServiceDB.OpenHelper(this). - getReadableDatabase()).getString(App.FORCE_LANGUAGE, null); + @Cleanup ServiceDB.OpenHelper serviceDB = new ServiceDB.OpenHelper(this); + String lang = new Settings(serviceDB.getReadableDatabase()).getString(App.FORCE_LANGUAGE, null); if (lang != null && !lang.equals(DEFAULT_LANGUAGE)) { LanguageUtils.setLanguage(this, lang); }