Split RemoteServiceActivity into multiple activities
This commit is contained in:
@@ -23,7 +23,10 @@ import android.content.Intent;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
|
||||
public class ExitActivity extends Activity {
|
||||
/**
|
||||
* For Guardianproject's PANIC app
|
||||
*/
|
||||
public class PanicExitActivity extends Activity {
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
@Override
|
||||
@@ -40,7 +43,7 @@ public class ExitActivity extends Activity {
|
||||
}
|
||||
|
||||
public static void exitAndRemoveFromRecentApps(Activity activity) {
|
||||
Intent intent = new Intent(activity, ExitActivity.class);
|
||||
Intent intent = new Intent(activity, PanicExitActivity.class);
|
||||
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK
|
||||
| Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS
|
||||
@@ -25,6 +25,9 @@ import android.os.Bundle;
|
||||
|
||||
import org.sufficientlysecure.keychain.service.PassphraseCacheService;
|
||||
|
||||
/**
|
||||
* Responder for Guardianproject's PANIC app
|
||||
*/
|
||||
public class PanicResponderActivity extends Activity {
|
||||
|
||||
public static final String PANIC_TRIGGER_ACTION = "info.guardianproject.panic.action.TRIGGER";
|
||||
@@ -37,7 +40,7 @@ public class PanicResponderActivity extends Activity {
|
||||
Intent intent = getIntent();
|
||||
if (intent != null && PANIC_TRIGGER_ACTION.equals(intent.getAction())) {
|
||||
PassphraseCacheService.clearCachedPassphrases(this);
|
||||
ExitActivity.exitAndRemoveFromRecentApps(this);
|
||||
PanicExitActivity.exitAndRemoveFromRecentApps(this);
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
|
||||
Reference in New Issue
Block a user