From 0226f47f8d3b36fc2cc48cd1895065214fc82acb Mon Sep 17 00:00:00 2001 From: farfromrefuge Date: Thu, 17 Nov 2022 04:14:41 +0000 Subject: [PATCH] fix(android): shared SDK_VERSION (#10090) --- packages/core/file-system/file-system-access.android.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/core/file-system/file-system-access.android.ts b/packages/core/file-system/file-system-access.android.ts index 5962dd789..2d67f8bf8 100644 --- a/packages/core/file-system/file-system-access.android.ts +++ b/packages/core/file-system/file-system-access.android.ts @@ -1,9 +1,6 @@ import * as textModule from '../text'; import { getNativeApplication } from '../application'; -import { Device } from '../platform'; -import lazy from '../utils/lazy'; - -const sdkVersion = lazy(() => parseInt(Device.sdkVersion)); +import { SDK_VERSION } from '../utils/utils-common'; import type { IFileSystemAccess } from './file-system-access'; @@ -585,7 +582,7 @@ export class FileSystemAccess implements IFileSystemAccess { } public normalizePath(path: string): string { - if (sdkVersion() >= 26) { + if (SDK_VERSION >= 26) { // the [''] is a trick to not have to create a android.net.URI // and use the method with string signature return java.nio.file.Paths.get(path, ['']).normalize().toString();