I met a crash issue when instant app running on Samsung device, here is the crash log:
Fatal Exception: java.lang.SecurityException: Setting aod_show_state is not accessible from ephemeral package xx.xx.xx
at android.os.Parcel.readException(Parcel.java:1958)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:183)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
at android.content.ContentProviderProxy.call(ContentProviderNative.java:651)
at android.provider.Settings$NameValueCache.getStringForUser(Settings.java:1923)
at android.provider.Settings$System.getStringForUser(Settings.java:2229)
at android.provider.Settings$System.getIntForUser(Settings.java:2299)
at android.provider.Settings$System.getInt(Settings.java:2294)
at android.view.ViewRootImpl$1.toViewScreenState(ViewRootImpl.java:1363)
at android.view.ViewRootImpl$1.onDisplayChanged(ViewRootImpl.java:1319)
at android.hardware.display.DisplayManagerGlobal$DisplayListenerDelegate.handleMessage(DisplayManagerGlobal.java:966)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6938)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Seems like it's trying to access the aod_show_state
Settings(which is the specific feature called "Always on Display" on Samsung device), and it requires permission WRITE_SETTINGS
/WRITE_SECURE_SETTINGS
, and the instant app does not support these two permissions, then app crashed...
Is there any way to solve this problem?