fix(android): shared SDK_VERSION (#10090)

This commit is contained in:
farfromrefuge
2022-11-17 04:14:41 +00:00
committed by GitHub
parent fd9869094e
commit 0226f47f8d

View File

@@ -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();