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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/preferences/Preferences.java

Issue 2386213004: Use task id to determine if Preferences should be finished (Closed)
Patch Set: Created 4 years, 2 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: chrome/android/java/src/org/chromium/chrome/browser/preferences/Preferences.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/Preferences.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/Preferences.java
index 6cd85f0dfb04e04c65d4031f0469df921db7bdd4..b62a1e4f09700a784b7fda9a92bbf4b4adb9e8f3 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/Preferences.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/Preferences.java
@@ -157,13 +157,16 @@ public class Preferences extends AppCompatActivity implements
// Prevent the user from interacting with multiple instances of Preferences at the same time
// (e.g. in multi-instance mode on a Samsung device), which would cause many fun bugs.
- if (sResumedInstance != null && sResumedInstance != this && !mIsNewlyCreated) {
+ if (sResumedInstance != null && sResumedInstance.getTaskId() != getTaskId()
+ && !mIsNewlyCreated) {
// This activity was unpaused or recreated while another instance of Preferences was
// already showing. The existing instance takes precedence.
finish();
} else {
// This activity was newly created and takes precedence over sResumedInstance.
- if (sResumedInstance != null && sResumedInstance != this) sResumedInstance.finish();
+ if (sResumedInstance != null && sResumedInstance.getTaskId() != getTaskId()) {
+ sResumedInstance.finish();
+ }
sResumedInstance = this;
mIsNewlyCreated = false;
« 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