diff --git a/CHANGELOG.en.md b/CHANGELOG.en.md
index 61ce9b16..07def84c 100644
--- a/CHANGELOG.en.md
+++ b/CHANGELOG.en.md
@@ -4,6 +4,64 @@
Updates by date and platform. Within each group: Add, Change, Fix, Note, Test. Entries describe the state at their date; a fix in development requires an updated installed version.
+
+
+## 01/12/2026 · 2.7-preview.26
+
+
+
+**Gecko 161.0 on desktop, Android and Pixel 3a · Tundra 0.2.0 on Pixel**
+
+The Linux desktop and Pixel 3a move from Gecko 156.0.1 to **161.0**. On the Pixel, **Tundra 0.2.0** reduces wakeups in standby. Battery-life gains still need measuring. The Home bar follows the active app’s colours and stays hidden during startup and shutdown. The Android APK also moves to **GeckoView 161.0**. All three editions share **Gaia 2.7.0**.
+
+### 
+
+-   Cancelling an alarm removes a queued delivery. Alarms handle failed storage writes and backward clock changes. The service stops its timer when no alarms remain.
+
+-  The wallpaper picker restores the original Gaia orange wallpaper and lists the blue Vulpes wallpaper once. Marketplace uses its round icon again.
+
+-  Settings links to Vulpes support, the source repository and the Vulpes Marketplace privacy notice.
+
+-  The wallpaper keeps its size when opening or closing the notification shade. Settings links to the Vulpes help, browsing and system privacy pages in English and French.
+
+### 
+
+-   vCard import preserves more contact details, including postal addresses, websites, organisations, notes and preferred numbers.
+
+-   An unreadable installed package is isolated at startup. An update with invalid files leaves the installed copy intact.
+
+-  The Home bar stays hidden during the startup logo and the shutdown and restart animations. The shell opens with the same blue background as the Vulpes splash screen.
+
+-  The Home button responds in its centre. In the power menu, the Home bar matches the grey footer and leaves Cancel within reach. Open Camera in Videos requests video mode. Calendar selector options each occupy their own row.
+
+-  The home screen removes the extra empty row. The Home button clears the power menu and notification shade. The browser shows same-origin site icons after redirects.
+
+-   Tapping the page outside a text field dismisses the keyboard.
+
+-   PNG screenshots use the display’s pixel density to preserve text and icon detail.
+
+### 
+
+-   The Home ring and bar follow the colours of the open app. The bar stays transparent in recent apps and throughout the transition back to Home and disappears on the lock screen to leave room for the unlock gesture.
+
+-   After unlocking, holding the Home button with the mouse opens recent apps. They stay open when the button is released.
+
+-  Gaia boots on the Gecko 161.0 candidate. Settings survive a restart. Browser navigation and returning Home work. Camera preview is blocked at the permission prompt.
+
+### 
+
+-   After a radio change, a stale scan can no longer overwrite the next scan in the cache. The status bar updates signal bars when measurements disappear.
+
+-   When the screen turns off, the system marks Gaia sessions as idle. The hardware button service no longer wakes every second while waiting for input.
+
+-   The standby fix is installed on the test Pixel. Battery life in airplane mode still needs to be measured (#35).
+
+-  Pixel 3a boots Gaia on ARM64 Gecko 161.0 from RAM. P26 was then flashed to slot A on the test Pixel with full readback verification and no data wipe. The call screen check failed in this trial. The phone camera still needs testing.
+
+### 
+
+-  Pixel 3a and Nokia 2720 Flip now share the Tundra version (0.2.0). Each model keeps its own hardware adaptation version.
+
## 28/11/2026 · 2.7-preview.25
@@ -129,10 +187,10 @@ Download the Android APK, Linux x86_64 desktop archive or Pixel 3a image. On Lin
### 
-   : Boot no longer rereads the 3 GiB system image to calculate SHA-256. Provenance remains checked during preparation; boot checks file type and size before mounting read-only. The HAL wait is capped at 8 seconds.
--   : Tundra waits for HAL initialization to finish, then enables Qualcomm low-power states. RAM boot v23 confirms `sleep_disabled=N`; CPU0 spent 3.6–4.0 seconds in C3 over 5.2-second samples.
-   : Gaia startup no longer waits for the network login barrier.
--   : With the backlight off in RAM, `Isolated Web Co` still used 21%, `crtc_commit` 13% and Firefox 10% of one core. Battery was 29.5 °C and CPU around 38 °C; the phone was plugged in, so discharge rate was not measured.
+-   : Tundra waits for HAL initialization to finish, then enables Qualcomm low-power states. RAM boot v23 confirms `sleep_disabled=N`; CPU0 spent 3.6–4.0 seconds in C3 over 5.2-second samples.
-   : Private v23 image booted in RAM without partition writes. Gaia process profiling and a longer unplugged measurement remain.
+-   : With the backlight off in RAM, `Isolated Web Co` still used 21%, `crtc_commit` 13% and Firefox 10% of one core. Battery was 29.5 °C and CPU around 38 °C; the phone was plugged in, so discharge rate was not measured.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2cf79fb4..391f2033 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,64 @@
Les nouveautés, par date et par plateforme. Dans chaque groupe : Add, Change, Fix, Note, Test. Les entrées décrivent la situation à leur date ; une correction en développement nécessite une nouvelle version installée.
+
+
+## 01/12/2026 · 2.7-preview.26
+
+
+
+**Gecko 161.0 sur PC, Android et Pixel 3a · Tundra 0.2.0 sur Pixel**
+
+Le bureau Linux et le Pixel 3a passent de Gecko 156.0.1 à **161.0**. Sur le Pixel, **Tundra 0.2.0** réduit les réveils en veille. Le gain d’autonomie reste à mesurer. La barre Accueil prend les couleurs de l’application et disparaît pendant les animations de démarrage et d’arrêt. L’APK Android passe lui aussi à **GeckoView 161.0**. Les trois éditions partagent **Gaia 2.7.0**.
+
+### 
+
+-   Une alarme annulée en attente de livraison est retirée. Les erreurs de stockage et le recul de l’heure système sont mieux gérés. Sans alarme, le service arrête son minuteur.
+
+-  Le catalogue retrouve le fond orange de Gaia et affiche une seule fois le fond bleu de Vulpes. Le Marketplace retrouve son icône ronde.
+
+-  Les Paramètres proposent l’assistance Vulpes, son dépôt de sources et la notice du Vulpes Marketplace.
+
+-  Le fond d’écran garde sa taille pendant l’ouverture et la fermeture du tiroir de notifications. Depuis les Paramètres, les liens d’aide, de navigation privée et de confidentialité ouvrent les pages Vulpes en français ou en anglais.
+
+### 
+
+-   L’import vCard conserve davantage de données de la fiche, dont les adresses postales, les sites web, les organisations, les notes et les numéros préférés.
+
+-   Un paquet installé illisible est isolé au démarrage. Une mise à jour dont les fichiers sont invalides conserve la copie installée.
+
+-  La barre Accueil reste masquée pendant le logo de démarrage et les animations d’arrêt et de redémarrage. Au lancement, le fond du shell reprend le bleu du splash Vulpes.
+
+-  La zone active du bouton Accueil est centrée. Dans le menu Alimentation, sa barre reprend le gris du pied de menu et laisse Annuler accessible. Le bouton Caméra de Vidéo ouvre le mode vidéo. Les options du calendrier occupent chacune leur ligne.
+
+-  L’accueil retire la rangée vide en fin de liste. Le bouton Accueil dégage Annuler et le tiroir de notifications. Le navigateur affiche les favicons du site après une redirection.
+
+-   Toucher la page en dehors du champ de saisie permet de fermer le clavier.
+
+-   Les captures d’écran PNG utilisent la densité de l’écran pour conserver les détails du texte et des icônes.
+
+### 
+
+-   La couleur du cercle Accueil et celle de sa barre suivent l’application ouverte. La barre reste transparente dans les applications récentes et pendant tout le retour à l’accueil. Sur l’écran verrouillé, elle disparaît pour laisser toute la place au geste de déverrouillage.
+
+-   Après déverrouillage, maintenir le bouton Accueil avec la souris ouvre les applications récentes. Elles restent affichées quand on relâche le bouton.
+
+-  Gaia démarre sur le moteur candidat Gecko 161.0. Les réglages persistent après redémarrage. La navigation et le retour à l’accueil fonctionnent. L’aperçu de la caméra reste bloqué sur la demande d’autorisation.
+
+### 
+
+-   Après une bascule radio, un ancien scan ne peut plus remplacer le résultat du suivant dans le cache. La barre d’état actualise les barres de réception quand la mesure disparaît.
+
+-   Lorsque l’écran s’éteint, le système signale la mise en veille aux sessions Gaia. Le service des boutons physiques cesse de se réveiller chaque seconde en l’absence d’interaction.
+
+-   Le correctif de veille est installé sur le Pixel de test. Le gain d’autonomie en mode avion reste à mesurer (#35).
+
+-  Gaia démarre sur Gecko 161.0 ARM64 en RAM sur le Pixel 3a. La P26 a ensuite été flashée sur le slot A du Pixel de test avec vérification par relecture, sans effacement des données. La vérification de l’écran d’appel a échoué pendant cet essai. La caméra reste à tester sur le téléphone.
+
+### 
+
+-  Le Pixel 3a et le Nokia 2720 Flip utilisent désormais le même numéro de version pour Tundra (0.2.0). Chaque modèle conserve son numéro d’adaptation matérielle.
+
## 28/11/2026 · 2.7-preview.25
@@ -129,10 +187,10 @@ Téléchargez l’APK Android, l’archive Desktop pour Linux x86_64 ou l’imag
### 
-   : Le boot ne relit plus les 3 Gio de l’image système en SHA-256. La provenance reste contrôlée à la préparation ; au démarrage, taille et type sont vérifiés avant le montage en lecture seule. L’attente HAL est plafonnée à 8 s.
--   : Tundra attend la fin d’initialisation du HAL puis active les états basse consommation Qualcomm. Le boot RAM v23 confirme `sleep_disabled=N` ; CPU0 a résidé 3,6 à 4,0 s en C3 sur des fenêtres de 5,2 s.
-   : Gaia ne dépend plus de l’attente de session réseau pour démarrer.
--   : En RAM, l’écran éteint laisse encore `Isolated Web Co` à 21 %, `crtc_commit` à 13 % et Firefox à 10 % d’un cœur. Batterie à 29,5 °C et CPU autour de 38 °C ; téléphone branché, donc taux de décharge non mesuré.
+-   : Tundra attend la fin d’initialisation du HAL puis active les états basse consommation Qualcomm. Le boot RAM v23 confirme `sleep_disabled=N` ; CPU0 a résidé 3,6 à 4,0 s en C3 sur des fenêtres de 5,2 s.
-   : Image v23 privée, démarrée en RAM sans écriture de partition. Le profilage des processus Gaia et la mesure prolongée sans câble restent à faire.
+-   : En RAM, l’écran éteint laisse encore `Isolated Web Co` à 21 %, `crtc_commit` à 13 % et Firefox à 10 % d’un cœur. Batterie à 29,5 °C et CPU autour de 38 °C ; téléphone branché, donc taux de décharge non mesuré.
diff --git a/README.fr.md b/README.fr.md
index 31e494e1..0677c95a 100644
--- a/README.fr.md
+++ b/README.fr.md
@@ -4,10 +4,10 @@
Firefox OS fork · Open source
-
+
-
-
+
+
@@ -38,11 +38,7 @@ Je développe Vulpes principalement seul, sous le nom d’OverSu, avec l’aide
Sur Pixel 3a, **Tundra démarre directement Gecko et Gaia** et assure leur accès au matériel. Droidian a servi d’environnement de test au début du projet : il n’est pas inclus dans Vulpes OS et Tundra ne repose pas dessus.
-### Preview 25 · publiée
-L’APK Android, l’archive Desktop pour Linux x86_64 et l’image Pixel 3a sont disponibles. La mise à jour depuis la P24 corrigée conserve les données. Une première installation complète efface le Pixel. [Changelog](CHANGELOG.md) · [Téléchargements](https://nnsprod.com/git/oversu/VulpesOS/releases/tag/v2.7-preview.25)
-
-PC/Sargo utilisent Gecko **156.0.1** ; Android utilise GeckoView **156.0**. Android 8 / API 26 minimum est déclaré. L’APK est un build de développement signé, avec débogage via ADB autorisé.
### Linux
Prérequis : Linux x86_64, Git, Python 3 et les bibliothèques système nécessaires à Firefox.
diff --git a/README.md b/README.md
index 8976d1ea..848ebdaa 100644
--- a/README.md
+++ b/README.md
@@ -4,10 +4,10 @@
Firefox OS fork · Open source
-
+
-
-
+
+
@@ -38,11 +38,7 @@ I’m OverSu, and I develop Vulpes mostly on my own, with help from people who t
On the Pixel 3a, **Tundra boots Gecko and Gaia directly** and provides access to the hardware. Droidian was used as a testing environment early in development. It is not included in Vulpes OS, and Tundra is not based on it.
-### Preview 25 · released
-Download the Android APK, Linux x86_64 desktop archive or Pixel 3a image. Updating from corrected P24 preserves data. A full first installation erases the Pixel. [Changelog](CHANGELOG.en.md) · [Downloads](https://nnsprod.com/git/oversu/VulpesOS/releases/tag/v2.7-preview.25)
-
-Desktop/Sargo use Gecko **156.0.1**; Android uses GeckoView **156.0**. Android 8 / API 26 minimum is declared. The APK is a signed development build with debugging available through authorized ADB.
### Linux
You’ll need Linux x86_64, Git, Python 3 and the system libraries required by Firefox.
diff --git a/android/app/build.gradle b/android/app/build.gradle
index f1d5cbf1..bb5bcf85 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -3,7 +3,7 @@ def vulpesRelease = new groovy.json.JsonSlurper().parse(rootProject.file('../rel
def productVersion = vulpesRelease.version ?: "${vulpesRelease.gaia}-${vulpesRelease.channel}.${vulpesRelease.revision}"
android {
namespace 'org.vulpes_os.preview'
- compileSdk { version = release(37) { minorApiLevel = 1 } }
+ compileSdk { version = release(37) { minorApiLevel = 2 } }
buildToolsVersion '37.0.0'
defaultConfig {
applicationId 'org.vulpes_os.preview'
diff --git a/android/app/src/main/java/org/vulpes_os/preview/MainActivity.java b/android/app/src/main/java/org/vulpes_os/preview/MainActivity.java
index 51916801..8624ac18 100644
--- a/android/app/src/main/java/org/vulpes_os/preview/MainActivity.java
+++ b/android/app/src/main/java/org/vulpes_os/preview/MainActivity.java
@@ -342,6 +342,7 @@ public final class MainActivity extends Activity {
params.topMargin = !landscape && overlay ? -dp(44) : 0;
params.leftMargin = landscape && overlay ? -dp(44) : 0;
home.setLayoutParams(params);
+ home.setVisibility(overlay && app.trayOverHome ? View.INVISIBLE : View.VISIBLE);
if (overlay && app.homeAtBottom) home.setBackgroundColor(Color.TRANSPARENT);
else if (overlay) home.setBackground(
new android.graphics.drawable.GradientDrawable(
diff --git a/android/app/src/main/java/org/vulpes_os/preview/VulpesApplication.java b/android/app/src/main/java/org/vulpes_os/preview/VulpesApplication.java
index 1ac1ab40..78a3edf2 100644
--- a/android/app/src/main/java/org/vulpes_os/preview/VulpesApplication.java
+++ b/android/app/src/main/java/org/vulpes_os/preview/VulpesApplication.java
@@ -19,6 +19,7 @@ public final class VulpesApplication extends Application {
AndroidNotifications notifications;
boolean pendingScreenLock;
boolean homeVisible;
+ boolean trayOverHome;
boolean homeAtBottom;
boolean trackingProtection = true;
@@ -132,6 +133,7 @@ public final class VulpesApplication extends Application {
}
if (json.optString("type").equals("navigation")) {
homeVisible = json.optBoolean("home");
+ trayOverHome = json.optBoolean("trayOverHome");
if (activity != null) activity.setHomeSurface(homeVisible);
return GeckoResult.fromValue(null);
}
diff --git a/android/extension/background.js b/android/extension/background.js
index f678c456..f1814c37 100644
--- a/android/extension/background.js
+++ b/android/extension/background.js
@@ -144,6 +144,7 @@ const ready = (async () => {
save: (state) => browser.storage.local.set({ alarms: state }),
},
(callback, delay) => setInterval(callback, delay),
+ timer => clearInterval(timer),
);
await alarms.init();
console.info('VULPES Android services ready');
@@ -448,7 +449,7 @@ async function handle(peer, request) {
}
if (method === 'desktop.navigation') {
if (app.id !== 'system' || typeof params?.home !== 'boolean') throw Error('PERMISSION_DENIED');
- return browser.runtime.sendNativeMessage('vulpes', { type: 'navigation', home: params.home });
+ return browser.runtime.sendNativeMessage('vulpes', { type: 'navigation', home: params.home, trayOverHome: params.trayOverHome === true });
}
if (method === 'desktop.screen') {
if (!app.manifest.permissions?.power) throw Error('PERMISSION_DENIED');
diff --git a/android/toolchain-lock.json b/android/toolchain-lock.json
index 69ce3f17..5b6e1030 100644
--- a/android/toolchain-lock.json
+++ b/android/toolchain-lock.json
@@ -2,9 +2,9 @@
"jdk": "Temurin 21.0.12.1+1",
"gradle": "9.5.0",
"androidGradlePlugin": "9.3.3",
- "geckoview": "156.0.20260921121718",
+ "geckoview": "161.0.20261118180411",
"sdk": [
- "platforms;android-37.1",
+ "platforms;android-37.2",
"build-tools;37.0.0"
],
"archives": {
@@ -17,8 +17,8 @@
"url": "https://services.gradle.org/distributions/gradle-9.5.0-bin.zip"
},
"geckoview.aar": {
- "sha256": "42f80fcccbbe72c17f67bc7be3044cae097e4cb61a9084b406ec935f66e8edca",
- "url": "https://maven.mozilla.org/maven2/org/mozilla/geckoview/geckoview/156.0.20260921121718/geckoview-156.0.20260921121718.aar"
+ "sha256": "56523d3b98cf09a127e7ea019c674cf951d85182fd534143d3079b5344be637b",
+ "url": "https://maven.mozilla.org/maven2/org/mozilla/geckoview/geckoview/161.0.20261118180411/geckoview-161.0.20261118180411.aar"
},
"commandlinetools.zip": {
"url": "https://dl.google.com/android/repository/commandlinetools-linux-13114758_latest.zip",
diff --git a/android/tools/prepare-toolchain.py b/android/tools/prepare-toolchain.py
index 79c84e8a..74aa1fbe 100644
--- a/android/tools/prepare-toolchain.py
+++ b/android/tools/prepare-toolchain.py
@@ -84,7 +84,7 @@ def main():
for _, _, _, executable in installs
if not executable.is_file()
]
- packages = [sdk / "platforms/android-37.1/android.jar", sdk / "build-tools/37.0.0/apksigner"]
+ packages = [sdk / "platforms/android-37.2/android.jar", sdk / "build-tools/37.0.0/apksigner"]
if args.check:
missing += [str(path.relative_to(ROOT)) for path in packages if not path.is_file()]
if missing:
diff --git a/assets/webapps/homescreen.gaiamobile.org/gaia_build_defer_index.js b/assets/webapps/homescreen.gaiamobile.org/gaia_build_defer_index.js
index fba1130a..5409e5e9 100644
--- a/assets/webapps/homescreen.gaiamobile.org/gaia_build_defer_index.js
+++ b/assets/webapps/homescreen.gaiamobile.org/gaia_build_defer_index.js
@@ -860,7 +860,7 @@ this.metadata.set([{id:id,icon:blob}]).then(()=>{},(e)=>{console.error('Error sa
icon.addEventListener('activated',e=>{e.preventDefault();this.handleEvent({type:'activate',detail:{target:e.target.parentNode},preventDefault:()=>{}});});},refreshIcon:function(icon){icon.size=this.iconSize?this.iconSize:icon.size;if(icon.bookmark){IconsHelper.setElementIcon(icon,this.iconSize).then(()=>{},e=>{console.error('Error refreshing bookmark icon',e);if(!icon.isUserSet){icon.refresh();}});}else{icon.refresh();}},storeAppOrder:function(){var storedOrders=[];var children=this.icons.children;for(var i=0,iLen=children.length;i{},(e)=>{console.error('Error storing app order',e);});},iconAdded:function(container){if(container.style.display==='none'){return;}
this.refreshGridSize();},refreshGridSize:function(){var children=this.icons.children;var cols=document.documentElement.dataset.vulpesLayout==='compact'?3:(this.settings.small?4:3);var visibleChildren=0;var firstVisibleChild=-1;for(var i=0,iLen=children.length;i=scrollHeight){this.onVisualLoad();}}
this.scrollable.style.scrollSnapPointsY=`repeat(${this.pageHeight}px)`;this.icons.style.backgroundSize='100% '+(this.pageHeight*2)+'px';if(this.resizeTimeout!==null){clearTimeout(this.resizeTimeout);}
var setGridHeight=()=>{this.resizeTimeout=null;this.icons.style.height=gridHeight+'px';this.gridHeight=this.pendingGridHeight;};if(this.pendingGridHeight>this.gridHeight){setGridHeight();}else if(this.pendingGridHeight!==this.gridHeight){this.resizeTimeout=setTimeout(setGridHeight,RESIZE_TIMEOUT);}},snapScrollPosition:function(bias){bias=bias||0;var gridHeight=this.pendingGridHeight;var currentScroll=this.scrollable.scrollTop;var scrollHeight=this.scrollable.clientHeight;var destination;if(this.settings.scrollSnapping){destination=Math.min(gridHeight-scrollHeight,Math.round(currentScroll/this.pageHeight+bias)*this.pageHeight);}else{destination=Math.min(gridHeight-scrollHeight,currentScroll+(this.pageHeight*bias));}
diff --git a/assets/webapps/homescreen.gaiamobile.org/js/apps.js b/assets/webapps/homescreen.gaiamobile.org/js/apps.js
index 08de6f71..3e2e048b 100644
--- a/assets/webapps/homescreen.gaiamobile.org/js/apps.js
+++ b/assets/webapps/homescreen.gaiamobile.org/js/apps.js
@@ -31,7 +31,7 @@ this.metadata.set([{id:id,icon:blob}]).then(()=>{},(e)=>{console.error('Error sa
icon.addEventListener('activated',e=>{e.preventDefault();this.handleEvent({type:'activate',detail:{target:e.target.parentNode},preventDefault:()=>{}});});},refreshIcon:function(icon){icon.size=this.iconSize?this.iconSize:icon.size;if(icon.bookmark){IconsHelper.setElementIcon(icon,this.iconSize).then(()=>{},e=>{console.error('Error refreshing bookmark icon',e);if(!icon.isUserSet){icon.refresh();}});}else{icon.refresh();}},storeAppOrder:function(){var storedOrders=[];var children=this.icons.children;for(var i=0,iLen=children.length;i{},(e)=>{console.error('Error storing app order',e);});},iconAdded:function(container){if(container.style.display==='none'){return;}
this.refreshGridSize();},refreshGridSize:function(){var children=this.icons.children;var cols=this.settings.small?4:3;var visibleChildren=0;var firstVisibleChild=-1;for(var i=0,iLen=children.length;i=scrollHeight){this.onVisualLoad();}}
this.scrollable.style.scrollSnapPointsY=`repeat(${this.pageHeight}px)`;this.icons.style.backgroundSize='100% '+(this.pageHeight*2)+'px';if(this.resizeTimeout!==null){clearTimeout(this.resizeTimeout);}
var setGridHeight=()=>{this.resizeTimeout=null;this.icons.style.height=gridHeight+'px';this.gridHeight=this.pendingGridHeight;};if(this.pendingGridHeight>this.gridHeight){setGridHeight();}else if(this.pendingGridHeight!==this.gridHeight){this.resizeTimeout=setTimeout(setGridHeight,RESIZE_TIMEOUT);}},snapScrollPosition:function(bias){bias=bias||0;var gridHeight=this.pendingGridHeight;var currentScroll=this.scrollable.scrollTop;var scrollHeight=this.scrollable.clientHeight;var destination;if(this.settings.scrollSnapping){destination=Math.min(gridHeight-scrollHeight,Math.round(currentScroll/this.pageHeight+bias)*this.pageHeight);}else{destination=Math.min(gridHeight-scrollHeight,currentScroll+(this.pageHeight*bias));}
diff --git a/assets/webapps/marketplace.gaiamobile.org/icon.png b/assets/webapps/marketplace.gaiamobile.org/icon.png
index 9880f58a..c8cacf42 100644
Binary files a/assets/webapps/marketplace.gaiamobile.org/icon.png and b/assets/webapps/marketplace.gaiamobile.org/icon.png differ
diff --git a/assets/webapps/marketplace.gaiamobile.org/manifest.webapp b/assets/webapps/marketplace.gaiamobile.org/manifest.webapp
index 8cded036..68318933 100644
--- a/assets/webapps/marketplace.gaiamobile.org/manifest.webapp
+++ b/assets/webapps/marketplace.gaiamobile.org/manifest.webapp
@@ -4,7 +4,7 @@
"launch_path": "/index.html",
"type": "certified",
"icons": {
- "512": "/icon.png"
+ "128": "/icon.png"
},
"permissions": {
"browser": {},
diff --git a/assets/webapps/settings.gaiamobile.org/elements/about_your_privacy.html b/assets/webapps/settings.gaiamobile.org/elements/about_your_privacy.html
index a0c8ce2e..64aa1871 100644
--- a/assets/webapps/settings.gaiamobile.org/elements/about_your_privacy.html
+++ b/assets/webapps/settings.gaiamobile.org/elements/about_your_privacy.html
@@ -7,17 +7,20 @@
diff --git a/assets/webapps/settings.gaiamobile.org/js/panels/help/panel.js b/assets/webapps/settings.gaiamobile.org/js/panels/help/panel.js
index 586409d7..2ba3b789 100644
--- a/assets/webapps/settings.gaiamobile.org/js/panels/help/panel.js
+++ b/assets/webapps/settings.gaiamobile.org/js/panels/help/panel.js
@@ -1,5 +1,5 @@
-define('panels/help/support',['require','modules/settings_cache','shared/lazy_loader'],function(require){'use strict';var SettingsCache=require('modules/settings_cache');var LazyLoader=require('shared/lazy_loader');var Support=function(){};Support.prototype={init:function support_init(elements){this._elements=elements;this._callSupportInfo=null;var url='http://support.mozilla.org/products/firefox-os';this._elements.userGuide.addEventListener('click',()=>{this._elements.userGuide.blur();var activity=new window.MozActivity({name:'view',data:{type:'url',url:url}});activity.onsuccess=function(){};});this._getSupportInfo(this._displaySupportInfo.bind(this));},uninit:function(){this._elements=null;this._supportInfo=null;this._callSupportInfo=null;},_getSupportInfo:function support_getSupportInfo(callback){if(this._supportInfo){callback(this._supportInfo);return;}
+define('panels/help/support',['require','modules/settings_cache','shared/lazy_loader'],function(require){'use strict';var SettingsCache=require('modules/settings_cache');var LazyLoader=require('shared/lazy_loader');var Support=function(){};Support.prototype={init:function support_init(elements){this._elements=elements;this._callSupportInfo=null;var url='https://vulpes-os.org/help.php';this._elements.userGuide.addEventListener('click',()=>{this._elements.userGuide.blur();var activity=new window.MozActivity({name:'view',data:{type:'url',url:url}});activity.onsuccess=function(){};});this._getSupportInfo(this._displaySupportInfo.bind(this));},uninit:function(){this._elements=null;this._supportInfo=null;this._callSupportInfo=null;},_getSupportInfo:function support_getSupportInfo(callback){if(this._supportInfo){callback(this._supportInfo);return;}
LazyLoader.getJSON('/resources/support.json').then(function loadSupportInfo(data){this._supportInfo=data;callback(this._supportInfo);}.bind(this));},_createLinkNode:function support_createLinkNode(data,type){var link=document.createElement('a');link.setAttribute('href',data.href);link.classList.add('link-text');if(type=='tel'){link.textContent=data.title+' ('+data.href+')';}else{link.textContent=data.title;}
return link;},_enableSupportInfo:function support_enableSupportInfo(){this._elements.help.dataset.hasSupportInfo=true;},_setOnlineSupportInfo:function support_setOnlineSupportInfo(onlineSupportInfo){this._enableSupportInfo();var nodes=this._createLinkNode(onlineSupportInfo);this._elements.supportText.appendChild(nodes);},_setCallSupportInfo:function support_setCallSupportInfo(supportInfo){this._enableSupportInfo();for(var id in supportInfo){this._elements.supportNumber.appendChild(this._createLinkNode(supportInfo[id],'tel'));}},_renderSupportInfo:function support_renderSupportInfo(result){var onlineSupportInfo=null;var onlineSupportTitle=result['support.onlinesupport.title'];if(onlineSupportTitle!==''){onlineSupportInfo={title:onlineSupportTitle};onlineSupportInfo.href=result['support.onlinesupport.href'];this._setOnlineSupportInfo(onlineSupportInfo);}else if(this._supportInfo){this._setOnlineSupportInfo(this._supportInfo.onlinesupport);}
var callSupport1Title=result['support.callsupport1.title'];if(callSupport1Title!==''){this._callSupportInfo=[{'title':callSupport1Title,'href':result['support.callsupport1.href']}];var callSupport2Title=result['support.callsupport2.title'];if(callSupport2Title!==''){this._callSupportInfo.push({'title':callSupport2Title,'href':result['support.callsupport2.href']});this._setCallSupportInfo(this._callSupportInfo);}}else if(this._supportInfo){this._setCallSupportInfo(this._supportInfo.callsupport);}},_displaySupportInfo:function support_displaySupportInfo(supportInfo){SettingsCache.getSettings(this._renderSupportInfo.bind(this));}};return function ctor_support(){return new Support();};});define('panels/help/panel',['require','modules/settings_panel','panels/help/support'],function(require){'use strict';var SettingsPanel=require('modules/settings_panel');var Support=require('panels/help/support');return function ctor_support_panel(){var help=Support();return SettingsPanel({onInit:function(panel){var elements={userGuide:panel.querySelector('#user-guide'),help:panel,supportText:panel.querySelector('#help-online-support-text'),supportNumber:panel.querySelector('#help-call-support-numbers')};help.init(elements);}});};});
\ No newline at end of file
diff --git a/assets/webapps/settings.gaiamobile.org/js/panels/screen_lock_passcode/panel.js b/assets/webapps/settings.gaiamobile.org/js/panels/screen_lock_passcode/panel.js
index d4091f1c..b0bbd7ab 100644
--- a/assets/webapps/settings.gaiamobile.org/js/panels/screen_lock_passcode/panel.js
+++ b/assets/webapps/settings.gaiamobile.org/js/panels/screen_lock_passcode/panel.js
@@ -1,5 +1,6 @@
-define('panels/screen_lock_passcode/panel',['require','modules/settings_utils','modules/dialog_panel','shared/passcode_helper'],function(require){'use strict';var SettingsUtils=require('modules/settings_utils');var DialogPanel=require('modules/dialog_panel');var PasscodeHelper=require('shared/passcode_helper');return function ctor_screenlockPasscode(){var mozSettings=window.navigator.mozSettings;return DialogPanel({_elements:{},_mode:'create',_leftApp:false,_passcodeBuffer:'',_checkingLength:{'create':8,'new':8,'edit':4,'confirm':4,'confirmLock':4},_headerL10nIdMapping:{'create':'new-passcode','edit':'current-passcode','new':'new-passcode','confirm':'enter-passcode','confirmLock':'enter-passcode'},_submitButtonL10nIdMapping:{'new':'change','create':'create','edit':'','confirm':'','confirmLock':''},onInit:function(panel){this._elements.panel=panel;this._elements.gaiaHeader=panel.querySelector('gaia-header');this._elements.header=panel.querySelector('gaia-header h1');this._elements.passcodeInput=panel.querySelector('.passcode-input');this._elements.passcodeDigits=panel.querySelectorAll('.passcode-digit');this._elements.passcodeContainer=panel.querySelector('.passcode-container');this._elements.submitButton=panel.querySelector('button[type="submit"]');this._elements.submitButtonText=this._elements.submitButton.querySelector('span');this._bindEvents();},_bindEvents:function(){this._elements.passcodeInput.type='password';this._elements.passcodeInput.inputMode='numeric';this._elements.passcodeInput.maxLength=8;this._elements.passcodeInput.oninput=this._onPasscodeInput.bind(this);this._elements.passcodeContainer.onclick=this._onPasscodeContainerClick.bind(this);},_onPasscodeContainerClick:function(evt){evt.preventDefault();this._elements.passcodeInput.focus();},_onPasscodeInput: function() {
+define('panels/screen_lock_passcode/panel',['require','modules/settings_utils','modules/dialog_panel','shared/passcode_helper'],function(require){'use strict';var SettingsUtils=require('modules/settings_utils');var DialogPanel=require('modules/dialog_panel');var PasscodeHelper=require('shared/passcode_helper');return function ctor_screenlockPasscode(){var mozSettings=window.navigator.mozSettings;return DialogPanel({_elements:{},_mode:'create',_leftApp:false,_passcodeBuffer:'',_checkingLength:{'create':8,'new':8,'edit':4,'confirm':4,'confirmLock':4},_headerL10nIdMapping:{'create':'new-passcode','edit':'current-passcode','new':'new-passcode','confirm':'enter-passcode','confirmLock':'enter-passcode'},_submitButtonL10nIdMapping:{'new':'change','create':'create','edit':'','confirm':'','confirmLock':''},onInit:function(panel){this._elements.panel=panel;this._elements.gaiaHeader=panel.querySelector('gaia-header');this._elements.header=panel.querySelector('gaia-header h1');this._elements.passcodeInput=panel.querySelector('.passcode-input');this._elements.passcodeDigits=panel.querySelectorAll('.passcode-digit');this._elements.passcodeContainer=panel.querySelector('.passcode-container');this._elements.submitButton=panel.querySelector('button[type="submit"]');this._elements.submitButtonText=this._elements.submitButton.querySelector('span');this._bindEvents();},_bindEvents:function(){this._elements.passcodeInput.type='password';this._elements.passcodeInput.inputMode='numeric';this._elements.passcodeInput.maxLength=8;this._elements.passcodeInput.oninput=this._onPasscodeInput.bind(this);this._elements.passcodeContainer.setAttribute('data-vulpes-keep-input', '');
+ this._elements.passcodeContainer.onclick=this._onPasscodeContainerClick.bind(this);},_onPasscodeContainerClick:function(evt){evt.preventDefault();this._elements.passcodeInput.focus();},_onPasscodeInput: function() {
// Android IMEs commit text without legacy keypress/charCode events.
var value = this._elements.passcodeInput.value.replace(/[^0-9]/g, '').slice(0, 8);
this._hideErrorMessage();
diff --git a/assets/webapps/settings.gaiamobile.org/resources/obtaining_source_code.html b/assets/webapps/settings.gaiamobile.org/resources/obtaining_source_code.html
index 77b46f60..e49d7ab7 100644
--- a/assets/webapps/settings.gaiamobile.org/resources/obtaining_source_code.html
+++ b/assets/webapps/settings.gaiamobile.org/resources/obtaining_source_code.html
@@ -1,24 +1,12 @@
-
+
+
-
+
+
+ Vulpes OS source code
-
-
Obtaining Source Code
-
-
Some open source licenses which cover code used in Boot2Gecko require
-that the code be made available to users. This document explains how to obtain
-that source code. It should be updated or replaced on any shipping device
-with a document appropriate to the code used to build that device. If you
-see this message on a shipping device you should remind the manufacturer of
-their obligations under the open source licenses.
-
-
-
-Instructions for downloading and compiling the open source code for copies
-of Boot2Gecko made available by Mozilla can be found on the
-Mozilla Developer Network.
-
diff --git a/assets/webapps/settings.gaiamobile.org/resources/open_source_license.html b/assets/webapps/settings.gaiamobile.org/resources/open_source_license.html
index ab63fbe7..bf94fd41 100644
--- a/assets/webapps/settings.gaiamobile.org/resources/open_source_license.html
+++ b/assets/webapps/settings.gaiamobile.org/resources/open_source_license.html
@@ -36,8 +36,8 @@
this product is available under one of the following licenses. These licenses
give you the freedom to run the software, study it, change it to meet your
needs, and share your changes with others. You can
-download the source code
-from Mozilla. Please consult the source to see which license applies to which
+download the source code
+from the Vulpes OS repository. Please consult the source to see which license applies to which
parts of the code.
diff --git a/assets/webapps/system.gaiamobile.org/js/app_chrome.js b/assets/webapps/system.gaiamobile.org/js/app_chrome.js
index b69d892e..99ba8589 100644
--- a/assets/webapps/system.gaiamobile.org/js/app_chrome.js
+++ b/assets/webapps/system.gaiamobile.org/js/app_chrome.js
@@ -300,6 +300,10 @@
this.handleError(evt);
break;
+ case '_iconchange':
+ this.setSiteIcon();
+ break;
+
case '_locationchange':
this.hidePinDialogCard();
this.handleLocationChange();
@@ -733,6 +737,7 @@
this.app.element.addEventListener('mozbrowsermetachange', this);
this.app.element.addEventListener('mozbrowserscrollareachanged', this);
this.app.element.addEventListener('_locationchange', this);
+ this.app.element.addEventListener('_iconchange', this);
this.app.element.addEventListener('_namechanged', this);
this.app.element.addEventListener('_securitychange', this);
this.app.element.addEventListener('_loading', this);
@@ -792,6 +797,7 @@
this.app.element.removeEventListener('mozbrowsererror', this);
this.app.element.removeEventListener('mozbrowsermetachange', this);
this.app.element.removeEventListener('_locationchange', this);
+ this.app.element.removeEventListener('_iconchange', this);
this.app.element.removeEventListener('_namechanged', this);
this.app.element.removeEventListener('_loading', this);
this.app.element.removeEventListener('_loaded', this);
@@ -1279,8 +1285,19 @@
return;
}
+ const generation = this.iconGeneration = (this.iconGeneration || 0) + 1;
+ const favicon = Object.keys(this.app.favicons || {}).find(href => {
+ try { return new URL(href).origin === new URL(this.app.config.url).origin; }
+ catch (_) { return false; }
+ });
+ if (favicon) {
+ this.siteIcon.style.backgroundImage = 'url(' + JSON.stringify(favicon) + ')';
+ this._currentIconUrl = favicon;
+ return;
+ }
this.app.getSiteIconUrl(ICON_SIZE)
.then(iconObject => {
+ if (generation !== this.iconGeneration) return;
// We compare the original icon URL, otherwise there is a flickering
// effect because a different object url is created each time.
if (this._currentIconUrl !== iconObject.originalUrl) {
@@ -1289,6 +1306,7 @@
}
})
.catch((err) => {
+ if (generation !== this.iconGeneration) return;
// Installed apps have a manifest icon even when the Places cache has
// no favicon. Keep the original chrome slot and select a crisp source.
const icons = this.app.manifest && this.app.manifest.icons;
diff --git a/assets/webapps/system.gaiamobile.org/js/wifi_icon.js b/assets/webapps/system.gaiamobile.org/js/wifi_icon.js
index a152249c..58cc96da 100644
--- a/assets/webapps/system.gaiamobile.org/js/wifi_icon.js
+++ b/assets/webapps/system.gaiamobile.org/js/wifi_icon.js
@@ -31,12 +31,10 @@
break;
case 'connected':
- if (!this.manager.wifiManager.connectionInformation) {
- return;
- }
- var level = Math.min(Math.floor(
- this.manager.wifiManager
- .connectionInformation.relSignalStrength / 20), 4);
+ var info = this.manager.wifiManager.connectionInformation;
+ var strength = info && info.relSignalStrength;
+ var level = Number.isFinite(strength) ?
+ Math.max(0, Math.min(4, Math.floor(strength / 20))) : 0;
this.show();
if (icon.dataset.connecting) {
delete icon.dataset.connecting;
@@ -54,7 +52,7 @@
WifiIcon.prototype.view = function view() {
return `
`;
};
diff --git a/assets/webapps/wallpaper.gaiamobile.org/resources/list.json b/assets/webapps/wallpaper.gaiamobile.org/resources/list.json
index 0de19787..1f783f31 100644
--- a/assets/webapps/wallpaper.gaiamobile.org/resources/list.json
+++ b/assets/webapps/wallpaper.gaiamobile.org/resources/list.json
@@ -1,6 +1,5 @@
[
"Illus_Flow2_Blue.jpg",
- "Illus_Flow2_Orange@2.25x.jpg",
"FX_Bolt.jpg",
"FX_Leap.jpg",
"FX_Rearing.jpg",
@@ -42,6 +41,5 @@
"PH_Tree.jpg",
"PH_TreeForest.jpg",
"PH_Wheat.jpg",
- "PH_WhiteFlower.jpg",
- "Vulpes_Blue.png"
+ "PH_WhiteFlower.jpg"
]
diff --git a/changelog.json b/changelog.json
index 9225760c..f0f4d6b8 100644
--- a/changelog.json
+++ b/changelog.json
@@ -5,6 +5,26 @@
"en": "# Changelog — Vulpes OS\n\n[Français](CHANGELOG.md)\n\nUpdates by date and platform. Within each group: Add, Change, Fix, Note, Test. Entries describe the state at their date; a fix in development requires an updated installed version.\n"
},
"entries": [
+ {
+ "id": "2.7-preview.26",
+ "metadata": {
+ "kind": "version",
+ "status": "published",
+ "platforms": [
+ "pc",
+ "apk",
+ "models"
+ ],
+ "models": [
+ "sargo",
+ "beatles"
+ ]
+ },
+ "text": {
+ "en": "## 01/12/2026 · 2.7-preview.26\n\n\n\n**Gecko 161.0 on desktop, Android and Pixel 3a · Tundra 0.2.0 on Pixel**\n\nThe Linux desktop and Pixel 3a move from Gecko 156.0.1 to **161.0**. On the Pixel, **Tundra 0.2.0** reduces wakeups in standby. Battery-life gains still need measuring. The Home bar follows the active app’s colours and stays hidden during startup and shutdown. The Android APK also moves to **GeckoView 161.0**. All three editions share **Gaia 2.7.0**.\n\n### \n\n-   Cancelling an alarm removes a queued delivery. Alarms handle failed storage writes and backward clock changes. The service stops its timer when no alarms remain.\n\n-  The wallpaper picker restores the original Gaia orange wallpaper and lists the blue Vulpes wallpaper once. Marketplace uses its round icon again.\n\n-  Settings links to Vulpes support, the source repository and the Vulpes Marketplace privacy notice.\n\n-  The wallpaper keeps its size when opening or closing the notification shade. Settings links to the Vulpes help, browsing and system privacy pages in English and French.\n\n### \n\n-   vCard import preserves more contact details, including postal addresses, websites, organisations, notes and preferred numbers.\n\n-   An unreadable installed package is isolated at startup. An update with invalid files leaves the installed copy intact.\n\n-  The Home bar stays hidden during the startup logo and the shutdown and restart animations. The shell opens with the same blue background as the Vulpes splash screen.\n\n-  The Home button responds in its centre. In the power menu, the Home bar matches the grey footer and leaves Cancel within reach. Open Camera in Videos requests video mode. Calendar selector options each occupy their own row.\n\n-  The home screen removes the extra empty row. The Home button clears the power menu and notification shade. The browser shows same-origin site icons after redirects.\n\n-   Tapping the page outside a text field dismisses the keyboard.\n\n-   PNG screenshots use the display’s pixel density to preserve text and icon detail.\n\n### \n\n-   The Home ring and bar follow the colours of the open app. The bar stays transparent in recent apps and throughout the transition back to Home and disappears on the lock screen to leave room for the unlock gesture.\n\n-   After unlocking, holding the Home button with the mouse opens recent apps. They stay open when the button is released.\n\n-  Gaia boots on the Gecko 161.0 candidate. Settings survive a restart. Browser navigation and returning Home work. Camera preview is blocked at the permission prompt.\n\n### \n\n-   After a radio change, a stale scan can no longer overwrite the next scan in the cache. The status bar updates signal bars when measurements disappear.\n\n-   When the screen turns off, the system marks Gaia sessions as idle. The hardware button service no longer wakes every second while waiting for input.\n\n-   The standby fix is installed on the test Pixel. Battery life in airplane mode still needs to be measured (#35).\n\n-  Pixel 3a boots Gaia on ARM64 Gecko 161.0 from RAM. P26 was then flashed to slot A on the test Pixel with full readback verification and no data wipe. The call screen check failed in this trial. The phone camera still needs testing.\n\n### \n\n-  Pixel 3a and Nokia 2720 Flip now share the Tundra version (0.2.0). Each model keeps its own hardware adaptation version.\n",
+ "fr": "## 01/12/2026 · 2.7-preview.26\n\n\n\n**Gecko 161.0 sur PC, Android et Pixel 3a · Tundra 0.2.0 sur Pixel**\n\nLe bureau Linux et le Pixel 3a passent de Gecko 156.0.1 à **161.0**. Sur le Pixel, **Tundra 0.2.0** réduit les réveils en veille. Le gain d’autonomie reste à mesurer. La barre Accueil prend les couleurs de l’application et disparaît pendant les animations de démarrage et d’arrêt. L’APK Android passe lui aussi à **GeckoView 161.0**. Les trois éditions partagent **Gaia 2.7.0**.\n\n### \n\n-   Une alarme annulée en attente de livraison est retirée. Les erreurs de stockage et le recul de l’heure système sont mieux gérés. Sans alarme, le service arrête son minuteur.\n\n-  Le catalogue retrouve le fond orange de Gaia et affiche une seule fois le fond bleu de Vulpes. Le Marketplace retrouve son icône ronde.\n\n-  Les Paramètres proposent l’assistance Vulpes, son dépôt de sources et la notice du Vulpes Marketplace.\n\n-  Le fond d’écran garde sa taille pendant l’ouverture et la fermeture du tiroir de notifications. Depuis les Paramètres, les liens d’aide, de navigation privée et de confidentialité ouvrent les pages Vulpes en français ou en anglais.\n\n### \n\n-   L’import vCard conserve davantage de données de la fiche, dont les adresses postales, les sites web, les organisations, les notes et les numéros préférés.\n\n-   Un paquet installé illisible est isolé au démarrage. Une mise à jour dont les fichiers sont invalides conserve la copie installée.\n\n-  La barre Accueil reste masquée pendant le logo de démarrage et les animations d’arrêt et de redémarrage. Au lancement, le fond du shell reprend le bleu du splash Vulpes.\n\n-  La zone active du bouton Accueil est centrée. Dans le menu Alimentation, sa barre reprend le gris du pied de menu et laisse Annuler accessible. Le bouton Caméra de Vidéo ouvre le mode vidéo. Les options du calendrier occupent chacune leur ligne.\n\n-  L’accueil retire la rangée vide en fin de liste. Le bouton Accueil dégage Annuler et le tiroir de notifications. Le navigateur affiche les favicons du site après une redirection.\n\n-   Toucher la page en dehors du champ de saisie permet de fermer le clavier.\n\n-   Les captures d’écran PNG utilisent la densité de l’écran pour conserver les détails du texte et des icônes.\n\n### \n\n-   La couleur du cercle Accueil et celle de sa barre suivent l’application ouverte. La barre reste transparente dans les applications récentes et pendant tout le retour à l’accueil. Sur l’écran verrouillé, elle disparaît pour laisser toute la place au geste de déverrouillage.\n\n-   Après déverrouillage, maintenir le bouton Accueil avec la souris ouvre les applications récentes. Elles restent affichées quand on relâche le bouton.\n\n-  Gaia démarre sur le moteur candidat Gecko 161.0. Les réglages persistent après redémarrage. La navigation et le retour à l’accueil fonctionnent. L’aperçu de la caméra reste bloqué sur la demande d’autorisation.\n\n### \n\n-   Après une bascule radio, un ancien scan ne peut plus remplacer le résultat du suivant dans le cache. La barre d’état actualise les barres de réception quand la mesure disparaît.\n\n-   Lorsque l’écran s’éteint, le système signale la mise en veille aux sessions Gaia. Le service des boutons physiques cesse de se réveiller chaque seconde en l’absence d’interaction.\n\n-   Le correctif de veille est installé sur le Pixel de test. Le gain d’autonomie en mode avion reste à mesurer (#35).\n\n-  Gaia démarre sur Gecko 161.0 ARM64 en RAM sur le Pixel 3a. La P26 a ensuite été flashée sur le slot A du Pixel de test avec vérification par relecture, sans effacement des données. La vérification de l’écran d’appel a échoué pendant cet essai. La caméra reste à tester sur le téléphone.\n\n### \n\n-  Le Pixel 3a et le Nokia 2720 Flip utilisent désormais le même numéro de version pour Tundra (0.2.0). Chaque modèle conserve son numéro d’adaptation matérielle.\n"
+ }
+ },
{
"id": "2.7-preview.25",
"metadata": {
@@ -95,8 +115,8 @@
]
},
"text": {
- "fr": "## 26/10/2026 : Démarrage Sargo et autonomie — en développement\n\n### \n\n-   : Le boot ne relit plus les 3 Gio de l’image système en SHA-256. La provenance reste contrôlée à la préparation ; au démarrage, taille et type sont vérifiés avant le montage en lecture seule. L’attente HAL est plafonnée à 8 s.\n-   : Tundra attend la fin d’initialisation du HAL puis active les états basse consommation Qualcomm. Le boot RAM v23 confirme `sleep_disabled=N` ; CPU0 a résidé 3,6 à 4,0 s en C3 sur des fenêtres de 5,2 s.\n-   : Gaia ne dépend plus de l’attente de session réseau pour démarrer.\n-   : En RAM, l’écran éteint laisse encore `Isolated Web Co` à 21 %, `crtc_commit` à 13 % et Firefox à 10 % d’un cœur. Batterie à 29,5 °C et CPU autour de 38 °C ; téléphone branché, donc taux de décharge non mesuré.\n-   : Image v23 privée, démarrée en RAM sans écriture de partition. Le profilage des processus Gaia et la mesure prolongée sans câble restent à faire.\n",
- "en": "## 26/10/2026 : Sargo startup and battery life — in development\n\n### \n\n-   : Boot no longer rereads the 3 GiB system image to calculate SHA-256. Provenance remains checked during preparation; boot checks file type and size before mounting read-only. The HAL wait is capped at 8 seconds.\n-   : Tundra waits for HAL initialization to finish, then enables Qualcomm low-power states. RAM boot v23 confirms `sleep_disabled=N`; CPU0 spent 3.6–4.0 seconds in C3 over 5.2-second samples.\n-   : Gaia startup no longer waits for the network login barrier.\n-   : With the backlight off in RAM, `Isolated Web Co` still used 21%, `crtc_commit` 13% and Firefox 10% of one core. Battery was 29.5 °C and CPU around 38 °C; the phone was plugged in, so discharge rate was not measured.\n-   : Private v23 image booted in RAM without partition writes. Gaia process profiling and a longer unplugged measurement remain.\n"
+ "fr": "## 26/10/2026 : Démarrage Sargo et autonomie — en développement\n\n### \n\n-   : Le boot ne relit plus les 3 Gio de l’image système en SHA-256. La provenance reste contrôlée à la préparation ; au démarrage, taille et type sont vérifiés avant le montage en lecture seule. L’attente HAL est plafonnée à 8 s.\n-   : Gaia ne dépend plus de l’attente de session réseau pour démarrer.\n-   : Tundra attend la fin d’initialisation du HAL puis active les états basse consommation Qualcomm. Le boot RAM v23 confirme `sleep_disabled=N` ; CPU0 a résidé 3,6 à 4,0 s en C3 sur des fenêtres de 5,2 s.\n-   : Image v23 privée, démarrée en RAM sans écriture de partition. Le profilage des processus Gaia et la mesure prolongée sans câble restent à faire.\n-   : En RAM, l’écran éteint laisse encore `Isolated Web Co` à 21 %, `crtc_commit` à 13 % et Firefox à 10 % d’un cœur. Batterie à 29,5 °C et CPU autour de 38 °C ; téléphone branché, donc taux de décharge non mesuré.\n",
+ "en": "## 26/10/2026 : Sargo startup and battery life — in development\n\n### \n\n-   : Boot no longer rereads the 3 GiB system image to calculate SHA-256. Provenance remains checked during preparation; boot checks file type and size before mounting read-only. The HAL wait is capped at 8 seconds.\n-   : Gaia startup no longer waits for the network login barrier.\n-   : Tundra waits for HAL initialization to finish, then enables Qualcomm low-power states. RAM boot v23 confirms `sleep_disabled=N`; CPU0 spent 3.6–4.0 seconds in C3 over 5.2-second samples.\n-   : Private v23 image booted in RAM without partition writes. Gaia process profiling and a longer unplugged measurement remain.\n-   : With the backlight off in RAM, `Isolated Web Co` still used 21%, `crtc_commit` 13% and Firefox 10% of one core. Battery was 29.5 °C and CPU around 38 °C; the phone was plugged in, so discharge rate was not measured.\n"
}
},
{
@@ -1326,6 +1346,13 @@
"url": "https://nnsprod.com/git/oversu/VulpesOS/releases/tag/v2.7-preview.25",
"include_entry": true,
"summary": "# Vulpes OS — 2.7-preview.25 · Desktop / Android / Pixel 3a\n\n🇫🇷 **Mise à jour depuis la P24 corrigée : vos données sont conservées.** APK Android, archive Desktop Linux x86_64 et image Sargo disponibles. Pour une première installation, la procédure complète efface le téléphone.\n\n🇬🇧 **Updating from corrected P24 keeps your data.** Includes the Android APK, Linux x86_64 desktop archive and Sargo image. A full first installation erases the phone."
+ },
+ "v2.7-preview.26": {
+ "version": "2.7-preview.26",
+ "after": "2.7-preview.25",
+ "url": "https://nnsprod.com/git/oversu/VulpesOS/releases/tag/v2.7-preview.26",
+ "include_entry": false,
+ "summary": "# Vulpes OS · Preview 26\n\n## Gecko 161.0 · Tundra 0.2.0\n\n🇫🇷 Le bureau Linux et le Pixel 3a passent de Gecko 156.0.1 à **161.0**. Sur le Pixel, **Tundra 0.2.0** réduit les réveils en veille. Le gain d’autonomie reste à mesurer. La barre Accueil prend les couleurs de l’application et disparaît pendant les animations de démarrage et d’arrêt. L’APK Android passe lui aussi à **GeckoView 161.0**. Les trois éditions partagent **Gaia 2.7.0**.\n\nSur un Pixel déjà sous P25, préparer le moteur ARM64 avant de mettre à jour le démarrage conserve les données. Une première installation complète **efface le téléphone**. Les deux procédures figurent dans l’archive Sargo.\n\n🇬🇧 The Linux desktop and Pixel 3a move from Gecko 156.0.1 to **161.0**. On the Pixel, **Tundra 0.2.0** reduces wakeups in standby. Battery-life gains still need measuring. The Home bar follows the active app’s colours and stays hidden during startup and shutdown. The Android APK also moves to **GeckoView 161.0**. All three editions share **Gaia 2.7.0**.\n\nOn a Pixel running P25, staging the ARM64 engine before updating the boot partition preserves data. A full first installation **erases the phone**. Both procedures are included in the Sargo archive."
}
}
}
diff --git a/engine-lock.json b/engine-lock.json
index a1d01f83..7900761c 100644
--- a/engine-lock.json
+++ b/engine-lock.json
@@ -1,15 +1,13 @@
{
- "version": "156.0.1",
- "runtime": "engines/156.0.1/firefox",
- "archive": "https://archive.mozilla.org/pub/firefox/releases/156.0.1/linux-x86_64/en-US/firefox-156.0.1.tar.xz",
- "sha512": "7f5894d1c97a7b9be73abd5c6b25c76eaba4a154b3bbb46b59f1f05ce80790a514772c72d30b8924d6d6b95dcebc12c188b2fc47de74fc050788dbfbdad56875",
- "checksumSource": "https://archive.mozilla.org/pub/firefox/releases/156.0.1/SHA512SUMS",
+ "version": "161.0",
+ "runtime": "engines/161.0/firefox",
+ "archive": "https://archive.mozilla.org/pub/firefox/releases/161.0/linux-x86_64/en-US/firefox-161.0.tar.xz",
+ "sha512": "4b83d5313082dbf9b9c16a961487ff3299d7da85a5b47a728cd88198aecb6341bd60eed4a7779c366fa2ff6e6017e0b10cad85d61701a8b6176bc616cd56dd6c",
+ "checksumSource": "https://archive.mozilla.org/pub/firefox/releases/161.0/SHA512SUMS",
"channel": "release",
- "sourceArchive": "https://archive.mozilla.org/pub/firefox/releases/156.0.1/source/firefox-156.0.1.source.tar.xz",
+ "sourceArchive": "https://archive.mozilla.org/pub/firefox/releases/161.0/source/firefox-161.0.source.tar.xz",
"localChanges": [
"distribution/policies.json: pin engine; no automatic update"
],
- "gaiaPorted": false,
- "gaiaBoots": true,
- "qualificationReport": "logs/updates/20260922T195851.271119Z/report.json"
+ "gaiaPorted": false
}
diff --git a/gaia/apps/camera/js/lib/camera/camera.js b/gaia/apps/camera/js/lib/camera/camera.js
index beecb33e..27085b69 100755
--- a/gaia/apps/camera/js/lib/camera/camera.js
+++ b/gaia/apps/camera/js/lib/camera/camera.js
@@ -657,6 +657,7 @@ Camera.prototype.release = function(done) {
debug('failed to release hardware');
self.ready();
self.releasing = false;
+ self.emit('released');
done(err);
}
};
diff --git a/gaia/apps/homescreen/js/apps.js b/gaia/apps/homescreen/js/apps.js
index df6d5666..742b11e4 100755
--- a/gaia/apps/homescreen/js/apps.js
+++ b/gaia/apps/homescreen/js/apps.js
@@ -633,7 +633,7 @@
Math.ceil(visibleChildren / cols)) / pageHeight) *
pageHeight) + (scrollHeight - pageHeight);
} else {
- gridHeight = (Math.ceil(visibleChildren / cols) + 1) * iconHeight;
+ gridHeight = Math.ceil(visibleChildren / cols) * iconHeight;
}
this.pageHeight = pageHeight;
diff --git a/gaia/apps/marketplace/icon.png b/gaia/apps/marketplace/icon.png
index 9880f58a..c8cacf42 100644
Binary files a/gaia/apps/marketplace/icon.png and b/gaia/apps/marketplace/icon.png differ
diff --git a/gaia/apps/marketplace/manifest.webapp b/gaia/apps/marketplace/manifest.webapp
index 8cded036..68318933 100644
--- a/gaia/apps/marketplace/manifest.webapp
+++ b/gaia/apps/marketplace/manifest.webapp
@@ -4,7 +4,7 @@
"launch_path": "/index.html",
"type": "certified",
"icons": {
- "512": "/icon.png"
+ "128": "/icon.png"
},
"permissions": {
"browser": {},
diff --git a/gaia/apps/settings/elements/about_your_privacy.html b/gaia/apps/settings/elements/about_your_privacy.html
index a0c8ce2e..64aa1871 100755
--- a/gaia/apps/settings/elements/about_your_privacy.html
+++ b/gaia/apps/settings/elements/about_your_privacy.html
@@ -7,17 +7,20 @@
Some open source licenses which cover code used in Boot2Gecko require
-that the code be made available to users. This document explains how to obtain
-that source code. It should be updated or replaced on any shipping device
-with a document appropriate to the code used to build that device. If you
-see this message on a shipping device you should remind the manufacturer of
-their obligations under the open source licenses.
-
-
-
-Instructions for downloading and compiling the open source code for copies
-of Boot2Gecko made available by Mozilla can be found on the
-Mozilla Developer Network.
-
diff --git a/gaia/apps/settings/resources/open_source_license.html b/gaia/apps/settings/resources/open_source_license.html
index ab63fbe7..bf94fd41 100755
--- a/gaia/apps/settings/resources/open_source_license.html
+++ b/gaia/apps/settings/resources/open_source_license.html
@@ -36,8 +36,8 @@
this product is available under one of the following licenses. These licenses
give you the freedom to run the software, study it, change it to meet your
needs, and share your changes with others. You can
-download the source code
-from Mozilla. Please consult the source to see which license applies to which
+download the source code
+from the Vulpes OS repository. Please consult the source to see which license applies to which
parts of the code.
diff --git a/gaia/apps/system/js/app_chrome.js b/gaia/apps/system/js/app_chrome.js
index 5f54e803..32e98674 100755
--- a/gaia/apps/system/js/app_chrome.js
+++ b/gaia/apps/system/js/app_chrome.js
@@ -300,6 +300,10 @@
this.handleError(evt);
break;
+ case '_iconchange':
+ this.setSiteIcon();
+ break;
+
case '_locationchange':
this.hidePinDialogCard();
this.handleLocationChange();
@@ -730,6 +734,7 @@
this.app.element.addEventListener('mozbrowsermetachange', this);
this.app.element.addEventListener('mozbrowserscrollareachanged', this);
this.app.element.addEventListener('_locationchange', this);
+ this.app.element.addEventListener('_iconchange', this);
this.app.element.addEventListener('_namechanged', this);
this.app.element.addEventListener('_securitychange', this);
this.app.element.addEventListener('_loading', this);
@@ -789,6 +794,7 @@
this.app.element.removeEventListener('mozbrowsererror', this);
this.app.element.removeEventListener('mozbrowsermetachange', this);
this.app.element.removeEventListener('_locationchange', this);
+ this.app.element.removeEventListener('_iconchange', this);
this.app.element.removeEventListener('_namechanged', this);
this.app.element.removeEventListener('_loading', this);
this.app.element.removeEventListener('_loaded', this);
@@ -1276,8 +1282,19 @@
return;
}
+ const generation = this.iconGeneration = (this.iconGeneration || 0) + 1;
+ const favicon = Object.keys(this.app.favicons || {}).find(href => {
+ try { return new URL(href).origin === new URL(this.app.config.url).origin; }
+ catch (_) { return false; }
+ });
+ if (favicon) {
+ this.siteIcon.style.backgroundImage = 'url(' + JSON.stringify(favicon) + ')';
+ this._currentIconUrl = favicon;
+ return;
+ }
this.app.getSiteIconUrl(ICON_SIZE)
.then(iconObject => {
+ if (generation !== this.iconGeneration) return;
// We compare the original icon URL, otherwise there is a flickering
// effect because a different object url is created each time.
if (this._currentIconUrl !== iconObject.originalUrl) {
@@ -1286,6 +1303,7 @@
}
})
.catch((err) => {
+ if (generation !== this.iconGeneration) return;
this.siteIcon.style.backgroundImage = '';
this.app.debug('setSiteIcon, error from getSiteIcon: %s', err);
});
diff --git a/gaia/apps/system/js/wifi_icon.js b/gaia/apps/system/js/wifi_icon.js
index a152249c..58cc96da 100755
--- a/gaia/apps/system/js/wifi_icon.js
+++ b/gaia/apps/system/js/wifi_icon.js
@@ -31,12 +31,10 @@
break;
case 'connected':
- if (!this.manager.wifiManager.connectionInformation) {
- return;
- }
- var level = Math.min(Math.floor(
- this.manager.wifiManager
- .connectionInformation.relSignalStrength / 20), 4);
+ var info = this.manager.wifiManager.connectionInformation;
+ var strength = info && info.relSignalStrength;
+ var level = Number.isFinite(strength) ?
+ Math.max(0, Math.min(4, Math.floor(strength / 20))) : 0;
this.show();
if (icon.dataset.connecting) {
delete icon.dataset.connecting;
@@ -54,7 +52,7 @@
WifiIcon.prototype.view = function view() {
return `
`;
};
diff --git a/gaia/apps/system/js/wrapper_factory.js b/gaia/apps/system/js/wrapper_factory.js
index a7056777..6ea27179 100755
--- a/gaia/apps/system/js/wrapper_factory.js
+++ b/gaia/apps/system/js/wrapper_factory.js
@@ -117,9 +117,9 @@
var isManuallyRegular = activeApp && activeApp.url &&
activeApp.url.includes('private=0');
if (activeApp && (activeApp.isBrowser() || activeApp.isSearch())) {
- activeApp.isPrivate = activeApp.hasOwnProperty('isPrivate') ?
- activeApp.isPrivate :
- (Browser.privateByDefault && !isManuallyRegular);
+ activeApp.isPrivate = activeApp.isPrivateBrowser() ||
+ (activeApp.hasOwnProperty('isPrivate') ? activeApp.isPrivate :
+ (Browser.privateByDefault && !isManuallyRegular));
activeApp.navigate(url);
return;
}
diff --git a/gaia/apps/system/lockscreen/js/lockscreen.js b/gaia/apps/system/lockscreen/js/lockscreen.js
index a86533e7..d6a0df15 100755
--- a/gaia/apps/system/lockscreen/js/lockscreen.js
+++ b/gaia/apps/system/lockscreen/js/lockscreen.js
@@ -205,7 +205,8 @@
break;
case 'holdhome':
- if (!this.locked) {
+ // The window manager also handles unlocks initiated outside this panel.
+ if (!(Service.query('locked') ?? this.locked)) {
return;
}
diff --git a/gaia/apps/wallpaper/resources/list.json b/gaia/apps/wallpaper/resources/list.json
index 0de19787..1f783f31 100755
--- a/gaia/apps/wallpaper/resources/list.json
+++ b/gaia/apps/wallpaper/resources/list.json
@@ -1,6 +1,5 @@
[
"Illus_Flow2_Blue.jpg",
- "Illus_Flow2_Orange@2.25x.jpg",
"FX_Bolt.jpg",
"FX_Leap.jpg",
"FX_Rearing.jpg",
@@ -42,6 +41,5 @@
"PH_Tree.jpg",
"PH_TreeForest.jpg",
"PH_Wheat.jpg",
- "PH_WhiteFlower.jpg",
- "Vulpes_Blue.png"
+ "PH_WhiteFlower.jpg"
]
diff --git a/host/Alarms.sys.mjs b/host/Alarms.sys.mjs
index 5a2d2dfa..8085a594 100644
--- a/host/Alarms.sys.mjs
+++ b/host/Alarms.sys.mjs
@@ -1,8 +1,10 @@
// Local alarms survive host restarts. They cannot wake a powered-off PC.
export class Alarms {
- constructor(identity, launch, storage, schedule) {
+ constructor(identity, launch, storage, schedule, cancelTimer) {
this.storage = storage;
this.schedule = schedule;
+ this.cancelTimer = cancelTimer;
+ this.timer = null;
this.identity = identity;
this.launch = launch;
this.listeners = new Map();
@@ -11,15 +13,25 @@ export class Alarms {
}
async init() {
this.state = (await this.storage.load()) || { nextId: 1, records: [], pending: [] };
- this.timer = this.schedule(() => this.serial(() => this.tick()).catch(console.error), 1000);
+ this.updateTimer();
+ }
+ updateTimer() {
+ if (this.state.records.length || this.state.pending.length || this.pendingDeliverySave) {
+ if (this.timer === null) this.timer = this.schedule(() => this.serial(() => this.tick()).catch(console.error), 1000);
+ } else if (this.timer !== null) {
+ this.cancelTimer?.(this.timer);
+ this.timer = null;
+ }
}
serial(fn) {
const p = this.queue.then(fn);
this.queue = p.catch(() => {});
return p;
}
- save() {
- return this.storage.save(this.state);
+ async commit(next) {
+ await this.storage.save(next);
+ this.state = next;
+ this.updateTimer();
}
cleanup(actor) {
this.listeners.delete(actor);
@@ -42,11 +54,11 @@ export class Alarms {
}));
if (operation === 'add') {
if (
- !Number.isFinite(date) ||
+ !Number.isFinite(+new Date(date)) || !Number.isFinite(date) ||
!['honorTimezone', 'ignoreTimezone'].includes(respectTimezone) ||
!Array.isArray(local) ||
local.length !== 7 ||
- !local.every(Number.isFinite)
+ !local.every(Number.isInteger) || !Number.isFinite(+new Date(...local))
)
throw new Error('InvalidStateError');
if (this.state.records.filter((r) => r.owner === app.id).length >= 256)
@@ -55,19 +67,18 @@ export class Alarms {
if (encodedData.length > 65536) throw new Error('QuotaExceededError');
const record = {
owner: app.id,
- id: this.state.nextId++,
+ id: this.state.nextId,
date,
respectTimezone,
data: JSON.parse(encodedData),
local,
};
- this.state.records.push(record);
- await this.save();
+ await this.commit({...this.state, nextId: record.id + 1, records: [...this.state.records, record]});
return record.id;
}
if (operation === 'remove') {
- this.state.records = this.state.records.filter((r) => r.owner !== app.id || r.id !== id);
- await this.save();
+ const keep = r => r.owner !== app.id || r.id !== id;
+ await this.commit({...this.state, records: this.state.records.filter(keep), pending: this.state.pending.filter(keep)});
return null;
}
if (operation === 'subscribe') {
@@ -92,9 +103,10 @@ export class Alarms {
async tick() {
const ready = this.state.records.filter((r) => this.due(r) <= Date.now());
if (ready.length) {
- this.state.records = this.state.records.filter((r) => !ready.includes(r));
- this.state.pending.push(...ready.map((r) => ({ ...r, date: this.due(r) })));
- await this.save();
+ await this.commit({...this.state,
+ records: this.state.records.filter(r => !ready.includes(r)),
+ pending: this.state.pending.concat(ready.map(r => ({...r, date: this.due(r)}))),
+ });
}
let changed = false;
for (const record of [...this.state.pending]) {
@@ -112,11 +124,19 @@ export class Alarms {
} catch (_) {
this.listeners.delete(receiver[0]);
}
- } else if (Date.now() - (this.lastLaunch.get(record.owner) || 0) > 5000) {
- this.lastLaunch.set(record.owner, Date.now());
+ } else {
+ const now = Date.now();
+ const previous = this.lastLaunch.get(record.owner);
+ if (now >= previous && now - previous <= 5000) continue;
+ this.lastLaunch.set(record.owner, now);
this.launch(record.owner);
}
}
- if (changed) await this.save();
+ if (changed) this.pendingDeliverySave = true;
+ if (this.pendingDeliverySave) {
+ await this.storage.save(this.state);
+ this.pendingDeliverySave = false;
+ this.updateTimer();
+ }
}
}
diff --git a/host/NativeCamera.sys.mjs b/host/NativeCamera.sys.mjs
index c93d3e3b..bb17ba51 100644
--- a/host/NativeCamera.sys.mjs
+++ b/host/NativeCamera.sys.mjs
@@ -74,7 +74,7 @@ export class NativeCamera {
}
if (!this.session || this.session.actor !== actor || this.session.id !== params.session)
throw Error('CAMERA_NOT_OPEN');
- if (!['frame','focus','zoom','picture','flash'].includes(params.action)) throw Error('CAMERA_INVALID_COMMAND');
+ if (!['frame','focus','focusMode','zoom','picture','flash'].includes(params.action)) throw Error('CAMERA_INVALID_COMMAND');
let controlRejected = false;
try {
if (params.action === 'frame') {
diff --git a/host/Platform.sys.mjs b/host/Platform.sys.mjs
index 96d0e867..5cce4e1b 100644
--- a/host/Platform.sys.mjs
+++ b/host/Platform.sys.mjs
@@ -230,6 +230,10 @@ export class Platform {
if (operation === 'power') return tundraHardware({operation:'power', action:params.action});
if (operation === 'wifi') return tundraWifi(params);
if (operation === 'deviceSettings') return tundraRadio('deviceSettings', params);
+ if (operation === 'carrierName') {
+ const network = await tundraRadio('mobileSettings', {action:'network'});
+ return ['registered', 'roaming'].includes(network.status) ? network.operator || '' : '';
+ }
if (operation === 'mobileSettings') return tundraRadio('mobileSettings', params);
if (operation === 'bluetooth') return tundraBluetooth(params);
if (['callHistory','ackCallHistory'].includes(operation)) return this.radio(operation, params);
@@ -259,7 +263,7 @@ export class Platform {
if (operation === 'snapshot') return tundraSnapshot();
if (operation === 'capabilities') return {
platform:'tundra', platformName:'Tundra', model:'Nokia 2720 Flip',
- adapter:{version:'0.1.0-dev',device:'beatles'}, tundra:'0.1.0-dev',
+ adapter:{version:this.runtime.release.adapters.beatles,device:'beatles'}, tundra:this.runtime.release.tundra,
version:this.runtime.release.version, gaia:this.runtime.release.gaia,
gecko:Services.appinfo.platformVersion, hardwareStatus:true,
radioStatus:true, wifiControl:Services.env.get('VULPES_TUNDRA_WIFI') === '1', camera:Services.env.get('VULPES_TUNDRA_CAMERA') === '1', media:true, contacts:true,
diff --git a/host/Runtime.sys.mjs b/host/Runtime.sys.mjs
index 95fcf406..4474fd62 100644
--- a/host/Runtime.sys.mjs
+++ b/host/Runtime.sys.mjs
@@ -1,5 +1,5 @@
import {mmsPayload} from 'resource://vulpes/services/mms.mjs';
-import { setInterval, setTimeout, clearTimeout } from 'resource://gre/modules/Timer.sys.mjs';
+import { setInterval, clearInterval, setTimeout, clearTimeout } from 'resource://gre/modules/Timer.sys.mjs';
import {Input} from 'resource://vulpes/host/Input.sys.mjs';
import { ScreenPower } from 'resource://vulpes/services/screen-power.mjs';
import { Packages } from 'resource://vulpes/services/packages.mjs';
@@ -237,7 +237,7 @@ export const Runtime = {
load: async () => ((await IOUtils.exists(alarmPath)) ? IOUtils.readJSON(alarmPath) : null),
save: (state) => IOUtils.writeJSON(alarmPath, state, { tmpPath: alarmPath + '.tmp' }),
},
- setInterval,
+ setInterval, clearInterval,
);
await this.alarms.init();
this.dataStores = new DataStoreService(this.apps, storage, (data) =>
@@ -415,9 +415,11 @@ export const Runtime = {
return { error: { code: 'INVALID_URL' } };
}
if (!['http', 'https'].includes(uri.scheme)) return { error: { code: 'URL_SCHEME_DENIED' } };
+ const data = { type: 'url', url: uri.spec };
+ if (typeof params.data.isPrivate === 'boolean') data.isPrivate = params.data.isPrivate;
this.broadcast(
'activity-view',
- { source: { name: 'view', data: { type: 'url', url: uri.spec } } },
+ { source: { name: 'view', data } },
'system',
);
return { result: null };
@@ -512,7 +514,7 @@ export const Runtime = {
if (app.id !== 'system' || typeof params?.home !== 'boolean')
return { error: { code: 'PERMISSION_DENIED' } };
actor.browsingContext.top.embedderElement.ownerDocument.defaultView.setHomeSurface(
- params.home,
+ params.home, params.powerSplash === true, params.trayOverHome === true, params.recents === true, params.dark === true, typeof params.appId === 'string' ? params.appId : '', params.lockscreen === true, params.bootSplash === true,
);
return { result: null };
}
diff --git a/host/Tundra.sys.mjs b/host/Tundra.sys.mjs
index 1245a467..96e409c4 100644
--- a/host/Tundra.sys.mjs
+++ b/host/Tundra.sys.mjs
@@ -43,8 +43,8 @@ export function tundraCapabilities(release) {
platform: 'tundra',
platformName: 'Tundra',
model: 'Google Pixel 3a',
- tundra: '0.1.0-dev',
- adapter: { version: '0.1.0-dev', device: 'sargo' },
+ tundra: release.tundra,
+ adapter: { version: release.adapters.sargo, device: 'sargo' },
version: release.version,
gaia: release.gaia,
gecko: Services.appinfo.platformVersion,
@@ -102,6 +102,7 @@ export async function tundraRadio(operation, params = {}) {
let wifiScanPending = null;
let wifiScanCache = null;
+let wifiGeneration = 0;
const WIFI_SCAN_CACHE_MS = 5000;
export async function tundraWifi(params) {
@@ -110,7 +111,11 @@ export async function tundraWifi(params) {
throw Error('WIFI_INVALID_REQUEST');
if (params.operation !== 'scan') {
try { return await wifiCommand(params); }
- finally { if (['connect','connectHidden','disconnect','forget','setEnabled','hotspotPower'].includes(params.operation)) wifiScanCache = null; }
+ finally { if (['connect','connectHidden','disconnect','forget','setEnabled','hotspotPower'].includes(params.operation)) {
+ wifiGeneration++;
+ wifiScanPending = null;
+ wifiScanCache = null;
+ } }
}
// System and Settings share a broker: at most one Python scan client exists.
if (wifiScanPending) return wifiScanPending;
@@ -118,14 +123,15 @@ export async function tundraWifi(params) {
if (wifiScanCache.error) throw wifiScanCache.error;
return wifiScanCache.result;
}
+ const generation = wifiGeneration;
wifiScanPending = wifiCommand(params).then(result => {
- wifiScanCache = {result, expires:Date.now() + WIFI_SCAN_CACHE_MS};
+ if (generation === wifiGeneration) wifiScanCache = {result, expires:Date.now() + WIFI_SCAN_CACHE_MS};
return result;
}, error => {
// A missing interface must not turn retries into another process storm.
- wifiScanCache = {error, expires:Date.now() + WIFI_SCAN_CACHE_MS};
+ if (generation === wifiGeneration) wifiScanCache = {error, expires:Date.now() + WIFI_SCAN_CACHE_MS};
throw error;
- }).finally(() => { wifiScanPending = null; });
+ }).finally(() => { if (generation === wifiGeneration) wifiScanPending = null; });
return wifiScanPending;
}
diff --git a/host/VCard.sys.mjs b/host/VCard.sys.mjs
index fd5a8795..506e7eab 100644
--- a/host/VCard.sys.mjs
+++ b/host/VCard.sys.mjs
@@ -3,6 +3,19 @@ function unescapeText(value) {
return value.replace(/\\([nN,;\\])/g, (_, char) => /n/i.test(char) ? '\n' : char);
}
+// Split before decoding: escaped commas and semicolons belong to the field.
+function components(value, separator) {
+ const result = [''];
+ for (let i = 0; i < value.length; i++) {
+ if (value[i] === separator) result.push('');
+ else {
+ result[result.length - 1] += value[i];
+ if (value[i] === '\\' && i + 1 < value.length) result[result.length - 1] += value[++i];
+ }
+ }
+ return result;
+}
+
export function readVCards(raw) {
const cards = [];
let card;
@@ -17,10 +30,11 @@ export function readVCards(raw) {
if (!card) throw Error('INVALID_VCARD');
if (/^END:VCARD$/i.test(line)) {
if (!card.name.length) {
- const name = [...(card.givenName || []), ...(card.familyName || [])].join(' ');
+ const name = ['honorificPrefix','givenName','additionalName','familyName','honorificSuffix']
+ .flatMap(key => card[key] || []).join(' ');
if (name) card.name.push(name);
}
- if (!card.name.length && !card.tel.length && !card.email.length) throw Error('INVALID_VCARD');
+ if (!card.name.length && !card.tel.length && !card.email.length && !card.org?.length && !card.adr?.length && !card.url?.length && !card.nickname?.length) throw Error('INVALID_VCARD');
cards.push(card);
card = null;
continue;
@@ -32,17 +46,39 @@ export function readVCards(raw) {
const value = unescapeText(field[2]);
if (key === 'FN') card.name = [value];
if (key === 'N') {
- const [, family, given] = /^((?:\\.|[^;\\])*)(?:;((?:\\.|[^;\\])*))?/.exec(field[2]);
- if (family) card.familyName = [unescapeText(family)];
- if (given) card.givenName = [unescapeText(given)];
+ const fields = ['familyName','givenName','additionalName','honorificPrefix','honorificSuffix'];
+ components(field[2], ';').slice(0, fields.length).forEach((part, i) => {
+ if (part) card[fields[i]] = components(part, ',').map(unescapeText);
+ });
}
- if (key === 'TEL' || key === 'EMAIL') {
+ if (key === 'NICKNAME' || key === 'CATEGORIES') {
+ const name = key === 'NICKNAME' ? 'nickname' : 'category';
+ (card[name] ||= []).push(...components(field[2], ',').map(unescapeText));
+ }
+ if (key === 'ORG' || key === 'NOTE' || key === 'TITLE') {
+ const name = {ORG:'org', NOTE:'note', TITLE:'jobTitle'}[key];
+ (card[name] ||= []).push(key === 'ORG' ? components(field[2], ';').map(unescapeText).join(' / ') : value);
+ }
+ if (['TEL','EMAIL','URL','ADR'].includes(key)) {
const types = params.flatMap(param => {
if (param.includes('=') && !/^TYPE=/i.test(param)) return [];
return param.replace(/^TYPE=/i, '').replace(/"/g, '').toLowerCase().split(',');
}).filter(Boolean).map(type => type === 'cell' ? 'mobile' : type);
- const clean = key === 'TEL' ? value.replace(/^tel:/i, '') : value.replace(/^mailto:/i, '');
- if (clean) card[key.toLowerCase()].push({value: clean, type: types.length ? types : ['other']});
+ const preferred = types.includes('pref') || params.some(param => /^PREF=1$/i.test(param));
+ const labels = types.filter(type => type !== 'pref');
+ const entry = {type: labels.length ? labels : ['other']};
+ if (preferred) entry.pref = true;
+ if (key === 'ADR') {
+ const [box, extended, street, locality, region, postalCode, countryName] =
+ components(field[2], ';').map(unescapeText);
+ Object.assign(entry, {streetAddress:[box, extended, street].filter(Boolean).join('\n'),
+ locality, region, postalCode, countryName});
+ } else {
+ entry.value = key === 'TEL' ? value.replace(/^tel:/i, '') :
+ key === 'EMAIL' ? value.replace(/^mailto:/i, '') : value;
+ if (!entry.value) continue;
+ }
+ (card[key.toLowerCase()] ||= []).push(entry);
}
}
if (card || !cards.length) throw Error('INVALID_VCARD');
diff --git a/host/Views.sys.mjs b/host/Views.sys.mjs
index 9bbacbef..839c191e 100644
--- a/host/Views.sys.mjs
+++ b/host/Views.sys.mjs
@@ -9,12 +9,9 @@ export const Views = {
uri?.filePath !== '/index.html') {
throw new Error('SCREENSHOT_NOT_AVAILABLE');
}
- const image = await context.currentWindowGlobal.drawSnapshot(null, 1, 'white');
const doc = context.top.embedderElement?.ownerDocument;
- if (!doc) {
- image.close();
- throw new Error('SCREENSHOT_NOT_AVAILABLE');
- }
+ if (!doc?.defaultView) throw new Error('SCREENSHOT_NOT_AVAILABLE');
+ const image = await context.currentWindowGlobal.drawSnapshot(null, doc.defaultView.devicePixelRatio, 'white');
const canvas = doc.createElementNS('http://www.w3.org/1999/xhtml', 'canvas');
canvas.width = image.width;
canvas.height = image.height;
@@ -211,6 +208,15 @@ export const Views = {
if (flags & Ci.nsIWebProgressListener.STATE_STOP) {
emit('loadend', { backgroundColor: 'rgb(255, 255, 255)' });
emit('titlechange', browser.contentTitle || browser.currentURI.spec);
+ const page = browser.browsingContext?.currentWindowGlobal;
+ if (page && ['https', 'http'].includes(browser.currentURI.scheme)) {
+ page.getActor('WebInput').sendQuery('Vulpes:PageIcon').then(icon => {
+ if (!icon || browser.browsingContext?.currentWindowGlobal !== page) return;
+ const href = new URL(icon.href);
+ if (href.origin === new URL(browser.currentURI.spec).origin)
+ emit('iconchange', {href:href.href, sizes:String(icon.sizes || '')});
+ }).catch(() => {});
+ }
// Replacing a navigation cancels the previous request normally.
if (!Components.isSuccessCode(status) && status !== Cr.NS_BINDING_ABORTED)
emit('error', { type: 'other', status });
diff --git a/host/actors/VulpesChild.sys.mjs b/host/actors/VulpesChild.sys.mjs
index dc1d2235..2737abb4 100644
--- a/host/actors/VulpesChild.sys.mjs
+++ b/host/actors/VulpesChild.sys.mjs
@@ -46,7 +46,20 @@ export class VulpesChild extends JSWindowActorChild {
const params = Cu.cloneInto(data, {});
params.contextId = native.browsingContext.id;
if (params.operation === 'geometry') {
- const rect = native.getBoundingClientRect();
+ const bounds = native.getBoundingClientRect();
+ const left = Math.max(0, bounds.left);
+ let top = Math.max(0, bounds.top);
+ if (this.document.location.hostname === 'system.localhost') {
+ const bar = this.document.getElementById('statusbar');
+ if (bar?.checkVisibility({checkOpacity:true, checkVisibilityCSS:true})) {
+ const header = bar.getBoundingClientRect();
+ if (header.top <= top && header.width > 0) top = Math.max(top, header.bottom);
+ }
+ }
+ // Gaia's collapsing toolbar can scroll the iframe above the viewport.
+ // Hit-test and position the native view within the same visible rectangle.
+ const rect = {left, top, width: Math.min(win.innerWidth, bounds.right) - left,
+ height: Math.min(win.innerHeight, bounds.bottom) - top};
const unobscured = frameUnobscured(this.document, native, rect);
params.geometry = {
left: rect.left + win.mozInnerScreenX,
diff --git a/host/actors/WebInputChild.sys.mjs b/host/actors/WebInputChild.sys.mjs
index 992c65e4..dd4648be 100644
--- a/host/actors/WebInputChild.sys.mjs
+++ b/host/actors/WebInputChild.sys.mjs
@@ -31,7 +31,7 @@ export class WebInputChild extends JSWindowActorChild {
const editable = element?.isContentEditable || element?.localName === 'textarea' ||
(element?.localName === 'input' && ['text','search','email','url','tel','password','number'].includes(element.type));
if (!editable || element.disabled || element.readOnly) {
- if (event.type === 'click') this.sendAsyncMessage('Vulpes:InputFocus', null);
+ if (event.type === 'click' && event.isTrusted) this.sendAsyncMessage('Vulpes:WebDismissInput', null);
return;
}
this.editor ||= new InputEditor(this.contentWindow);
@@ -39,6 +39,25 @@ export class WebInputChild extends JSWindowActorChild {
this.sendAsyncMessage('Vulpes:InputFocus', this.editor.state());
}
receiveMessage(message) {
+ if (message.name === 'Vulpes:PageIcon') {
+ const doc = this.document;
+ const origin = doc.location.origin;
+ const candidates = [...doc.querySelectorAll('link[rel~="icon" i][href]')]
+ .map(link => ({href:link.href, sizes:link.getAttribute('sizes') || ''}));
+ candidates.push({href:origin + '/favicon.ico', sizes:''});
+ return (async () => {
+ for (const candidate of candidates.slice(0, 12)) {
+ let url;
+ try { url = new URL(candidate.href); } catch { continue; }
+ if (url.origin !== origin || !['https:', 'http:'].includes(url.protocol)) continue;
+ const image = doc.createElement('img');
+ image.src = url.href;
+ try { await image.decode(); } catch { continue; }
+ if (image.naturalWidth) return {href:url.href, sizes:candidate.sizes};
+ }
+ return null;
+ })();
+ }
if (message.name !== 'Vulpes:Edit' || !this.editor) throw Error('INPUT_CONTEXT_EXPIRED');
return this.editor.edit(message.data);
}
diff --git a/host/actors/WebInputParent.sys.mjs b/host/actors/WebInputParent.sys.mjs
index b92cbedf..932646a1 100644
--- a/host/actors/WebInputParent.sys.mjs
+++ b/host/actors/WebInputParent.sys.mjs
@@ -14,6 +14,16 @@ export class WebInputParent extends JSWindowActorParent {
}
return;
}
+ if (message.name === 'Vulpes:WebDismissInput') {
+ if (!Runtime.identity(this) && Runtime.inputIdentity(this) && Runtime.input.focus) {
+ const owner = Runtime.input.focus.actor;
+ if (owner.browsingContext.top === this.browsingContext.top ||
+ (Runtime.identity(owner)?.id === 'system' &&
+ owner.browsingContext.top.embedderElement.ownerDocument ===
+ this.browsingContext.top.embedderElement.ownerDocument)) Runtime.input.hide();
+ }
+ return;
+ }
if (message.name !== 'Vulpes:InputFocus') throw Error('METHOD_NOT_SUPPORTED');
if (Runtime.identity(this)) return; // Bundled apps already use VulpesChild.
Runtime.input.changed(this, message.data);
diff --git a/host/desktop.css b/host/desktop.css
index 9cf6c725..e5d00f80 100644
--- a/host/desktop.css
+++ b/host/desktop.css
@@ -256,3 +256,9 @@ html[data-vulpes-app] .vulpes-select-label {
}
html[dir=rtl][data-vulpes-app] .vulpes-select-label { inset: 0 1.1rem 0 3.5rem; }
html[data-vulpes-theme=dark] .vulpes-select-label { color: #eee; }
+
+html[data-vulpes-app="calendar"] #vulpes-value-selector [role="option"] > label {
+ position: static;
+ inset: auto;
+ height: auto;
+}
diff --git a/host/gaia-camera.js b/host/gaia-camera.js
index 0d84639d..b6f952a9 100644
--- a/host/gaia-camera.js
+++ b/host/gaia-camera.js
@@ -26,7 +26,7 @@
if (releases.has(stream)) return releases.get(stream);
if (current === stream) current = null;
const release = Promise.resolve().then(async () => {
- await stream.vulpesFinishRecording?.();
+ try { await stream.vulpesFinishRecording?.(); } catch (error) { recordError(error); }
emit(stream, 'previewstatechange', {newState:'stopped'});
// Stop the capture producer before detaching its consumers. Gecko can
// otherwise block in srcObject=null while a GPU-backed frame is in use.
@@ -465,7 +465,7 @@
thumbnailSizes: [],
recorderProfiles: videoMime ? {webm:profile} : {},
flashModes: native?.flashModes?.length ? native.flashModes : ['off'],
- focusModes: native ? (native.focusModes.includes('auto') ? ['auto','infinity'] : ['fixed']) : ['fixed'],
+ focusModes: native?.focusModes?.length ? native.focusModes : ['fixed'],
sceneModes: ['auto'],
whiteBalanceModes: ['auto'],
isoModes: ['auto'],
@@ -671,6 +671,20 @@
const done=recording.done;stream.stopRecording();await done;
},
});
+ if (native?.focusModes?.some(value => value.startsWith('continuous-'))) {
+ let focusMode = null;
+ Object.defineProperty(stream, 'focusMode', {
+ configurable: true, get: () => focusMode,
+ set(value) {
+ if (value === focusMode || !native.focusModes.includes(value) || value === 'fixed') return;
+ focusMode = value;
+ stream.vulpesCameraControl({action:'focusMode',mode:value}).catch(error => {
+ if (focusMode === value) focusMode = null;
+ recordError(error);
+ });
+ }
+ });
+ }
if (native) Object.defineProperty(stream,'flashMode',{
configurable:true, get:()=>flashMode,
set(value) {
diff --git a/host/gaia-compat.js b/host/gaia-compat.js
index a979edeb..eb436b78 100644
--- a/host/gaia-compat.js
+++ b/host/gaia-compat.js
@@ -275,9 +275,9 @@
}
if (type === 'screen-on') window.ScreenManager?.turnScreenOn(true);
if (type === 'home' || type === 'holdhome') {
- if (window.VulpesPlatform === 'tundra' && type === 'home') {
+ if (window.VulpesPlatform === 'tundra' && window.ScreenManager?.screenEnabled) {
call('settings.get', {key:'vibration.enabled'}).then(setting => {
- if (setting.value !== false) navigator.vibrate(30);
+ if (setting.value !== false) navigator.vibrate(type === 'holdhome' ? [30, 60, 30] : 30);
}).catch(console.error);
}
call('activities.cancel', {}).catch(console.error);
diff --git a/host/gaia-restoration.js b/host/gaia-restoration.js
index 8a79f719..43f06e11 100644
--- a/host/gaia-restoration.js
+++ b/host/gaia-restoration.js
@@ -54,6 +54,30 @@
});
}
if (app === 'system') {
+ if (window.VulpesPlatform === 'tundra' && window.VulpesNativeTelephony &&
+ !window.VulpesNativeRadioStatus && !navigator.mozMobileConnections) {
+ let revision = 0;
+ const refreshCarrier = async () => {
+ const element = document.getElementById('lockscreen-conn-states');
+ const current = ++revision;
+ if (!element) return;
+ const key = 'ril.radio.disabled';
+ const request = navigator.mozSettings.createLock().get(key);
+ request.onsuccess = async () => {
+ if (current !== revision) return;
+ const line = document.createElement('span');
+ if (request.result[key]) navigator.mozL10n.setAttributes(line, 'airplaneMode');
+ else line.textContent = await VulpesCompat.call('platform.carrierName', {}).catch(() => '');
+ if (current !== revision || !element.isConnected) return;
+ element.replaceChildren(line);
+ element.hidden = !request.result[key] && !line.textContent;
+ };
+ };
+ navigator.mozSettings.addObserver('ril.radio.disabled', refreshCarrier);
+ addEventListener('lockscreen-appopened', refreshCarrier);
+ addEventListener('screenchange', event => { if (event.detail.screenEnabled) refreshCarrier(); });
+ navigator.mozL10n.ready(refreshCarrier);
+ }
// Android reserves the edge swipe for its own shade. A tap on Gaia's
// status bar provides access without competing with that system gesture.
if (window.VulpesPlatform === 'android') {
diff --git a/host/gaia-theme.css b/host/gaia-theme.css
index 3bd220cd..996e58ea 100644
--- a/host/gaia-theme.css
+++ b/host/gaia-theme.css
@@ -329,3 +329,18 @@ html[data-vulpes-layout="compact"][data-vulpes-app="homescreen"] gaia-app-icon[d
background: #04060b; padding: 1rem; text-align: center; overflow-wrap: anywhere;
height: auto; font-size: 1.4rem; line-height: 1.5;
}
+
+#sleep-menu-container gaia-buttons {
+ display: flex;
+ justify-content: center;
+}
+#sleep-menu-container gaia-buttons > button {
+ margin-inline: auto;
+ text-align: center;
+}
+
+/* The scrolling panel already reserves the Home button inset. */
+html[data-vulpes-home-overlay][data-vulpes-layout="standard"][data-vulpes-app="homescreen"] body:not(.edit-mode) #apps {
+ overflow: visible;
+ padding-bottom: 0;
+}
diff --git a/host/gaia-wifi.js b/host/gaia-wifi.js
index 74ac7de8..4abf6f29 100644
--- a/host/gaia-wifi.js
+++ b/host/gaia-wifi.js
@@ -21,13 +21,19 @@
}
let pendingNetwork = null;
function update(network, status = network ? 'connected' : 'disconnected') {
- const changed = manager.connection.status !== status || manager.connection.network?.ssid !== network?.ssid;
+ const previous = manager.connection.network;
+ const info = manager.connectionInformation;
+ const changed = manager.connection.status !== status || previous?.ssid !== network?.ssid ||
+ previous?.vulpesId !== network?.vulpesId;
manager.connection = {status, network};
manager.connectionInformation = status === 'connected' && network ? {...connectionInfo,relSignalStrength:network.relSignalStrength} : null;
if (changed) emit('statuschange', manager.connection);
// Gaia's signal listeners require the associated network. A scan while
// disconnected must not announce connection information for a missing AP.
- if (manager.connectionInformation) emit('connectioninfoupdate', {network, ...manager.connectionInformation});
+ const current = manager.connectionInformation;
+ if (current && (changed || !info || Object.keys({...info, ...current}).some(k => info[k] !== current[k]))) {
+ emit('connectioninfoupdate', {network, ...current});
+ }
}
function applyState(state) {
power(state.enabled === true);
@@ -37,13 +43,14 @@
if (state.enabled && (state.state === 'connecting' || (pendingNetwork && state.state === 'disconnected'))) {
const target = state.network;
const network = target ? {ssid:target.ssid, security:securityTypes(target.security)} : pendingNetwork;
- if (network) update(network, 'connecting');
+ update(network, 'connecting');
return;
}
const network=state.state==='connected' && state.network;
update(network ? {
...networks.find(n => network.id ? n.vulpesId === network.id : n.connected && n.ssid === network.ssid),
ssid:network.ssid,
+ ...(network.id ? {vulpesId:network.id} : {}),
security:securityTypes(network.security),
relSignalStrength:network.signal,savedId:network.savedId,connected:true
} : null);
diff --git a/host/platform-ui.js b/host/platform-ui.js
index 832ab795..cb414062 100644
--- a/host/platform-ui.js
+++ b/host/platform-ui.js
@@ -231,20 +231,45 @@
schedule();
}
if (app === 'system') {
- let previous;
+ let bootComplete = false;
+ let returningHome = false;
+ let previous, previousSplash, previousTray, previousRecents, previousDark, previousApp, previousLockscreen, previousBoot;
const navigation = () => {
const active = document.querySelector('.appWindow.active');
- const home = !!active?.querySelector('iframe[src*="homescreen.localhost"]') &&
+ if (!bootComplete && active && !document.querySelector('#os-logo, #carrier-logo')) bootComplete = true;
+ const bootSplash = !bootComplete;
+ const powerMenu = !!document.querySelector('#sleep-menu.visible');
+ const home = !powerMenu && !!active?.querySelector('iframe[src*="homescreen.localhost"]') &&
!document.querySelector('#screen.locked, .attentionWindow.active');
- if (home === previous) return;
+ const lockscreen = !powerMenu && !!document.querySelector('#screen.locked, .lockScreenWindow.active') &&
+ !document.querySelector('.attentionWindow.active');
+ const powerSplash = !!document.getElementById('poweroff-splash');
+ const trayOverHome = home && !!document.querySelector('#screen.utility-tray, #screen.utility-tray-in-transition');
+ const frame = active?.querySelector('iframe');
+ const appId = powerMenu ? 'power-menu' : frame?.src.match(/^http:\/\/([a-z0-9-]+)\.localhost(?=[:/])/)?.[1] || '';
+ // Gaia clears cards-view at the start of the return animation.
+ if (document.querySelector('#task-manager.to-home')) returningHome = true;
+ else if (active || powerMenu || lockscreen || powerSplash) returningHome = false;
+ const recents = !powerMenu && !lockscreen && !powerSplash &&
+ (returningHome || !!document.querySelector('#screen.cards-view'));
+ const dark = document.documentElement.dataset.vulpesTheme === 'dark';
+ if (bootSplash === previousBoot && lockscreen === previousLockscreen && appId === previousApp && recents === previousRecents && dark === previousDark && home === previous && powerSplash === previousSplash && trayOverHome === previousTray) return;
+ previousBoot = bootSplash;
+ previousLockscreen = lockscreen;
+ previousApp = appId;
+ previousRecents = recents;
+ previousDark = dark;
+ previousTray = trayOverHome;
previous = home;
- call('desktop.navigation', { home }).catch(console.error);
+ previousSplash = powerSplash;
+ call('desktop.navigation', { home, powerSplash, trayOverHome, recents, dark, appId, lockscreen, bootSplash }).catch(console.error);
};
+ new MutationObserver(navigation).observe(document.documentElement, { attributes: true, attributeFilter: ['data-vulpes-theme'] });
new MutationObserver(navigation).observe(document.body, {
subtree: true,
childList: true,
attributes: true,
- attributeFilter: ['class'],
+ attributeFilter: ['class', 'src'],
});
navigation();
}
diff --git a/host/shell.css b/host/shell.css
index 215efb4d..8cb95774 100644
--- a/host/shell.css
+++ b/host/shell.css
@@ -1,6 +1,9 @@
-/* Navigation matches the Android preview; Gaia owns the application theme. */
-[keypad] #home { display: none; }
-#home {
+:root { background-color: #f4f4f4; }
+:root[dark-surface] { background-color: #18232e; }
+[boot-splash] #home-bar, [lock-surface] #home-bar, [tray-over-home] #home-bar, [keypad] #home-bar, [power-splash] #home-bar { display: none; }
+:root[boot-splash] { background-color: #071d35; }
+[awaiting-gaia] #system { opacity: 0; }
+#home-bar {
appearance: none;
box-sizing: border-box;
display: flex;
@@ -13,8 +16,8 @@
padding: 0;
border: 0;
border-radius: 0;
- background: #122332;
- color: white;
+ background: var(--nav-background, transparent);
+ color: var(--nav-ring, white);
touch-action: none;
user-select: none;
position: fixed;
@@ -22,20 +25,50 @@
left: 0;
z-index: 10;
}
-[home-active] #home {
+[home-active]:not([recents], [lock-surface]) #home-bar {
background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}
-[home-active][home-at-bottom] #home {
+[home-active][home-at-bottom]:not([recents]) #home-bar {
background: transparent;
}
+#home {
+ appearance: none;
+ border: 0;
+ background: transparent;
+ color: inherit;
+ width: 44px;
+ height: 44px;
+ padding: 0;
+ display: grid;
+ place-items: center;
+ touch-action: none;
+}
#home::before {
content: '';
box-sizing: border-box;
width: 20px;
height: 20px;
border: 2px solid currentColor;
+ box-shadow: 0 0 0 1px rgb(0 0 0 / 48%), inset 0 0 0 1px rgb(0 0 0 / 35%);
border-radius: 50%;
}
+:root:is([data-nav-app="communications"], [data-nav-app="sms"], [data-nav-app="calendar"]) {
+ --nav-background: #fff;
+ --nav-ring: #657073;
+}
+:root:is([data-nav-app="settings"], [data-nav-app="email"], [data-nav-app="search"], [data-nav-app="marketplace"], [data-nav-app="camera"]) {
+ --nav-ring: #657073;
+}
+:root[data-nav-app="fm"] { --nav-background: #2f3337; }
+:root:is([data-nav-app="power-menu"], [data-nav-app="costcontrol"]) { --nav-background: #4d4d4d; }
+:root[data-nav-app="gallery"] { --nav-background: #040505; }
+:root:is([data-nav-app="clock"], [data-nav-app="music"], [data-nav-app="video"]) { --nav-background: #2d2d2d; }
+:root[dark-surface]:is([data-nav-app="settings"], [data-nav-app="email"]) { --nav-ring: #b8c8d8; }
+:root:is([data-nav-app="communications"], [data-nav-app="sms"], [data-nav-app="calendar"],
+ [data-nav-app="settings"], [data-nav-app="email"], [data-nav-app="search"],
+ [data-nav-app="camera"], [data-nav-app="gallery"], [data-nav-app="music"],
+ [data-nav-app="video"], [data-nav-app="clock"], [data-nav-app="fm"],
+ [data-nav-app="costcontrol"], [data-nav-app="power-menu"], [data-nav-app="marketplace"]) #home::before { box-shadow: none; }
#home:active::before {
opacity: 0.6;
}
@@ -45,9 +78,9 @@
}
@media (orientation: landscape) {
- #home { left:auto; right:0; top:0; bottom:0; width:44px; height:100%; }
- [home-active] #home {
+ #home-bar { left:auto; right:0; top:0; bottom:0; width:44px; height:100%; }
+ [home-active]:not([recents], [lock-surface]) #home-bar {
background:linear-gradient(to left, rgba(0,0,0,0.8), transparent);
}
- [home-active][home-at-bottom] #home { background:transparent; }
+ [home-active][home-at-bottom]:not([recents]) #home-bar { background:transparent; }
}
diff --git a/host/shell.js b/host/shell.js
index 314ed50b..c908c528 100644
--- a/host/shell.js
+++ b/host/shell.js
@@ -115,17 +115,26 @@ window.addEventListener('load', async () => {
// their existing phone dimensions unless the launcher requests fullscreen.
{
const screen = document.getElementById('screen');
- const homeButton = document.getElementById('home');
+ const homeBar = document.getElementById('home-bar');
+ if (!keypadHost && Services.env.get('VULPES_TUNDRA') !== '1') {
+ // A sleeping Gaia screen is inert. Handle wake in the desktop window.
+ const wake = () => {
+ if (screen.inert) Runtime.broadcast('screen-on', {}, 'system');
+ };
+ window.addEventListener('activate', wake);
+ window.addEventListener('pointerdown', wake, true);
+ window.addEventListener('keydown', wake, true);
+ }
const resize = () => {
const landscape = window.innerWidth > window.innerHeight;
- const overlay = keypadHost || document.documentElement.hasAttribute('home-active');
+ const overlay = keypadHost || document.documentElement.matches('[boot-splash], [recents], [power-splash], [home-active], [lock-surface]');
const width = Math.max(1, window.innerWidth - (landscape && !overlay ? 44 : 0));
const height = Math.max(1, window.innerHeight - (!landscape && !overlay ? 44 : 0));
screen.style.width = width + 'px';
screen.style.height = height + 'px';
browser.style.width = width + 'px';
browser.style.height = height + 'px';
- homeButton.style.width = landscape ? '44px' : window.innerWidth + 'px';
+ homeBar.style.width = landscape ? '44px' : window.innerWidth + 'px';
// Flush the embedder's layout before notifying the remote document.
// On Wayland its initial viewport can otherwise remain 0x0 until an
// unrelated chrome layout query, leaving Gaia and video unpainted.
@@ -134,7 +143,15 @@ window.addEventListener('load', async () => {
};
window.addEventListener('resize', resize);
- window.setHomeSurface = (home) => {
+ window.setHomeSurface = (home, powerSplash, trayOverHome, recents, dark, appId, lockscreen, bootSplash) => {
+ document.documentElement.removeAttribute('awaiting-gaia');
+ document.documentElement.toggleAttribute('boot-splash', bootSplash);
+ document.documentElement.toggleAttribute('recents', recents);
+ document.documentElement.toggleAttribute('dark-surface', dark);
+ document.documentElement.toggleAttribute('lock-surface', lockscreen);
+ document.documentElement.dataset.navApp = lockscreen || recents || home ? '' : appId;
+ document.documentElement.toggleAttribute('tray-over-home', home && trayOverHome);
+ document.documentElement.toggleAttribute('power-splash', powerSplash);
document.documentElement.toggleAttribute('home-active', home);
resize();
};
@@ -196,10 +213,11 @@ window.addEventListener('load', async () => {
held = false;
home.title = 'Accueil · maintenir pour les applications ouvertes (Ctrl+Espace)';
home.addEventListener('pointerdown', (event) => {
- if (event.button !== 0) return;
+ if (event.button !== 0 || !Runtime.power.screenEnabled) return;
held = false;
home.setPointerCapture(event.pointerId);
holdTimer = setTimeout(() => {
+ if (!Runtime.power.screenEnabled) return;
held = true;
Views.hideAll();
Runtime.broadcast('holdhome', {}, 'system');
@@ -210,7 +228,7 @@ window.addEventListener('load', async () => {
home.addEventListener('pointerup', cancel);
home.addEventListener('pointercancel', cancel);
home.addEventListener('click', () => {
- if (!held) {Views.hideAll();Runtime.broadcast('home', {}, 'system');}
+ if (!held && Runtime.power.screenEnabled) {Views.hideAll();Runtime.broadcast('home', {}, 'system');}
held = false;
});
window.addEventListener('keydown', (event) => {
diff --git a/host/shell.xhtml b/host/shell.xhtml
index 9bd43f5a..95cce4cd 100644
--- a/host/shell.xhtml
+++ b/host/shell.xhtml
@@ -1,9 +1,9 @@
-
+
-
-
+
+
diff --git a/overrides/camera.gaiamobile.org/js/main.js b/overrides/camera.gaiamobile.org/js/main.js
index ad3374d3..b4e47c82 100644
--- a/overrides/camera.gaiamobile.org/js/main.js
+++ b/overrides/camera.gaiamobile.org/js/main.js
@@ -3308,6 +3308,7 @@ Camera.prototype.release = function(done) {
debug('failed to release hardware');
self.ready();
self.releasing = false;
+ self.emit('released');
done(err);
}
};
diff --git a/overrides/settings.gaiamobile.org/js/panels/help/panel.js b/overrides/settings.gaiamobile.org/js/panels/help/panel.js
index cd804001..79b9ae73 100644
--- a/overrides/settings.gaiamobile.org/js/panels/help/panel.js
+++ b/overrides/settings.gaiamobile.org/js/panels/help/panel.js
@@ -37,7 +37,7 @@ define('panels/help/support',["require", "modules/settings_cache", "shared/lazy_
* refer to the JSON File Data.
*/
this._callSupportInfo = null;
- var url = 'https://vulpes-os.org/';
+ var url = 'https://vulpes-os.org/help.php';
this._elements.userGuide.addEventListener('click', () => {
this._elements.userGuide.blur();
var activity = new window.MozActivity({
@@ -73,7 +73,7 @@ define('panels/help/support',["require", "modules/settings_cache", "shared/lazy_
callback(this._supportInfo);
}.bind(this)).catch(function(error) {
console.warn('Support information:', error);
- callback({onlinesupport: {title: 'Vulpes OS', href: 'https://vulpes-os.org/'}, callsupport: []});
+ callback({onlinesupport: {title: 'Vulpes OS', href: 'https://vulpes-os.org/help.php'}, callsupport: []});
});
},
/**
diff --git a/overrides/settings.gaiamobile.org/resources/support.json b/overrides/settings.gaiamobile.org/resources/support.json
index ff1e2856..bd2a44f6 100644
--- a/overrides/settings.gaiamobile.org/resources/support.json
+++ b/overrides/settings.gaiamobile.org/resources/support.json
@@ -1 +1 @@
-{"onlinesupport":{"title":"Vulpes OS","href":"https://vulpes-os.org/"},"callsupport":[]}
+{"onlinesupport":{"title":"Vulpes OS","href":"https://vulpes-os.org/help.php"},"callsupport":[]}
diff --git a/overrides/system.gaiamobile.org/js/app_chrome.js b/overrides/system.gaiamobile.org/js/app_chrome.js
index ab0d02ab..0204d054 100644
--- a/overrides/system.gaiamobile.org/js/app_chrome.js
+++ b/overrides/system.gaiamobile.org/js/app_chrome.js
@@ -300,6 +300,10 @@
this.handleError(evt);
break;
+ case '_iconchange':
+ this.setSiteIcon();
+ break;
+
case '_locationchange':
this.hidePinDialogCard();
this.handleLocationChange();
@@ -730,6 +734,7 @@
this.app.element.addEventListener('mozbrowsermetachange', this);
this.app.element.addEventListener('mozbrowserscrollareachanged', this);
this.app.element.addEventListener('_locationchange', this);
+ this.app.element.addEventListener('_iconchange', this);
this.app.element.addEventListener('_namechanged', this);
this.app.element.addEventListener('_securitychange', this);
this.app.element.addEventListener('_loading', this);
@@ -789,6 +794,7 @@
this.app.element.removeEventListener('mozbrowsererror', this);
this.app.element.removeEventListener('mozbrowsermetachange', this);
this.app.element.removeEventListener('_locationchange', this);
+ this.app.element.removeEventListener('_iconchange', this);
this.app.element.removeEventListener('_namechanged', this);
this.app.element.removeEventListener('_loading', this);
this.app.element.removeEventListener('_loaded', this);
@@ -1276,8 +1282,19 @@
return;
}
+ const generation = this.iconGeneration = (this.iconGeneration || 0) + 1;
+ const favicon = Object.keys(this.app.favicons || {}).find(href => {
+ try { return new URL(href).origin === new URL(this.app.config.url).origin; }
+ catch (_) { return false; }
+ });
+ if (favicon) {
+ this.siteIcon.style.backgroundImage = 'url(' + JSON.stringify(favicon) + ')';
+ this._currentIconUrl = favicon;
+ return;
+ }
this.app.getSiteIconUrl(ICON_SIZE)
.then(iconObject => {
+ if (generation !== this.iconGeneration) return;
// We compare the original icon URL, otherwise there is a flickering
// effect because a different object url is created each time.
if (this._currentIconUrl !== iconObject.originalUrl) {
@@ -1286,6 +1303,7 @@
}
})
.catch((err) => {
+ if (generation !== this.iconGeneration) return;
// Installed apps have a manifest icon even when the Places cache has
// no favicon. Keep the original chrome slot and select a crisp source.
const icons = this.app.manifest && this.app.manifest.icons;
diff --git a/overrides/system.gaiamobile.org/shared/resources/branding/browser_126.png b/overrides/system.gaiamobile.org/shared/resources/branding/browser_126.png
new file mode 100644
index 00000000..905faf81
Binary files /dev/null and b/overrides/system.gaiamobile.org/shared/resources/branding/browser_126.png differ
diff --git a/overrides/wallpaper.gaiamobile.org/resources/Illus_Flow2_Orange.jpg b/overrides/wallpaper.gaiamobile.org/resources/Illus_Flow2_Orange.jpg
index f4161df2..ecfbf8ba 100755
Binary files a/overrides/wallpaper.gaiamobile.org/resources/Illus_Flow2_Orange.jpg and b/overrides/wallpaper.gaiamobile.org/resources/Illus_Flow2_Orange.jpg differ
diff --git a/release.json b/release.json
index de1af6d4..36edb1d1 100644
--- a/release.json
+++ b/release.json
@@ -1,17 +1,20 @@
{
"gaia": "2.7.0",
"channel": "preview",
- "revision": 25,
- "androidVersionCode": 25,
- "geckoview": "156.0.20260921121718",
+ "revision": 26,
+ "androidVersionCode": 26,
+ "geckoview": "161.0.20261118180411",
"engineAlignment": {
- "family": "156",
- "patchParity": false,
- "reason": "Firefox desktop 156.0.1; Mozilla's GeckoView release repository currently offers 156.0 only. Keep the desktop patch and report actual engine versions."
+ "family": "161",
+ "patchParity": true,
+ "reason": "Desktop, Sargo and Android ship Gecko 161.0."
},
- "version": "2.7-preview.25",
+ "version": "2.7-preview.26",
"adapters": {
"desktop": "0.1.0-dev",
- "android": "0.1.0-dev"
- }
+ "android": "0.1.0-dev",
+ "sargo": "0.1.0-dev",
+ "beatles": "0.1.0-dev"
+ },
+ "tundra": "0.2.0"
}
diff --git a/services/activities.mjs b/services/activities.mjs
index cd3e2c1b..20a099f4 100644
--- a/services/activities.mjs
+++ b/services/activities.mjs
@@ -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.
diff --git a/services/platform.mjs b/services/platform.mjs
index eea7b7b6..902fb31d 100644
--- a/services/platform.mjs
+++ b/services/platform.mjs
@@ -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))
diff --git a/tests/activities.test.mjs b/tests/activities.test.mjs
index 1480ccac..feab681d 100644
--- a/tests/activities.test.mjs
+++ b/tests/activities.test.mjs
@@ -140,3 +140,15 @@ assert.throws(()=>sharing.route({name:'share',data:{type:'image/jpeg',blobs:Arra
assert.throws(()=>sharing.start({app:{id:'untrusted'}},{name:'share',data:{type:'image/jpeg'}}),/PERMISSION_DENIED/);
assert.equal(isGaiaActivity({name:'share'}),true);
console.log('Gallery share chooser, MIME matching, provider limits and cancellation: OK');
+
+const camera = {id:'camera',origin:'http://camera.localhost',manifest:{
+ launch_path:'/index.html',activities:{record:{filters:{type:['photos','videos']},disposition:'window'}}
+}};
+apps.push(camera);
+const recording = {name:'record',data:{type:'videos'}};
+assert.ok(isGaiaActivity(recording));
+const openedCamera = broker.start({app:{id:'video'}},recording);
+assert.equal(new URL(launches.at(-1)[1]).hash,'#record');
+broker.subscribe({app:camera});
+await openedCamera;
+assert.deepEqual(events.at(-1)[2].source,recording);
diff --git a/tests/alarms.test.mjs b/tests/alarms.test.mjs
index c931b7d0..96c4519a 100644
--- a/tests/alarms.test.mjs
+++ b/tests/alarms.test.mjs
@@ -1,3 +1,4 @@
+import test from 'node:test';
import assert from 'node:assert/strict';
import { Alarms } from '../host/Alarms.sys.mjs';
@@ -60,3 +61,81 @@ assert.equal(saved.pending.length, 0);
console.log(
'PASS: shared alarms persist, enforce permissions and deliver queued events after restart.',
);
+
+const isolated = async () => {
+ let fail = false;
+ let stored;
+ const a = new Alarms(() => app, () => {}, {
+ load: async () => null,
+ save: async state => {
+ if (fail) throw Error('disk full');
+ stored = structuredClone(state);
+ },
+ }, () => {});
+ await a.init();
+ return {a, fail: value => { fail=value; }, stored: () => stored};
+};
+test('failed add cannot create a ringing alarm',async()=>{
+ const {a,fail}=await isolated();fail(true);
+ await assert.rejects(a.request(actor,app,request),/disk full/);
+ assert.equal(a.state.records.length,0);
+});
+test('failed deletion retains a scheduled alarm',async()=>{
+ const {a,fail}=await isolated();
+ const id=await a.request(actor,app,request);fail(true);
+ await assert.rejects(a.request(actor,app,{operation:'remove',id}),/disk full/);
+ assert.equal(a.state.records[0].id,id);
+});
+test('failed transition to pending keeps alarm scheduled for retry',async()=>{
+ const {a,fail,stored}=await isolated();
+ await a.request(actor,app,{...request,date:Date.now()-100});fail(true);
+ await assert.rejects(a.tick(),/disk full/);
+ assert.equal(a.state.records.length,1);
+ fail(false);await a.tick();assert.equal(stored().pending.length,1);
+});
+test('cancel queued alarm before delivery',async()=>{
+ const {a,stored}=await isolated();
+ const id=await a.request(actor,app,{...request,date:Date.now()-100});
+ await a.tick();await a.request(actor,app,{operation:'remove',id});
+ assert.equal(stored().pending.length,0);
+});
+test('reject dates outside the supported calendar range',async()=>{
+ const {a}=await isolated();
+ await assert.rejects(a.request(actor,app,{...request,date:Number.MAX_VALUE}),/InvalidStateError/);
+ await assert.rejects(a.request(actor,app,{...request,respectTimezone:'ignoreTimezone',local:[1e12,1,1,0,0,0,0]}),/InvalidStateError/);
+});
+test('retry failed delivery acknowledgement without ringing twice',async()=>{
+ const {a, fail, stored}=await isolated();
+ await a.request(actor,app,{...request,date:Date.now()-100});
+ await a.tick();
+ a.listeners.set(actor,app.id);
+ fail(true);
+ await assert.rejects(a.tick(),/disk full/);
+ fail(false);
+ const deliveries=events.length;
+ await a.tick();
+ assert.equal(stored().pending.length,0,'retry acknowledgement after storage recovers');
+ assert.equal(events.length,deliveries);
+});
+test('retry launch after clock is set back',async()=>{
+ const launches=[];
+ const {a}=await isolated();
+ a.launch=id=>launches.push(id);
+ await a.request(actor,app,{...request,date:Date.now()-100});
+ a.lastLaunch.set(app.id,Date.now()+3600000);
+ await a.tick();
+ assert.deepEqual(launches,[app.id],'a backwards clock adjustment does not suppress delivery');
+});
+test('stop idle alarm timer until a new alarm is scheduled',async()=>{
+ let active=0;
+ const a=new Alarms(()=>app,()=>{}, {load:async()=>null,save:async()=>{}},
+ ()=>{active++;return 7;}, id=>{assert.equal(id,7);active--;});
+ await a.init();
+ assert.equal(active,0,'no periodic wakeup with an empty alarm store');
+ const id=await a.request(actor,app,request);
+ assert.equal(active,1);
+ await a.request(actor,app,{operation:'remove',id});
+ assert.equal(active,0);
+ await a.request(actor,app,request);
+ assert.equal(active,1,'scheduler restarts when needed');
+});
diff --git a/tests/installed_apps_test.py b/tests/installed_apps_test.py
index f85116dd..e844f3b4 100644
--- a/tests/installed_apps_test.py
+++ b/tests/installed_apps_test.py
@@ -25,4 +25,30 @@ class StoreTests(unittest.TestCase):
restored.remove(item['id'])
self.assertEqual(InstalledApps(folder,8765).records(),[])
+ def test_bad_app_does_not_hide_other_apps_or_break_boot(self):
+ with tempfile.TemporaryDirectory() as folder:
+ store = InstalledApps(folder, 8765)
+ good = dict(id='user-'+'1'*24, manifest={'name':'Working'}, files={})
+ store.save(good)
+ bad = Path(folder)/('user-'+'2'*24+'.json')
+ for payload in ('{', '[]', json.dumps({**good,'files':None}),
+ json.dumps({**good,'manifest':None}),
+ json.dumps({**good,'files':{'icon.png':'??'}}),
+ json.dumps({**good,'manifest':{'name':'Wrong app'}})):
+ with self.subTest(payload=payload):
+ bad.write_text(payload)
+ restarted = InstalledApps(folder, 8765)
+ self.assertEqual([r['manifest']['name'] for r in restarted.records()], ['Working'])
+ self.assertTrue(bad.exists())
+
+ def test_failed_package_update_preserves_installed_copy(self):
+ with tempfile.TemporaryDirectory() as folder:
+ store = InstalledApps(folder, 8765)
+ item = dict(id='user-'+'1'*24, manifest={'name':'Working'}, files={'index.html':'T0s='})
+ store.save(item)
+ for patch in ({'manifest':None}, {'files':{'index.html':'??'}}):
+ with self.assertRaises(ValueError):
+ store.save({**item,**patch})
+ self.assertEqual(store.read(item['id'],'index.html'), b'OK')
+
if __name__=='__main__':unittest.main()
diff --git a/tests/platform.test.mjs b/tests/platform.test.mjs
index a0b3b7b8..cf5e9956 100644
--- a/tests/platform.test.mjs
+++ b/tests/platform.test.mjs
@@ -17,6 +17,11 @@ rejects(gallery, 'wifi', { operation: 'connect' });
rejects(settings, 'wifi', { password: 'x'.repeat(4097) });
authorizePlatform(gallery, 'pick', { type: 'pictures' });
authorizePlatform(camera, 'capture');
+authorizePlatform(app('system'), 'carrierName');
+rejects(gallery, 'carrierName');
+authorizePlatform(camera, 'cameraPreview', {action:'focusMode',mode:'continuous-picture'});
+rejects(gallery, 'cameraPreview', {action:'focusMode',mode:'continuous-picture'});
+assert.throws(() => authorizePlatform(camera, 'cameraPreview', {action:'focusMode',mode:'unknown'}), /INVALID_VALUE/);
authorizePlatform(camera, 'cameraPreview', {action:'start',camera:'back'});
authorizePlatform(camera, 'cameraPreview', {action:'frame'});
authorizePlatform(camera, 'cameraPreview', {action:'stop'});
diff --git a/tests/tundra-state.test.mjs b/tests/tundra-state.test.mjs
index ff2cd132..b2f281bf 100644
--- a/tests/tundra-state.test.mjs
+++ b/tests/tundra-state.test.mjs
@@ -24,7 +24,10 @@ test('Tundra rejects missing/stale status and preserves the real battery value',
test('native capabilities report the camera adapter and gate modem/Wi-Fi services', () => {
globalThis.Services = { appinfo: { platformVersion: '156.0.1' } };
- const caps = tundraCapabilities({ version: '2.7-preview.7', gaia: '2.7.0' });
+ const caps = tundraCapabilities({ version: '2.7-preview.26', gaia: '2.7.0',
+ tundra: '0.2.0', adapters: { sargo: '0.1.0-dev' } });
+ assert.equal(caps.tundra, '0.2.0');
+ assert.deepEqual(caps.adapter, { device: 'sargo', version: '0.1.0-dev' });
assert.equal(caps.platform, 'tundra');
assert.equal(caps.gecko, '156.0.1');
assert.equal(caps.camera, true);
diff --git a/tests/vcard-import.test.mjs b/tests/vcard-import.test.mjs
index 6f15b18c..9d433b6c 100644
--- a/tests/vcard-import.test.mjs
+++ b/tests/vcard-import.test.mjs
@@ -48,3 +48,23 @@ test('batch import writes once, preserves simultaneous saves and can recover fro
assert.deepEqual(book.data.contacts.map(c=>c.name[0]),['One','Two','Three']);
assert.equal(events.length,3);
});
+
+for (const [label, lines, field, expected] of [
+ ['additional names and titles', ['N:Diaz;Ana;Maria;Dr.;Jr.'], 'name', ['Dr. Ana Maria Diaz Jr.']],
+ ['multiple given names and escaped commas', [String.raw`N:Diaz;Ana,Mary\,Jane;;;`], 'givenName', ['Ana','Mary,Jane']],
+ ['postal addresses', [String.raw`ADR;TYPE=HOME:;;1 Rue\; Est;Lyon;;69000;France`], 'adr',
+ [{streetAddress:'1 Rue; Est',locality:'Lyon',region:'',postalCode:'69000',countryName:'France',type:['home']}]],
+ ['web addresses', ['URL;TYPE=WORK:https://example.org'], 'url', [{value:'https://example.org',type:['work']}]],
+ ['organisation', ['ORG:Clinic;Research'], 'org', ['Clinic / Research']],
+ ['job title', ['TITLE:Surgeon'], 'jobTitle', ['Surgeon']],
+ ['notes', [String.raw`NOTE:Main\nOffice`], 'note', ['Main\nOffice']],
+ ['nicknames', [String.raw`NICKNAME:Ana,A\,B`], 'nickname', ['Ana','A,B']],
+ ['contact groups', ['CATEGORIES:Family,Friends'], 'category', ['Family','Friends']],
+ ['preferred phone', ['TEL;TYPE=CELL,PREF:123'], 'tel', [{value:'123',type:['mobile'],pref:true}]],
+ ['preferred email', ['EMAIL;PREF=1:a@example.org'], 'email', [{value:'a@example.org',type:['other'],pref:true}]],
+]) {
+ test('vCard import retains '+label, () => {
+ const [card]=readVCards(wrap(['FN:Ana', ...lines].filter(l=>field!=='name'||!l.startsWith('FN:'))));
+ assert.deepEqual(card[field],expected);
+ });
+}
diff --git a/tests/wifi-throttle.test.mjs b/tests/wifi-throttle.test.mjs
index 6beb74f7..cf01b912 100644
--- a/tests/wifi-throttle.test.mjs
+++ b/tests/wifi-throttle.test.mjs
@@ -262,3 +262,74 @@ test('two APs with the same name keep the active AP identifier; a saved network
assert.equal(wifi.connection.network.vulpesId,'ap-b');
const [known]=await wifi.getKnownNetworks();await wifi.associate(known);assert.equal(target,'profile-b');
});
+
+test('live Wi-Fi updates distinguish roaming, unknown targets and unchanged polling',async()=>{
+ const {readFile}=await import('node:fs/promises');
+ const vm=await import('node:vm');
+ const events={}, navigator={mozSettings:{addObserver(){}}};
+ let state={enabled:true, state:'disconnected', networks:[]}, refresh;
+ vm.runInNewContext(await readFile(new URL('../host/gaia-wifi.js',import.meta.url),'utf8'),{
+ navigator,document:{},window:{VulpesNativeWifi:true},location:{hostname:'system.localhost'},
+ Event,EventTarget,console,VulpesCompat:{call:async()=>state,request:p=>p},
+ addEventListener:(k,cb)=>{events[k]=cb;},setInterval:cb=>{refresh=cb;},clearInterval(){}});
+ await events.DOMContentLoaded();
+ const wifi=navigator.mozWifiManager;
+ let signals=0, changes=0;
+ wifi.onconnectioninfoupdate=()=>signals++;
+ wifi.onstatuschange=()=>changes++;
+ state={enabled:true,state:'connected',network:{id:'ap1',ssid:'Lab',signal:10,security:'open'}};
+ await refresh();
+ assert.equal(wifi.connection.network.vulpesId,'ap1');
+ await refresh();
+ assert.equal(signals,1);
+ state.network.id='ap2';
+ await refresh();
+ assert.equal(changes,2);
+ state={enabled:true,state:'connecting'};
+ await refresh();
+ assert.equal(wifi.connection.status,'connecting');
+ assert.equal(wifi.connectionInformation,null);
+});
+
+
+test('a scan started before disabling Wi-Fi cannot overwrite a newer scan cache', async () => {
+ const {tundraWifi: wifi} = await import('../host/Tundra.sys.mjs?scan-generation');
+ const responses=[];
+ globalThis.Services={env:{get:key => key==='VULPES_TUNDRA_WIFI'?'1':''}};
+ globalThis.ChromeUtils={importESModule:()=>({Subprocess:{call:async ()=>{
+ let read=false;
+ const result=new Promise(resolve=>responses.push(resolve));
+ return {stdin:{write:async()=>{},close:async()=>{}},stdout:{readString:async()=>{
+ if(read)return null;read=true;return JSON.stringify({result:await result});
+ }},wait:async()=>({exitCode:0})};
+ }}})};
+ const stale=wifi({operation:'scan'});
+ const off=wifi({operation:'setEnabled',enabled:false});
+ responses[1]({enabled:false});await off;
+ const fresh=wifi({operation:'scan'});
+ assert.equal(responses.length,3);
+ responses[2]({enabled:false,networks:[]});await fresh;
+ responses[0]({enabled:true,networks:[{ssid:'Old'}]});await stale;
+ assert.equal((await wifi({operation:'scan'})).enabled,false);
+});
+
+test('status icon resets stale bars and the connecting spinner when telemetry disappears', async () => {
+ const {readFile}=await import('node:fs/promises');
+ const vm=await import('node:vm');
+ const window={};
+ vm.runInNewContext(await readFile(new URL('../gaia/apps/system/js/wifi_icon.js',import.meta.url),'utf8'),{
+ window,BaseIcon:function(){},navigator:{mozL10n:{setAttributes(){}}}
+ });
+ const icon=new window.WifiIcon();
+ const wifi={connection:{status:'connected'},connectionInformation:null};
+ Object.assign(icon,{manager:{wifiManager:wifi},element:{dataset:{level:'4',connecting:'true'}},
+ enabled:()=>true,show(){},publish(){}});
+ icon.update();
+ assert.equal(icon.element.dataset.level,0);
+ assert.equal(icon.element.dataset.connecting,undefined);
+ for (const [signal,level] of [[-1,0],[NaN,0],[21,1],[99,4]]) {
+ wifi.connectionInformation={relSignalStrength:signal};
+ icon.update();
+ assert.equal(icon.element.dataset.level,level);
+ }
+});
diff --git a/tools/check-parity.py b/tools/check-parity.py
index 4a983a1b..a7b6a838 100644
--- a/tools/check-parity.py
+++ b/tools/check-parity.py
@@ -50,6 +50,10 @@ with source as archive:
actual = gaia.read("_vulpes/" + name)
assert actual == expected, "Stale Android shared UI: " + name
results[name] = hashlib.sha256(actual).hexdigest()
+ settings_html = gaia.read("settings/index.html").decode()
+ for link in ("system-privacy.php#reports", "system-privacy.php#telemetry",
+ "browser-help.php#private", "browser-help.php#tracking", "browser-help.php#dnt"):
+ assert "https://vulpes-os.org/" + link in settings_html, "Stale Settings help link: " + link
wifi = translate((ROOT / "overrides/system.gaiamobile.org/js/wifi.js").read_text()).encode()
assert gaia.read("system/js/wifi.js") == wifi, "Stale Android Gaia Wi-Fi timer"
results["system/js/wifi.js"] = hashlib.sha256(wifi).hexdigest()
diff --git a/tools/installed_apps.py b/tools/installed_apps.py
index 44dae493..e948cf0b 100644
--- a/tools/installed_apps.py
+++ b/tools/installed_apps.py
@@ -1,6 +1,7 @@
"""Private ordinary-web-app store. No Gaia permissions are read from packages."""
import base64
import json
+import logging
import os
from pathlib import Path
import re
@@ -19,9 +20,15 @@ class InstalledApps:
token.chmod(0o600)
self.items = {}
for path in self.root.glob('user-*.json'):
- item = json.loads(path.read_text())
- if self.valid_id(item.get('id')):
- self.items[item['id']] = item
+ try:
+ item = json.loads(path.read_text())
+ self.validate(item)
+ if item['id'] != path.stem:
+ raise ValueError('Package filename does not match its ID')
+ except (ValueError, OSError) as error:
+ logging.warning('Skipping unreadable installed app %s: %s', path.name, error)
+ continue
+ self.items[item['id']] = item
@staticmethod
def valid_id(value):
@@ -37,13 +44,18 @@ class InstalledApps:
return dict(id=item['id'], origin=origin, manifestURL=origin+'/manifest.webapp',
manifest=manifest, removable=True, installed=True)
- def save(self, item):
- if not self.valid_id(item.get('id')) or not isinstance(item.get('files'), dict):
+ def validate(self, item):
+ if (not isinstance(item, dict) or not self.valid_id(item.get('id'))
+ or not isinstance(item.get('manifest'), dict) or not isinstance(item.get('files'), dict)):
raise ValueError('INVALID_PACKAGE')
# A second boundary check keeps the storage API independent of ZIP parsing.
for name, content in item['files'].items():
if not isinstance(name, str) or not isinstance(content, str):
raise ValueError('INVALID_PACKAGE')
+ base64.b64decode(content, validate=True)
+
+ def save(self, item):
+ self.validate(item)
with self.lock:
target = self.root / (item['id']+'.json')
stage = target.with_suffix('.tmp')
diff --git a/tools/probe-engine.py b/tools/probe-engine.py
index 060d9a0e..7532fa62 100644
--- a/tools/probe-engine.py
+++ b/tools/probe-engine.py
@@ -31,6 +31,7 @@ prefs = {
"".join("user_pref(" + json.dumps(k) + "," + json.dumps(v) + ");\n" for k, v in prefs.items())
)
env = os.environ.copy()
+env["MOZ_REMOTE_ALLOW_SYSTEM_ACCESS"] = "1"
for name in list(env):
if name.startswith("MOZ_DISABLE_") or name == "B2G_HOMESCREEN":
env.pop(name)
diff --git a/tools/project.py b/tools/project.py
index 581bcdf9..2acd871c 100644
--- a/tools/project.py
+++ b/tools/project.py
@@ -11,8 +11,8 @@ ROOT = Path(__file__).resolve().parents[1]
SOURCE_OVERRIDES = {
"system": ["js/launcher.js", "js/gaia_scheduler.js", "js/keyboard_manager.js",
"js/core.js", "js/rocketbar.js", "js/wrapper_factory.js",
- "js/cover_screen.js", "js/lockscreen_window.js",
- "js/app_usage_metrics.js", "js/battery_overlay.js"],
+ "js/cover_screen.js", "js/lockscreen_window.js", "lockscreen/js/lockscreen.js",
+ "js/app_usage_metrics.js", "js/battery_overlay.js", "js/wifi_icon.js"],
"camera": ["js/views/setting-options.js", "js/views/setting.js"],
"communications": ["dialer/js/telephony_helper.js", "dialer/js/mmi.js"],
"settings": ["js/modules/storage_helper.js", "js/modules/wifi_context.js", "js/startup.js"],
diff --git a/tools/run-host.py b/tools/run-host.py
index b334c539..1d9435bc 100644
--- a/tools/run-host.py
+++ b/tools/run-host.py
@@ -70,11 +70,15 @@ def main():
raise RuntimeError("Port Gaia 8765 déjà occupé. Fermer le précédent hôte/serveur Gaia.")
finally:
probe.close()
+ profile_prefix = "host-" if args.test else "desktop-"
+ if args.candidate and not args.test:
+ # Leave the desktop-VERSION path available for migration on activation.
+ profile_prefix = "candidate-"
profile = (
ROOT
/ "profiles"
/ (
- ("host-" if args.test else "desktop-")
+ profile_prefix
+ ("legacy-" if args.legacy_apps else "")
+ lock["version"]
)
@@ -115,6 +119,7 @@ def main():
"chrome://vulpes/content/shell.xhtml",
]
if args.test:
+ env["MOZ_REMOTE_ALLOW_SYSTEM_ACCESS"] = "1"
command += ["-marionette", "--remote-allow-system-access", "-new-window", "about:blank"]
proc = None
with (ROOT / "logs/gaia-server.log").open("w") as output:
diff --git a/tools/test-apps.py b/tools/test-apps.py
index 99c78e10..dac91bd7 100644
--- a/tools/test-apps.py
+++ b/tools/test-apps.py
@@ -375,7 +375,14 @@ done(canvas.toDataURL());}).catch(e=>done({error:String(e)}));""",
),
)
focus()
- subprocess.run(["xdotool", "mousemove", "240", "820", "mousedown", "1"], check=True)
+ subprocess.run(["xdotool", "search", "--name", "^Vulpes", "windowraise", "windowfocus"], check=True)
+ home_x, home_y = client.execute("""
+ const w = Services.wm.getMostRecentWindow('vulpes:host');
+ const r = w.document.getElementById('home').getBoundingClientRect();
+ return [Math.round(w.mozInnerScreenX+r.x+r.width/2),
+ Math.round(w.mozInnerScreenY+r.y+r.height/2)];
+ """)
+ subprocess.run(["xdotool", "mousemove", str(home_x), str(home_y), "mousedown", "1"], check=True)
time.sleep(0.85)
subprocess.run(["xdotool", "mouseup", "1"], check=True)
check(
diff --git a/tools/test-home-surface.py b/tools/test-home-surface.py
index 1b34543e..f2fc7aac 100644
--- a/tools/test-home-surface.py
+++ b/tools/test-home-surface.py
@@ -11,15 +11,23 @@ spec=importlib.util.spec_from_file_location('probe',Path(__file__).with_name('pr
probe=importlib.util.module_from_spec(spec);spec.loader.exec_module(probe)
with Client(2857) as c:
probe.register(c)
+ probe.evaluate(c,'system',"ScreenManager.turnScreenOn(true);if(Service.query('locked'))await Service.request('unlock',{forcibly:true});return true;")
+ hit_area=c.execute("const d=Services.wm.getMostRecentWindow('vulpes:host').document,b=d.getElementById('home'),r=b.getBoundingClientRect(),y=r.y+r.height/2;return [d.elementFromPoint(r.x+r.width/2,y)===b,d.elementFromPoint(2,y)===b,r.width];")
+ assert hit_area == [True,False,44],hit_area
def state():
- return c.execute("const w=Services.wm.getMostRecentWindow('vulpes:host'),d=w.document,b=d.getElementById('home');return {home:d.documentElement.hasAttribute('home-active'),bottom:d.documentElement.hasAttribute('home-at-bottom'),height:w.innerHeight,screen:d.getElementById('screen').clientHeight,bar:b.clientHeight,background:w.getComputedStyle(b).backgroundImage,color:w.getComputedStyle(b).backgroundColor};")
- def wait(home):
+ return c.execute("const w=Services.wm.getMostRecentWindow('vulpes:host'),d=w.document,b=d.getElementById('home-bar');return {app:d.documentElement.dataset.navApp,home:d.documentElement.hasAttribute('home-active'),bottom:d.documentElement.hasAttribute('home-at-bottom'),height:w.innerHeight,screen:d.getElementById('screen').clientHeight,bar:b.clientHeight,background:w.getComputedStyle(b).backgroundImage,color:w.getComputedStyle(b).backgroundColor,ring:w.getComputedStyle(d.getElementById('home'),'::before').color};")
+ def wait(home, app=None):
for _ in range(100):
s=state()
- if s['home']==home and s['screen']==s['height']-(0 if home else s['bar']):return s
+ if s['home']==home and (app is None or s['app']==app) and s['screen']==s['height']-(0 if home else s['bar']):return s
time.sleep(.15)
raise AssertionError(s)
c.execute("Services.wm.getMostRecentWindow('vulpes:host').document.getElementById('home').click();")
+ wait(True)
+ probe.evaluate(c,'homescreen',"document.querySelector('#apps-panel > .scrollable').scrollTop=0;return true;")
+ for _ in range(50):
+ if not state()['bottom']:break
+ time.sleep(.05)
home=wait(True);assert 'linear-gradient' in home['background'],home
c.execute("const b=Services.wm.getMostRecentWindow('vulpes:host').document.getElementById('home');InspectorUtils.addPseudoClassLock(b,':active');")
pressed=state();assert pressed['background']==home['background'] and pressed['color']==home['color'],pressed
@@ -30,14 +38,66 @@ with Client(2857) as c:
if bottom['bottom']:break
time.sleep(.1)
assert bottom['background']=='none' and bottom['color']=='rgba(0, 0, 0, 0)',bottom
+ for open_overlay,close_overlay in [
+ ("dispatchEvent(new CustomEvent('holdsleep'))", "document.querySelector('#sleep-menu button').click()"),
+ ("UtilityTray.show(true)", "UtilityTray.hide(true)"),
+ ]:
+ probe.evaluate(c,'system',open_overlay+';return true;')
+ if open_overlay.startswith('UtilityTray'):
+ for _ in range(50):
+ if c.execute("return Services.wm.getMostRecentWindow('vulpes:host').document.documentElement.hasAttribute('tray-over-home');"):break
+ time.sleep(.05)
+ tray=state()
+ assert tray['home'] and tray['screen']==home['screen'] and tray['bar']==0,tray
+ else:
+ power = wait(False)
+ footer = probe.evaluate(c,'system',"const b=document.querySelector('#sleep-menu button'),r=b.getBoundingClientRect();return [getComputedStyle(b.closest('gaia-buttons')).backgroundColor,r.bottom,document.elementFromPoint(r.x+r.width/2,r.y+r.height/2)===b];")['value']
+ assert power['color']==footer[0] and power['ring']=='rgb(255, 255, 255)',power
+ assert footer[1]<=power['screen'] and footer[2],footer
+ probe.evaluate(c,'system',close_overlay+';return true;')
+ wait(True)
+ if open_overlay.startswith('UtilityTray'):
+ for _ in range(50):
+ restored=state()
+ if restored['bar']:break
+ time.sleep(.05)
+ assert restored['bar']==home['bar'] and restored['screen']==home['screen'],restored
result=probe.evaluate(c,'system','await VulpesCompat.call("apps.launch",{manifestURL:"http://settings.localhost:8765/manifest.webapp"});return true;')
assert result.get('value'),result
- app=wait(False);assert app['background']=='none' and app['color']=='rgb(18, 35, 50)',app
+ app=wait(False,'settings');assert app['background']=='none' and app['color']=='rgba(0, 0, 0, 0)',app
+ assert app['ring']=='rgb(101, 112, 115)',app
+ x,y=c.execute("const r=Services.wm.getMostRecentWindow('vulpes:host').document.getElementById('home').getBoundingClientRect();return [Math.floor(r.x+r.width/2),Math.floor(r.y+r.height/2)];")
+ c.call("WebDriver:PerformActions",{"actions":[{"type":"pointer","id":"home-mouse",
+ "parameters":{"pointerType":"mouse"},"actions":[{"type":"pointerMove","x":x,"y":y},
+ {"type":"pointerDown","button":0},{"type":"pause","duration":950},{"type":"pointerUp","button":0}]}]})
+ for _ in range(100):
+ if c.execute("return Services.wm.getMostRecentWindow('vulpes:host').document.documentElement.hasAttribute('recents');"):
+ break
+ time.sleep(.1)
+ else:
+ raise AssertionError('Recent apps did not open')
+ recent=state()
+ assert recent['screen']==recent['height'] and recent['background']=='none' and recent['color']=='rgba(0, 0, 0, 0)',recent
denied=probe.evaluate(c,'settings','try {await VulpesCompat.call("desktop.navigation",{home:true});return false;} catch(e) {return true;}')
assert denied.get('value'),denied
deniedScroll=probe.evaluate(c,'settings','try {await VulpesCompat.call("desktop.homeScroll",{bottom:true});return false;} catch(e) {return true;}')
assert deniedScroll.get('value'),deniedScroll
- c.execute("Services.wm.getMostRecentWindow('vulpes:host').document.getElementById('home').click();")
+ frames = c.call("WebDriver:ExecuteAsyncScript", {"script": """
+ const done=arguments[arguments.length-1],w=Services.wm.getMostRecentWindow('vulpes:host');
+ const d=w.document,root=d.documentElement,bar=d.getElementById('home-bar'),screen=d.getElementById('screen');
+ let frames=0,settled=0;
+ function paint(){
+ const style=w.getComputedStyle(bar);
+ if(screen.clientHeight!==w.innerHeight || style.backgroundColor!=='rgba(0, 0, 0, 0)')
+ return done({error:'Exposed navigation strip',height:screen.clientHeight,background:style.backgroundColor});
+ if(root.hasAttribute('home-active') && !root.hasAttribute('recents')) settled++;
+ if(++frames>400 || settled>=3) return done({frames,settled});
+ w.requestAnimationFrame(paint);
+ }
+ w.requestAnimationFrame(paint);
+ d.getElementById('home').click();
+ ""","args":[],"sandbox":"system","newSandbox":True,"scriptTimeout":12000})['value']
+ assert frames.get('settled',0)>=3,frames
wait(True)
probe.evaluate(c,'homescreen',"document.querySelector('#apps-panel > .scrollable').scrollTop=0;return true;")
for _ in range(100):
@@ -63,6 +123,6 @@ try {
} finally {box.remove();}
''')
assert iconRecovery.get('value',{}).get('initial')==0 and iconRecovery['value'].get('naturalWidth',0)>0,iconRecovery
- report={'passed':True,'home':home,'pressed':pressed,'bottom':bottom,'application':app,'returnHome':top,'nonSystemCallerDenied':True,'nonHomeScrollCallerDenied':True,'zeroWidthIconRecovery':iconRecovery['value']}
+ report={'passed':True,'home':home,'pressed':pressed,'bottom':bottom,'application':app,'recents':recent,'returnFrames':frames,'returnHome':top,'nonSystemCallerDenied':True,'nonHomeScrollCallerDenied':True,'zeroWidthIconRecovery':iconRecovery['value']}
(ROOT/'logs/home-surface-test.json').write_text(json.dumps(report,indent=2)+'\n')
print(json.dumps(report,indent=2))
diff --git a/tools/test-host.py b/tools/test-host.py
index a065d836..83502c05 100644
--- a/tools/test-host.py
+++ b/tools/test-host.py
@@ -231,25 +231,20 @@ bc.currentWindowGlobal.getActor('VulpesProbe').sendQuery('Evaluate', CODE)
check=True,
stdout=subprocess.DEVNULL,
)
- subprocess.run(
- [
- "xdotool",
- "mousemove",
- "245",
- "630",
- "mousedown",
- "1",
- "mousemove",
- "245",
- "530",
- "mousemove",
- "245",
- "430",
- "mouseup",
- "1",
- ],
- check=True,
- )
+ drag = evaluate("homescreen", """
+ const panel = document.querySelector('#apps-panel > .scrollable');
+ const rect = panel.getBoundingClientRect();
+ return {x:Math.round(mozInnerScreenX + rect.x + rect.width * .55),
+ y:Math.round(mozInnerScreenY + rect.y + rect.height * .75),
+ distance:Math.round(rect.height * .35)};
+ """)
+ for action in (["mousemove", str(drag["x"]), str(drag["y"])], ["mousedown", "1"]):
+ subprocess.run(["xdotool", *action], check=True)
+ for n in range(1, 13):
+ time.sleep(.025)
+ subprocess.run(["xdotool", "mousemove", str(drag["x"]),
+ str(drag["y"] - drag["distance"] * n // 12)], check=True)
+ subprocess.run(["xdotool", "mouseup", "1"], check=True)
expect(
"trusted-touch-drag",
wait(
diff --git a/tools/test-languages.py b/tools/test-languages.py
index f61d6047..1af8b183 100644
--- a/tools/test-languages.py
+++ b/tools/test-languages.py
@@ -129,18 +129,19 @@ if(!bc){done({missing:true});return;}bc.currentWindowGlobal.getActor('VulpesProb
)
time.sleep(0.5)
- def state():
- return client.execute(
- "return Services.wm.getMostRecentWindow('vulpes:host').document.getElementById('ContentSelectDropdown')?.menupopup?.state;"
- )
-
def open_menu():
tap("settings", "document.querySelector('select[name=\"language.current\"]')")
- for _ in range(30):
- if state() == "open":
- return
- time.sleep(0.1)
- raise AssertionError("Native select did not open")
+ wait("settings", "return document.querySelector('#vulpes-value-selector')?.checkVisibility();")
+
+ def menu_tap(selector):
+ tap("settings", "document.querySelector(" + json.dumps("#vulpes-value-selector " + selector) + ")")
+
+ def choose(language):
+ selector = '[role="option"][data-value="' + language + '"]'
+ ev("settings", "document.querySelector(" + json.dumps("#vulpes-value-selector " + selector) +
+ ").scrollIntoView({block:'center'});return true;")
+ menu_tap(selector)
+ menu_tap('[data-action="confirm"]')
if args.restart_check:
check(
@@ -156,14 +157,9 @@ if(!bc){done({missing:true});return;}bc.currentWindowGlobal.getActor('VulpesProb
"return document.querySelector('select[name=\"language.current\"]').value;",
)
open_menu()
- check(
- "native-language-menu-styled",
- client.execute(
- "const w=Services.wm.getMostRecentWindow('vulpes:host');const item=w.document.querySelector('#ContentSelectDropdownPopup menuitem');return w.getComputedStyle(item.querySelector('.menu-highlightable-text')).display==='none' && w.getComputedStyle(item.querySelector('.menu-text')).display!=='none';"
- ),
- )
- shot("languages-native-menu")
- subprocess.run(["xdotool", "key", "Escape"], check=True)
+ check("gaia-language-menu", ev("settings", "return !!document.querySelector('#vulpes-value-selector [role=option][aria-selected=true]');"))
+ shot("languages-gaia-menu")
+ menu_tap('[data-action="cancel"]')
check(
"language-cancel-preserves-value",
ev(
@@ -174,8 +170,7 @@ if(!bc){done({missing:true});return;}bc.currentWindowGlobal.getActor('VulpesProb
),
)
open_menu()
- # Native menu keyboard selection exercises Gecko's input/change route.
- subprocess.run(["xdotool", "key", "Home", *(["Down"] * 8), "Return"], check=True)
+ choose("en-US")
check(
"language-english-applied",
wait(
@@ -188,21 +183,7 @@ if(!bc){done({missing:true});return;}bc.currentWindowGlobal.getActor('VulpesProb
wait("homescreen", "return document.documentElement.lang==='en-US';"),
)
open_menu()
- # Select French with a real pointer click on the native menu item.
- position = client.execute(
- "const w=Services.wm.getMostRecentWindow('vulpes:host');const e=[...w.document.querySelectorAll('#ContentSelectDropdownPopup menuitem')].find(e=>e.getAttribute('label').includes('Français'));e.scrollIntoView();const b=e.getBoundingClientRect();return {x:w.mozInnerScreenX+b.x+b.width/2,y:w.mozInnerScreenY+b.y+b.height/2};"
- )
- subprocess.run(
- [
- "xdotool",
- "mousemove",
- str(round(position["x"])),
- str(round(position["y"])),
- "click",
- "1",
- ],
- check=True,
- )
+ choose("fr")
check(
"language-french-applied",
wait(
diff --git a/tools/test-services.py b/tools/test-services.py
index ce60a7f8..e7e39300 100644
--- a/tools/test-services.py
+++ b/tools/test-services.py
@@ -54,6 +54,7 @@ results = {}
try:
for phase in ["first", "restart"]:
env = os.environ.copy()
+ env["MOZ_REMOTE_ALLOW_SYSTEM_ACCESS"] = "1"
for key in list(env):
if key.startswith("MOZ_DISABLE_") or key == "B2G_HOMESCREEN":
env.pop(key)
diff --git a/tundra/devices/sargo/engine-lock.json b/tundra/devices/sargo/engine-lock.json
new file mode 100644
index 00000000..1de67796
--- /dev/null
+++ b/tundra/devices/sargo/engine-lock.json
@@ -0,0 +1,14 @@
+{
+ "version": "161.0",
+ "runtime": "engines/161.0/firefox",
+ "archive": "https://archive.mozilla.org/pub/firefox/releases/161.0/linux-aarch64/en-US/firefox-161.0.tar.xz",
+ "sha512": "a4689c3cdd88e240db36c6cca06a1c3411568a4a0c1c6ce9944d939e8c7ad78cb42eaea049bffecfc4b49fa6f55467f64529775c471a6736d0fad30fa733da63",
+ "checksumSource": "https://archive.mozilla.org/pub/firefox/releases/161.0/SHA512SUMS",
+ "channel": "release",
+ "sourceArchive": "https://archive.mozilla.org/pub/firefox/releases/161.0/source/firefox-161.0.source.tar.xz",
+ "localChanges": [
+ "distribution/policies.json: pin engine; no automatic update"
+ ],
+ "gaiaPorted": false,
+ "architecture": "aarch64"
+}
diff --git a/tundra/devices/sargo/native-root.sh b/tundra/devices/sargo/native-root.sh
new file mode 100644
index 00000000..a962bd9f
--- /dev/null
+++ b/tundra/devices/sargo/native-root.sh
@@ -0,0 +1,106 @@
+#!/bin/sh
+# SPDX-License-Identifier: MPL-2.0
+# Called by rescue PID 1 only after the read-only storage check succeeds.
+set -eu
+BUILD_EPOCH=1795212545
+APPLY_NATIVE_CONFIG=1
+SYSTEM_IMAGE=/volume/tundra/images/c3017c3decc0824ed4a64124b5f7c47a7ceac5d116419bfd4fecdc4bdffd70b0.ext4
+SYSTEM_IMAGE_SHA=c3017c3decc0824ed4a64124b5f7c47a7ceac5d116419bfd4fecdc4bdffd70b0
+SYSTEM_IMAGE_BYTES=2684354560
+STATE_IMAGE=/volume/tundra/data/54b47c1b-1a3a-47b9-bace-11badc025f82.ext4
+STATE_UUID=54b47c1b-1a3a-47b9-bace-11badc025f82
+STATE_BYTES=2147483648
+# A kernel fallback date must not precede the build; RTC is not modified.
+if [ "$(date +%s)" -lt "${BUILD_EPOCH:-0}" ]; then date -s "@$BUILD_EPOCH"; fi
+trap 'echo TUNDRA_NATIVE_SETUP_FAILED; while :; do /bin/busybox sleep 5; done' EXIT
+: "${SYSTEM_IMAGE:?A bundled system image is required}"
+LOWER=/run/tundra-system
+if [ -n "${SYSTEM_IMAGE:-}" ]; then
+ test -f "$SYSTEM_IMAGE" && test ! -L "$SYSTEM_IMAGE"
+ test "$(stat -c %s "$SYSTEM_IMAGE")" = "$SYSTEM_IMAGE_BYTES"
+ mkdir -p /run/tundra-system
+ mount -t ext4 -o loop,ro,noload "$SYSTEM_IMAGE" /run/tundra-system
+ LOWER=/run/tundra-system
+fi
+test -f "$LOWER/etc/systemd/system/tundra.target"
+UPPER=/run/native-upper
+WORK=/run/native-work
+if [ -n "${STATE_IMAGE:-}" ]; then
+ test -f "$STATE_IMAGE" && test ! -L "$STATE_IMAGE"
+ test "$(stat -c %s "$STATE_IMAGE")" = "$STATE_BYTES"
+ blkid "$STATE_IMAGE" | grep -F "UUID=\"$STATE_UUID\"" >/dev/null
+ repaired=0
+ e2fsck -p "$STATE_IMAGE" || repaired=$?
+ test "$repaired" -le 1
+ mkdir -p /run/tundra-state
+ mount -t ext4 -o loop,rw,nosuid,nodev "$STATE_IMAGE" /run/tundra-state
+ # A data layer belongs to one immutable system image. Refuse accidental reuse.
+ test "$(cat /run/tundra-state/system.sha256)" = "$SYSTEM_IMAGE_SHA"
+ UPPER=/run/tundra-state/upper
+ WORK=/run/tundra-state/work
+fi
+mkdir -p "$UPPER" "$WORK" /newroot
+chmod 755 "$UPPER"
+mount -t overlay overlay -o "lowerdir=$LOWER,upperdir=$UPPER,workdir=$WORK" /newroot
+if [ -z "${SYSTEM_IMAGE:-}" ] || [ "${APPLY_NATIVE_CONFIG:-0}" = 1 ]; then
+ # Only the selected upper layer is edited; the system image stays read-only.
+ if [ -n "${STATE_IMAGE:-}" ]; then
+ mkdir -p /run/tundra-identity
+ for identity in machine-id passwd group shadow gshadow; do
+ if [ -s "/newroot/etc/$identity" ]; then
+ cp -p "/newroot/etc/$identity" "/run/tundra-identity/$identity"
+ fi
+ done
+ fi
+ rm -f /newroot/etc/tundra/hardware-enabled /newroot/etc/systemd/system/tundra.target.wants/ofono.service /newroot/etc/systemd/system/tundra.target.wants/tundra-audio.service /newroot/etc/tundra/network-enabled /newroot/etc/systemd/system/tundra.target.wants/NetworkManager.service /newroot/etc/systemd/system/tundra.target.wants/tundra-wifi.service
+ tar -xJf /native-config.tar -C /newroot
+ if [ -d /run/tundra-identity ]; then
+ for identity in /run/tundra-identity/*; do
+ [ -f "$identity" ] && cp -p "$identity" /newroot/etc/
+ done
+ chmod 644 /newroot/etc/machine-id
+ fi
+fi
+if [ -f /shared-ui.tar ]; then tar -xJf /shared-ui.tar -C /newroot; fi
+ENGINE=/volume/tundra/engines/p26-161
+test -x "$ENGINE/firefox/firefox"
+grep -qx 'Milestone=161.0' "$ENGINE/firefox/platform.ini"
+mkdir -p /newroot/opt/vulpes/engines/161.0/firefox
+mount --bind "$ENGINE/firefox" /newroot/opt/vulpes/engines/161.0/firefox
+mount --bind "$ENGINE/engine-lock.json" /newroot/opt/vulpes/engine-lock.json
+# A previous successful session must never count as proof of this boot.
+for log in test.json home.png session.pid gecko.log server.log compositor.log network-gecko.json wifi-ui.json; do
+ rm -f "/newroot/opt/vulpes/logs/$log"
+done
+mkdir -p /newroot/reference /newroot/run /newroot/root/.ssh
+if [ -z "${SYSTEM_IMAGE:-}" ]; then
+ : > /newroot/reference/android-rootfs.img
+ mount --bind /volume/var/lib/lxc/android/android-rootfs.img /newroot/reference/android-rootfs.img
+else
+ test -s /newroot/reference/android-rootfs.img
+fi
+mkdir -p /newroot/reference
+test -s /volume/tundra/hardware/vendor.img
+: > /newroot/reference/vendor.img
+mount --bind /volume/tundra/hardware/vendor.img /newroot/reference/vendor.img
+mount -o remount,bind,ro /newroot/reference/vendor.img
+test -s /volume/tundra/hardware/modem.img
+: > /newroot/reference/modem.img
+mount --bind /volume/tundra/hardware/modem.img /newroot/reference/modem.img
+mount -o remount,bind,ro /newroot/reference/modem.img
+mkdir -p /newroot/etc/tundra
+printf '%s\n' '{"images":{"vendor.img":{"source":"vendor_a.img","sha256":"d584429873c88db741b81144b55977bbd8126b3e877445901bee6a0bda7fe4d0","bytes":805306368},"modem.img":{"source":"modem_a.img","sha256":"fd0624b37ac1d80c064a9763c7e2d2d6f94c3fd5e4617965b735ad411a473d0a","bytes":115343360}}}' > /newroot/etc/tundra/hardware-images.json
+mkdir -p /newroot/usr/libexec /newroot/etc/systemd/system/tundra.target.wants
+mkdir -p /newroot/usr/share/doc/qbootctl
+cp /qbootctl-copyright /newroot/usr/share/doc/qbootctl/copyright
+cp /sbin/tundra-qbootctl /newroot/usr/libexec/tundra-qbootctl
+cp /standalone-boot-success.py /newroot/usr/libexec/tundra-mark-boot-success.py
+cp /standalone-boot-success.service /newroot/etc/systemd/system/tundra-boot-success.service
+ln -sf ../tundra-boot-success.service /newroot/etc/systemd/system/tundra.target.wants/tundra-boot-success.service
+# Installed lower layers stay reachable for the overlay/loop driver until reboot.
+mkdir -p /newroot/reference/tundra-volume
+mount --move /volume /newroot/reference/tundra-volume
+# Public boot: no USB maintenance account or shared SSH key.
+for fs in dev proc sys run; do mount --move "/$fs" "/newroot/$fs"; done
+# A static watchdog survives switch_root without needing the old /bin or /proc.
+exec switch_root /newroot /sbin/init --unit=tundra.target
diff --git a/tundra/devices/sargo/prepare-update.py b/tundra/devices/sargo/prepare-update.py
new file mode 100644
index 00000000..dce2b895
--- /dev/null
+++ b/tundra/devices/sargo/prepare-update.py
@@ -0,0 +1,57 @@
+#!/usr/bin/env python3
+"""Extract the upgrade payload from the clean installation image (Linux)."""
+import argparse
+import gzip
+import hashlib
+import json
+from pathlib import Path
+import subprocess
+import tarfile
+import tempfile
+
+def pack(tree, destination):
+ # A canonical uncompressed tar has the same digest with any gzip implementation.
+ with destination.open("wb") as file, gzip.GzipFile(filename="", fileobj=file, mode="wb", compresslevel=2, mtime=0) as compressed, tarfile.open(fileobj=compressed, mode="w|", format=tarfile.GNU_FORMAT) as archive:
+ for path in sorted(tree.rglob("*")):
+ name = path.relative_to(tree).as_posix()
+ header = archive.gettarinfo(str(path), arcname=name)
+ if not (header.isdir() or header.isfile()):
+ raise ValueError(f"Unexpected entry {name}")
+ header.uid = header.gid = header.mtime = 0
+ header.uname = header.gname = ""
+ if header.isfile():
+ with path.open("rb") as source:
+ archive.addfile(header, source)
+ else:
+ archive.addfile(header)
+
+def main():
+ parser = argparse.ArgumentParser(description=__doc__)
+ parser.add_argument("--work-dir", type=Path, default=Path.cwd(), help="Filesystem with 10 GiB available")
+ args = parser.parse_args()
+ base = Path(__file__).resolve().parent
+ with tempfile.TemporaryDirectory(dir=args.work_dir.resolve()) as temp:
+ work = Path(temp)
+ raw = work / "volume.ext4"
+ sparse = base / "userdata.img"
+ manifest = json.loads((base / "package.json").read_text())
+ with sparse.open("rb") as src:
+ if hashlib.file_digest(src, "sha256").hexdigest() != manifest["partitions"]["userdata"]["sha256"]:
+ raise ValueError("Invalid userdata.img digest")
+ subprocess.run(["simg2img", sparse, raw], check=True)
+ subprocess.run(["debugfs", "-R", 'rdump /tundra/engines/p26-161 .', raw], cwd=work, check=True)
+ tree = work / "p26-161"
+ if not (tree / "firefox/platform.ini").is_file():
+ raise ValueError("Missing runtime in installation image")
+ packed = work / "engine.tar.gz"
+ pack(tree, packed)
+ with gzip.open(packed, "rb") as data:
+ digest = hashlib.file_digest(data, "sha256").hexdigest()
+ if digest != (base / "engine-tar.sha256").read_text().strip():
+ raise ValueError("Reconstructed engine checksum differs")
+ import shutil
+ shutil.copyfile(packed, base / "engine.tar.gz")
+ print("engine.tar.gz ready for the recovery")
+
+if __name__ == "__main__":
+ main()
diff --git a/tundra/devices/sargo/stage-engine.sh b/tundra/devices/sargo/stage-engine.sh
new file mode 100644
index 00000000..073717d9
--- /dev/null
+++ b/tundra/devices/sargo/stage-engine.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+set -eu
+test "$(id -u)" = 0
+dev=/dev/block/by-name/userdata
+test -b "$dev" || dev=/dev/mmcblk0p72
+uuid=4e2a0eec-cd82-4a0a-ac57-70e79b3faebb
+blkid "$dev" | grep -F "UUID=\"$uuid\"" >/dev/null
+cd /tmp
+actual=$(gzip -dc engine.tar.gz | sha256sum)
+test "${actual%% *}" = "ebe0c80498f2a520f83e52e04cecda82c948f427b725605a7cac6b1135313a68"
+vol=$(mktemp -d /tmp/vulpes-volume.XXXXXX)
+mount -t ext4 -o rw "$dev" "$vol"
+trap 'umount "$vol" && rmdir "$vol"' EXIT
+test "$(cat "$vol/tundra-volume-id")" = "$uuid"
+test -f "$vol/tundra/images/c3017c3decc0824ed4a64124b5f7c47a7ceac5d116419bfd4fecdc4bdffd70b0.ext4"
+mkdir -p "$vol/tundra/engines"
+dest="$vol/tundra/engines/p26-161"
+test ! -e "$dest" || { echo "Engine directory already exists; inspect before proceeding." >&2; exit 1; }
+stage=$(mktemp -d "$vol/tundra/engines/.p26-161.XXXXXX")
+trap 'rm -rf "$stage"; umount "$vol" && rmdir "$vol"' EXIT
+tar -xzpf engine.tar.gz -C "$stage"
+chown -R 32011:32011 "$stage/firefox/vulpes" "$stage/firefox/defaults/pref" "$stage/firefox/vulpes.cfg"
+chmod 755 "$stage"
+test -x "$stage/firefox/firefox"
+grep -qx 'Milestone=161.0' "$stage/firefox/platform.ini"
+mv "$stage" "$dest"
+sync
+umount "$vol"
+trap - EXIT
+rmdir "$vol"
+echo 'Vulpes engine ready'
diff --git a/tundra/runtime/buttons.py b/tundra/runtime/buttons.py
index fd343de6..c870b2ce 100644
--- a/tundra/runtime/buttons.py
+++ b/tundra/runtime/buttons.py
@@ -107,21 +107,24 @@ def control(p):
def set_session_idle(idle):
"""Tell logind that Gaia has switched the display between active and idle."""
try:
- result = subprocess.run(['/usr/bin/loginctl', 'list-sessions', '--no-legend', '--no-pager'],
- capture_output=True, text=True, timeout=3, check=True)
- sessions = []
- for line in result.stdout.splitlines():
- fields = line.split()
- if len(fields) >= 2 and fields[1] == '32011' and fields[0].isalnum():
- sessions.append(fields[0])
+ bus = ['/usr/bin/busctl', '--system']
+ service = 'org.freedesktop.login1'
+ result = subprocess.run([*bus, '--json=short', 'call', service, '/org/freedesktop/login1',
+ service + '.Manager', 'ListSessions'],
+ capture_output=True, text=True, timeout=3, check=True)
+ rows, = json.loads(result.stdout)['data']
+ sessions = [path for _, uid, _, _, path in rows if uid == 32011]
if not sessions:
raise RuntimeError('No Tundra logind sessions found')
value = 'true' if idle else 'false'
- for session in sessions:
- subprocess.run(['/usr/bin/busctl', '--system', 'call', 'org.freedesktop.login1',
- '/org/freedesktop/login1/session/'+session,
- 'org.freedesktop.login1.Session', 'SetIdleHint', 'b', value],
- capture_output=True, text=True, timeout=3, check=True)
+ failures = []
+ for path in sessions:
+ reply = subprocess.run([*bus, 'call', service, path, service + '.Session',
+ 'SetIdleHint', 'b', value], capture_output=True, text=True, timeout=3)
+ if reply.returncode:
+ failures.append(path + ' ' + reply.stderr.strip())
+ if failures:
+ raise RuntimeError(', '.join(failures))
return True
except (OSError, RuntimeError, subprocess.SubprocessError) as error:
print('TUNDRA_LOGIND_IDLE_FAILED '+str(error), file=sys.stderr, flush=True)
@@ -149,7 +152,9 @@ def serve():
fd = os.open('/dev/input/'+device.name, os.O_RDONLY | os.O_NONBLOCK)
selector.register(fd, selectors.EVENT_READ)
while True:
- timeout = max(0, min(1, vibration.deadline - time.monotonic())) if vibration.deadline is not None else 1
+ timers = [t for t in (vibration.deadline, wake_recovery.deadline) if t is not None]
+ timeout = max(0, min(timers) - time.monotonic()) if timers else None
+ previous_sequence = state['sequence']
for key, _ in selector.select(timeout):
if key.fileobj is server:
conn, _ = server.accept()
@@ -178,7 +183,8 @@ def serve():
if vibration.deadline is not None:
vibration.advance(time.monotonic())
wake_recovery.advance(time.monotonic())
- publish()
+ if previous_sequence != state['sequence']:
+ publish()
def client():
raw = sys.stdin.read(1024)
diff --git a/tundra/runtime/camera-preview.py b/tundra/runtime/camera-preview.py
index d26d34d9..75e86f21 100644
--- a/tundra/runtime/camera-preview.py
+++ b/tundra/runtime/camera-preview.py
@@ -154,6 +154,20 @@ class Camera:
actual = int(self.read_parameters().get('zoom',index))
if not 0 <= actual < len(self.zoom_ratios): raise RuntimeError('CAMERA_INVALID_ZOOM_REPLY')
return {'zoom':self.zoom_ratios[actual]}
+ if action == 'focusMode':
+ mode = command.get('mode')
+ # AutoFocusMode from libhybris camera_compatibility_layer_capabilities.h.
+ modes = {'continuous-video': 1, 'auto': 2, 'macro': 3,
+ 'continuous-picture': 4, 'infinity': 5}
+ if mode not in modes or mode not in self.metadata()['focusModes']:
+ raise ValueError('CAMERA_FOCUS_UNAVAILABLE')
+ function(self.lib,'android_camera_stop_autofocus',[P])(self.camera)
+ if mode.startswith('continuous-'):
+ function(self.lib,'android_camera_reset_focus_region',[P])(self.camera)
+ function(self.lib,'android_camera_set_auto_focus_mode',[P,I])(self.camera,modes[mode])
+ if self.read_parameters().get('focus-mode') != mode:
+ raise RuntimeError('CAMERA_FOCUS_READBACK_FAILED')
+ return {'mode': mode}
if action == 'focus':
if 'auto' not in self.metadata()['focusModes']:
raise ValueError('CAMERA_FOCUS_UNAVAILABLE')
diff --git a/tundra/tests/test_buttons.py b/tundra/tests/test_buttons.py
index 0b6e976d..a484261f 100644
--- a/tundra/tests/test_buttons.py
+++ b/tundra/tests/test_buttons.py
@@ -21,13 +21,19 @@ class Buttons(unittest.TestCase):
with self.assertRaises(ValueError):b.control(p)
def test_display_state_updates_all_logind_sessions(self):
- sessions='1 32011 droidian - 1017 manager - no -\nc2 32011 droidian - 1082 background - no -\nc3 32011 droidian seat0 1119 user tty7 no -\n'
- with patch.object(b.subprocess,'run') as run:
- run.side_effect=[type('Result',(),{'stdout':sessions})(),None,None,None]
- self.assertTrue(b.set_session_idle(True))
- calls=[call.args[0] for call in run.call_args_list[1:]]
- self.assertEqual(len(calls),3)
- self.assertTrue(all(call[-2:]==['b','true'] for call in calls))
+ import subprocess
+ rows = [['1',32011,'droidian','','/org/freedesktop/login1/session/_31'],
+ ['c2',32011,'droidian','seat0','/org/freedesktop/login1/session/c2'],
+ ['2',1000,'tester','','/org/freedesktop/login1/session/_32']]
+ listing = subprocess.CompletedProcess([],0,b.json.dumps({'data':[rows]}))
+ for first_status in (0,1):
+ with patch.object(b.subprocess,'run') as run:
+ run.side_effect=[listing,subprocess.CompletedProcess([],first_status,'','error'),
+ subprocess.CompletedProcess([],0,'','')]
+ self.assertEqual(b.set_session_idle(True),first_status==0)
+ calls=[call.args[0] for call in run.call_args_list[1:]]
+ self.assertEqual([cmd[4] for cmd in calls],[rows[0][-1],rows[1][-1]])
+ self.assertTrue(all(cmd[-2:]==['b','true'] for cmd in calls))
def test_vibration_pattern_progresses_without_blocking_and_can_be_cancelled(self):
with tempfile.TemporaryDirectory() as d,patch.object(b,'VIBRATOR',Path(d)),patch.object(b.time,'monotonic',return_value=10):
diff --git a/tundra/tools/battery-idle-log.py b/tundra/tools/battery-idle-log.py
index f970b269..b1d2d3be 100644
--- a/tundra/tools/battery-idle-log.py
+++ b/tundra/tools/battery-idle-log.py
@@ -21,7 +21,8 @@ def sample():
for path in sorted(Path('/sys/class/power_supply').iterdir()):
supplies[path.name] = values(path, (
'type', 'status', 'online', 'capacity', 'current_now',
- 'voltage_now', 'power_now', 'charge_now', 'energy_now', 'temp'))
+ 'voltage_now', 'power_now', 'charge_now', 'charge_counter', 'charge_full',
+ 'charge_full_design', 'energy_now', 'temp'))
thermal = {}
for path in sorted(Path('/sys/class/thermal').glob('thermal_zone*')):
item = values(path, ('type', 'temp'))
@@ -33,6 +34,8 @@ def sample():
if item:
idle[str(path.relative_to('/sys/devices/system/cpu'))] = item
return {'timeUnix': time.time(), 'timeMonotonic': time.monotonic(),
+ 'timeBoottime': time.clock_gettime(time.CLOCK_BOOTTIME),
+ 'brightness': values(Path('/sys/class/backlight/panel0-backlight'), ('brightness',)),
'powerSupplies': supplies, 'thermalZones': thermal, 'cpuIdle': idle}
diff --git a/tundra/tools/shared_ui.py b/tundra/tools/shared_ui.py
index 7b508ef4..d38f3982 100644
--- a/tundra/tools/shared_ui.py
+++ b/tundra/tools/shared_ui.py
@@ -65,12 +65,16 @@ def selected_files():
ROOT.parent/'assets/webapps/clock.gaiamobile.org/js/panels/timer/main.js',
ROOT.parent/'assets/webapps/search.gaiamobile.org/manifest.webapp',
ROOT.parent/'assets/webapps/homescreen.gaiamobile.org/gaia_build_defer_index.js',
+ ROOT.parent/'assets/webapps/settings.gaiamobile.org/index.html',
+ ROOT.parent/'assets/webapps/settings.gaiamobile.org/resources/open_source_license.html',
+ ROOT.parent/'assets/webapps/settings.gaiamobile.org/resources/obtaining_source_code.html',
ROOT.parent/'assets/webapps/settings.gaiamobile.org/js/panels/app_permissions_list/panel.js',
ROOT.parent/'assets/webapps/settings.gaiamobile.org/js/panels/screen_lock_passcode/panel.js',
ROOT.parent/'assets/webapps/verticalhome.gaiamobile.org/gaia_build_defer_index.js',
ROOT.parent/'assets/webapps/verticalhome.gaiamobile.org/js/init.json',
ROOT.parent/'gaia/apps/verticalhome/js/sources/application.js',
ROOT.parent/'assets/webapps/wallpaper.gaiamobile.org/style/wallpaper.css',
+ ROOT.parent/'assets/webapps/wallpaper.gaiamobile.org/resources/list.json',
ROOT.parent/'assets/webapps/ringtones.gaiamobile.org/gaia_build_defer_pick.js',
ROOT.parent/'assets/webapps/ringtones.gaiamobile.org/gaia_build_defer_manage.js',
ROOT.parent/'assets/webapps/ringtones.gaiamobile.org/js/tone_player.js',