mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
refactor: circular deps part 13
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import * as common from './application-settings-common';
|
||||
import { Application } from '../application';
|
||||
import { getNativeApp } from '../application/helpers-common';
|
||||
|
||||
let sharedPreferences: android.content.SharedPreferences;
|
||||
function ensureSharedPreferences() {
|
||||
if (!sharedPreferences) {
|
||||
sharedPreferences = Application.android.getNativeApplication().getApplicationContext().getSharedPreferences('prefs.db', 0);
|
||||
sharedPreferences = (getNativeApp() as android.app.Application).getApplicationContext().getSharedPreferences('prefs.db', 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user