| 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;
|
|
|