From 414900abf8c97e3659c5bd2c651a525f3c78c2b2 Mon Sep 17 00:00:00 2001 From: inorichi Date: Thu, 14 Jan 2016 22:33:41 +0100 Subject: [PATCH] Do not let the launcher create a new MainActivity --- .../main/java/eu/kanade/mangafeed/ui/main/MainActivity.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/src/main/java/eu/kanade/mangafeed/ui/main/MainActivity.java b/app/src/main/java/eu/kanade/mangafeed/ui/main/MainActivity.java index 3e47ba6ffe..7d85b1f4e4 100644 --- a/app/src/main/java/eu/kanade/mangafeed/ui/main/MainActivity.java +++ b/app/src/main/java/eu/kanade/mangafeed/ui/main/MainActivity.java @@ -36,6 +36,12 @@ public class MainActivity extends BaseActivity { @Override protected void onCreate(Bundle savedState) { + // Do not let the launcher create a new activity + if ((getIntent().getFlags() & Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT) != 0) { + finish(); + return; + } + super.onCreate(savedState); setContentView(R.layout.activity_main); ButterKnife.bind(this);