From f634fe8d26d3419748fed60abbbe8a9f0d536bb0 Mon Sep 17 00:00:00 2001 From: Fahim Salam Chowdhury Date: Mon, 19 Dec 2022 17:45:53 +0600 Subject: [PATCH] 1021-Fix_quick_settings_not_working_issue issue: https://gitlab.e.foundation/e/backlog/-/issues/1021 As quick settings tries to open the app from another process, FLAG_ACTIVITY_NEW_TASK is required to open the app. --- .../dmfs/tasks/quicksettings/TaskQuickSettingsTile.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/opentasks/src/main/java/org/dmfs/tasks/quicksettings/TaskQuickSettingsTile.java b/opentasks/src/main/java/org/dmfs/tasks/quicksettings/TaskQuickSettingsTile.java index e483ced3..f87b9e84 100644 --- a/opentasks/src/main/java/org/dmfs/tasks/quicksettings/TaskQuickSettingsTile.java +++ b/opentasks/src/main/java/org/dmfs/tasks/quicksettings/TaskQuickSettingsTile.java @@ -14,13 +14,8 @@ public class TaskQuickSettingsTile extends TileService { @Override public void onClick() { final Intent taskCreateIntent = new Intent(getApplicationContext(), EditTaskActivity.class); - taskCreateIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); - unlockAndRun(new Runnable() { - @Override - public void run() { - startActivityAndCollapse(taskCreateIntent); - } - }); + taskCreateIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); + unlockAndRun(() -> startActivityAndCollapse(taskCreateIntent)); } @Override -- GitLab