Repository navigation
Expand file tree
/
Copy pathplatform.native.tsx
More file actions
54 lines (45 loc) · 2.06 KB
/
Copy pathplatform.native.tsx
File metadata and controls
54 lines (45 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import {Dimensions, Platform} from 'react-native'
import Constants from 'expo-constants'
import {
androidIsDeviceSecure,
androidSetSecureFlagSetting,
androidGetSecureFlagSetting,
fsCacheDir,
} from 'react-native-kb'
export {version, androidIsTestDevice, uses24HourClock, fsCacheDir} from 'react-native-kb'
export const isNewArch = !!global.__turboModuleProxy
export const setSecureFlagSetting = androidSetSecureFlagSetting
export const getSecureFlagSetting = androidGetSecureFlagSetting
// Currently this is given to us as a boolean, but no real documentation on this, so just in case it changes in the future.
// Android only field that tells us if there is a lock screen.
export const isDeviceSecureAndroid = androidIsDeviceSecure
export const runMode = 'prod'
export const pathSep = '/'
export const isIOS = Platform.OS === 'ios'
export const isAndroid = !isIOS
export const isMobile = true
export const isTablet = Platform.OS === 'ios' && Platform.isPad
export const isPhone = !isTablet
export const isDarwin = false
export const isElectron = false
export const isLinux = false
export const isWindows = false
export const isMac = false
export const isDebuggingInChrome = typeof location !== 'undefined'
export const defaultUseNativeFrame = true
export const fileUIName = 'File Explorer'
export const mobileOsVersion = Platform.Version
const mobileOsVersionNumber = typeof mobileOsVersion === 'string' ? parseInt(mobileOsVersion) : -1
export const isAndroidNewerThanM = isAndroid && mobileOsVersionNumber > 22
export const isAndroidNewerThanN = isAndroid && mobileOsVersionNumber >= 26
export const shortcutSymbol = ''
export const realDeviceName = Constants.deviceName ?? ''
const windowHeight = Dimensions.get('window').height
// isLargeScreen means you have at larger screen like iPhone 6,7 or Pixel
// See https://material.io/devices/
export const isLargeScreen = windowHeight >= 667
const _dir = `${fsCacheDir}/Keybase`
export const logFileDir = _dir
export const pprofDir = _dir
export const serverConfigFileName = `${_dir}/keybase.app.serverConfig`
export const downloadFolder = ''