Skip to content

Tags: Igalia/wolvic

Tags

v1.9

Toggle v1.9's commit message
Fix visionglass startup crash on fresh install

VRBrowserActivity is launched and PlatformActivity.onCreate detects
that the legal terms have not been accepted yet. It then redirects to
FirstRunActivity and finishes the activity early, before mBinding (and
the rest of the phone-UI state) has been initialized. Then this
exception is thrown:

FATAL EXCEPTION: main
  Process: com.igalia.wolvic.world.visionglass
  java.lang.RuntimeException: Unable to start activity ComponentInfo{
      com.igalia.wolvic.world.visionglass/com.igalia.wolvic.VRBrowserActivity}:
  java.lang.NullPointerException: Attempt to read from field
      "com.google.android.material.button.MaterialButton
       com.igalia.wolvic.databinding.VisionglassLayoutBinding.homeButton"
      on a null object reference
      at com.igalia.wolvic.PlatformActivity$PlatformActivityPluginVisionGlass.<init>
      at com.igalia.wolvic.VRBrowserActivity.onCreate

The early return left VRBrowserActivity.onCreate to continue running:
it called initializeWidgets() -> createPlatformPlugin(), whose
constructor dereferences the still null mBinding. Even when guarded,
further teardown paths fail because PlatformActivity.onCreate registered
broadcast receivers, sensors and display listeners only on the
happy path while onDestroy/onPause/onResume tear them down
unconditionally.

The fix makes FirstRunActivity the only externally-reachable entry
point on visionglass, so VRBrowserActivity is never instantiated until
both legal flags are set:

