title: Odd "Class not found when unmarshalling" error
body: <p>So I encountered a strange <em>Class not found when unmarshalling</em> error in my app. Everytime I fire up an activity with parcelable object in the intent I get this error but everything seems to work fine.  I wrote a simple app to test parcels and this error. The app has one button which launches new activity with following code:</p>
  
  <pre><code>public void onClick(View v) {
      Intent i = new Intent(getActivity(), Display.class);
      Data data = new Data(49, "Foobar");
      i.putExtra("data", data);
      startActivity(i);
  }
  </code></pre>
  
  <p>When I tap the button I get looong error/stacktrace which you'll find in the bottom of this post. The interesting thing is that I don't even need to handle the bundle/parcel/data in the new activity to get this error. I'm starting to belive that my phone(Galaxy S3 LTE) f*cks with the parcel somehow since I haven't been able to reproduce this error with emulator or S2.</p>
  
  <p>Has anyone else encountered this behaviour or have some ideas how I could try to fix this?</p>
  
  <p>The parcel object I use is the following:</p>
  
  <pre><code>public class Data implements Parcelable {
      private int mNumber;
      private String mText;
  
      @Override
      public int describeContents() {
          return 0;
      }
      @Override
      public void writeToParcel(Parcel dest, int flags) {
          dest.writeInt(mNumber);
          dest.writeString(mText);
      }
      public Data(Parcel in) {
          mNumber = in.readInt();
          mText = in.readString();
      }
      public static final Creator&lt;Data&gt; CREATOR = new Creator&lt;Data&gt;() {
          @Override
          public Data createFromParcel(Parcel source) {
              return new Data(source);
          }
          @Override
          public Data[] newArray(int size) {
              return new Data[size];
          }
      };
      public int getNumber() {
          return mNumber;
      }
      public String getText() {
          return mText;
      }
      public Data(int num, String s) {
          mNumber = num;
          mText = s;
      }
  }
  </code></pre>
  
  <p>and the error:</p>
  
  <pre><code>10-20 22:15:22.605    2378-2389/? E/DatabaseUtils﹕ Writing exception to parcel
      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
              at com.android.server.am.ActivityManagerService.handleIncomingUser(ActivityManagerService.java:13101)
              at android.app.ActivityManager.handleIncomingUser(ActivityManager.java:2038)
              at com.android.providers.settings.SettingsProvider.callFromPackage(SettingsProvider.java:607)
              at android.content.ContentProvider$Transport.call(ContentProvider.java:279)
              at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:273)
              at android.os.Binder.execTransact(Binder.java:388)
              at dalvik.system.NativeStart.run(Native Method)
  10-20 22:15:22.610    2378-2997/? E/Parcel﹕ Class not found when unmarshalling: com.foobar.parceltest.Data
      java.lang.ClassNotFoundException: com.foobar.parceltest.Data
              at java.lang.Class.classForName(Native Method)
              at java.lang.Class.forName(Class.java:204)
              at java.lang.Class.forName(Class.java:169)
              at android.os.Parcel.readParcelableCreator(Parcel.java:2091)
              at android.os.Parcel.readParcelable(Parcel.java:2055)
              at android.os.Parcel.readValue(Parcel.java:1971)
              at android.os.Parcel.readMapInternal(Parcel.java:2255)
              at android.os.Bundle.unparcel(Bundle.java:223)
              at android.os.Bundle.getString(Bundle.java:1082)
              at android.content.Intent.getStringExtra(Intent.java:4961)
              at com.android.server.am.ActivityStack.startActivityLocked(ActivityStack.java:3761)
              at com.android.server.am.ActivityStack.startActivityMayWait(ActivityStack.java:4981)
              at com.android.server.am.ActivityManagerService.startActivityAsUser(ActivityManagerService.java:3163)
              at com.android.server.am.ActivityManagerService.startActivity(ActivityManagerService.java:3119)
              at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:157)
              at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2115)
              at android.os.Binder.execTransact(Binder.java:388)
              at dalvik.system.NativeStart.run(Native Method)
       Caused by: java.lang.NoClassDefFoundError: com/foobar/parceltest/Data
              at java.lang.Class.classForName(Native Method)
              at java.lang.Class.forName(Class.java:204)
              at java.lang.Class.forName(Class.java:169)
              at android.os.Parcel.readParcelableCreator(Parcel.java:2091)
              at android.os.Parcel.readParcelable(Parcel.java:2055)
              at android.os.Parcel.readValue(Parcel.java:1971)
              at android.os.Parcel.readMapInternal(Parcel.java:2255)
              at android.os.Bundle.unparcel(Bundle.java:223)
              at android.os.Bundle.getString(Bundle.java:1082)
              at android.content.Intent.getStringExtra(Intent.java:4961)
              at com.android.server.am.ActivityStack.startActivityLocked(ActivityStack.java:3761)
              at com.android.server.am.ActivityStack.startActivityMayWait(ActivityStack.java:4981)
              at com.android.server.am.ActivityManagerService.startActivityAsUser(ActivityManagerService.java:3163)
              at com.android.server.am.ActivityManagerService.startActivity(ActivityManagerService.java:3119)
              at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:157)
              at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2115)
              at android.os.Binder.execTransact(Binder.java:388)
              at dalvik.system.NativeStart.run(Native Method)
       Caused by: java.lang.ClassNotFoundException: Didn't find class "com.foobar.parceltest.Data" on path: .
              at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:64)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
              at java.lang.Class.classForName(Native Method)
              at java.lang.Class.forName(Class.java:204)
              at java.lang.Class.forName(Class.java:169)
              at android.os.Parcel.readParcelableCreator(Parcel.java:2091)
              at android.os.Parcel.readParcelable(Parcel.java:2055)
              at android.os.Parcel.readValue(Parcel.java:1971)
              at android.os.Parcel.readMapInternal(Parcel.java:2255)
              at android.os.Bundle.unparcel(Bundle.java:223)
              at android.os.Bundle.getString(Bundle.java:1082)
              at android.content.Intent.getStringExtra(Intent.java:4961)
              at com.android.server.am.ActivityStack.startActivityLocked(ActivityStack.java:3761)
              at com.android.server.am.ActivityStack.startActivityMayWait(ActivityStack.java:4981)
              at com.android.server.am.ActivityManagerService.startActivityAsUser(ActivityManagerService.java:3163)
              at com.android.server.am.ActivityManagerService.startActivity(ActivityManagerService.java:3119)
              at android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:157)
              at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2115)
              at android.os.Binder.execTransact(Binder.java:388)
              at dalvik.system.NativeStart.run(Native Method)
  </code></pre>