title: onCreate runs 2 times with singletop launch mode set
body: <p><strong>Problem:</strong></p>
  
  <p>My Launching Activity creatively named <code>LoadingActivity</code>'s <a href="https://developer.android.com/reference/android/app/Activity#onCreate(android.os.Bundle)" rel="nofollow noreferrer">onCreate</a> method is called 2 times.</p>
  
  <p><strong>Manifest Content:</strong></p>
  
  <pre><code>&lt;manifest&gt;
      &lt;application&gt;
          ...
          &lt;activity
              android:launchMode="singleTop"
              android:name="com.awesome.app.activites.LoadingActivity"
              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;
          ...
      &lt;/application&gt;
  &lt;/manifest&gt;
  </code></pre>
  
  <p>First <a href="https://developer.android.com/reference/android/app/Activity#onCreate(android.os.Bundle)" rel="nofollow noreferrer">onCreate</a> call is called with <code>Bundle savedInstanceState</code> which is <code>null</code>, shortly after which the <a href="https://developer.android.com/reference/android/app/Activity#onCreate(android.os.Bundle)" rel="nofollow noreferrer">onCreate</a> method is called again, but this time with Bundle savedInstanceState which contains the following serialized content:</p>
  
  <pre><code>Bundle[{com.google.app_measurement.screen_service=Bundle[{referrer_name=LoadingActivity, id=1612091517631091562, name=null}], android:viewHierarchyState=Bundle[{android:views={16908290=android.view.AbsSavedState$1@a24446f, 2131296302=android.view.AbsSavedState$1@a24446f, 2131296313=android.view.AbsSavedState$1@a24446f, 2131296424=android.view.AbsSavedState$1@a24446f, 2131296445=android.widget.ProgressBar$SavedState@b25257c, 2131296581=android.view.AbsSavedState$1@a24446f, 2131296582=android.view.AbsSavedState$1@a24446f}}], androidx.lifecycle.BundlableSavedStateRegistry.key=Bundle[{}], android:lastAutofillId=1073741823, android:fragments=android.app.FragmentManagerState@a24ee05}]
  </code></pre>
  
  <p><em>Yes, this doesn't mean much, but it may be related to something at the bottom of the post.</em></p>
  
  <p><strong>Tried:</strong> </p>
  
  <p>I have tried setting <a href="https://developer.android.com/guide/topics/manifest/activity-element#lmode" rel="nofollow noreferrer">launchmode</a> settings with <code>android:launchMode="singleTop"</code> for the <code>LoadingActivty</code> in my <code>AndroidManifest.xml</code>, but this does not help at all, it still runs the <a href="https://developer.android.com/reference/android/app/Activity#onCreate(android.os.Bundle)" rel="nofollow noreferrer">onCreate</a> 2 times.</p>
  
  <p>I have gone through my onCreate method, no where do I onCreate again or change ApplicationContext settings i.e. Orientation (physically or programmatically), etc. </p>
  
  <p><strong>Any idea why this happens and what I can do to resolve it.</strong></p>
  
  <p>For what it is worth, I have recently updated my deps and see this in my Manifest:</p>
  
  <p><a href="https://i.stack.imgur.com/bnUYh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bnUYh.png" alt="enter image description here"></a></p>
  
  <p><em>It compiles (change the package name for obv reasons) with the portrait launchmode, but I think this may have something to do with the double launch</em></p>