diff options
author | Dianne Hackborn <hackbod@google.com> | 2010-09-21 00:27:06 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-09-21 00:27:06 -0700 |
commit | e665698ffe539bdb99122dcf83e19844ebea92b8 (patch) | |
tree | 7b3de1511e21ec1e5172d18e1b3180fdab9b4dc0 /services | |
parent | 83af4fbb0e5c28506a77fc508056c5022b9a71eb (diff) | |
parent | 6f33b65f8033cf8644eb4ba727421b90bd4c0ae9 (diff) | |
download | frameworks_base-e665698ffe539bdb99122dcf83e19844ebea92b8.zip frameworks_base-e665698ffe539bdb99122dcf83e19844ebea92b8.tar.gz frameworks_base-e665698ffe539bdb99122dcf83e19844ebea92b8.tar.bz2 |
am 6f33b65f: Merge "Fix issue #2999757: "Application Redirected" dialogue showing up erratically" into gingerbread
Merge commit '6f33b65f8033cf8644eb4ba727421b90bd4c0ae9' into gingerbread-plus-aosp
* commit '6f33b65f8033cf8644eb4ba727421b90bd4c0ae9':
Fix issue #2999757: "Application Redirected" dialogue showing up erratically
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/am/ActivityStack.java | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/services/java/com/android/server/am/ActivityStack.java b/services/java/com/android/server/am/ActivityStack.java index 4fc8020..a4497d6 100644 --- a/services/java/com/android/server/am/ActivityStack.java +++ b/services/java/com/android/server/am/ActivityStack.java @@ -1104,26 +1104,30 @@ public class ActivityStack { // Okay we are now going to start a switch, to 'next'. We may first // have to pause the current activity, but this is an important point // where we have decided to go to 'next' so keep track of that. - if (mLastStartedActivity != null && !mLastStartedActivity.finishing) { - long now = SystemClock.uptimeMillis(); - final boolean inTime = mLastStartedActivity.startTime != 0 - && (mLastStartedActivity.startTime + START_WARN_TIME) >= now; - final int lastUid = mLastStartedActivity.info.applicationInfo.uid; - final int nextUid = next.info.applicationInfo.uid; - if (inTime && lastUid != nextUid - && lastUid != next.launchedFromUid - && mService.checkPermission( - android.Manifest.permission.STOP_APP_SWITCHES, - -1, next.launchedFromUid) - != PackageManager.PERMISSION_GRANTED) { - mService.showLaunchWarningLocked(mLastStartedActivity, next); + // XXX "App Redirected" dialog is getting too many false positives + // at this point, so turn off for now. + if (false) { + if (mLastStartedActivity != null && !mLastStartedActivity.finishing) { + long now = SystemClock.uptimeMillis(); + final boolean inTime = mLastStartedActivity.startTime != 0 + && (mLastStartedActivity.startTime + START_WARN_TIME) >= now; + final int lastUid = mLastStartedActivity.info.applicationInfo.uid; + final int nextUid = next.info.applicationInfo.uid; + if (inTime && lastUid != nextUid + && lastUid != next.launchedFromUid + && mService.checkPermission( + android.Manifest.permission.STOP_APP_SWITCHES, + -1, next.launchedFromUid) + != PackageManager.PERMISSION_GRANTED) { + mService.showLaunchWarningLocked(mLastStartedActivity, next); + } else { + next.startTime = now; + mLastStartedActivity = next; + } } else { - next.startTime = now; + next.startTime = SystemClock.uptimeMillis(); mLastStartedActivity = next; } - } else { - next.startTime = SystemClock.uptimeMillis(); - mLastStartedActivity = next; } // We need to start pausing the current activity so the top one |