mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-05-14 14:02:49 +00:00
Merge pull request #716 from DerEnderKeks/fix-recent-apps-behavior
Fixed that app vanished from recent apps list after locking
This commit is contained in:
commit
efb5b10a76
1 changed files with 11 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
||||||
package com.beemdevelopment.aegis.ui;
|
package com.beemdevelopment.aegis.ui;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
import android.content.ActivityNotFoundException;
|
import android.content.ActivityNotFoundException;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
|
@ -19,6 +20,8 @@ import com.beemdevelopment.aegis.ThemeMap;
|
||||||
import com.beemdevelopment.aegis.ui.dialogs.Dialogs;
|
import com.beemdevelopment.aegis.ui.dialogs.Dialogs;
|
||||||
import com.beemdevelopment.aegis.vault.VaultManagerException;
|
import com.beemdevelopment.aegis.vault.VaultManagerException;
|
||||||
|
|
||||||
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
import java.lang.reflect.Method;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@ -89,7 +92,14 @@ public abstract class AegisActivity extends AppCompatActivity implements AegisAp
|
||||||
@Override
|
@Override
|
||||||
public void onLocked(boolean userInitiated) {
|
public void onLocked(boolean userInitiated) {
|
||||||
setResult(RESULT_CANCELED, null);
|
setResult(RESULT_CANCELED, null);
|
||||||
finishAndRemoveTask();
|
try {
|
||||||
|
Method method = Activity.class.getDeclaredMethod("finish", int.class);
|
||||||
|
method.setAccessible(true);
|
||||||
|
method.invoke(this, 2); // FINISH_TASK_WITH_ACTIVITY = 2
|
||||||
|
} catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
finishAndRemoveTask();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected AegisApplication getApp() {
|
protected AegisApplication getApp() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue