chore: cleanup android refs

This commit is contained in:
Nathan Walker
2025-07-15 12:01:45 -07:00
parent 7bc57216c0
commit 2fb70c1f10
27 changed files with 283 additions and 332 deletions

View File

@@ -2,7 +2,7 @@ import { View } from '../core/view';
import { LinearGradient } from './linear-gradient';
import { ClipPathFunction } from './clip-path-function';
import { isDataURI, isFileOrResourcePath, RESOURCE_PREFIX, FILE_PREFIX } from '../../utils';
import { CSSValue, parse } from '../../css-value';
import { CSSValue, parse } from '../../css-value/reworkcss-value';
import { path, knownFolders } from '../../file-system';
export * from './background-common';

View File

@@ -1,9 +1,9 @@
import { Font as FontBase, parseFontFamily, genericFontFamilies, FontWeight, FontVariationSettings, FONTS_BASE_PATH } from './font-common';
import { FontStyleType, FontWeightType, FontVariationSettingsType } from './font-interfaces';
import { getNativeApp } from '../../application/helpers-common';
import { Trace } from '../../trace';
import { SDK_VERSION } from '../../utils/constants';
import * as fs from '../../file-system';
import { ad } from '../../utils';
export * from './font-common';
@@ -60,7 +60,7 @@ function computeFontCacheKey(fontFamily: string, font: Font) {
function loadFontFromFile(fontFamily: string, font: Font): android.graphics.Typeface {
const cacheKey = SDK_VERSION >= 26 ? computeFontCacheKey(fontFamily, font) : fontFamily;
appAssets = appAssets || (ad.getApplicationContext() as android.content.Context).getAssets();
appAssets = appAssets || getNativeApp<android.app.Application>().getApplicationContext().getAssets();
if (!appAssets) {
return null;
}