0

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?

  • For instant app WRITE_SETTINGS/WRITE_SECURE_SETTINGS permissions not allowed for now. can you check more info https://developer.android.com/topic/instant-apps/faqs.html – Prags Mar 16 '18 at 13:11
  • Same as https://stackoverflow.com/questions/49141740/fatal-exception-java-lang-securityexception-setting-enable-navbar-is-not-acces - known issue https://issuetracker.google.com/issues/72611334 – TWL Mar 16 '18 at 18:01
  • Should be fixed by the OEM applying https://android-review.googlesource.com/c/platform/frameworks/base/+/577142 – Prags Mar 17 '18 at 09:00
  • Did you try posting this in [android-instant-apps issue tracker](https://github.com/googlesamples/android-instant-apps/issues)? If this is an issue in Android O, you may get a more accurate answer. Hope this helps. – Mr.Rebot Mar 18 '18 at 12:35

0 Answers0