STK: prevent to appear a home screen when DISPLAY_TEXT
This patch changes the acvity flag as FLAG_ACTIVITY_CLEAR_TOP from
FLAG_ACTIVITY_CLEAR_TASK. FLAG_ACTIVITY_CLEAR_TASK destroys all
activities and creates a new activity. The home screen is displayed
when DISPLAY_TEXT is occured and another STK activity is already performing.
If FLAG_ACTIVITY_CLEAR_TOP is used, another STK activity is brought to
foreground and then it is cleared. So, the home screen is not appeared.
Bug: 10316520
Change-Id: I19a9fb37e091c30e0094b7734fbb5e406aae47f2
diff --git a/src/com/android/stk/StkAppService.java b/src/com/android/stk/StkAppService.java
index 42e8e01..1212ea7 100644
--- a/src/com/android/stk/StkAppService.java
+++ b/src/com/android/stk/StkAppService.java
@@ -663,7 +663,7 @@
private void launchTextDialog() {
Intent newIntent = new Intent(this, StkDialogActivity.class);
newIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
- | Intent.FLAG_ACTIVITY_CLEAR_TASK
+ | Intent.FLAG_ACTIVITY_CLEAR_TOP
| Intent.FLAG_ACTIVITY_NO_HISTORY
| Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS
| getFlagActivityNoUserAction(InitiatedByUserAction.unknown));