Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions SystemSetting.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ import Utils from './Utils'

const SystemSettingNative = NativeModules.SystemSetting

SystemSettingNative.removeListeners = () => {
// This is a placeholder implementation
}

SystemSettingNative.addListener = () => {
// This is a placeholder implementation
}

const SCREEN_BRIGHTNESS_MODE_UNKNOW = -1
const SCREEN_BRIGHTNESS_MODE_MANUAL = 0
const SCREEN_BRIGHTNESS_MODE_AUTOMATIC = 1
Expand Down Expand Up @@ -207,12 +215,12 @@ export default class SystemSetting {
if (supported) await Linking.openURL(settingsLink);
break;
}
case 'android':
case 'android':
await SystemSettingNative.openAppSystemSettings()
break;
default:
throw new Error('unknown platform')
break;
break;
}
}

Expand Down Expand Up @@ -268,4 +276,4 @@ export default class SystemSetting {
complete()
})
}
}
}