summaryrefslogtreecommitdiff
path: root/core/java/android/app/ApplicationThreadNative.java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2010-09-17 18:29:22 -0700
committerDianne Hackborn <hackbod@google.com>2010-09-21 22:08:50 -0700
commit625ac271f80777668f832a344486a6fcdc06d0ae (patch)
treed9646d9a22d407ef7745cc39fa161488433a8e6e /core/java/android/app/ApplicationThreadNative.java
parent6cf08937a11851403e63908b937c9de0dff5a8cf (diff)
Work on fragments in layouts.
- Change semantics if IDs associated with these fragments, to work correctly when placed in a container. If the container has an ID or you have supplied a tag, the fragment's ID is optional. - To do this, there is a new LayoutInflater API that allows code creating views to access the parent container that view will be in. - Fix issues with state management around these fragments. Now correctly retains state when switching to a layout that doesn't include the fragment. Also: - Add new simple list layouts for items that want to show an activated state. - Add new Activity.dump() that can be invoked with adb shell dumpsys; the default implementation dumps fragment state. Change-Id: I192f35e3ea8c53fbd26cf909095f2a994abfc1b6
Diffstat (limited to 'core/java/android/app/ApplicationThreadNative.java')
-rw-r--r--core/java/android/app/ApplicationThreadNative.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/core/java/android/app/ApplicationThreadNative.java b/core/java/android/app/ApplicationThreadNative.java
index dc2145fb4c2c..95689fc3df42 100644
--- a/core/java/android/app/ApplicationThreadNative.java
+++ b/core/java/android/app/ApplicationThreadNative.java
@@ -414,6 +414,21 @@ public abstract class ApplicationThreadNative extends Binder
dumpHeap(managed, path, fd);
return true;
}
+
+ case DUMP_ACTIVITY_TRANSACTION: {
+ data.enforceInterface(IApplicationThread.descriptor);
+ ParcelFileDescriptor fd = data.readFileDescriptor();
+ final IBinder activity = data.readStrongBinder();
+ final String[] args = data.readStringArray();
+ if (fd != null) {
+ dumpActivity(fd.getFileDescriptor(), activity, args);
+ try {
+ fd.close();
+ } catch (IOException e) {
+ }
+ }
+ return true;
+ }
}
return super.onTransact(code, data, reply, flags);
@@ -857,5 +872,16 @@ class ApplicationThreadProxy implements IApplicationThread {
IBinder.FLAG_ONEWAY);
data.recycle();
}
+
+ public void dumpActivity(FileDescriptor fd, IBinder token, String[] args)
+ throws RemoteException {
+ Parcel data = Parcel.obtain();
+ data.writeInterfaceToken(IApplicationThread.descriptor);
+ data.writeFileDescriptor(fd);
+ data.writeStrongBinder(token);
+ data.writeStringArray(args);
+ mRemote.transact(DUMP_ACTIVITY_TRANSACTION, data, null, 0);
+ data.recycle();
+ }
}