Release Vulpes OS 2.7-preview.22

This commit is contained in:
OverSu 2026-10-22 20:42:26 +02:00
commit a138f97877
294 changed files with 515786 additions and 187 deletions

View file

@ -15,6 +15,11 @@ import org.mozilla.geckoview.*;
public final class MainActivity extends Activity {
void updateTrackingProtection(boolean enabled) {
if (gaia != null) gaia.getSettings().setUseTrackingProtection(enabled);
if (web != null) web.getSettings().setUseTrackingProtection(enabled);
}
private VulpesApplication app;
private GeckoSession gaia, web;
private GeckoView gaiaView, webView;
@ -130,6 +135,7 @@ public final class MainActivity extends Activity {
? app.gaiaSession
: new GeckoSession(
new GeckoSessionSettings.Builder()
.useTrackingProtection(app.trackingProtection)
.displayMode(GeckoSessionSettings.DISPLAY_MODE_STANDALONE)
.build()
);
@ -216,7 +222,8 @@ public final class MainActivity extends Activity {
return;
}
if (web == null) {
web = new GeckoSession();
web = new GeckoSession(new GeckoSessionSettings.Builder()
.useTrackingProtection(app.trackingProtection).build());
web.setContentDelegate(content);
web.setPromptDelegate(prompts);
web.setPermissionDelegate(permissions);

View file

@ -20,6 +20,7 @@ public final class VulpesApplication extends Application {
boolean pendingScreenLock;
boolean homeVisible;
boolean homeAtBottom;
boolean trackingProtection = true;
@Override
public void onCreate() {
@ -66,6 +67,8 @@ public final class VulpesApplication extends Application {
.locales(new String[] { "fr", "en-US" })
.automaticFontSizeAdjustment(false)
.fontInflation(false)
.contentBlocking(new ContentBlocking.Settings.Builder()
.antiTracking(ContentBlocking.AntiTracking.DEFAULT).build())
.build()
);
services = new AndroidServices(this);
@ -104,6 +107,12 @@ public final class VulpesApplication extends Application {
return GeckoResult.fromException(new SecurityException("EXTENSION_REQUIRED"));
}
JSONObject json = (JSONObject) message;
if (json.optString("type").equals("privacy.configure")) {
trackingProtection = json.optBoolean("enabled", true);
if (gaiaSession != null) gaiaSession.getSettings().setUseTrackingProtection(trackingProtection);
if (activity != null) activity.updateTrackingProtection(trackingProtection);
return GeckoResult.fromValue(null);
}
if (json.optString("type").equals("marketplace.return") && activity!=null) {activity.runOnUiThread(()->activity.closeBrowser());return GeckoResult.fromValue(null);}
if (json.optString("type").startsWith("packages.")) {
GeckoResult<Object> result=new GeckoResult<>();