mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix(android): shared SDK_VERSION (#10090)
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user