mirror of
https://github.com/etesync/android
synced 2025-01-23 14:10:54 +00:00
Fix DB resource leak.
It doesn't affect anything in a noticeable way, but still, obviously, worth fixing.
This commit is contained in:
parent
af04b2fa45
commit
c2521bf556
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user