TestNetworkService: Fix TestNetworkInterface parcel flags
PARCELABLE_WRITE_RETURN_VALUE will close the fd when writeParcelable is called. This is not always preferable (specifically, if TestNetworkInterface is passed as an "in" parameter). writeParcelable(FileDescriptor, ...) should therefore use the flags passed to writeToParcel which should be correct for all cases. Test: atest EthernetManagerTest Change-Id: Ibb5f14028a3d686157504da3657a18ec0bc28110
This commit is contained in:
parent
f8785cf1f9
commit
2ebff8a777
1 changed files with 1 additions and 1 deletions
|
|
@ -40,7 +40,7 @@ public final class TestNetworkInterface implements Parcelable {
|
|||
|
||||
@Override
|
||||
public void writeToParcel(@NonNull Parcel out, int flags) {
|
||||
out.writeParcelable(mFileDescriptor, PARCELABLE_WRITE_RETURN_VALUE);
|
||||
out.writeParcelable(mFileDescriptor, flags);
|
||||
out.writeString(mInterfaceName);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue