diff options
author | Dianne Hackborn <hackbod@google.com> | 2011-06-14 18:36:14 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2011-06-14 20:47:44 -0700 |
commit | f930232fd1c8d301d91853c8fe5dca43979ac807 (patch) | |
tree | 6609c0215f9888761749d4f96d088e604c9bca18 /services | |
parent | 4e04380d0a42347013808ee2058c786582ad548f (diff) | |
download | frameworks_base-f930232fd1c8d301d91853c8fe5dca43979ac807.zip frameworks_base-f930232fd1c8d301d91853c8fe5dca43979ac807.tar.gz frameworks_base-f930232fd1c8d301d91853c8fe5dca43979ac807.tar.bz2 |
Fix a major problem in fragment lifecycle.
When animating away a fragment, we were not putting it through
the last part of its lifecycle (onDestroy() etc).
Also, retained fragments that have a target were broken. Oops.
Change-Id: I5a669b77a2f24b581cde2a0959acf62edb65e326
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/am/ActivityManagerService.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java index 1a333ba..01bd7a9 100644 --- a/services/java/com/android/server/am/ActivityManagerService.java +++ b/services/java/com/android/server/am/ActivityManagerService.java @@ -7536,7 +7536,8 @@ public final class ActivityManagerService extends ActivityManagerNative pw.println(" COMP_SPEC may also be a component name (com.foo/.myApp),"); pw.println(" a partial substring in a component name, an"); pw.println(" ActivityRecord hex object identifier, or"); - pw.println(" \"all\" for all objects"); + pw.println(" \"all\" for all objects, or"); + pw.println(" \"top\" for the top activity."); pw.println(" -a: include all available server state."); pw.println(" -c: include client state."); return; @@ -8090,6 +8091,13 @@ public final class ActivityManagerService extends ActivityManagerNative activities.add(r1); } } + } else if ("top".equals(name)) { + synchronized (this) { + final int N = mMainStack.mHistory.size(); + if (N > 0) { + activities.add((ActivityRecord)mMainStack.mHistory.get(N-1)); + } + } } else { ComponentName componentName = ComponentName.unflattenFromString(name); int objectId = 0; |