diff options
author | 2024-02-27 19:41:10 +0000 | |
---|---|---|
committer | 2024-03-20 15:45:04 +0000 | |
commit | 874d816386efacc6a0592b445bc007d6b705ca4a (patch) | |
tree | 0b4433b41d6981de9af65f5272448f411a5ed5fd /ravenwood/runtime-helper-src | |
parent | dc6f83dd7b500d748f91765036129a39199cf4ee (diff) |
Adding method to check if a Parcel has any Binders marshalled in it.
This is an extension to the existing `hasFileDescriptors` method, both of which are "Active Objects" of a sort and allow writes across processes.
This check would be useful to perform validations on Bundle entries or
any Parcelable type if it only contains non-active objects and can be
essentially treated read only without having to inspect the marshalled
parcel object.
Test: TODO
Bug: 316589195
API-Coverage-Bug: 323147058
Change-Id: I1fd8c8a27e3e7b90df8fefb0fe77bbad908db6b6
Diffstat (limited to 'ravenwood/runtime-helper-src')
-rw-r--r-- | ravenwood/runtime-helper-src/framework/com/android/platform/test/ravenwood/nativesubstitution/Parcel_host.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ravenwood/runtime-helper-src/framework/com/android/platform/test/ravenwood/nativesubstitution/Parcel_host.java b/ravenwood/runtime-helper-src/framework/com/android/platform/test/ravenwood/nativesubstitution/Parcel_host.java index 81ad31e631fe..61ec7b4bbc72 100644 --- a/ravenwood/runtime-helper-src/framework/com/android/platform/test/ravenwood/nativesubstitution/Parcel_host.java +++ b/ravenwood/runtime-helper-src/framework/com/android/platform/test/ravenwood/nativesubstitution/Parcel_host.java @@ -383,9 +383,21 @@ public class Parcel_host { // Assume false for now, because we don't support writing FDs yet. return false; } + public static boolean nativeHasFileDescriptorsInRange( long nativePtr, int offset, int length) { // Assume false for now, because we don't support writing FDs yet. return false; } + + public static boolean nativeHasBinders(long nativePtr) { + // Assume false for now, because we don't support adding binders. + return false; + } + + public static boolean nativeHasBindersInRange( + long nativePtr, int offset, int length) { + // Assume false for now, because we don't support writing FDs yet. + return false; + } } |