summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2011-06-14 20:54:40 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2011-06-14 20:54:40 -0700
commitbaa89d3839f70bd31e5219c636ac24a4cc29928d (patch)
tree80fad68d9f4557218b2c5e8715cdb20dd09466c7 /services
parent027e9e28b2880b8e50912d7c25e68e8f196bb66b (diff)
parentf930232fd1c8d301d91853c8fe5dca43979ac807 (diff)
downloadframeworks_base-baa89d3839f70bd31e5219c636ac24a4cc29928d.zip
frameworks_base-baa89d3839f70bd31e5219c636ac24a4cc29928d.tar.gz
frameworks_base-baa89d3839f70bd31e5219c636ac24a4cc29928d.tar.bz2
am f930232f: Fix a major problem in fragment lifecycle.
* commit 'f930232fd1c8d301d91853c8fe5dca43979ac807': Fix a major problem in fragment lifecycle.
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/am/ActivityManagerService.java10
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;