Merge "Unmarshall PFDs properly when hand-crafting interface stubs" into klp-dev

This commit is contained in:
Amith Yamasani
2013-09-23 21:14:51 +00:00
committed by Android (Google) Code Review
3 changed files with 11 additions and 10 deletions

View File

@@ -152,7 +152,7 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM
int startFlags = data.readInt();
String profileFile = data.readString();
ParcelFileDescriptor profileFd = data.readInt() != 0
? data.readFileDescriptor() : null;
? ParcelFileDescriptor.CREATOR.createFromParcel(data) : null;
Bundle options = data.readInt() != 0
? Bundle.CREATOR.createFromParcel(data) : null;
int userId = data.readInt();
@@ -178,7 +178,7 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM
int startFlags = data.readInt();
String profileFile = data.readString();
ParcelFileDescriptor profileFd = data.readInt() != 0
? data.readFileDescriptor() : null;
? ParcelFileDescriptor.CREATOR.createFromParcel(data) : null;
Bundle options = data.readInt() != 0
? Bundle.CREATOR.createFromParcel(data) : null;
int userId = data.readInt();
@@ -1354,7 +1354,7 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM
int profileType = data.readInt();
String path = data.readString();
ParcelFileDescriptor fd = data.readInt() != 0
? data.readFileDescriptor() : null;
? ParcelFileDescriptor.CREATOR.createFromParcel(data) : null;
boolean res = profileControl(process, userId, start, path, fd, profileType);
reply.writeNoException();
reply.writeInt(res ? 1 : 0);
@@ -1608,7 +1608,7 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM
boolean managed = data.readInt() != 0;
String path = data.readString();
ParcelFileDescriptor fd = data.readInt() != 0
? data.readFileDescriptor() : null;
? ParcelFileDescriptor.CREATOR.createFromParcel(data) : null;
boolean res = dumpHeap(process, userId, managed, path, fd);
reply.writeNoException();
reply.writeInt(res ? 1 : 0);

View File

@@ -143,7 +143,7 @@ public abstract class ApplicationThreadNative extends Binder
boolean isForward = data.readInt() != 0;
String profileName = data.readString();
ParcelFileDescriptor profileFd = data.readInt() != 0
? data.readFileDescriptor() : null;
? ParcelFileDescriptor.CREATOR.createFromParcel(data) : null;
boolean autoStopProfiler = data.readInt() != 0;
scheduleLaunchActivity(intent, b, ident, info, curConfig, compatInfo, procState, state,
ri, pi, notResumed, isForward, profileName, profileFd, autoStopProfiler);
@@ -267,7 +267,7 @@ public abstract class ApplicationThreadNative extends Binder
? new ComponentName(data) : null;
String profileName = data.readString();
ParcelFileDescriptor profileFd = data.readInt() != 0
? data.readFileDescriptor() : null;
? ParcelFileDescriptor.CREATOR.createFromParcel(data) : null;
boolean autoStopProfiler = data.readInt() != 0;
Bundle testArgs = data.readBundle();
IBinder binder = data.readStrongBinder();
@@ -418,7 +418,7 @@ public abstract class ApplicationThreadNative extends Binder
int profileType = data.readInt();
String path = data.readString();
ParcelFileDescriptor fd = data.readInt() != 0
? data.readFileDescriptor() : null;
? ParcelFileDescriptor.CREATOR.createFromParcel(data) : null;
profilerControl(start, path, fd, profileType);
return true;
}
@@ -473,7 +473,7 @@ public abstract class ApplicationThreadNative extends Binder
boolean managed = data.readInt() != 0;
String path = data.readString();
ParcelFileDescriptor fd = data.readInt() != 0
? data.readFileDescriptor() : null;
? ParcelFileDescriptor.CREATOR.createFromParcel(data) : null;
dumpHeap(managed, path, fd);
return true;
}

View File

@@ -887,8 +887,9 @@ public abstract class PreferenceActivity extends ListActivity implements
/**
* Subclasses should override this method and verify that the given fragment is a valid type
* to be attached to this activity. The default implementation returns <code>true</code> prior
* to Key Lime Pie, <code>false</code> otherwise.
* to be attached to this activity. The default implementation returns <code>true</code> for
* apps built for <code>android:targetSdkVersion</code> older than
* {@link android.os.Build.VERSION_CODES#KITKAT}. For later versions, it will throw an exception.
* @param fragmentName the class name of the Fragment about to be attached to this activity.
* @return true if the fragment class name is valid for this Activity and false otherwise.
*/