refactor: circular deps part 13

This commit is contained in:
Nathan Walker
2025-07-09 20:07:56 -07:00
parent ee03774ec0
commit 579a25d583
31 changed files with 552 additions and 387 deletions

View File

@@ -1,4 +1,4 @@
import { Application } from '../../application';
import { getNativeApp } from '../../application/helpers-common';
import { SDK_VERSION } from '../../utils/constants';
import { platformNames } from '../common';
import { Screen } from '../screen';
@@ -65,7 +65,7 @@ class DeviceRef {
get uuid(): string {
if (!this._uuid) {
const nativeApp = Application.android.getNativeApplication();
const nativeApp = getNativeApp() as android.app.Application;
this._uuid = android.provider.Settings.Secure.getString(nativeApp.getContentResolver(), android.provider.Settings.Secure.ANDROID_ID);
}

View File

@@ -1,10 +1,10 @@
import { Application } from '../../application';
import { getNativeApp } from '../../application/helpers-common';
class MainScreen {
private _metrics: android.util.DisplayMetrics;
private initMetrics(): void {
const nativeApp = Application.android.getNativeApplication();
const nativeApp = getNativeApp() as android.app.Application;
nativeApp.getSystemService(android.content.Context.WINDOW_SERVICE).getDefaultDisplay().getRealMetrics(this._metrics);
}