title: Android 9 phone crashes when app is launched
body: <p>My app only crashes on <code>android</code> 9. It works fine on other <code>android</code> <code>platforms</code>. What can be the reasons?
  I receive the following error:</p>
  
  <blockquote>
    <p>ui.activities.StartActivity}: java.lang.SecurityException: Call from
    user 0 as user -1 without permission INTERACT_ACROSS_USERS or
    INTERACT_ACROSS_USERS_FULL not allowed</p>
  </blockquote>
  
  <pre><code>09-07 14:57:45.917 17829-17829/XXXXXXXXX E/AndroidRuntime: FATAL EXCEPTION: main
  Process: XXXXXXXXX, PID: 17829
  java.lang.RuntimeException: Unable to start activity ComponentInfo{XXXXXXXXX/XXXXXXXXX.ui.activities.StartActivity}: 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:2913)
      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
      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:1808)
      at android.os.Handler.dispatchMessage(Handler.java:106)
      at android.os.Looper.loop(Looper.java:193)
      at android.app.ActivityThread.main(ActivityThread.java:6669)
      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.&lt;init&gt;(AccessibilityManager.java:358)
      at android.view.accessibility.AccessibilityManager.getInstance(AccessibilityManager.java:336)
      at android.view.View.setFlags(View.java:14008)
      at android.view.View.&lt;init&gt;(View.java:5565)
      at android.view.ViewGroup.&lt;init&gt;(ViewGroup.java:659)
      at android.view.ViewGroup.&lt;init&gt;(ViewGroup.java:655)
      at android.view.ViewGroup.&lt;init&gt;(ViewGroup.java:651)
      at android.view.ViewGroup.&lt;init&gt;(ViewGroup.java:647)
      at android.widget.FrameLayout.&lt;init&gt;(FrameLayout.java:78)
      at com.android.internal.policy.DecorView.&lt;init&gt;(DecorView.java:255)
      at com.android.internal.policy.PhoneWindow.generateDecor(PhoneWindow.java:2310)
      at com.android.internal.policy.PhoneWindow.installDecor(PhoneWindow.java:2662)
      at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:410)
      at android.app.Activity.setContentView(Activity.java:2771)
      at XXXXXXXXX.ui.activities.StartActivity.onCreate(StartActivity.java:15)
      at android.app.Activity.performCreate(Activity.java:7136)
      at android.app.Activity.performCreate(Activity.java:7127)
      at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893)
      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048) 
      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:1808) 
      at android.os.Handler.dispatchMessage(Handler.java:106) 
      at android.os.Looper.loop(Looper.java:193) 
      at android.app.ActivityThread.main(ActivityThread.java:6669) 
      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)
  </code></pre>
  
  <p>09-07 14:57:49.921 17829-17829/XXXXXXXXX E/CrashlyticsCore: Failed to execute task.
      java.util.concurrent.TimeoutException
          at java.util.concurrent.FutureTask.get(FutureTask.java:206)
          at com.crashlytics.android.core.CrashlyticsBackgroundWorker.submitAndWait(CrashlyticsBackgroundWorker.java:41)
          at com.crashlytics.android.core.CrashlyticsController.handleUncaughtException(CrashlyticsController.java:320)
          at com.crashlytics.android.core.CrashlyticsController$6.onUncaughtException(CrashlyticsController.java:300)
          at com.crashlytics.android.core.CrashlyticsUncaughtExceptionHandler.uncaughtException(CrashlyticsUncaughtExceptionHandler.java:42)
          at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1068)
          at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1063)
          at java.lang.Thread.dispatchUncaughtException(Thread.java:1955)</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical" android:layout_width="match_parent"
  android:layout_height="match_parent"&gt;
  &lt;ImageView
      android:id="@+id/imageView"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:scaleType="centerCrop"
      android:src="@drawable/splash"/&gt;
  &lt;/LinearLayout&gt;
  
  OnCreate:
  @Override
  protected void onCreate(Bundle savedInstanceState) {
     super.onCreate(savedInstanceState);
     setContentView(R.layout.activity_splash);
  
  
  
  
  Manifest:
  &lt;activity
         android:name=".ui.activities.StartActivity"
         android:launchMode="singleTask"
         android:screenOrientation="portrait" &gt;
         &lt;intent-filter&gt;
             &lt;action android:name="android.intent.action.MAIN" /&gt;
             &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
         &lt;/intent-filter&gt;
     &lt;/activity&gt;
  </code></pre>