Release Vulpes OS Preview 26 with Gecko 161.0 and Tundra 0.2.0
This commit is contained in:
parent
3a1fba4efe
commit
e241a42d2f
1 changed files with 1305 additions and 331 deletions
|
|
@ -14,6 +14,7 @@ export function authorizePlatform(app, operation, params = {}) {
|
|||
snapshot: ['settings', 'system', 'costcontrol'].includes(app.id),
|
||||
wifi: ['settings', 'system'].includes(app.id),
|
||||
radioPower: ['system', 'settings'].includes(app.id),
|
||||
carrierName: app.id === 'system',
|
||||
mobileSettings: app.id === 'settings',
|
||||
deviceSettings: app.id === 'settings',
|
||||
bluetooth: ['settings', 'system', 'bluetooth'].includes(app.id),
|
||||
|
|
@ -42,10 +43,12 @@ export function authorizePlatform(app, operation, params = {}) {
|
|||
if (operation === 'mobileSettings' && JSON.stringify(params).length > 6144) throw Error('INVALID_VALUE');
|
||||
if (operation === 'deviceSettings' && (!['clock','setTime','setTimezone','setAutomatic'].includes(params.action) || JSON.stringify(params).length > 1024)) throw Error('INVALID_VALUE');
|
||||
if (operation === 'cameraPreview' &&
|
||||
(!['start', 'frame', 'stop', 'focus', 'zoom', 'picture', 'flash'].includes(params.action) ||
|
||||
(!['start', 'frame', 'stop', 'focus', 'focusMode', 'zoom', 'picture', 'flash'].includes(params.action) ||
|
||||
(params.action === 'start' && !['back', 'front'].includes(params.camera))))
|
||||
throw Error('INVALID_VALUE');
|
||||
if (operation === 'cameraPreview') {
|
||||
if (params.action === 'focusMode' && !['continuous-picture','continuous-video','auto','macro','infinity'].includes(params.mode))
|
||||
throw Error('INVALID_VALUE');
|
||||
if (params.action === 'flash' && !['off','auto','on','torch'].includes(params.mode))
|
||||
throw Error('INVALID_VALUE');
|
||||
if (params.action === 'zoom' && (!Number.isFinite(params.zoom) || params.zoom<1 || params.zoom>100))
|
||||
|
|
|
|||
Loading…
Reference in a new issue