mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-06-24 18:10:58 +00:00
Merge pull request #481 from alexbakker/no-singletask
Unset "singleTask" as the launchMode for MainActivity
This commit is contained in:
commit
32c145b02d
4 changed files with 3 additions and 16 deletions
|
@ -32,8 +32,7 @@
|
||||||
android:label="Select entries" />
|
android:label="Select entries" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.MainActivity"
|
android:name=".ui.MainActivity"
|
||||||
android:label="${title}"
|
android:label="${title}">
|
||||||
android:launchMode="singleTask">
|
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
||||||
|
|
|
@ -141,6 +141,7 @@ public class AegisApplication extends Application {
|
||||||
|
|
||||||
Intent intent = new Intent(this, MainActivity.class);
|
Intent intent = new Intent(this, MainActivity.class);
|
||||||
intent.putExtra("action", "scan");
|
intent.putExtra("action", "scan");
|
||||||
|
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||||
intent.setAction(Intent.ACTION_MAIN);
|
intent.setAction(Intent.ACTION_MAIN);
|
||||||
|
|
||||||
ShortcutInfo shortcut = new ShortcutInfo.Builder(this, "shortcut_new")
|
ShortcutInfo shortcut = new ShortcutInfo.Builder(this, "shortcut_new")
|
||||||
|
|
|
@ -35,7 +35,7 @@ public abstract class AegisActivity extends AppCompatActivity implements AegisAp
|
||||||
// if the app was killed, relaunch MainActivity and close everything else
|
// if the app was killed, relaunch MainActivity and close everything else
|
||||||
if (savedInstanceState != null && isOrphan()) {
|
if (savedInstanceState != null && isOrphan()) {
|
||||||
Intent intent = new Intent(this, MainActivity.class);
|
Intent intent = new Intent(this, MainActivity.class);
|
||||||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
|
||||||
startActivity(intent);
|
startActivity(intent);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -160,21 +160,8 @@ public class MainActivity extends AegisActivity implements EntryListView.Listene
|
||||||
return super.dispatchTouchEvent(event);
|
return super.dispatchTouchEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void onNewIntent(Intent intent) {
|
|
||||||
super.onNewIntent(intent);
|
|
||||||
setIntent(intent);
|
|
||||||
|
|
||||||
doShortcutActions();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||||
// don't process any activity results if the vault is locked
|
|
||||||
if (requestCode != CODE_DECRYPT && requestCode != CODE_DO_INTRO && _app.isVaultLocked()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (resultCode != RESULT_OK) {
|
if (resultCode != RESULT_OK) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue