Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(637)

Unified Diff: shell/android/apk/src/org/chromium/mojo/shell/IntentReceiverActivity.java

Issue 1363343002: Remove the IntentReceiverActivity task when needed. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: shell/android/apk/src/org/chromium/mojo/shell/IntentReceiverActivity.java
diff --git a/shell/android/apk/src/org/chromium/mojo/shell/IntentReceiverActivity.java b/shell/android/apk/src/org/chromium/mojo/shell/IntentReceiverActivity.java
index f929d7dc4cede5aa9ea456dd8443b8d0ce92e71e..b198ba1f8f2b93c3bad5d54aaffded3c2f9be774 100644
--- a/shell/android/apk/src/org/chromium/mojo/shell/IntentReceiverActivity.java
+++ b/shell/android/apk/src/org/chromium/mojo/shell/IntentReceiverActivity.java
@@ -19,7 +19,11 @@ public class IntentReceiverActivity extends Activity {
protected void onCreate(final Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (processIntent(getIntent())) {
- finish();
+ if (isTaskRoot()) {
+ finishAndRemoveTask();
+ } else {
+ finish();
+ }
}
}
@@ -56,6 +60,10 @@ public class IntentReceiverActivity extends Activity {
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
IntentReceiverRegistry.getInstance().onActivityResult(requestCode, resultCode, data);
- finish();
+ if (isTaskRoot()) {
+ finishAndRemoveTask();
+ } else {
+ finish();
+ }
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698