title: crash before app starts : SecurityException: Permission Denial: INTERACT_ACROSS_USERS_FULL
body: <h2>Background</h2>
  
  <p>I have a rooted device, which is Galaxy S3 I9300 , with Samsung stock based ROM, based on Android 4.3.</p>
  
  <p>I never had any problems running an app i'm working on with this device.</p>
  
  <h2>The problem</h2>
  
  <p>ever since yesterday (and I didn't change anything on the device), each time I open the app, it shows for a very short time, closes itself without any crash dialog yet it shows the next log:</p>
  
  <pre><code>01-30 09:27:18.325: E/DatabaseUtils(2366): Writing exception to parcel
  01-30 09:27:18.325: E/DatabaseUtils(2366): java.lang.SecurityException: Permission Denial: get/set setting for user asks to run as user -2 but is calling from user 0; this requires android.permission.INTERACT_ACROSS_USERS_FULL
  01-30 09:27:18.325: E/DatabaseUtils(2366):  at com.android.server.am.ActivityManagerService.handleIncomingUser(ActivityManagerService.java:13140)
  01-30 09:27:18.325: E/DatabaseUtils(2366):  at android.app.ActivityManager.handleIncomingUser(ActivityManager.java:2038)
  01-30 09:27:18.325: E/DatabaseUtils(2366):  at com.android.providers.settings.SettingsProvider.callFromPackage(SettingsProvider.java:607)
  01-30 09:27:18.325: E/DatabaseUtils(2366):  at android.content.ContentProvider$Transport.call(ContentProvider.java:279)
  01-30 09:27:18.325: E/DatabaseUtils(2366):  at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:273)
  01-30 09:27:18.325: E/DatabaseUtils(2366):  at android.os.Binder.execTransact(Binder.java:388)
  01-30 09:27:18.325: E/DatabaseUtils(2366):  at dalvik.system.NativeStart.run(Native Method)
  </code></pre>
  
  <p>it doesn't even get to the code of the class that extends Application ...</p>
  
  <h2>What I've found</h2>
  
  <p>It seems that this problem is very common (many have reported about it), but I can't find any solution and why it occurs, other than having a rooted device.</p>
  
  <p>People also say the permission that is written here is actually a system permission, but I never even heard of it, let alone use it (not even sure what it is).</p>
  
  <p>Problem is, the app I'm working on doesn't have anything related to root, plus it worked just a few days ago.</p>
  
  <p>I've tried to re-install the ROM (Omega ROM v54) and also disable anything related to xposed framework. it didn't help.</p>
  
  <h2>The question</h2>
  
  <p>How do I fix this issue? How would I know other users won't have this problem?</p>
  
  <p>Is it even related to rooted devices? </p>
  
  <hr>
  
  <p>EDIT: i thought i've found an answer that fixes it, by choosing "revoke USB debugging..." on the developers section of the settings screen. it seemed to work at first, but later the problem returned and clicking it didn't do anything helpful anymore...</p>
  
  <hr>
  
  <p>EDIT: I think it's just a bug on the app itself or the ROM, since I can't reproduce it anymore. It's quite weird since I'm quite sure I've tried to debug the app and put a breakpoint on the onCreate method of the acitivity (and maybe of the application class itself) and it didn't stop there.</p>