Fatal Exception: java.lang.IllegalArgumentException: Unknown URI content://com.xiaomi.xmsf.push.control.APIProvider
at android.content.ContentResolver.call(ContentResolver.java:1721)
at top.trumeet.common.push.ControllerImpl.call(ControllerImpl.java:28)
at top.trumeet.common.push.ControllerImpl.setEnable(ControllerImpl.java:54)
at top.trumeet.mipushframework.MainFragment.lambda$initSwitch$0$MainFragment(MainFragment.java:203)
at top.trumeet.mipushframework.MainFragment$$Lambda$0.onCheckedChanged(Unknown Source:2)
at android.widget.CompoundButton.setChecked(CompoundButton.java:171)
at android.support.v7.widget.SwitchCompat.setChecked(SwitchCompat.java:1056)
at android.support.v7.widget.SwitchCompat.toggle(SwitchCompat.java:1051)
at android.widget.CompoundButton.performClick(CompoundButton.java:132)
at android.view.View$PerformClick.run(View.java:24803)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6650)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:818)
ContentResolver
的所有跨进程调用(增删改查及call
)一加 ROM 有一个 「高级优化」,开启后被 Android 电池优化的应用都会受到此限制。现在暂时解决方案是强制用户去除优化。