Вызов от пользователя 0 как пользователя -1 без разрешения INTERACT_ACROSS_USERS или INTERACT_ACROSS_USERS_FULL не разрешен - PullRequest
0 голосов
/ 19 января 2019

мое приложение работает нормально на устройствах с Android <9, но на Android 9 я получил следующую ошибку, я попытался удалить мои стили, но повторил ту же ошибку, хотя это был запрос OkHttp, а также я попытался полностью удалить свой OkHttpClientClientКонструктор из класса приложения, но, похоже, ничего не работает :( Любые идеи? </p>

E/AndroidRuntime: FATAL EXCEPTION: main
    Process: io.a.software.app, PID: 10551
    java.lang.RuntimeException: Unable to start activity ComponentInfo{io.a.software.app/io.a.software.app.ui.SplashActivity}: java.lang.SecurityException: Call from user 0 as user -1 without permission INTERACT_ACROSS_USERS or INTERACT_ACROSS_USERS_FULL not allowed.
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2902)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3037)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1797)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6642)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
     Caused by: java.lang.SecurityException: Call from user 0 as user -1 without permission INTERACT_ACROSS_USERS or INTERACT_ACROSS_USERS_FULL not allowed.
        at android.os.Parcel.createException(Parcel.java:1942)
        at android.os.Parcel.readException(Parcel.java:1910)
        at android.os.Parcel.readException(Parcel.java:1860)
        at android.view.accessibility.IAccessibilityManager$Stub$Proxy.addClient(IAccessibilityManager.java:295)
        at android.view.accessibility.AccessibilityManager.tryConnectToServiceLocked(AccessibilityManager.java:1125)
        at android.view.accessibility.AccessibilityManager.<init>(AccessibilityManager.java:358)
        at android.view.accessibility.AccessibilityManager.getInstance(AccessibilityManager.java:336)
        at android.view.View.setFlags(View.java:14010)
        at android.view.View.<init>(View.java:5565)
        at android.view.ViewGroup.<init>(ViewGroup.java:659)
        at android.view.ViewGroup.<init>(ViewGroup.java:655)
        at android.view.ViewGroup.<init>(ViewGroup.java:651)
        at android.view.ViewGroup.<init>(ViewGroup.java:647)
        at android.widget.FrameLayout.<init>(FrameLayout.java:78)
        at com.android.internal.policy.DecorView.<init>(DecorView.java:255)
        at com.android.internal.policy.PhoneWindow.generateDecor(PhoneWindow.java:2305)
        at com.android.internal.policy.PhoneWindow.installDecor(PhoneWindow.java:2657)
        at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:410)
        at android.app.Activity.setContentView(Activity.java:2769)
        at io.a.software.app.ui.SplashActivity.onCreate(SplashActivity.kt:28)
        at android.app.Activity.performCreate(Activity.java:7131)
        at android.app.Activity.performCreate(Activity.java:7122)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2882)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3037) 
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) 
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) 
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1797) 
        at android.os.Handler.dispatchMessage(Handler.java:106) 
        at android.os.Looper.loop(Looper.java:193) 
        at android.app.ActivityThread.main(ActivityThread.java:6642) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) 
     Caused by: android.os.RemoteException: Remote stack trace:
        at com.android.server.accessibility.AccessibilityManagerService$SecurityPolicy.resolveCallingUserIdEnforcingPermissionsLocked(AccessibilityManagerService.java:3522)
        at com.android.server.accessibility.AccessibilityManagerService.addClient(AccessibilityManagerService.java:487)
        at android.view.accessibility.IAccessibilityManager$Stub.onTransact(IAccessibilityManager.java:82)
        at android.os.Binder.execTransact(Binder.java:731)

, и это мой файл XML SplashCreen Activity_splash.xml

<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center"
android:background="@android:color/white">

<ImageView
    android:layout_width="wrap_content"
    android:layout_height="200dp"
    android:layout_marginBottom="20dp"
    android:scaleType="centerInside"
    android:src="@drawable/ic_logo"/>

<ProgressBar
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" />

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...