title: Parcel.readException for Android 6.0-7.1
body: <p>Since December 12th, I've been having a ridiculous number of these errors. I don't believe I've changed anything significant, and I may attribute this to a potential update in AppCompat libraries. The following is one of the logs:</p>
  
  <pre><code> java.lang.IllegalArgumentException: 
    at android.os.Parcel.readException (Parcel.java:1603)
  
    at android.os.Parcel.readException (Parcel.java:1552)
  
    at android.app.ActivityManagerProxy.isTopOfTask (ActivityManagerProxy.java:4986)
  
    at android.app.Activity.isTopOfTask (Activity.java:5731)
  
    at android.app.Activity.cancelInputsAndStartExitTransition (Activity.java:4049)
  
    at android.app.Activity.startActivityForResult (Activity.java:4026)
  
    at android.support.v4.app.BaseFragmentActivityApi16.startActivityForResult (BaseFragmentActivityApi16.java:54)
  
    at android.support.v4.app.FragmentActivity.startActivityForResult (FragmentActivity.java:67)
  
    at android.app.Activity.startActivity (Activity.java:4294)
  
    at android.support.v4.content.ContextCompat.startActivity (ContextCompat.java:143)
  </code></pre>
  
  <p>There have been a few other Stack Overflow questions with this issue, but they typically have an actual message from the exception. The most common result was an incompatibilty with AppCompatActivity calls and Activity calls.</p>
  
  <p>Though all of my activities are based off of AppCompat, I have made sure to call things with <code>startActivity</code>, and to have animations from the <code>ActivityOptions</code> vs its compat counterpart.</p>
  
  <p>Anyone have any ideas?</p>
  
  <p>If source code is necessary, my <a href="https://github.com/AllanWang/Frost-for-Facebook" rel="nofollow noreferrer">project</a> is completely open source. Anything not in there is in my <a href="https://github.com/AllanWang/KAU" rel="nofollow noreferrer">other library</a>.</p>
  
  <p>I never ended up being able to replicate the error myself, but it seems like the issue occurs predominantly on Samsung and Motorola devices.</p>
  
  <hr>
  
  <p>Relevant Code Snippets:</p>
  
  <p>The crashes occur in my MainActivity and my LoginActivity, so it's the first activity transition for the user. </p>
  
  <p>Base theme:</p>
  
  <pre><code>&lt;style name="FrostThemeBase" parent="MaterialDrawerTheme.ActionBar"&gt;
      &lt;item name="colorPrimary"&gt;@color/facebook_blue&lt;/item&gt;
      &lt;item name="colorPrimaryDark"&gt;@color/facebook_blue_dark&lt;/item&gt;
      &lt;item name="colorAccent"&gt;@android:color/white&lt;/item&gt;
      &lt;item name="android:windowSoftInputMode"&gt;adjustResize&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name="FrostTheme" parent="@style/FrostThemeBase"&gt;
      &lt;item name="windowActionBar"&gt;false&lt;/item&gt;
      &lt;item name="windowNoTitle"&gt;true&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>Where MaterialDrawer extends an AppCompat theme.</p>
  
  <p>One difference I have from most applications is that I support dynamic and transparent themes:</p>
  
  <pre><code>fun Activity.setFrostTheme(forceTransparent: Boolean = false) {
      val isTransparent = (Color.alpha(Prefs.bgColor) != 255) || forceTransparent
      if (Prefs.bgColor.isColorDark)
          setTheme(if (isTransparent) R.style.FrostTheme_Transparent else R.style.FrostTheme)
      else
          setTheme(if (isTransparent) R.style.FrostTheme_Light_Transparent else R.style.FrostTheme_Light)
  }
  </code></pre>
  
  <p>For starting activities, I have the following helper method:</p>
  
  <pre><code>inline fun &lt;T : Activity&gt; Context.startActivity(
          clazz: Class&lt;T&gt;,
          clearStack: Boolean = false,
          bundleBuilder: Bundle.() -&gt; Unit = {},
          intentBuilder: Intent.() -&gt; Unit = {}) {
      val intent = Intent(this, clazz)
      if (clearStack) intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK or Intent.FLAG_ACTIVITY_NEW_TASK)
      intent.intentBuilder()
      val bundle = Bundle()
      bundle.bundleBuilder()
      startActivity(intent, bundle)
      if (clearStack &amp;&amp; this is Activity) finish()
  }
  </code></pre>
  
  <p>In short, for Login, the stack will be cleared by setting the clear task and new task flags, and the activity will be finished. I realize now that I do pass an empty bundle by default, so that may potentially be an issue.</p>
  
  <p>There are some other differences such as custom activity transitions for some activity, though I don't think that's an issue as there are activities without it that crash as well.</p>