Release Vulpes OS Preview 26 with Gecko 161.0 and Tundra 0.2.0
This commit is contained in:
parent
3a1fba4efe
commit
e241a42d2f
2 changed files with 1305 additions and 331 deletions
|
|
@ -1,5 +1,5 @@
|
|||
export function isGaiaActivity(source) {
|
||||
return source?.name === 'pick' || source?.name === 'share' ||
|
||||
return (source?.name === 'record' && source.data?.type === 'videos') || source?.name === 'pick' || source?.name === 'share' ||
|
||||
(source?.name === 'moz_configure_window' && source.data?.target === 'device') ||
|
||||
(source?.name === 'configure' && source.data?.target === 'device') ||
|
||||
(source?.name === 'configure' && source.data?.target === 'ringtone') ||
|
||||
|
|
@ -26,7 +26,8 @@ export class Activities {
|
|||
route(source, caller, shareProvider) {
|
||||
const types = [].concat(source?.data?.type || []), name=source?.name;
|
||||
let id = name === 'share' && ['sms','email'].includes(shareProvider) ? shareProvider : undefined;
|
||||
if (name === 'pick') {
|
||||
if (name === 'record' && types.includes('videos')) id='camera';
|
||||
else if (name === 'pick') {
|
||||
if (types.some(t=>['ringtone','alerttone'].includes(t))) id='ringtones';
|
||||
else if (types.includes('wallpaper')) id='wallpaper';
|
||||
else if (types.some(t=>['webcontacts/contact','webcontacts/tel','webcontacts/email','webcontacts/select','text/vcard','text/x-vcard','text/directory'].includes(t))) id='communications';
|
||||
|
|
@ -47,8 +48,9 @@ export class Activities {
|
|||
const count=source.data?.blobs?.length || source.data?.number || 0;
|
||||
return matches && (!d.filters?.number?.max || count<=d.filters.number.max);
|
||||
});
|
||||
if (!app || !definition?.href) throw Error('ACTIVITY_NOT_SUPPORTED');
|
||||
const url=new URL(definition.href,app.origin);
|
||||
const path = definition?.href || (definition && id==='camera' && name==='record' ? (app.manifest.launch_path || '/index.html')+'#record' : null);
|
||||
if (!path) throw Error('ACTIVITY_NOT_SUPPORTED');
|
||||
const url=new URL(path,app.origin);
|
||||
if (url.origin!==new URL(app.origin).origin) throw Error('ACTIVITY_NOT_SUPPORTED');
|
||||
// SMS handles the activity after startup; its old manifest fragment is
|
||||
// not a Navigation view in the packaged Gaia build.
|
||||
|
|
|
|||
|
|
@ -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