Reopen properly when we select launcher icon.

* Reopen properly when we select launcher icon.

* Reduce noise
This commit is contained in:
Alex Hart
2020-12-19 16:54:00 -04:00
committed by Alan Evans
parent 6bab6c2454
commit b7477d287b
20 changed files with 72 additions and 34 deletions

View File

@@ -1,6 +1,7 @@
package org.thoughtcrime.securesms;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
@@ -22,6 +23,16 @@ public class MainActivity extends PassphraseRequiredActivity {
private final DynamicTheme dynamicTheme = new DynamicNoActionBarTheme();
private final MainNavigator navigator = new MainNavigator(this);
public static @NonNull Intent clearTop(@NonNull Context context) {
Intent intent = new Intent(context, MainActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP |
Intent.FLAG_ACTIVITY_NEW_TASK |
Intent.FLAG_ACTIVITY_SINGLE_TOP);
return intent;
}
@Override
protected void onCreate(Bundle savedInstanceState, boolean ready) {
super.onCreate(savedInstanceState, ready);