Closed arifhn closed 8 years ago
Does it throw an exception or just never return from the call?
If possible, try delaying your preference loading to a later point in the initialization process. If that isn't possible however, here are some alternatives:
sendBroadcast()
and pass a ResultReceiver
as an extra. In your app (with access to the preferences), handle the broadcast and pass the necessary data back through the ResultReceiver
. This is how GravityBox does it, IIRC. Note that this is asynchronous, so you must be able to handle the callback running at an unknown point in the future (or maybe even not at all if things go wrong).Hello, Its not throwing any Exception, just waiting for it and never return.
Yes, I think ContentProvider is not the proper way to store preference if we need it immediately while package is loading (including system packages). On my case, I'm still using your CP solution but ignoring all system packages so it will not try to query the CP.
For now I think we can not do anything for this issue, so I will close it. We need to think another way how to provide best configuration db for Xposed modules.
Thank you.
I created an app with list of package that enable or disable feature. When the module get called (I hook onCreate for all Application.class) it will use RemotePreference with context from the Application. The problem occurs when com.android.systemui get loaded before my content provider start (it happen on some device) then the boot process keep waiting for the CP.