* Strip every inherited intent filter from VRBrowserActivity in the
  visionglass manifest with <intent-filter tools:node="removeAll"/>.
  This removes MAIN/LAUNCHER plus the VIEW (http/https), VIEW
  (wolvic://) and SEND filters declared in the base manifest, which
  would otherwise let external apps (deep links, share sheet) reach
  VRBrowserActivity directly and bypass the legal gate.
* Set android:exported="false" on VRBrowserActivity (with
  tools:replace) so that even an explicit ComponentName launch from
  another app cannot reach it without going through FirstRunActivity.
* Re-declare MAIN/LAUNCHER, VIEW (http/https), VIEW (wolvic://) and
  SEND on FirstRunActivity so every external entry point routes through
  it.
* Add src/visionglassDebug/AndroidManifest.xml (wired up in
  app/build.gradle mirroring the oculusvr pattern) to override
  src/debug/AndroidManifest.xml on visionglass debug builds, where it
  would otherwise reattach MAIN/LAUNCHER to VRBrowserActivity. The
  same overlay is also applied to visionglass release variants when
  useDebugSigningOnRelease=true, since that path also reads
  src/debug/AndroidManifest.xml.
* When FirstRunActivity forwards to VRBrowserActivity, clone the
  launching intent rather than building a fresh one, so URLs from VIEW
  intents and payloads from SEND intents survive the legal hop.
* Short-circuit FirstRunActivity.onCreate when both flags are already
  accepted: skip setContentView, prefs registration and fragment work,
  and jump straight to VRBrowserActivity. This keeps the normal launch
  path lightweight.
* Move setTheme() before setContentView() in FirstRunActivity.onCreate
  so the theme applies before layout inflation.
* Guard FirstRunActivity.onDestroy so it tolerates the short-circuit
  path where mPrefs was never assigned.

v1.3-chromium

Toggle v1.3-chromium's commit message
Fix visionglass startup crash on fresh install

VRBrowserActivity is launched and PlatformActivity.onCreate detects
that the legal terms have not been accepted yet. It then redirects to
FirstRunActivity and finishes the activity early, before mBinding (and
the rest of the phone-UI state) has been initialized. Then this
exception is thrown:

FATAL EXCEPTION: main
  Process: com.igalia.wolvic.world.visionglass
  java.lang.RuntimeException: Unable to start activity ComponentInfo{
      com.igalia.wolvic.world.visionglass/com.igalia.wolvic.VRBrowserActivity}:
  java.lang.NullPointerException: Attempt to read from field
      "com.google.android.material.button.MaterialButton
       com.igalia.wolvic.databinding.VisionglassLayoutBinding.homeButton"
      on a null object reference
      at com.igalia.wolvic.PlatformActivity$PlatformActivityPluginVisionGlass.<init>
      at com.igalia.wolvic.VRBrowserActivity.onCreate

The early return left VRBrowserActivity.onCreate to continue running:
it called initializeWidgets() -> createPlatformPlugin(), whose
constructor dereferences the still null mBinding. Even when guarded,
further teardown paths fail because PlatformActivity.onCreate registered
broadcast receivers, sensors and display listeners only on the
happy path while onDestroy/onPause/onResume tear them down
unconditionally.

The fix makes FirstRunActivity the only externally-reachable entry
point on visionglass, so VRBrowserActivity is never instantiated until
both legal flags are set:

* Strip every inherited intent filter from VRBrowserActivity in the
  visionglass manifest with <intent-filter tools:node="removeAll"/>.
  This removes MAIN/LAUNCHER plus the VIEW (http/https), VIEW
  (wolvic://) and SEND filters declared in the base manifest, which
  would otherwise let external apps (deep links, share sheet) reach
  VRBrowserActivity directly and bypass the legal gate.
* Set android:exported="false" on VRBrowserActivity (with
  tools:replace) so that even an explicit ComponentName launch from
  another app cannot reach it without going through FirstRunActivity.
* Re-declare MAIN/LAUNCHER, VIEW (http/https), VIEW (wolvic://) and
  SEND on FirstRunActivity so every external entry point routes through
  it.
* Add src/visionglassDebug/AndroidManifest.xml (wired up in
  app/build.gradle mirroring the oculusvr pattern) to override
  src/debug/AndroidManifest.xml on visionglass debug builds, where it
  would otherwise reattach MAIN/LAUNCHER to VRBrowserActivity. The
  same overlay is also applied to visionglass release variants when
  useDebugSigningOnRelease=true, since that path also reads
  src/debug/AndroidManifest.xml.
* When FirstRunActivity forwards to VRBrowserActivity, clone the
  launching intent rather than building a fresh one, so URLs from VIEW
  intents and payloads from SEND intents survive the legal hop.
* Short-circuit FirstRunActivity.onCreate when both flags are already
  accepted: skip setContentView, prefs registration and fragment work,
  and jump straight to VRBrowserActivity. This keeps the normal launch
  path lightweight.
* Move setTheme() before setContentView() in FirstRunActivity.onCreate
  so the theme applies before layout inflation.
* Guard FirstRunActivity.onDestroy so it tolerates the short-circuit
  path where mPrefs was never assigned.

v1.8.3

Toggle v1.8.3's commit message
[Chromium] Fix the total matches count in find in page

The code assumes that the Web Engine reports the number of matches only
once (as Gecko does). However Chromium reports partial results on the go.
As the code was only considering the first notification from the engine
we were not properly picking the right values for current and total
number of matches (just the first partial results).

Fixes #1481

v1.2.3-chromium

Toggle v1.2.3-chromium's commit message
[Chromium] Fix the total matches count in find in page

The code assumes that the Web Engine reports the number of matches only
once (as Gecko does). However Chromium reports partial results on the go.
As the code was only considering the first notification from the engine
we were not properly picking the right values for current and total
number of matches (just the first partial results).

Fixes #1481

v1.8.2

Toggle v1.8.2's commit message
Bump version code for 1.8.2

v1.2.2-chromium

Toggle v1.2.2-chromium's commit message
Bump version code for 1.8.2

v1.2.1-chromium

Toggle v1.2.1-chromium's commit message
Set version name + remove minify

v1.8.1

Toggle v1.8.1's commit message
Bump version code for 1.8.1

v1.8.0

Toggle v1.8.0's commit message
Bump version code for 1.8.0

v1.2-chromium

Toggle v1.2-chromium's commit message
[Chromium] Set version name for release

Also disable minification as it still causes many issues with
release packages.