Tags: Igalia/wolvic
Tags
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.
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.
[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
[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
PreviousNext