Open Bug 1918057 Opened 1 year ago Updated 1 year ago

Multiple StrictMode violations on Xiaomi device

Categories

(Firefox for Android :: General, task)

Firefox 132
All
Android
task

Tracking

()

People

(Reporter: polly, Unassigned)

Details

Attachments

(1 file)

Steps to reproduce

Launch Firefox debug build (from Android Studio)

Expected behavior

App runs ok

Actual behavior

Startup crash due to StrictMode policy violations

Device information

  • Firefox version: 132 (debug build)
  • Android device model: Xiaomi 11 Lite 5G NE
  • Android OS version: 14

Any additional information?

It looks like there is an issue reading from the disk to load the fonts on this device.
It would be good to confirm if this is an issue on other Xiaomi devices or just this one, and to understand if we should be doing anything differently with our font loading.
The app starts up fine if you turn off strict mode.

another issue happens with some reflection stuff that leakcanary does on initialisation, causing

StrictMode policy violation: android.os.strictmode.NonSdkApiUsedViolation: Lcom/android/internal/policy/DecorView;->mWindow:Lcom/android/internal/policy/PhoneWindow;
	at android.os.StrictMode.lambda$static$1(StrictMode.java:430)
	at android.os.StrictMode$$ExternalSyntheticLambda2.accept(
Unknown Source:2)
	at java.lang.Class.getDeclaredField(Native Method)
	at curtains.internal.WindowSpy$windowField$2.invoke(
WindowSpy.kt:60)
	at curtains.internal.WindowSpy$windowField$2.invoke(
WindowSpy.kt:14)
	at kotlin.UnsafeLazyImpl.getValue(Lazy.kt:81)
	at curtains.internal.WindowSpy.getWindowField(Unknown 
Source:2)
	at curtains.internal.WindowSpy.pullWindow(WindowSpy.kt:80)
	at curtains.WindowsKt.getPhoneWindow(Windows.kt:34)
	at leakcanary.RootViewWatcher$listener$1.onRootViewAdded(
RootViewWatcher.kt:46)

more info on the need for reflection here
not sure why this would be specific to Xiaomi...

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: