Fix activity flags to launch settings activity

This change adds the following flags to the intent to lauch settings activity.
 - Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED
 - Intent.FLAG_ACTIVITY_CLEAR_TOP

Bug: 8055342
Change-Id: I85284409bbba3fd284442e5ac4c7a55e58ad15ec
main
Tadashi G. Takaoka 2013-01-23 14:35:39 +09:00
parent ad4cacafc6
commit 40651c8cf7
1 changed files with 3 additions and 1 deletions

View File

@ -2490,7 +2490,9 @@ public final class LatinIME extends InputMethodService implements KeyboardAction
private void launchSubActivity(final Class<? extends Activity> activityClass) { private void launchSubActivity(final Class<? extends Activity> activityClass) {
Intent intent = new Intent(); Intent intent = new Intent();
intent.setClass(LatinIME.this, activityClass); intent.setClass(LatinIME.this, activityClass);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
| Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED
| Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent); startActivity(intent);
} }