title: How to restore activity stack?
body: <p>I have SplashActivity to show animation and init some data, after animation finishes I start MainActivity and call finish() for SplashActivity. When I am at MainActivity and press Home button, than open Play Market, found my app and press Open button, my app starts from SplashActivity. But when I open my app from recent or from icon in apps list it works OK.</p>
  
  <p>Summing:
  How it is:
  SplashActivty->MainActivity->Home Button->Play Market->MyApp->Open Button->SplashActivity</p>
  
  <p>How I need:
  SplashActivty->MainActivity->Home Button->Play Market->MyApp->Open Button->MainActivity</p>
  
  <p>I guess that Play Market adds some special flags to intent when launching app, but this behavior is not acceptable for me, maybe someone had the same problem and can advice me some solution.</p>
  
  <p>This is SplashActivity in AndroidManifest</p>
  
  <pre><code>&lt;activity
      android:name=".activities.SplashActivity"
      android:screenOrientation="portrait"
      android:windowSoftInputMode="stateAlwaysHidden"
      android:theme="@style/SplashTheme"
      tools:replace="name"&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>
  
  <p>This is code to launch MainActivity</p>
  
  <pre><code>public void openMainActivity() {
      Intent intent = new Intent(this, MainActivity.class);
      startActivity(intent);
      overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out);
      finish();
  }
  </code></pre>