aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-07-07 05:22:19 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-07-07 05:22:19 +0000
commit75af0a23cdfa6341a3f9997b34c12fe28d7e45ae (patch)
tree299efbccc7f71daa67253b5d436c4bcdfaeddf9e
parentff2eb137386b6e766598edbb91432c1d2a26ba77 (diff)
parent1487d3a350538efd795d41e681242d363bdbc2f9 (diff)
downloadaidl-android14-mainline-sdkext-release.tar.gz
Snap for 10453563 from 1487d3a350538efd795d41e681242d363bdbc2f9 to mainline-sdkext-releaseaml_sdk_341510000aml_sdk_341410000aml_sdk_341110080aml_sdk_341110000aml_sdk_341010000aml_sdk_340912010android14-mainline-sdkext-release
Change-Id: I3c34ad14dae721197cb8b844a6616b42a0bdb9a1
-rw-r--r--Android.bp146
-rw-r--r--OWNERS3
-rw-r--r--TEST_MAPPING23
-rwxr-xr-xaidl-format.sh14
-rw-r--r--aidl.cpp81
-rw-r--r--aidl_api/aidl-test-versioned-interface/3/.hash1
-rw-r--r--aidl_api/aidl-test-versioned-interface/3/android/aidl/versioned/tests/BazUnion.aidl23
-rw-r--r--aidl_api/aidl-test-versioned-interface/3/android/aidl/versioned/tests/Foo.aidl23
-rw-r--r--aidl_api/aidl-test-versioned-interface/3/android/aidl/versioned/tests/IFooInterface.aidl27
-rw-r--r--aidl_checkapi.cpp101
-rw-r--r--aidl_dumpapi.cpp94
-rw-r--r--aidl_dumpapi.h8
-rw-r--r--aidl_language.cpp143
-rw-r--r--aidl_language.h32
-rw-r--r--aidl_language_l.ll2
-rw-r--r--aidl_language_y.yy43
-rw-r--r--aidl_to_cpp.cpp2
-rw-r--r--aidl_to_cpp_common.cpp98
-rw-r--r--aidl_to_cpp_common.h26
-rw-r--r--aidl_to_java.cpp49
-rw-r--r--aidl_to_java.h2
-rw-r--r--aidl_to_ndk.cpp17
-rw-r--r--aidl_to_rust.cpp73
-rw-r--r--aidl_unittest.cpp618
-rw-r--r--analyzer/Analyzer.cpp53
-rw-r--r--analyzer/analyzerMain.cpp410
-rw-r--r--analyzer/include/Analyzer.h49
-rw-r--r--build/Android.bp142
-rw-r--r--build/aidl_api.go164
-rw-r--r--build/aidl_api/test-piece-3/2/.hash1
-rw-r--r--build/aidl_api/test-piece-3/2/other_package/Enum.aidl38
-rw-r--r--build/aidl_api/test-piece-3/2/other_package/IBaz.aidl38
-rw-r--r--build/aidl_api/test-piece-3/current/other_package/Enum.aidl38
-rw-r--r--build/aidl_api/test-piece-3/current/other_package/IBaz.aidl1
-rw-r--r--build/aidl_api/tests-vintf/1/.hash1
-rw-r--r--build/aidl_api/tests-vintf/1/vintf/IFoo.aidl53
-rw-r--r--build/aidl_api/tests-vintf/current/vintf/IFoo.aidl53
-rw-r--r--build/aidl_gen_rule.go55
-rw-r--r--build/aidl_interface.go447
-rw-r--r--build/aidl_interface_backends.go279
-rw-r--r--build/aidl_interface_bp2build_test.go437
-rw-r--r--build/aidl_interface_defaults.go32
-rw-r--r--build/aidl_interface_headers.go25
-rw-r--r--build/aidl_interface_metadata_singleton.go2
-rw-r--r--build/aidl_mapping.go90
-rwxr-xr-xbuild/aidl_rust_glue.py5
-rw-r--r--build/aidl_rust_source_provider.go2
-rw-r--r--build/aidl_test.go490
-rw-r--r--build/client-using-test-piece-3.cpp6
-rwxr-xr-xbuild/hash_gen.sh4
-rw-r--r--build/message_check_equality.txt3
-rw-r--r--build/message_check_equality_frozen.txt9
-rw-r--r--build/properties.go35
-rw-r--r--build/tests_1/other_package/Enum.aidl19
-rw-r--r--build/tests_1/other_package/IBaz.aidl2
-rw-r--r--build/tests_bp2build/Android.bp87
-rw-r--r--build/tests_bp2build/aidl_api/example-aidl-interfaces/1/.hash1
-rw-r--r--build/tests_bp2build/aidl_api/example-aidl-interfaces/1/c/d/CD.aidl38
-rw-r--r--build/tests_bp2build/aidl_api/example-aidl-interfaces/2/.hash1
-rw-r--r--build/tests_bp2build/aidl_api/example-aidl-interfaces/2/c/d/CD.aidl38
-rw-r--r--build/tests_bp2build/aidl_api/example-aidl-interfaces/2/c/d/CD2.aidl38
-rw-r--r--build/tests_bp2build/aidl_api/example-aidl-interfaces/current/c/d/CD.aidl38
-rw-r--r--build/tests_bp2build/aidl_api/example-aidl-interfaces/current/c/d/CD2.aidl38
-rw-r--r--build/tests_bp2build/aidl_api/example-dep-aidl-interfaces/1/.hash1
-rw-r--r--build/tests_bp2build/aidl_api/example-dep-aidl-interfaces/1/a/b/AB.aidl37
-rw-r--r--build/tests_bp2build/aidl_api/example-dep-aidl-interfaces/current/a/b/AB.aidl37
-rw-r--r--build/tests_bp2build/src/a/b/AB.aidl21
-rw-r--r--build/tests_bp2build/src/a/b/AB2.aidl21
-rw-r--r--build/tests_bp2build/src/android/Test.java23
-rw-r--r--build/tests_bp2build/src/c/d/CD.aidl24
-rw-r--r--build/tests_bp2build/src/c/d/CD2.aidl24
-rw-r--r--build/tests_vintf/vintf/IFoo.aidl33
-rw-r--r--check_valid.cpp85
-rw-r--r--diagnostics.cpp5
-rw-r--r--generate_cpp.cpp213
-rw-r--r--generate_cpp_analyzer.cpp216
-rw-r--r--generate_cpp_analyzer.h37
-rw-r--r--generate_cpp_unittest.cpp3
-rw-r--r--generate_java.cpp21
-rw-r--r--generate_java.h3
-rw-r--r--generate_java_binder.cpp578
-rw-r--r--generate_ndk.cpp137
-rw-r--r--generate_rust.cpp209
-rw-r--r--import_resolver.cpp6
-rw-r--r--io_delegate.cpp50
-rw-r--r--logging.h2
-rw-r--r--options.cpp18
-rw-r--r--options.h14
-rw-r--r--options_unittest.cpp11
-rw-r--r--preprocess.cpp5
-rw-r--r--scripts/example_dep_build_failure_output.txt88
-rw-r--r--scripts/redundancy_check/Android.bp35
-rw-r--r--scripts/redundancy_check/srcs/main.rs175
-rwxr-xr-xscripts/vis_aidl_ver_errors.py56
-rwxr-xr-xtests/aidl_integration_test.py46
-rw-r--r--tests/aidl_integration_test.xml5
-rw-r--r--tests/aidl_parser_fuzzer.dict2
-rw-r--r--tests/aidl_test_client.h7
-rw-r--r--tests/aidl_test_client_delegate.cpp117
-rw-r--r--tests/aidl_test_client_loggable_interface.cpp4
-rw-r--r--tests/aidl_test_client_ndk_delegate.cpp7
-rw-r--r--tests/aidl_test_client_ndk_loggable_interface.cpp11
-rw-r--r--tests/aidl_test_client_ndk_nested.cpp5
-rw-r--r--tests/aidl_test_client_ndk_nullables.cpp7
-rw-r--r--tests/aidl_test_client_ndk_parcelables.cpp5
-rw-r--r--tests/aidl_test_client_ndk_primitives_test.cpp5
-rw-r--r--tests/aidl_test_client_ndk_strings_test.cpp5
-rw-r--r--tests/aidl_test_client_ndk_versioned_interface.cpp42
-rw-r--r--tests/aidl_test_client_nested.cpp4
-rw-r--r--tests/aidl_test_client_parcelables.cpp7
-rw-r--r--tests/aidl_test_client_primitives.cpp29
-rw-r--r--tests/aidl_test_client_versioned_interface.cpp11
-rw-r--r--tests/aidl_test_service.cpp47
-rw-r--r--tests/android/aidl/tests/CircularParcelable.aidl23
-rw-r--r--tests/android/aidl/tests/GenericStructuredParcelable.aidl1
-rw-r--r--tests/android/aidl/tests/ICircular.aidl23
-rw-r--r--tests/android/aidl/tests/ITestService.aidl38
-rw-r--r--tests/android/aidl/tests/permission/INoPermission.aidl6
-rw-r--r--tests/android/aidl/tests/permission/IProtected.aidl3
-rw-r--r--tests/android/aidl/tests/permission/IProtectedInterface.aidl3
-rw-r--r--tests/corpus/overflow_in_nested_interface1
-rw-r--r--tests/fake_io_delegate.cpp36
-rw-r--r--tests/fake_io_delegate.h8
-rw-r--r--tests/golden_output/aidl-test-fixedsizearray-cpp-source/gen/android/aidl/fixedsizearray/FixedSizeArrayExample.cpp20
-rw-r--r--tests/golden_output/aidl-test-fixedsizearray-cpp-source/gen/include/android/aidl/fixedsizearray/FixedSizeArrayExample.h22
-rw-r--r--tests/golden_output/aidl-test-fixedsizearray-java-source/gen/android/aidl/fixedsizearray/FixedSizeArrayExample.java16
-rw-r--r--tests/golden_output/aidl-test-fixedsizearray-ndk-source/gen/include/aidl/android/aidl/fixedsizearray/FixedSizeArrayExample.h6
-rw-r--r--tests/golden_output/aidl-test-fixedsizearray-rust-source/gen/android/aidl/fixedsizearray/FixedSizeArrayExample.rs750
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ArrayOfInterfaces.cpp1
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ArrayOfInterfaces.cpp.d2
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/BackendType.cpp1
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/BackendType.cpp.d2
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ByteEnum.cpp1
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ByteEnum.cpp.d2
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/CircularParcelable.cpp1
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/CircularParcelable.cpp.d16
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ConstantExpressionEnum.cpp1
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ConstantExpressionEnum.cpp.d2
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/DeprecatedEnum.cpp1
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/DeprecatedEnum.cpp.d2
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/DeprecatedParcelable.cpp1
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/DeprecatedParcelable.cpp.d2
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/FixedSize.cpp1
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/FixedSize.cpp.d3
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/GenericStructuredParcelable.cpp1
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/GenericStructuredParcelable.cpp.d2
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ICircular.cpp53
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ICircular.cpp.d16
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/IDeprecated.cpp26
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/IDeprecated.cpp.d2
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/INamedCallback.cpp53
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/INamedCallback.cpp.d2
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/INewName.cpp53
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/INewName.cpp.d2
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/IOldName.cpp53
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/IOldName.cpp.d2
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ITestService.cpp2684
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ITestService.cpp.d16
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/IntEnum.cpp1
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/IntEnum.cpp.d2
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ListOfInterfaces.cpp1
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ListOfInterfaces.cpp.d2
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/LongEnum.cpp1
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/LongEnum.cpp.d2
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/OtherParcelableForToString.cpp1
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/OtherParcelableForToString.cpp.d2
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ParcelableForToString.cpp1
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ParcelableForToString.cpp.d10
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/RecursiveList.cpp1
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/RecursiveList.cpp.d2
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/StructuredParcelable.cpp1
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/StructuredParcelable.cpp.d7
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/Union.cpp1
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/Union.cpp.d3
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/UnionWithFd.cpp1
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/UnionWithFd.cpp.d2
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/extension/ExtendableParcelable.cpp1
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/extension/ExtendableParcelable.cpp.d2
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/extension/MyExt.cpp1
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/extension/MyExt.cpp.d2
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/extension/MyExt2.cpp1
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/extension/MyExt2.cpp.d3
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/extension/MyExtLike.cpp1
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/extension/MyExtLike.cpp.d2
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/nested/DeeplyNested.cpp1
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/nested/DeeplyNested.cpp.d2
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/nested/INestedService.cpp101
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/nested/INestedService.cpp.d3
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/nested/ParcelableWithNested.cpp1
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/nested/ParcelableWithNested.cpp.d2
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/unions/EnumUnion.cpp1
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/unions/EnumUnion.cpp.d4
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/unions/UnionInUnion.cpp1
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/unions/UnionInUnion.cpp.d5
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/timestamp0
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/ArrayOfInterfaces.cpp6
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/CircularParcelable.cpp44
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/CircularParcelable.cpp.d16
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/DeprecatedParcelable.cpp2
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/FixedSize.cpp4
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/ICircular.cpp112
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/ICircular.cpp.d16
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/INamedCallback.cpp2
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/INewName.cpp2
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/IOldName.cpp2
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/ITestService.cpp433
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/ITestService.cpp.d2
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/ListOfInterfaces.cpp6
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/OtherParcelableForToString.cpp2
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/ParcelableForToString.cpp2
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/RecursiveList.cpp2
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/StructuredParcelable.cpp4
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/extension/ExtendableParcelable.cpp2
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/extension/MyExt.cpp2
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/extension/MyExt2.cpp2
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/extension/MyExtLike.cpp2
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/nested/DeeplyNested.cpp10
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/nested/INestedService.cpp8
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/nested/ParcelableWithNested.cpp2
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/unions/EnumUnion.cpp6
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/ArrayOfInterfaces.h36
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BnCircular.h37
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BnCircularParcelable.h1
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BnDeprecated.h6
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BnNamedCallback.h6
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BnNewName.h6
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BnOldName.h6
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BnTestService.h137
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BpCircular.h19
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BpCircularParcelable.h1
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BpTestService.h2
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/CircularParcelable.h55
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/DeprecatedParcelable.h4
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/FixedSize.h12
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/GenericStructuredParcelable.h6
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/ICircular.h37
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/IDeprecated.h4
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/INamedCallback.h4
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/INewName.h4
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/IOldName.h4
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/ITestService.h254
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/ListOfInterfaces.h36
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/OtherParcelableForToString.h4
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/ParcelableForToString.h10
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/RecursiveList.h7
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/StructuredParcelable.h8
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/Union.h4
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/UnionWithFd.h4
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/extension/ExtendableParcelable.h4
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/extension/MyExt.h4
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/extension/MyExt2.h7
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/extension/MyExtLike.h4
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/nested/BnNestedService.h13
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/nested/DeeplyNested.h20
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/nested/INestedService.h18
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/nested/ParcelableWithNested.h4
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/unions/EnumUnion.h10
-rw-r--r--tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/unions/UnionInUnion.h4
-rw-r--r--tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/ArrayOfInterfaces.java60
-rw-r--r--tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/CircularParcelable.java50
-rw-r--r--tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/CircularParcelable.java.d16
-rw-r--r--tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/ICircular.java138
-rw-r--r--tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/ICircular.java.d16
-rw-r--r--tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/IDeprecated.java21
-rw-r--r--tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/INamedCallback.java25
-rw-r--r--tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/INewName.java25
-rw-r--r--tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/IOldName.java25
-rw-r--r--tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/ITestService.java896
-rw-r--r--tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/ITestService.java.d2
-rw-r--r--tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/ListOfInterfaces.java46
-rw-r--r--tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/nested/INestedService.java54
-rw-r--r--tests/golden_output/aidl-test-interface-ndk-source/gen/android/aidl/tests/CircularParcelable.cpp64
-rw-r--r--tests/golden_output/aidl-test-interface-ndk-source/gen/android/aidl/tests/CircularParcelable.cpp.d16
-rw-r--r--tests/golden_output/aidl-test-interface-ndk-source/gen/android/aidl/tests/ICircular.cpp153
-rw-r--r--tests/golden_output/aidl-test-interface-ndk-source/gen/android/aidl/tests/ICircular.cpp.d16
-rw-r--r--tests/golden_output/aidl-test-interface-ndk-source/gen/android/aidl/tests/ITestService.cpp472
-rw-r--r--tests/golden_output/aidl-test-interface-ndk-source/gen/android/aidl/tests/ITestService.cpp.d2
-rw-r--r--tests/golden_output/aidl-test-interface-ndk-source/gen/android/aidl/tests/unions/EnumUnion.cpp6
-rw-r--r--tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/ArrayOfInterfaces.h6
-rw-r--r--tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/BnCircular.h42
-rw-r--r--tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/BnCircularParcelable.h1
-rw-r--r--tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/BnTestService.h6
-rw-r--r--tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/BpCircular.h21
-rw-r--r--tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/BpCircularParcelable.h1
-rw-r--r--tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/BpTestService.h2
-rw-r--r--tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/CircularParcelable.h64
-rw-r--r--tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/ICircular.h50
-rw-r--r--tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/IDeprecated.h3
-rw-r--r--tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/INamedCallback.h3
-rw-r--r--tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/INewName.h3
-rw-r--r--tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/IOldName.h3
-rw-r--r--tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/ITestService.h333
-rw-r--r--tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/ListOfInterfaces.h6
-rw-r--r--tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/ParcelableForToString.h6
-rw-r--r--tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/RecursiveList.h3
-rw-r--r--tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/extension/MyExt2.h3
-rw-r--r--tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/nested/INestedService.h9
-rw-r--r--tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/unions/EnumUnion.h6
-rw-r--r--tests/golden_output/aidl-test-interface-permission-java-source/gen/android/aidl/tests/permission/INoPermission.java134
-rw-r--r--tests/golden_output/aidl-test-interface-permission-java-source/gen/android/aidl/tests/permission/INoPermission.java.d2
-rw-r--r--tests/golden_output/aidl-test-interface-permission-java-source/gen/android/aidl/tests/permission/IProtected.java135
-rw-r--r--tests/golden_output/aidl-test-interface-permission-java-source/gen/android/aidl/tests/permission/IProtectedInterface.java77
-rw-r--r--tests/golden_output/aidl-test-interface-permission-java-source/gen/android/aidl/tests/permission/platform/IProtected.java58
-rw-r--r--tests/golden_output/aidl-test-interface-platform-java-source/gen/android/aidl/tests/permission/platform/IProtected.java124
-rw-r--r--tests/golden_output/aidl-test-interface-platform-java-source/gen/android/aidl/tests/permission/platform/IProtected.java.d3
-rw-r--r--tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ArrayOfInterfaces.rs130
-rw-r--r--tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/BackendType.rs12
-rw-r--r--tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ByteEnum.rs10
-rw-r--r--tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/CircularParcelable.rs37
-rw-r--r--tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/CircularParcelable.rs.d16
-rw-r--r--tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ConstantExpressionEnum.rs24
-rw-r--r--tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/DeprecatedEnum.rs10
-rw-r--r--tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/DeprecatedParcelable.rs14
-rw-r--r--tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/FixedSize.rs140
-rw-r--r--tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/GenericStructuredParcelable.rs38
-rw-r--r--tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ICircular.rs136
-rw-r--r--tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ICircular.rs.d16
-rw-r--r--tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/IDeprecated.rs2
-rw-r--r--tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/INamedCallback.rs32
-rw-r--r--tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/INewName.rs32
-rw-r--r--tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/IOldName.rs32
-rw-r--r--tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ITestService.rs2626
-rw-r--r--tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ITestService.rs.d2
-rw-r--r--tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/IntEnum.rs12
-rw-r--r--tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ListOfInterfaces.rs130
-rw-r--r--tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/LongEnum.rs10
-rw-r--r--tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/OtherParcelableForToString.rs22
-rw-r--r--tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ParcelableForToString.rs198
-rw-r--r--tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/RecursiveList.rs30
-rw-r--r--tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/StructuredParcelable.rs476
-rw-r--r--tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/Union.rs36
-rw-r--r--tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/UnionWithFd.rs24
-rw-r--r--tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/extension/ExtendableParcelable.rs54
-rw-r--r--tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/extension/MyExt.rs30
-rw-r--r--tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/extension/MyExt2.rs38
-rw-r--r--tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/extension/MyExtLike.rs30
-rw-r--r--tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/nested/DeeplyNested.rs94
-rw-r--r--tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/nested/INestedService.rs120
-rw-r--r--tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/nested/ParcelableWithNested.rs32
-rw-r--r--tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/unions/EnumUnion.rs26
-rw-r--r--tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/unions/UnionInUnion.rs24
-rw-r--r--tests/golden_output/aidl-test-versioned-interface-V1-cpp-source/gen/android/aidl/versioned/tests/Foo.cpp2
-rw-r--r--tests/golden_output/aidl-test-versioned-interface-V1-cpp-source/gen/android/aidl/versioned/tests/IFooInterface.cpp8
-rw-r--r--tests/golden_output/aidl-test-versioned-interface-V1-cpp-source/gen/include/android/aidl/versioned/tests/BazUnion.h4
-rw-r--r--tests/golden_output/aidl-test-versioned-interface-V1-cpp-source/gen/include/android/aidl/versioned/tests/BnFooInterface.h6
-rw-r--r--tests/golden_output/aidl-test-versioned-interface-V1-cpp-source/gen/include/android/aidl/versioned/tests/Foo.h4
-rw-r--r--tests/golden_output/aidl-test-versioned-interface-V1-cpp-source/gen/include/android/aidl/versioned/tests/IFooInterface.h7
-rw-r--r--tests/golden_output/aidl-test-versioned-interface-V1-ndk-source/gen/include/aidl/android/aidl/versioned/tests/IFooInterface.h6
-rw-r--r--tests/golden_output/aidl-test-versioned-interface-V1-rust-source/gen/android/aidl/versioned/tests/BazUnion.rs22
-rw-r--r--tests/golden_output/aidl-test-versioned-interface-V1-rust-source/gen/android/aidl/versioned/tests/Foo.rs14
-rw-r--r--tests/golden_output/aidl-test-versioned-interface-V1-rust-source/gen/android/aidl/versioned/tests/IFooInterface.rs162
-rw-r--r--tests/golden_output/aidl_test_loggable_interface-cpp-source/gen/android/aidl/loggable/Data.cpp2
-rw-r--r--tests/golden_output/aidl_test_loggable_interface-cpp-source/gen/android/aidl/loggable/ILoggableInterface.cpp8
-rw-r--r--tests/golden_output/aidl_test_loggable_interface-cpp-source/gen/include/android/aidl/loggable/BnLoggableInterface.h7
-rw-r--r--tests/golden_output/aidl_test_loggable_interface-cpp-source/gen/include/android/aidl/loggable/Data.h4
-rw-r--r--tests/golden_output/aidl_test_loggable_interface-cpp-source/gen/include/android/aidl/loggable/ILoggableInterface.h15
-rw-r--r--tests/golden_output/aidl_test_loggable_interface-cpp-source/gen/include/android/aidl/loggable/Union.h4
-rw-r--r--tests/golden_output/aidl_test_loggable_interface-java-source/gen/android/aidl/loggable/ILoggableInterface.java194
-rw-r--r--tests/golden_output/aidl_test_loggable_interface-ndk-source/gen/include/aidl/android/aidl/loggable/ILoggableInterface.h9
-rwxr-xr-xtests/golden_test.sh3
-rw-r--r--tests/java/src/android/aidl/permission/service/FakePermissionEnforcer.java48
-rw-r--r--tests/java/src/android/aidl/permission/service/PermissionTestService.java68
-rw-r--r--tests/java/src/android/aidl/permission/tests/PermissionTests.java87
-rw-r--r--tests/java/src/android/aidl/permission/tests/PermissionTestsLocal.java38
-rw-r--r--tests/java/src/android/aidl/permission/tests/PermissionTestsRemote.java39
-rw-r--r--tests/java/src/android/aidl/sdkversion/ITestService.aidl7
-rw-r--r--tests/java/src/android/aidl/sdkversion/service/AidlJavaVersionTestService.java6
-rw-r--r--tests/java/src/android/aidl/sdkversion/tests/AidlJavaVersionTests.java5
-rw-r--r--tests/java/src/android/aidl/service/TestServiceServer.java53
-rw-r--r--tests/java/src/android/aidl/tests/TestServiceClient.java30
-rw-r--r--tests/lazy_test/main.cpp43
-rw-r--r--tests/rust/test_client.rs29
-rw-r--r--tests/rust/test_service.rs42
-rw-r--r--tests/rust/test_service_async.rs43
374 files changed, 17325 insertions, 4689 deletions
diff --git a/Android.bp b/Android.bp
index 08df261d..14ff04b7 100644
--- a/Android.bp
+++ b/Android.bp
@@ -41,7 +41,6 @@ cc_defaults {
header_libs: ["libgtest_prod_headers"],
static_libs: [
"libbase",
- "libcutils",
"libgtest",
],
// TODO(b/174366536): basic_stringbuf::overflow causes "ubsan: implicit-conversion"
@@ -65,6 +64,7 @@ cc_defaults {
cflags: ["-DPLATFORM_SDK_VERSION=%d"],
},
},
+ defaults_visibility: [":__subpackages__"],
}
// Logic shared between aidl and its unittests
@@ -94,6 +94,7 @@ cc_library_static {
"diagnostics.cpp",
"generate_aidl_mappings.cpp",
"generate_cpp.cpp",
+ "generate_cpp_analyzer.cpp",
"generate_java_binder.cpp",
"generate_java.cpp",
"generate_ndk.cpp",
@@ -111,6 +112,7 @@ cc_library_static {
gen_location_hh: true,
gen_position_hh: true,
},
+ visibility: [":__subpackages__"],
}
// aidl executable
@@ -241,6 +243,8 @@ python_test_host {
"aidl_test_java_service_sdk1",
"aidl_test_java_client_sdk29",
"aidl_test_java_service_sdk29",
+ "aidl_test_java_client_permission",
+ "aidl_test_java_service_permission",
],
test_suites: ["general-tests"],
test_options: {
@@ -291,11 +295,13 @@ filegroup {
"tests/android/aidl/tests/ArrayOfInterfaces.aidl",
"tests/android/aidl/tests/BackendType.aidl",
"tests/android/aidl/tests/ByteEnum.aidl",
+ "tests/android/aidl/tests/CircularParcelable.aidl",
"tests/android/aidl/tests/ConstantExpressionEnum.aidl",
"tests/android/aidl/tests/DeprecatedEnum.aidl",
"tests/android/aidl/tests/DeprecatedParcelable.aidl",
"tests/android/aidl/tests/GenericStructuredParcelable.aidl",
"tests/android/aidl/tests/FixedSize.aidl",
+ "tests/android/aidl/tests/ICircular.aidl",
"tests/android/aidl/tests/IDeprecated.aidl",
"tests/android/aidl/tests/INamedCallback.aidl",
"tests/android/aidl/tests/INewName.aidl",
@@ -330,9 +336,7 @@ filegroup {
filegroup {
name: "libaidl-integration-permission-test-files",
srcs: [
- "tests/android/aidl/tests/permission/IProtected.aidl",
- "tests/android/aidl/tests/permission/IProtectedInterface.aidl",
- "tests/android/aidl/tests/permission/platform/*.aidl",
+ "tests/android/aidl/tests/permission/**/*.aidl",
],
path: "tests",
}
@@ -344,10 +348,7 @@ aidl_interface {
srcs: [
"tests/versioned/**/*.aidl",
],
- versions: [
- "1",
- "2",
- ],
+
backend: {
java: {
gen_rpc: true,
@@ -356,6 +357,23 @@ aidl_interface {
enabled: true,
},
},
+ versions_with_info: [
+ {
+ version: "1",
+ imports: [],
+ },
+ {
+ version: "2",
+ imports: [],
+ },
+ {
+ version: "3",
+ imports: [],
+ },
+
+ ],
+ frozen: true,
+
}
cc_library_static {
@@ -471,11 +489,11 @@ aidl_interface {
rust: {
enabled: true,
},
- }
+ },
}
java_defaults {
- name: "aidl_test_java_defaults",
+ name: "aidl_test_java_integration_defaults",
platform_apis: true,
// Turn off Java optimization tools to speed up our test iterations.
optimize: {
@@ -487,6 +505,19 @@ java_defaults {
static_libs: [
"androidx.test.core",
"androidx.test.runner",
+ ],
+ aidl: {
+ include_dirs: [
+ "frameworks/native/aidl/binder",
+ ],
+ },
+ test_suites: ["general-tests"],
+}
+
+java_defaults {
+ name: "aidl_test_java_defaults",
+ defaults: ["aidl_test_java_integration_defaults"],
+ static_libs: [
"aidl_test_nonvintf_parcelable-V1-java",
"aidl_test_unstable_parcelable-java",
"aidl_test_vintf_parcelable-V1-java",
@@ -510,11 +541,9 @@ java_defaults {
aidl: {
include_dirs: [
"system/tools/aidl/tests/",
- "frameworks/native/aidl/binder",
],
generate_traces: true,
},
- test_suites: ["general-tests"],
}
java_test {
@@ -540,6 +569,9 @@ java_test {
"tests/java/src/android/aidl/tests/NullableTests.java",
"tests/java/src/android/aidl/tests/VintfTests.java",
],
+ data: [
+ ":cts-dalvik-device-test-runner",
+ ],
}
java_test {
@@ -552,6 +584,9 @@ java_test {
srcs: [
"tests/java/src/android/aidl/service/**/*.java",
],
+ data: [
+ ":cts-dalvik-device-test-runner",
+ ],
}
filegroup {
@@ -564,33 +599,19 @@ filegroup {
java_defaults {
name: "aidl_test_java_sdkversion_defaults",
- platform_apis: true,
- // Turn off Java optimization tools to speed up our test iterations.
- optimize: {
- enabled: false,
- },
- dex_preopt: {
- enabled: false,
- },
- static_libs: [
- "androidx.test.core",
- "androidx.test.runner",
- ],
+ defaults: ["aidl_test_java_integration_defaults"],
srcs: [
":aidl-for-sdkversion-tests",
],
- aidl: {
- include_dirs: [
- "frameworks/native/aidl/binder",
- ],
- },
- test_suites: ["general-tests"],
}
java_test {
name: "aidl_test_java_client_sdk29",
defaults: ["aidl_test_java_sdkversion_defaults"],
min_sdk_version: "29",
+ data: [
+ ":cts-dalvik-device-test-runner",
+ ],
srcs: [
"tests/java/src/android/aidl/sdkversion/tests/*.java",
],
@@ -603,6 +624,9 @@ java_test {
srcs: [
"tests/java/src/android/aidl/sdkversion/service/*.java",
],
+ data: [
+ ":cts-dalvik-device-test-runner",
+ ],
}
java_test {
@@ -612,17 +636,52 @@ java_test {
srcs: [
"tests/java/src/android/aidl/sdkversion/tests/*.java",
],
+ data: [
+ ":cts-dalvik-device-test-runner",
+ ],
}
java_test {
name: "aidl_test_java_service_sdk1",
defaults: ["aidl_test_java_sdkversion_defaults"],
min_sdk_version: "1",
+ data: [
+ ":cts-dalvik-device-test-runner",
+ ],
srcs: [
"tests/java/src/android/aidl/sdkversion/service/*.java",
],
}
+java_test {
+ name: "aidl_test_java_client_permission",
+ defaults: ["aidl_test_java_integration_defaults"],
+ static_libs: [
+ "aidl-test-interface-permission-java",
+ ],
+ srcs: [
+ "tests/java/src/android/aidl/permission/tests/*.java",
+ "tests/java/src/android/aidl/permission/service/*.java",
+ ],
+ data: [
+ ":cts-dalvik-device-test-runner",
+ ],
+}
+
+java_test {
+ name: "aidl_test_java_service_permission",
+ defaults: ["aidl_test_java_integration_defaults"],
+ static_libs: [
+ "aidl-test-interface-permission-java",
+ ],
+ data: [
+ ":cts-dalvik-device-test-runner",
+ ],
+ srcs: [
+ "tests/java/src/android/aidl/permission/service/*.java",
+ ],
+}
+
//
// "Golden" test of compiler output
//
@@ -655,6 +714,7 @@ genrule {
":aidl-test-fixedsizearray-java-source",
":aidl-test-fixedsizearray-ndk-source",
":aidl-test-fixedsizearray-rust-source",
+ ":aidl-test-interface-cpp-analyzer-source",
"tests/golden_output/**/*",
],
out: ["TODO_b_37575883.cpp"],
@@ -706,7 +766,6 @@ aidl_interface {
},
java: {
platform_apis: true,
- gen_rpc: true,
},
rust: {
enabled: true,
@@ -828,3 +887,28 @@ rust_test {
},
test_suites: ["general-tests"],
}
+
+cc_library_static {
+ name: "aidl-analyzer-main",
+ host_supported: true,
+ vendor_available: true,
+ shared_libs: [
+ "libbase",
+ "libbinder",
+ ],
+ srcs: [
+ "analyzer/analyzerMain.cpp",
+ "analyzer/Analyzer.cpp",
+ ],
+ export_include_dirs: ["analyzer/include"],
+}
+
+cc_binary {
+ name: "record_binder",
+ whole_static_libs: ["aidl-analyzer-main"],
+ shared_libs: [
+ "libbase",
+ "libbinder",
+ "libutils",
+ ],
+}
diff --git a/OWNERS b/OWNERS
index a1fcf5f0..df4dc339 100644
--- a/OWNERS
+++ b/OWNERS
@@ -1,3 +1,6 @@
+# Bug component: 655781
+
+devinmoore@google.com
elsk@google.com
jiyong@google.com
jooyung@google.com
diff --git a/TEST_MAPPING b/TEST_MAPPING
index 79f49e26..b4837f84 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -11,12 +11,33 @@
},
{
"name": "CtsNdkBinderTestCases"
+ },
+ {
+ "name": "hal_implementation_test"
+ },
+ {
+ "name": "resolv_integration_test"
+ },
+ {
+ "name": "FrameworksTelephonyTests",
+ "options": [
+ {
+ "include-filter": "com.android.internal.telephony.ServiceStateTrackerTest"
+ }
+ ]
+ },
+ {
+ "name": "EnforcePermissionTests"
}
],
"imports": [
{
"path": "frameworks/native/libs/binder"
}
+ ],
+ "auto-presubmit": [
+ {
+ "name": "hal_implementation_test"
+ }
]
}
-
diff --git a/aidl-format.sh b/aidl-format.sh
index dbf3e2af..1c081bdd 100755
--- a/aidl-format.sh
+++ b/aidl-format.sh
@@ -16,6 +16,8 @@
set -e
+clang_format=clang-format
+
# future considerations:
# - could we make this work with git-clang-format instead?
# - should we have our own formatter?
@@ -74,7 +76,7 @@ function _aidl-format() (
local style="$2"
local temp="$(mktemp)"
local styletext="$([ -f "$style" ] && cat "$style" | tr '\n' ',' 2> /dev/null)"
- cat "$input" | clang-format \
+ cat "$input" | $clang_format \
--style='{BasedOnStyle: Google,
ColumnLimit: 100,
IndentWidth: 4,
@@ -104,7 +106,7 @@ function _aidl-format() (
# @Anno(a=1, b=2) @Anno(c=3, d=4) int foo = 3;
# [^@,=] ensures that the match doesn't cross the characters, otherwise
# "a = 1, b = 2" would match only once and will become "a = 1, b=2".
- gawk -i inplace \
+ awk -i inplace \
'/@[^@]+\(.*=.*\)/ { # matches a line having @anno(param = val) \
print(gensub(/([^@,=]+) = ([^@,=]+|"[^"]*")/, "\\1=\\2", "g", $0)); \
done=1;\
@@ -147,19 +149,21 @@ function _aidl-format() (
echo " -d: display diff instead of the formatted result"
echo " -w: rewrite the result back to the source file, instead of stdout"
echo " -h: show this help message"
+ echo " --clang-format-path <PATH>: set the path to the clang-format to <PATH>"
echo " [path...]: source files. if none, input is read from stdin"
exit 1
}
local mode=print
- if [ $# -gt 0 ]; then
+ while [ $# -gt 0 ]; do
case "$1" in
-d) mode=diff; shift;;
-w) mode=write; shift;;
-h) show-help-and-exit;;
- -*) echo "$1" is wrong option; show-help-and-exit;;
+ --clang-format-path) clang_format="$2"; shift 2;;
+ *) break;;
esac
- fi
+ done
if [ $# -lt 1 ]; then
if [ $mode = "write" ]; then
diff --git a/aidl.cpp b/aidl.cpp
index 6938b53e..3b6f2ee8 100644
--- a/aidl.cpp
+++ b/aidl.cpp
@@ -43,6 +43,7 @@
#include "check_valid.h"
#include "generate_aidl_mappings.h"
#include "generate_cpp.h"
+#include "generate_cpp_analyzer.h"
#include "generate_java.h"
#include "generate_ndk.h"
#include "generate_rust.h"
@@ -355,38 +356,54 @@ bool ValidateAnnotationContext(const AidlDocument& doc) {
return validator.success;
}
-bool ValidateCppHeader(const AidlDocument& doc) {
- struct CppHeaderVisitor : AidlVisitor {
+bool ValidateHeaders(Options::Language language, const AidlDocument& doc) {
+ typedef std::string (AidlParcelable::*GetHeader)() const;
+
+ struct HeaderVisitor : AidlVisitor {
bool success = true;
- void Visit(const AidlParcelable& p) override {
- if (p.GetCppHeader().empty()) {
- AIDL_ERROR(p) << "Unstructured parcelable \"" << p.GetName()
- << "\" must have C++ header defined.";
+ const char* str = nullptr;
+ GetHeader getHeader = nullptr;
+
+ void check(const AidlParcelable& p) {
+ if ((p.*getHeader)().empty()) {
+ AIDL_ERROR(p) << "Unstructured parcelable \"" << p.GetName() << "\" must have " << str
+ << " defined.";
success = false;
}
}
+
+ void Visit(const AidlParcelable& p) override { check(p); }
void Visit(const AidlTypeSpecifier& m) override {
auto type = m.GetDefinedType();
if (type) {
auto unstructured = type->AsUnstructuredParcelable();
- if (unstructured && unstructured->GetCppHeader().empty()) {
- AIDL_ERROR(m) << "Unstructured parcelable \"" << m.GetUnresolvedName()
- << "\" must have C++ header defined.";
- success = false;
- }
+ if (unstructured) check(*unstructured);
}
}
};
- CppHeaderVisitor validator;
- VisitTopDown(validator, doc);
- return validator.success;
+ if (language == Options::Language::CPP) {
+ HeaderVisitor validator;
+ validator.str = "cpp_header";
+ validator.getHeader = &AidlParcelable::GetCppHeader;
+ VisitTopDown(validator, doc);
+ return validator.success;
+ } else if (language == Options::Language::NDK) {
+ HeaderVisitor validator;
+ validator.str = "ndk_header";
+ validator.getHeader = &AidlParcelable::GetNdkHeader;
+ VisitTopDown(validator, doc);
+ return validator.success;
+ }
+ return true;
}
} // namespace
namespace internals {
+// WARNING: options are passed here and below, but only the file contents should determine
+// what is generated for portability.
AidlError load_and_validate_aidl(const std::string& input_file_name, const Options& options,
const IoDelegate& io_delegate, AidlTypenames* typenames,
vector<string>* imported_files) {
@@ -432,7 +449,6 @@ AidlError load_and_validate_aidl(const std::string& input_file_name, const Optio
}
string import_path = import_resolver.FindImportFile(import);
if (import_path.empty()) {
- AIDL_ERROR(input_file_name) << "Couldn't find import for class " << import;
err = AidlError::BAD_IMPORT;
continue;
}
@@ -555,19 +571,6 @@ AidlError load_and_validate_aidl(const std::string& input_file_name, const Optio
}
if (!success) return AidlError::NOT_STRUCTURED;
}
-
- // Verify the var/const declarations.
- // const expressions should be non-empty when evaluated with the var/const type.
- for (const auto& constant : defined_type->GetConstantDeclarations()) {
- if (constant->ValueString(AidlConstantValueDecorator).empty()) {
- return AidlError::BAD_TYPE;
- }
- }
- for (const auto& var : defined_type->GetFields()) {
- if (var->GetDefaultValue() && var->ValueString(AidlConstantValueDecorator).empty()) {
- return AidlError::BAD_TYPE;
- }
- }
}
// Add meta methods and assign method IDs to each interface
@@ -613,9 +616,7 @@ AidlError load_and_validate_aidl(const std::string& input_file_name, const Optio
return AidlError::BAD_TYPE;
}
- if ((options.TargetLanguage() == Options::Language::CPP ||
- options.TargetLanguage() == Options::Language::NDK) &&
- !ValidateCppHeader(*document)) {
+ if (!ValidateHeaders(options.TargetLanguage(), *document)) {
return AidlError::BAD_TYPE;
}
@@ -628,16 +629,21 @@ AidlError load_and_validate_aidl(const std::string& input_file_name, const Optio
err = AidlError::BAD_TYPE;
}
- if (options.IsStructured() && type.AsUnstructuredParcelable() != nullptr &&
- !type.AsUnstructuredParcelable()->IsStableApiParcelable(options.TargetLanguage())) {
+ bool isStable = type.IsStableApiParcelable(options.TargetLanguage());
+
+ if (options.IsStructured() && type.AsUnstructuredParcelable() != nullptr && !isStable) {
err = AidlError::NOT_STRUCTURED;
AIDL_ERROR(type) << type.GetCanonicalName()
- << " is not structured, but this is a structured interface.";
+ << " is not structured, but this is a structured interface in "
+ << to_string(options.TargetLanguage());
}
- if (options.GetStability() == Options::Stability::VINTF && !type.IsVintfStability()) {
+ if (options.GetStability() == Options::Stability::VINTF && !type.IsVintfStability() &&
+ !isStable) {
err = AidlError::NOT_STRUCTURED;
AIDL_ERROR(type) << type.GetCanonicalName()
- << " does not have VINTF level stability, but this interface requires it.";
+ << " does not have VINTF level stability (marked @VintfStability), but this "
+ "interface requires it in "
+ << to_string(options.TargetLanguage());
}
// Ensure that untyped List/Map is not used in a parcelable, a union and a stable interface.
@@ -734,6 +740,9 @@ bool compile_aidl(const Options& options, const IoDelegate& io_delegate) {
} else if (lang == Options::Language::RUST) {
rust::GenerateRust(output_file_name, options, typenames, *defined_type, io_delegate);
success = true;
+ } else if (lang == Options::Language::CPP_ANALYZER) {
+ success = cpp::GenerateCppAnalyzer(output_file_name, options, typenames, *defined_type,
+ io_delegate);
} else {
AIDL_FATAL(input_file) << "Should not reach here.";
}
diff --git a/aidl_api/aidl-test-versioned-interface/3/.hash b/aidl_api/aidl-test-versioned-interface/3/.hash
new file mode 100644
index 00000000..de1b53f8
--- /dev/null
+++ b/aidl_api/aidl-test-versioned-interface/3/.hash
@@ -0,0 +1 @@
+70d76c61eb0c82288e924862c10b910d1b7d8cf8
diff --git a/aidl_api/aidl-test-versioned-interface/3/android/aidl/versioned/tests/BazUnion.aidl b/aidl_api/aidl-test-versioned-interface/3/android/aidl/versioned/tests/BazUnion.aidl
new file mode 100644
index 00000000..668973f4
--- /dev/null
+++ b/aidl_api/aidl-test-versioned-interface/3/android/aidl/versioned/tests/BazUnion.aidl
@@ -0,0 +1,23 @@
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.aidl.versioned.tests;
+union BazUnion {
+ int intNum;
+ long longNum;
+}
diff --git a/aidl_api/aidl-test-versioned-interface/3/android/aidl/versioned/tests/Foo.aidl b/aidl_api/aidl-test-versioned-interface/3/android/aidl/versioned/tests/Foo.aidl
new file mode 100644
index 00000000..7e5e4dff
--- /dev/null
+++ b/aidl_api/aidl-test-versioned-interface/3/android/aidl/versioned/tests/Foo.aidl
@@ -0,0 +1,23 @@
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.aidl.versioned.tests;
+@JavaSuppressLint(value={"NewApi"})
+parcelable Foo {
+ int intDefault42 = 42;
+}
diff --git a/aidl_api/aidl-test-versioned-interface/3/android/aidl/versioned/tests/IFooInterface.aidl b/aidl_api/aidl-test-versioned-interface/3/android/aidl/versioned/tests/IFooInterface.aidl
new file mode 100644
index 00000000..7e4be6e0
--- /dev/null
+++ b/aidl_api/aidl-test-versioned-interface/3/android/aidl/versioned/tests/IFooInterface.aidl
@@ -0,0 +1,27 @@
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.aidl.versioned.tests;
+@JavaDelegator
+interface IFooInterface {
+ void originalApi();
+ @utf8InCpp String acceptUnionAndReturnString(in android.aidl.versioned.tests.BazUnion u);
+ @SuppressWarnings(value={"inout-parameter"}) int ignoreParcelablesAndRepeatInt(in android.aidl.versioned.tests.Foo inFoo, inout android.aidl.versioned.tests.Foo inoutFoo, out android.aidl.versioned.tests.Foo outFoo, int value);
+ int returnsLengthOfFooArray(in android.aidl.versioned.tests.Foo[] foos);
+ void newApi();
+}
diff --git a/aidl_checkapi.cpp b/aidl_checkapi.cpp
index c1d3c66b..a18a8f81 100644
--- a/aidl_checkapi.cpp
+++ b/aidl_checkapi.cpp
@@ -44,7 +44,7 @@ using std::vector;
static std::string Dump(const AidlDefinedType& type) {
string code;
CodeWriterPtr out = CodeWriter::ForString(&code);
- DumpVisitor visitor(*out);
+ DumpVisitor visitor(*out, /*inline_constants=*/true);
type.DispatchVisit(visitor);
out->Close();
return code;
@@ -74,6 +74,12 @@ static vector<string> get_strict_annotations(const AidlAnnotatable& node) {
// - a new implementation might change so that it no longer returns null
// values (remove @nullable)
// - a new implementation might start accepting null values (add @nullable)
+ //
+ // AidlAnnotation::Type::SENSITIVE_DATA could be ignored for backwards
+ // compatibility, but is not. It should retroactively be applied to the
+ // older versions of the interface. When doing that, we need
+ // to add the new hash to the older versions after the change using
+ // tools/aidl/build/hash_gen.sh.
static const set<AidlAnnotation::Type> kIgnoreAnnotations{
AidlAnnotation::Type::NULLABLE,
// @JavaDerive doesn't affect read/write
@@ -296,57 +302,60 @@ static bool are_compatible_parcelables(const AidlDefinedType& older, const AidlT
}
}
- for (size_t i = old_fields.size(); i < new_fields.size(); i++) {
- const auto& new_field = new_fields.at(i);
- if (new_field->HasUsefulDefaultValue()) {
- continue;
- }
-
- // enum can't be nullable, but it's okay if it has 0 as a valid enumerator.
- if (const auto& enum_decl = new_types.GetEnumDeclaration(new_field->GetType());
- enum_decl != nullptr) {
- if (HasZeroEnumerator(*enum_decl)) {
+ // New fields must have default values.
+ if (older.AsUnionDeclaration() == nullptr) {
+ for (size_t i = old_fields.size(); i < new_fields.size(); i++) {
+ const auto& new_field = new_fields.at(i);
+ if (new_field->HasUsefulDefaultValue()) {
continue;
}
- // TODO(b/142893595): Rephrase the message: "provide a default value or make sure ..."
- AIDL_ERROR(new_field) << "Field '" << new_field->GetName() << "' of enum '"
- << enum_decl->GetName()
- << "' can't be initialized as '0'. Please make sure '"
- << enum_decl->GetName() << "' has '0' as a valid value.";
- compatible = false;
- continue;
- }
+ // enum can't be nullable, but it's okay if it has 0 as a valid enumerator.
+ if (const auto& enum_decl = new_types.GetEnumDeclaration(new_field->GetType());
+ enum_decl != nullptr) {
+ if (HasZeroEnumerator(*enum_decl)) {
+ continue;
+ }
+
+ // TODO(b/142893595): Rephrase the message: "provide a default value or make sure ..."
+ AIDL_ERROR(new_field) << "Field '" << new_field->GetName() << "' of enum '"
+ << enum_decl->GetName()
+ << "' can't be initialized as '0'. Please make sure '"
+ << enum_decl->GetName() << "' has '0' as a valid value.";
+ compatible = false;
+ continue;
+ }
- // Old API versions may suffer from the issue presented here. There is
- // only a finite number in Android, which we must allow indefinitely.
- struct HistoricalException {
- std::string canonical;
- std::string field;
- };
- static std::vector<HistoricalException> exceptions = {
- {"android.net.DhcpResultsParcelable", "serverHostName"},
- {"android.net.ResolverParamsParcel", "resolverOptions"},
- };
- bool excepted = false;
- for (const HistoricalException& exception : exceptions) {
- if (older.GetCanonicalName() == exception.canonical &&
- new_field->GetName() == exception.field) {
- excepted = true;
- break;
+ // Old API versions may suffer from the issue presented here. There is
+ // only a finite number in Android, which we must allow indefinitely.
+ struct HistoricalException {
+ std::string canonical;
+ std::string field;
+ };
+ static std::vector<HistoricalException> exceptions = {
+ {"android.net.DhcpResultsParcelable", "serverHostName"},
+ {"android.net.ResolverParamsParcel", "resolverOptions"},
+ };
+ bool excepted = false;
+ for (const HistoricalException& exception : exceptions) {
+ if (older.GetCanonicalName() == exception.canonical &&
+ new_field->GetName() == exception.field) {
+ excepted = true;
+ break;
+ }
}
+ if (excepted) continue;
+
+ AIDL_ERROR(new_field)
+ << "Field '" << new_field->GetName()
+ << "' does not have a useful default in some backends. Please either provide a default "
+ "value for this field or mark the field as @nullable. This value or a null value will "
+ "be used automatically when an old version of this parcelable is sent to a process "
+ "which understands a new version of this parcelable. In order to make sure your code "
+ "continues to be backwards compatible, make sure the default or null value does not "
+ "cause a semantic change to this parcelable.";
+ compatible = false;
}
- if (excepted) continue;
-
- AIDL_ERROR(new_field)
- << "Field '" << new_field->GetName()
- << "' does not have a useful default in some backends. Please either provide a default "
- "value for this field or mark the field as @nullable. This value or a null value will "
- "be used automatically when an old version of this parcelable is sent to a process "
- "which understands a new version of this parcelable. In order to make sure your code "
- "continues to be backwards compatible, make sure the default or null value does not "
- "cause a semantic change to this parcelable.";
- compatible = false;
}
compatible = are_compatible_constants(older, newer) && compatible;
diff --git a/aidl_dumpapi.cpp b/aidl_dumpapi.cpp
index 1451d417..00957140 100644
--- a/aidl_dumpapi.cpp
+++ b/aidl_dumpapi.cpp
@@ -31,6 +31,23 @@ using std::unique_ptr;
namespace android {
namespace aidl {
+static bool NeedsFinalValue(const AidlTypeSpecifier& type, const AidlConstantValue& c) {
+ // For enum types, use enumerator
+ if (auto defined_type = type.GetDefinedType();
+ defined_type && defined_type->AsEnumDeclaration()) {
+ return false;
+ }
+ // We need final value for constant expression which is not a single constant expression.
+ struct Visitor : AidlVisitor {
+ bool trivial = true;
+ void Visit(const AidlConstantReference&) override { trivial = false; }
+ void Visit(const AidlUnaryConstExpression&) override { trivial = false; }
+ void Visit(const AidlBinaryConstExpression&) override { trivial = false; }
+ } v;
+ c.DispatchVisit(v);
+ return !v.trivial;
+}
+
void DumpVisitor::DumpType(const AidlDefinedType& dt, const string& type) {
if (!dt.IsUserDefined()) {
return;
@@ -41,6 +58,12 @@ void DumpVisitor::DumpType(const AidlDefinedType& dt, const string& type) {
if (auto generic_type = dt.AsParameterizable(); generic_type && generic_type->IsGeneric()) {
out << "<" << Join(generic_type->GetTypeParameters(), ", ") << ">";
}
+
+ if (dt.AsUnstructuredParcelable()) {
+ out << ";\n";
+ return;
+ }
+
out << " {\n";
out.Indent();
DumpMembers(dt);
@@ -91,7 +114,28 @@ void DumpVisitor::DumpAnnotations(const AidlAnnotatable& a) {
}
void DumpVisitor::DumpConstantValue(const AidlTypeSpecifier& type, const AidlConstantValue& c) {
- out << c.ValueString(type, AidlConstantValueDecorator);
+ if (inline_constants) {
+ out << c.ValueString(type, AidlConstantValueDecorator);
+ return;
+ }
+ if (c.GetType() == AidlConstantValue::Type::ARRAY) {
+ type.ViewAsArrayBase([&](const auto& base_type) {
+ out << "{";
+ for (size_t i = 0; i < c.Size(); i++) {
+ if (i > 0) {
+ out << ", ";
+ }
+ DumpConstantValue(base_type, c.ValueAt(i));
+ }
+ out << "}";
+ });
+ } else {
+ c.DispatchVisit(*this);
+ // print final value as comment
+ if (NeedsFinalValue(type, c)) {
+ out << " /* " << c.ValueString(type, AidlConstantValueDecorator) << " */";
+ }
+ }
}
void DumpVisitor::Visit(const AidlInterface& t) {
@@ -120,8 +164,11 @@ void DumpVisitor::Visit(const AidlEnumDeclaration& t) {
out.Indent();
for (const auto& e : t.GetEnumerators()) {
DumpComments(*e);
- out << e->GetName() << " = ";
- DumpConstantValue(t.GetBackingType(), *e->GetValue());
+ out << e->GetName();
+ if (e->IsValueUserSpecified() || inline_constants) {
+ out << " = ";
+ DumpConstantValue(t.GetBackingType(), *e->GetValue());
+ }
out << ",\n";
}
out.Dedent();
@@ -167,9 +214,44 @@ void DumpVisitor::Visit(const AidlTypeSpecifier& t) {
out << t.ToString();
}
+// These Visit() methods are not invoked when inline_constants = true
+void DumpVisitor::Visit(const AidlConstantValue& c) {
+ AIDL_FATAL_IF(inline_constants, AIDL_LOCATION_HERE);
+ out << c.Literal();
+}
+
+void DumpVisitor::Visit(const AidlConstantReference& r) {
+ AIDL_FATAL_IF(inline_constants, AIDL_LOCATION_HERE);
+ if (auto& ref = r.GetRefType(); ref) {
+ ref->DispatchVisit(*this);
+ out << ".";
+ }
+ out << r.GetFieldName();
+}
+
+void DumpVisitor::Visit(const AidlBinaryConstExpression& b) {
+ AIDL_FATAL_IF(inline_constants, AIDL_LOCATION_HERE);
+ // TODO(b/262594867) put parentheses only when necessary
+ out << "(";
+ b.Left()->DispatchVisit(*this);
+ out << " " << b.Op() << " ";
+ b.Right()->DispatchVisit(*this);
+ out << ")";
+}
+
+void DumpVisitor::Visit(const AidlUnaryConstExpression& u) {
+ AIDL_FATAL_IF(inline_constants, AIDL_LOCATION_HERE);
+ // TODO(b/262594867) put parentheses only when necessary
+ out << "(";
+ out << u.Op();
+ u.Val()->DispatchVisit(*this);
+ out << ")";
+}
+
static string GetApiDumpPathFor(const AidlDefinedType& defined_type, const Options& options) {
string package_as_path = Join(Split(defined_type.GetPackage(), "."), OS_PATH_SEPARATOR);
- AIDL_FATAL_IF(options.OutputDir().empty() || options.OutputDir().back() != '/', defined_type);
+ AIDL_FATAL_IF(options.OutputDir().empty() || options.OutputDir().back() != OS_PATH_SEPARATOR,
+ defined_type);
return options.OutputDir() + package_as_path + OS_PATH_SEPARATOR + defined_type.GetName() +
".aidl";
}
@@ -203,7 +285,7 @@ bool dump_api(const Options& options, const IoDelegate& io_delegate) {
if (!type->GetPackage().empty()) {
(*writer) << "package " << type->GetPackage() << ";\n";
}
- DumpVisitor visitor(*writer);
+ DumpVisitor visitor(*writer, /*inline_constants=*/false);
type->DispatchVisit(visitor);
}
} else {
@@ -214,4 +296,4 @@ bool dump_api(const Options& options, const IoDelegate& io_delegate) {
}
} // namespace aidl
-} // namespace android \ No newline at end of file
+} // namespace android
diff --git a/aidl_dumpapi.h b/aidl_dumpapi.h
index df8278a4..b4c146cf 100644
--- a/aidl_dumpapi.h
+++ b/aidl_dumpapi.h
@@ -22,7 +22,9 @@ namespace aidl {
struct DumpVisitor : AidlVisitor {
CodeWriter& out;
- DumpVisitor(CodeWriter& out) : out(out) {}
+ bool inline_constants;
+ DumpVisitor(CodeWriter& out, bool inline_constants)
+ : out(out), inline_constants(inline_constants) {}
void DumpType(const AidlDefinedType& dt, const string& type);
void DumpMembers(const AidlDefinedType& dt);
@@ -39,6 +41,10 @@ struct DumpVisitor : AidlVisitor {
void Visit(const AidlVariableDeclaration& v) override;
void Visit(const AidlConstantDeclaration& c) override;
void Visit(const AidlTypeSpecifier& t) override;
+ void Visit(const AidlConstantValue& c) override;
+ void Visit(const AidlConstantReference& r) override;
+ void Visit(const AidlBinaryConstExpression& b) override;
+ void Visit(const AidlUnaryConstExpression& u) override;
};
bool dump_api(const Options& options, const IoDelegate& io_delegate);
diff --git a/aidl_language.cpp b/aidl_language.cpp
index 6e19d6e1..67208181 100644
--- a/aidl_language.cpp
+++ b/aidl_language.cpp
@@ -143,6 +143,10 @@ const std::vector<AidlAnnotation::Schema>& AidlAnnotation::AllSchemas() {
"JavaOnlyStableParcelable",
CONTEXT_TYPE_UNSTRUCTURED_PARCELABLE,
{}},
+ {AidlAnnotation::Type::NDK_STABLE_PARCELABLE,
+ "NdkOnlyStableParcelable",
+ CONTEXT_TYPE_UNSTRUCTURED_PARCELABLE,
+ {}},
{AidlAnnotation::Type::BACKING,
"Backing",
CONTEXT_TYPE_ENUM,
@@ -250,7 +254,7 @@ AidlAnnotation::AidlAnnotation(const AidlLocation& location, const Schema& schem
: AidlNode(location, comments), schema_(schema), parameters_(std::move(parameters)) {}
struct ConstReferenceFinder : AidlVisitor {
- const AidlConstantReference* found;
+ const AidlConstantReference* found = nullptr;
void Visit(const AidlConstantReference& ref) override {
if (!found) found = &ref;
}
@@ -351,9 +355,9 @@ bool AidlAnnotation::CheckContext(TargetContext context) const {
const static map<TargetContext, string> context_name_map{
{CONTEXT_TYPE_INTERFACE, "interface"},
{CONTEXT_TYPE_ENUM, "enum"},
- {CONTEXT_TYPE_STRUCTURED_PARCELABLE, "structured parcelable"},
+ {CONTEXT_TYPE_STRUCTURED_PARCELABLE, "parcelable definition"},
{CONTEXT_TYPE_UNION, "union"},
- {CONTEXT_TYPE_UNSTRUCTURED_PARCELABLE, "parcelable"},
+ {CONTEXT_TYPE_UNSTRUCTURED_PARCELABLE, "parcelable declaration"},
{CONTEXT_CONST, "constant"},
{CONTEXT_FIELD, "field"},
{CONTEXT_METHOD, "method"},
@@ -365,8 +369,8 @@ bool AidlAnnotation::CheckContext(TargetContext context) const {
available.push_back(name);
}
}
- AIDL_ERROR(this) << "@" << GetName() << " is not available. It can annotate {"
- << Join(available, ", ") << "}.";
+ AIDL_ERROR(this) << "@" << GetName()
+ << " is not available. It can only annotate: " << Join(available, ", ") << ".";
return false;
}
@@ -468,8 +472,16 @@ const AidlAnnotation* AidlAnnotatable::UnsupportedAppUsage() const {
return GetAnnotation(annotations_, AidlAnnotation::Type::UNSUPPORTED_APP_USAGE);
}
-const AidlAnnotation* AidlAnnotatable::RustDerive() const {
- return GetAnnotation(annotations_, AidlAnnotation::Type::RUST_DERIVE);
+std::vector<std::string> AidlAnnotatable::RustDerive() const {
+ std::vector<std::string> ret;
+ if (const auto* ann = GetAnnotation(annotations_, AidlAnnotation::Type::RUST_DERIVE)) {
+ for (const auto& name_and_param : ann->AnnotationParams(AidlConstantValueDecorator)) {
+ if (name_and_param.second == "true") {
+ ret.push_back(name_and_param.first);
+ }
+ }
+ }
+ return ret;
}
const AidlAnnotation* AidlAnnotatable::BackingType() const {
@@ -508,13 +520,20 @@ bool AidlAnnotatable::IsPermissionNone() const {
return GetAnnotation(annotations_, AidlAnnotation::Type::PERMISSION_NONE);
}
+bool AidlAnnotatable::IsPermissionAnnotated() const {
+ return IsPermissionNone() || IsPermissionManual() || EnforceExpression();
+}
+
bool AidlAnnotatable::IsPropagateAllowBlocking() const {
return GetAnnotation(annotations_, AidlAnnotation::Type::PROPAGATE_ALLOW_BLOCKING);
}
bool AidlAnnotatable::IsStableApiParcelable(Options::Language lang) const {
- return lang == Options::Language::JAVA &&
- GetAnnotation(annotations_, AidlAnnotation::Type::JAVA_STABLE_PARCELABLE);
+ if (lang == Options::Language::JAVA)
+ return GetAnnotation(annotations_, AidlAnnotation::Type::JAVA_STABLE_PARCELABLE);
+ if (lang == Options::Language::NDK)
+ return GetAnnotation(annotations_, AidlAnnotation::Type::NDK_STABLE_PARCELABLE);
+ return false;
}
bool AidlAnnotatable::JavaDerive(const std::string& method) const {
@@ -623,13 +642,17 @@ bool AidlTypeSpecifier::MakeArray(ArrayType array_type) {
return false;
}
+std::vector<int32_t> FixedSizeArray::GetDimensionInts() const {
+ std::vector<int32_t> ints;
+ for (const auto& dim : dimensions) {
+ ints.push_back(dim->EvaluatedValue<int32_t>());
+ }
+ return ints;
+}
+
std::vector<int32_t> AidlTypeSpecifier::GetFixedSizeArrayDimensions() const {
AIDL_FATAL_IF(!IsFixedSizeArray(), "not a fixed-size array");
- std::vector<int32_t> dimensions;
- for (const auto& dim : std::get<FixedSizeArray>(GetArray()).dimensions) {
- dimensions.push_back(dim->EvaluatedValue<int32_t>());
- }
- return dimensions;
+ return std::get<FixedSizeArray>(GetArray()).GetDimensionInts();
}
string AidlTypeSpecifier::Signature() const {
@@ -1040,9 +1063,11 @@ bool AidlConstantDeclaration::CheckValid(const AidlTypenames& typenames) const {
bool valid = true;
valid &= type_->CheckValid(typenames);
valid &= value_->CheckValid();
+ valid = valid && !ValueString(AidlConstantValueDecorator).empty();
if (!valid) return false;
- const static set<string> kSupportedConstTypes = {"String", "byte", "int", "long"};
+ const static set<string> kSupportedConstTypes = {"String", "byte", "int",
+ "long", "float", "double"};
if (kSupportedConstTypes.find(type_->Signature()) == kSupportedConstTypes.end()) {
AIDL_ERROR(this) << "Constant of type " << type_->Signature() << " is not supported.";
return false;
@@ -1284,6 +1309,26 @@ bool AidlDefinedType::CheckValidWithMembers(const AidlTypenames& typenames) cons
}
}
+ // Rust derive fields must be transitive
+ const std::vector<std::string> rust_derives = RustDerive();
+ for (const auto& v : GetFields()) {
+ const AidlDefinedType* field = typenames.TryGetDefinedType(v->GetType().GetName());
+ if (!field) continue;
+
+ // could get this from CONTEXT_*, but we don't currently save this info when we validated
+ // contexts
+ if (!field->AsStructuredParcelable() && !field->AsUnionDeclaration()) continue;
+
+ auto subs = field->RustDerive();
+ for (const std::string& derive : rust_derives) {
+ if (std::find(subs.begin(), subs.end(), derive) == subs.end()) {
+ AIDL_ERROR(v) << "Field " << v->GetName() << " of type with @RustDerive " << derive
+ << " also needs to derive this";
+ success = false;
+ }
+ }
+ }
+
set<string> constant_names;
for (const auto& constant : GetConstantDeclarations()) {
if (constant_names.count(constant->GetName()) > 0) {
@@ -1386,14 +1431,18 @@ const AidlDocument& AidlDefinedType::GetDocument() const {
AidlParcelable::AidlParcelable(const AidlLocation& location, const std::string& name,
const std::string& package, const Comments& comments,
- const std::string& cpp_header, std::vector<std::string>* type_params,
+ const AidlUnstructuredHeaders& headers,
+ std::vector<std::string>* type_params,
std::vector<std::unique_ptr<AidlMember>>* members)
: AidlDefinedType(location, name, comments, package, members),
AidlParameterizable<std::string>(type_params),
- cpp_header_(cpp_header) {
- // Strip off quotation marks if we actually have a cpp header.
- if (cpp_header_.length() >= 2) {
- cpp_header_ = cpp_header_.substr(1, cpp_header_.length() - 2);
+ headers_(headers) {
+ // Strip off quotation marks if we actually have headers.
+ if (headers_.cpp.length() >= 2) {
+ headers_.cpp = headers_.cpp.substr(1, headers_.cpp.length() - 2);
+ }
+ if (headers_.ndk.length() >= 2) {
+ headers_.ndk = headers_.ndk.substr(1, headers_.ndk.length() - 2);
}
}
@@ -1441,7 +1490,7 @@ AidlStructuredParcelable::AidlStructuredParcelable(
const AidlLocation& location, const std::string& name, const std::string& package,
const Comments& comments, std::vector<std::string>* type_params,
std::vector<std::unique_ptr<AidlMember>>* members)
- : AidlParcelable(location, name, package, comments, "" /*cpp_header*/, type_params, members) {}
+ : AidlParcelable(location, name, package, comments, {} /*headers*/, type_params, members) {}
bool AidlStructuredParcelable::CheckValid(const AidlTypenames& typenames) const {
if (!AidlParcelable::CheckValid(typenames)) {
@@ -1600,7 +1649,7 @@ AidlUnionDecl::AidlUnionDecl(const AidlLocation& location, const std::string& na
const std::string& package, const Comments& comments,
std::vector<std::string>* type_params,
std::vector<std::unique_ptr<AidlMember>>* members)
- : AidlParcelable(location, name, package, comments, "" /*cpp_header*/, type_params, members) {}
+ : AidlParcelable(location, name, package, comments, {} /*headers*/, type_params, members) {}
bool AidlUnionDecl::CheckValid(const AidlTypenames& typenames) const {
// visit parents
@@ -1698,44 +1747,32 @@ bool AidlInterface::CheckValid(const AidlTypenames& typenames) const {
}
}
- bool success = true;
- set<string> constant_names;
- for (const auto& constant : GetConstantDeclarations()) {
- if (constant_names.count(constant->GetName()) > 0) {
- AIDL_ERROR(constant) << "Found duplicate constant name '" << constant->GetName() << "'";
- success = false;
- }
- constant_names.insert(constant->GetName());
- success = success && constant->CheckValid(typenames);
- }
- return success;
+ return true;
}
bool AidlInterface::CheckValidPermissionAnnotations(const AidlMethod& m) const {
- if (IsPermissionNone() || IsPermissionManual()) {
- if (m.GetType().IsPermissionNone() || m.GetType().IsPermissionManual() ||
- m.GetType().EnforceExpression()) {
- std::string interface_annotation = IsPermissionNone()
- ? "requiring no permission"
- : "manually implementing permission checks";
- AIDL_ERROR(m) << "The interface " << GetName() << " is annotated as " << interface_annotation
- << " but the method " << m.GetName() << " is also annotated.\n"
- << "Consider distributing the annotation to each method.";
- return false;
- }
- } else if (EnforceExpression()) {
- if (m.GetType().IsPermissionNone() || m.GetType().IsPermissionManual()) {
- AIDL_ERROR(m) << "The interface " << GetName()
- << " enforces permissions using annotations"
- " but the method "
- << m.GetName() << " is also annotated.\n"
- << "Consider distributing the annotation to each method.";
- return false;
- }
+ if (IsPermissionAnnotated() && m.GetType().IsPermissionAnnotated()) {
+ AIDL_ERROR(m) << "The interface " << GetName()
+ << " uses a permission annotation but the method " << m.GetName()
+ << " is also annotated.\n"
+ << "Consider distributing the annotation to each method.";
+ return false;
}
return true;
}
+bool AidlInterface::UsesPermissions() const {
+ if (EnforceExpression()) {
+ return true;
+ }
+ for (auto& m : GetMethods()) {
+ if (m->GetType().EnforceExpression()) {
+ return true;
+ }
+ }
+ return false;
+}
+
std::string AidlInterface::GetDescriptor() const {
std::string annotatedDescriptor = AidlAnnotatable::GetDescriptor();
if (annotatedDescriptor != "") {
diff --git a/aidl_language.h b/aidl_language.h
index 15ce4bb4..3b1c77d1 100644
--- a/aidl_language.h
+++ b/aidl_language.h
@@ -226,6 +226,7 @@ class AidlAnnotation : public AidlNode {
enum class Type {
BACKING = 1,
JAVA_STABLE_PARCELABLE,
+ NDK_STABLE_PARCELABLE,
UNSUPPORTED_APP_USAGE,
VINTF_STABILITY,
NULLABLE,
@@ -271,7 +272,6 @@ class AidlAnnotation : public AidlNode {
std::map<std::string, std::shared_ptr<AidlConstantValue>> parameter_list,
const Comments& comments);
- AidlAnnotation(AidlAnnotation&&) = default;
virtual ~AidlAnnotation() = default;
bool CheckValid() const;
bool CheckContext(TargetContext context) const;
@@ -360,12 +360,13 @@ class AidlAnnotatable : public AidlCommentable {
std::string GetDescriptor() const;
const AidlAnnotation* UnsupportedAppUsage() const;
- const AidlAnnotation* RustDerive() const;
+ std::vector<std::string> RustDerive() const;
const AidlAnnotation* BackingType() const;
std::vector<std::string> SuppressWarnings() const;
std::unique_ptr<android::aidl::perm::Expression> EnforceExpression() const;
bool IsPermissionManual() const;
bool IsPermissionNone() const;
+ bool IsPermissionAnnotated() const;
bool IsPropagateAllowBlocking() const;
// ToString is for dumping AIDL.
@@ -391,6 +392,7 @@ struct DynamicArray {};
struct FixedSizeArray {
FixedSizeArray(std::unique_ptr<AidlConstantValue> dim) { dimensions.push_back(std::move(dim)); }
std::vector<std::unique_ptr<AidlConstantValue>> dimensions;
+ std::vector<int32_t> GetDimensionInts() const;
};
// Represents `[]` or `[N]` part of type specifier
using ArrayType = std::variant<DynamicArray, FixedSizeArray>;
@@ -686,7 +688,7 @@ class AidlConstantValue : public AidlNode {
// Raw value of type (currently valid in C++ and Java). Empty string on error.
string ValueString(const AidlTypeSpecifier& type, const ConstantValueDecorator& decorator) const;
- void TraverseChildren(std::function<void(const AidlNode&)> traverse) const {
+ void TraverseChildren(std::function<void(const AidlNode&)> traverse) const override {
if (type_ == Type::ARRAY) {
for (const auto& v : values_) {
traverse(*v);
@@ -694,6 +696,8 @@ class AidlConstantValue : public AidlNode {
}
}
void DispatchVisit(AidlVisitor& visitor) const override { visitor.Visit(*this); }
+ size_t Size() const { return values_.size(); }
+ const AidlConstantValue& ValueAt(size_t index) const { return *values_.at(index); }
private:
AidlConstantValue(const AidlLocation& location, Type parsed_type, int64_t parsed_value,
@@ -725,7 +729,7 @@ class AidlConstantValue : public AidlNode {
};
// Represents "<type>.<field>" which resolves to a constant which is one of
-// - constant declartion
+// - constant declaration
// - enumerator
// When a <type> is missing, <field> is of the enclosing type.
class AidlConstantReference : public AidlConstantValue {
@@ -763,6 +767,8 @@ class AidlUnaryConstExpression : public AidlConstantValue {
traverse(*unary_);
}
void DispatchVisit(AidlVisitor& v) const override { v.Visit(*this); }
+ const std::unique_ptr<AidlConstantValue>& Val() const { return unary_; }
+ const std::string& Op() const { return op_; }
private:
bool evaluate() const override;
@@ -788,6 +794,9 @@ class AidlBinaryConstExpression : public AidlConstantValue {
traverse(*right_val_);
}
void DispatchVisit(AidlVisitor& v) const override { v.Visit(*this); }
+ const std::unique_ptr<AidlConstantValue>& Left() const { return left_val_; }
+ const std::unique_ptr<AidlConstantValue>& Right() const { return right_val_; }
+ const std::string& Op() const { return op_; }
private:
bool evaluate() const override;
@@ -1034,11 +1043,16 @@ class AidlDefinedType : public AidlMember, public AidlScope {
std::vector<const AidlMember*> members_; // keep members in order of appearance.
};
+struct AidlUnstructuredHeaders {
+ std::string cpp;
+ std::string ndk;
+};
+
class AidlParcelable : public AidlDefinedType, public AidlParameterizable<std::string> {
public:
AidlParcelable(const AidlLocation& location, const std::string& name, const std::string& package,
- const Comments& comments, const std::string& cpp_header = "",
- std::vector<std::string>* type_params = nullptr,
+ const Comments& comments, const AidlUnstructuredHeaders& headers,
+ std::vector<std::string>* type_params,
std::vector<std::unique_ptr<AidlMember>>* members = nullptr);
virtual ~AidlParcelable() = default;
@@ -1048,7 +1062,8 @@ class AidlParcelable : public AidlDefinedType, public AidlParameterizable<std::s
AidlParcelable& operator=(const AidlParcelable&) = delete;
AidlParcelable& operator=(AidlParcelable&&) = delete;
- std::string GetCppHeader() const { return cpp_header_; }
+ std::string GetCppHeader() const { return headers_.cpp; }
+ std::string GetNdkHeader() const { return headers_.ndk; }
bool CheckValid(const AidlTypenames& typenames) const override;
const AidlParcelable* AsParcelable() const override { return this; }
@@ -1059,7 +1074,7 @@ class AidlParcelable : public AidlDefinedType, public AidlParameterizable<std::s
void DispatchVisit(AidlVisitor& v) const override { v.Visit(*this); }
private:
- std::string cpp_header_;
+ AidlUnstructuredHeaders headers_;
};
class AidlStructuredParcelable : public AidlParcelable {
@@ -1197,6 +1212,7 @@ class AidlInterface final : public AidlDefinedType {
bool CheckValid(const AidlTypenames& typenames) const override;
bool CheckValidPermissionAnnotations(const AidlMethod& m) const;
+ bool UsesPermissions() const;
std::string GetDescriptor() const;
void DispatchVisit(AidlVisitor& v) const override { v.Visit(*this); }
};
diff --git a/aidl_language_l.ll b/aidl_language_l.ll
index 5b11008d..732b421c 100644
--- a/aidl_language_l.ll
+++ b/aidl_language_l.ll
@@ -128,6 +128,8 @@ out { return yy::parser::token::OUT; }
inout { return yy::parser::token::INOUT; }
cpp_header { yylval->token = new AidlToken("cpp_header", comments);
return yy::parser::token::CPP_HEADER; }
+ndk_header { yylval->token = new AidlToken("ndk_header", comments);
+ return yy::parser::token::NDK_HEADER; }
const { yylval->token = new AidlToken("const", comments);
return yy::parser::token::CONST; }
true { return yy::parser::token::TRUE_LITERAL; }
diff --git a/aidl_language_y.yy b/aidl_language_y.yy
index 11ab29e9..3d506212 100644
--- a/aidl_language_y.yy
+++ b/aidl_language_y.yy
@@ -92,6 +92,7 @@ AidlLocation loc(const yy::parser::location_type& l) {
std::vector<std::unique_ptr<AidlTypeSpecifier>>* type_args;
std::vector<std::string>* type_params;
std::vector<std::unique_ptr<AidlDefinedType>>* declarations;
+ AidlUnstructuredHeaders* unstructured_headers;
}
%destructor { } <direction>
@@ -117,6 +118,7 @@ AidlLocation loc(const yy::parser::location_type& l) {
%token '(' ')' ',' '=' '[' ']' '.' '{' '}' ';'
%token UNKNOWN "unrecognized character"
%token<token> CPP_HEADER "cpp_header (which can also be used as an identifier)"
+%token<token> NDK_HEADER "ndk_header (which can also be used as an identifier)"
%token IN "in"
%token INOUT "inout"
%token OUT "out"
@@ -176,6 +178,7 @@ AidlLocation loc(const yy::parser::location_type& l) {
%type<token_list> imports
%type<declarations> decls
%type<token> import identifier error qualified_name optional_package
+%type<unstructured_headers> optional_unstructured_headers
%%
@@ -206,6 +209,7 @@ document
identifier
: IDENTIFIER
| CPP_HEADER
+ | NDK_HEADER
;
optional_package
@@ -294,18 +298,35 @@ type_params
delete $3;
};
- optional_type_params
- : /* none */ { $$ = nullptr; }
- | '<' type_params '>' {
- $$ = $2;
- };
+optional_type_params
+ : /* none */ { $$ = nullptr; }
+ | '<' type_params '>' {
+ $$ = $2;
+ };
+
+optional_unstructured_headers
+ : /* none */ { $$ = new AidlUnstructuredHeaders; }
+ | optional_unstructured_headers CPP_HEADER C_STR {
+ $$ = $1;
+ $$->cpp = $3->GetText();
+ delete $2;
+ delete $3;
+ }
+ | optional_unstructured_headers NDK_HEADER C_STR {
+ $$ = $1;
+ $$->ndk = $3->GetText();
+ delete $2;
+ delete $3;
+ }
+ ;
parcelable_decl
- : PARCELABLE qualified_name optional_type_params ';' {
+ : PARCELABLE qualified_name optional_type_params optional_unstructured_headers ';' {
// No check for type name here. We allow nested types for unstructured parcelables.
- $$ = new AidlParcelable(loc(@2), $2->GetText(), ps->Package(), $1->GetComments(), "", $3);
+ $$ = new AidlParcelable(loc(@2), $2->GetText(), ps->Package(), $1->GetComments(), *$4, $3);
delete $1;
delete $2;
+ delete $4;
}
| PARCELABLE qualified_name optional_type_params '{' parcelable_members '}' {
ps->CheckValidTypeName(*$2, loc(@2));
@@ -313,14 +334,6 @@ parcelable_decl
delete $1;
delete $2;
}
- | PARCELABLE qualified_name CPP_HEADER C_STR ';' {
- // No check for type name here. We allow nested types for unstructured parcelables.
- $$ = new AidlParcelable(loc(@2), $2->GetText(), ps->Package(), $1->GetComments(), $4->GetText());
- delete $1;
- delete $2;
- delete $3;
- delete $4;
- }
| PARCELABLE error ';' {
ps->AddError();
$$ = nullptr;
diff --git a/aidl_to_cpp.cpp b/aidl_to_cpp.cpp
index 987aba57..aab00247 100644
--- a/aidl_to_cpp.cpp
+++ b/aidl_to_cpp.cpp
@@ -348,7 +348,7 @@ std::string CppHeaderForType(const AidlDefinedType& defined_type) {
if (auto unstructured = AidlCast<AidlParcelable>(defined_type); unstructured) {
const std::string cpp_header = unstructured->GetCppHeader();
AIDL_FATAL_IF(cpp_header.empty(), unstructured)
- << "Parcelable " << unstructured->GetCanonicalName() << " has no C++ header defined.";
+ << "Parcelable " << unstructured->GetCanonicalName() << " has no cpp_header defined.";
return cpp_header;
}
return HeaderFile(defined_type, ClassNames::RAW, /*use_os_sep=*/false);
diff --git a/aidl_to_cpp_common.cpp b/aidl_to_cpp_common.cpp
index 682b6c88..9834c1a4 100644
--- a/aidl_to_cpp_common.cpp
+++ b/aidl_to_cpp_common.cpp
@@ -50,6 +50,11 @@ char kTransactionLogStruct[] = R"(struct TransactionLog {
};
)";
+bool HasDeprecatedField(const AidlParcelable& parcelable) {
+ return std::any_of(parcelable.GetFields().begin(), parcelable.GetFields().end(),
+ [](const auto& field) { return field->IsDeprecated(); });
+}
+
string ClassName(const AidlDefinedType& defined_type, ClassNames type) {
string base_name = defined_type.GetName();
if (base_name.length() >= 2 && base_name[0] == 'I' && isupper(base_name[1])) {
@@ -95,6 +100,31 @@ std::string HeaderFile(const AidlDefinedType& defined_type, ClassNames class_typ
return Join(paths, separator) + ".h";
}
+// Ensures that output_file is <out_dir>/<packagename>/<typename>.cpp
+bool ValidateOutputFilePath(const string& output_file, const Options& options,
+ const AidlDefinedType& defined_type) {
+ const auto& out_dir =
+ !options.OutputDir().empty() ? options.OutputDir() : options.OutputHeaderDir();
+ if (output_file.empty() || !android::base::StartsWith(output_file, out_dir)) {
+ // If output_file is not set (which happens in the unit tests) or is outside of out_dir, we can
+ // help but accepting it, because the path is what the user has requested.
+ return true;
+ }
+
+ string canonical_name = defined_type.GetCanonicalName();
+ std::replace(canonical_name.begin(), canonical_name.end(), '.', OS_PATH_SEPARATOR);
+ const string expected = out_dir + canonical_name + ".cpp";
+ if (expected != output_file) {
+ AIDL_ERROR(defined_type) << "Output file is expected to be at " << expected << ", but is "
+ << output_file << ".\n If this is an Android platform "
+ << "build, consider providing the input AIDL files using a filegroup "
+ << "with `path:\"<base>\"` so that the AIDL files are located at "
+ << "<base>/<packagename>/<typename>.aidl.";
+ return false;
+ }
+ return true;
+}
+
void EnterNamespace(CodeWriter& out, const AidlDefinedType& defined_type) {
const std::vector<std::string> packages = defined_type.GetSplitPackage();
for (const std::string& package : packages) {
@@ -425,16 +455,9 @@ void GenerateToString(CodeWriter& out, const AidlUnionDecl& parcelable) {
out << "os << \"" + parcelable.GetName() + "{\";\n";
out << "switch (getTag()) {\n";
for (const auto& f : parcelable.GetFields()) {
- if (f->IsDeprecated()) {
- out << "#pragma clang diagnostic push\n";
- out << "#pragma clang diagnostic ignored \"-Wdeprecated-declarations\"\n";
- }
const string tag = f->GetName();
out << "case " << tag << ": os << \"" << tag << ": \" << "
<< "::android::internal::ToString(get<" + tag + ">()); break;\n";
- if (f->IsDeprecated()) {
- out << "#pragma clang diagnostic pop\n";
- }
}
out << "}\n";
out << "os << \"}\";\n";
@@ -658,10 +681,6 @@ void UnionWriter::ReadFromParcel(CodeWriter& out, const ParcelWriterContext& ctx
read_var(tag, *tag_type);
out << fmt::format("switch (static_cast<Tag>({})) {{\n", tag);
for (const auto& variable : decl.GetFields()) {
- if (variable->IsDeprecated()) {
- out << "#pragma clang diagnostic push\n";
- out << "#pragma clang diagnostic ignored \"-Wdeprecated-declarations\"\n";
- }
out << fmt::format("case {}: {{\n", variable->GetName());
out.Indent();
const auto& type = variable->GetType();
@@ -681,9 +700,6 @@ void UnionWriter::ReadFromParcel(CodeWriter& out, const ParcelWriterContext& ctx
out << "}\n";
out << fmt::format("return {}; }}\n", ctx.status_ok);
out.Dedent();
- if (variable->IsDeprecated()) {
- out << "#pragma clang diagnostic pop\n";
- }
}
out << "}\n";
out << fmt::format("return {};\n", ctx.status_bad);
@@ -790,6 +806,60 @@ std::string CppConstantValueDecorator(
}
return cpp_type_name + "::" + value.substr(value.find_last_of('.') + 1);
}
+
+// Collect all forward declarations for the type's interface header.
+// Nested types are visited as well via VisitTopDown.
+void GenerateForwardDecls(CodeWriter& out, const AidlDefinedType& root_type, bool is_ndk) {
+ struct Visitor : AidlVisitor {
+ using PackagePath = std::vector<std::string>;
+ struct ClassDeclInfo {
+ std::string template_decl;
+ };
+ std::map<PackagePath, std::map<std::string, ClassDeclInfo>> classes;
+ // Collect class names for each interface or parcelable type
+ void Visit(const AidlTypeSpecifier& type) override {
+ const auto defined_type = type.GetDefinedType();
+ if (defined_type && !defined_type->GetParentType()) {
+ // Forward declarations are not supported for nested types
+ auto package = defined_type->GetSplitPackage();
+ if (defined_type->AsInterface() != nullptr) {
+ auto name = ClassName(*defined_type, ClassNames::INTERFACE);
+ classes[package][std::move(name)] = ClassDeclInfo();
+ } else if (auto* p = defined_type->AsStructuredParcelable(); p != nullptr) {
+ auto name = defined_type->GetName();
+ ClassDeclInfo info;
+ info.template_decl = TemplateDecl(*p);
+ classes[package][std::move(name)] = std::move(info);
+ }
+ }
+ }
+ } v;
+ VisitTopDown(v, root_type);
+
+ if (v.classes.empty()) {
+ return;
+ }
+
+ for (const auto& it : v.classes) {
+ auto package = it.first;
+ auto& classes = it.second;
+
+ if (is_ndk) {
+ package.insert(package.begin(), "aidl");
+ }
+
+ std::string namespace_name = Join(package, "::");
+ if (!namespace_name.empty()) {
+ out << "namespace " << namespace_name << " {\n";
+ }
+ for (const auto& [name, info] : classes) {
+ out << info.template_decl << "class " << name << ";\n";
+ }
+ if (!namespace_name.empty()) {
+ out << "} // namespace " << namespace_name << "\n";
+ }
+ }
+}
} // namespace cpp
} // namespace aidl
} // namespace android
diff --git a/aidl_to_cpp_common.h b/aidl_to_cpp_common.h
index e6733b69..e732641f 100644
--- a/aidl_to_cpp_common.h
+++ b/aidl_to_cpp_common.h
@@ -56,6 +56,9 @@ size_t AlignmentOf(const AidlTypeSpecifier& type, const AidlTypenames& typenames
std::string HeaderFile(const AidlDefinedType& defined_type, ClassNames class_type,
bool use_os_sep = true);
+bool ValidateOutputFilePath(const string& output_file, const Options& options,
+ const AidlDefinedType& defined_type);
+
void EnterNamespace(CodeWriter& out, const AidlDefinedType& defined_type);
void LeaveNamespace(CodeWriter& out, const AidlDefinedType& defined_type);
@@ -132,6 +135,29 @@ struct UnionWriter {
std::string CppConstantValueDecorator(
const AidlTypeSpecifier& type,
const std::variant<std::string, std::vector<std::string>>& raw_value, bool is_ndk);
+
+void GenerateForwardDecls(CodeWriter& out, const AidlDefinedType& root_type, bool is_ndk);
+
+struct ClangDiagnosticIgnoreDeprecated {
+ CodeWriter& out;
+ bool deprecated;
+ ClangDiagnosticIgnoreDeprecated(CodeWriter& out, bool deprecated)
+ : out(out), deprecated(deprecated) {
+ // enter
+ if (deprecated) {
+ out << "#pragma clang diagnostic push\n";
+ out << "#pragma clang diagnostic ignored \"-Wdeprecated-declarations\"\n";
+ }
+ }
+ ~ClangDiagnosticIgnoreDeprecated() {
+ // exit
+ if (deprecated) {
+ out << "#pragma clang diagnostic pop\n";
+ }
+ }
+};
+
+bool HasDeprecatedField(const AidlParcelable& parcelable);
} // namespace cpp
} // namespace aidl
} // namespace android
diff --git a/aidl_to_java.cpp b/aidl_to_java.cpp
index bc705dfa..acbe6fed 100644
--- a/aidl_to_java.cpp
+++ b/aidl_to_java.cpp
@@ -245,8 +245,34 @@ static private <T extends android.os.Parcelable> void writeTypedObject(
)";
}
+static void GenerateTypedListHelper(CodeWriter& out, const Options& options) {
+ out << R"(static private <T extends android.os.Parcelable> void writeTypedList(
+ android.os.Parcel parcel, java.util.List<T> value, int parcelableFlags) {
+ if (value == null) {
+ parcel.writeInt(-1);
+ } else {
+ int N = value.size();
+ int i = 0;
+ parcel.writeInt(N);
+ while (i < N) {
+)";
+
+ if (options.GetMinSdkVersion() < 23u) {
+ out << "writeTypedObject(parcel, value.get(i), parcelableFlags);";
+ } else {
+ out << "parcel.writeTypedObject(value.get(i), parcelableFlags);";
+ }
+
+ out << R"(
+ i++;
+ }
+ }
+}
+)";
+}
+
void GenerateParcelHelpers(CodeWriter& out, const AidlDefinedType& defined_type,
- const Options& options) {
+ const AidlTypenames& typenames, const Options& options) {
// root-level type contains all necessary helpers
if (defined_type.GetParentType()) {
return;
@@ -254,9 +280,11 @@ void GenerateParcelHelpers(CodeWriter& out, const AidlDefinedType& defined_type,
// visits method parameters and parcelable fields to collect types which
// requires read/write/create helpers.
struct Visitor : AidlVisitor {
+ const AidlTypenames& typenames;
const Options& options;
set<ParcelHelperGenerator> helpers;
- Visitor(const Options& options) : options(options) {}
+ Visitor(const AidlTypenames& typenames, const Options& options)
+ : typenames(typenames), options(options) {}
void Visit(const AidlTypeSpecifier& type) override {
auto name = type.GetName();
if (auto defined_type = type.GetDefinedType(); defined_type) {
@@ -276,9 +304,16 @@ void GenerateParcelHelpers(CodeWriter& out, const AidlDefinedType& defined_type,
}
}
}
+
+ if (name == "List" && type.IsGeneric()) {
+ const auto& element_name = type.GetTypeParameters()[0]->GetName();
+ if (typenames.IsParcelable(element_name) && options.GetMinSdkVersion() <= 33u) {
+ helpers.insert(&GenerateTypedListHelper);
+ }
+ }
}
}
- } v{options};
+ } v{typenames, options};
VisitTopDown(v, defined_type);
if (!v.helpers.empty()) {
@@ -378,7 +413,13 @@ void WriteToParcelFor(const CodeGeneratorContext& c) {
} else if (element_type_name == "IBinder") {
c.writer << c.parcel << ".writeBinderList(" << c.var << ");\n";
} else if (c.typenames.IsParcelable(element_type_name)) {
- c.writer << c.parcel << ".writeTypedList(" << c.var << ");\n";
+ if (c.min_sdk_version > 33u) {
+ c.writer << c.parcel << ".writeTypedList(" << c.var << ", " << c.write_to_parcel_flag
+ << ");\n";
+ } else {
+ c.writer << "_Parcel.writeTypedList(" << c.parcel << ", " << c.var << ", "
+ << c.write_to_parcel_flag << ");\n";
+ }
} else if (c.typenames.GetInterface(element_type)) {
c.writer << c.parcel << ".writeInterfaceList(" << c.var << ");\n";
} else {
diff --git a/aidl_to_java.h b/aidl_to_java.h
index 34c3239c..aa1ee98f 100644
--- a/aidl_to_java.h
+++ b/aidl_to_java.h
@@ -108,7 +108,7 @@ void ToStringFor(const CodeGeneratorContext& c);
// Generates create/read/write helper functions which are missing in Parcel.
void GenerateParcelHelpers(CodeWriter& out, const AidlDefinedType& defined_type,
- const Options& options);
+ const AidlTypenames& typenames, const Options& options);
} // namespace java
} // namespace aidl
diff --git a/aidl_to_ndk.cpp b/aidl_to_ndk.cpp
index adcd4512..f533c77c 100644
--- a/aidl_to_ndk.cpp
+++ b/aidl_to_ndk.cpp
@@ -30,11 +30,17 @@ namespace android {
namespace aidl {
namespace ndk {
-static const AidlTypeSpecifier kIntType{AIDL_LOCATION_HERE, "int", /*array=*/std::nullopt, nullptr,
- Comments{}};
-
std::string NdkHeaderFile(const AidlDefinedType& defined_type, cpp::ClassNames name,
bool use_os_sep) {
+ // Unstructured parcelable should set its ndk_header. use it.
+ if (auto unstructured = AidlCast<AidlParcelable>(defined_type); unstructured) {
+ AIDL_FATAL_IF(name != cpp::ClassNames::RAW, "unstructured parcelable should only use raw name");
+ const std::string ndk_header = unstructured->GetNdkHeader();
+ AIDL_FATAL_IF(ndk_header.empty(), unstructured)
+ << "Parcelable " << unstructured->GetCanonicalName() << " has no ndk_header defined.";
+ return ndk_header;
+ }
+
char seperator = (use_os_sep) ? OS_PATH_SEPARATOR : '/';
return std::string("aidl") + seperator + cpp::HeaderFile(defined_type, name, use_os_sep);
}
@@ -123,10 +129,9 @@ static TypeInfo WrapArrayType(TypeInfo info, const ArrayType* array) {
if (std::get_if<DynamicArray>(array)) {
info.cpp_name = "std::vector<" + info.cpp_name + ">";
} else {
- const auto& dimensions = std::get<FixedSizeArray>(*array).dimensions;
+ auto dimensions = std::get<FixedSizeArray>(*array).GetDimensionInts();
for (auto it = rbegin(dimensions), end = rend(dimensions); it != end; it++) {
- info.cpp_name = "std::array<" + info.cpp_name + ", " +
- (*it)->ValueString(kIntType, ConstantValueDecorator) + ">";
+ info.cpp_name = "std::array<" + info.cpp_name + ", " + std::to_string(*it) + ">";
}
}
info.value_is_cheap = false;
diff --git a/aidl_to_rust.cpp b/aidl_to_rust.cpp
index 3213266a..c00a9946 100644
--- a/aidl_to_rust.cpp
+++ b/aidl_to_rust.cpp
@@ -100,6 +100,13 @@ std::string GetRawRustName(const AidlTypeSpecifier& type) {
return rust_name;
}
+// Usually, this means that the type implements `Default`, however `ParcelableHolder` is also
+// included in this list because the code generator knows how to call `::new(stability)`.
+bool AutoConstructor(const AidlTypeSpecifier& type, const AidlTypenames& typenames) {
+ return !(type.GetName() == "ParcelFileDescriptor" || type.GetName() == "IBinder" ||
+ TypeIsInterface(type, typenames));
+}
+
std::string GetRustName(const AidlTypeSpecifier& type, const AidlTypenames& typenames,
StorageMode mode) {
// map from AIDL built-in type name to the corresponding Rust type name
@@ -117,38 +124,26 @@ std::string GetRustName(const AidlTypeSpecifier& type, const AidlTypenames& type
{"ParcelFileDescriptor", "binder::ParcelFileDescriptor"},
{"ParcelableHolder", "binder::ParcelableHolder"},
};
- const bool is_vector = type.IsArray() || typenames.IsList(type);
- // If the type is an array/List<T>, get the inner element type
- AIDL_FATAL_IF(typenames.IsList(type) && type.GetTypeParameters().size() != 1, type);
- const auto& element_type = type.IsGeneric() ? (*type.GetTypeParameters().at(0)) : type;
- const string& element_type_name = element_type.GetName();
- if (m.find(element_type_name) != m.end()) {
- AIDL_FATAL_IF(!AidlTypenames::IsBuiltinTypename(element_type_name), type);
- if (element_type_name == "byte" && type.IsArray()) {
- return "u8";
- } else if (element_type_name == "String" && mode == StorageMode::UNSIZED_ARGUMENT) {
+ const string& type_name = type.GetName();
+ if (m.find(type_name) != m.end()) {
+ AIDL_FATAL_IF(!AidlTypenames::IsBuiltinTypename(type_name), type);
+ if (type_name == "String" && mode == StorageMode::UNSIZED_ARGUMENT) {
return "str";
- } else if (element_type_name == "ParcelFileDescriptor" || element_type_name == "IBinder") {
- if (is_vector && mode == StorageMode::DEFAULT_VALUE) {
- // Out-arguments of ParcelFileDescriptors arrays need to
- // be Vec<Option<ParcelFileDescriptor>> so resize_out_vec
- // can initialize all elements to None (it requires Default
- // and ParcelFileDescriptor doesn't implement that)
- return "Option<" + m[element_type_name] + ">";
- } else {
- return m[element_type_name];
- }
+ } else {
+ return m[type_name];
}
- return m[element_type_name];
}
- auto name = GetRawRustName(element_type);
- if (TypeIsInterface(element_type, typenames)) {
+ auto name = GetRawRustName(type);
+ if (TypeIsInterface(type, typenames)) {
name = "binder::Strong<dyn " + name + ">";
- if (is_vector && mode == StorageMode::DEFAULT_VALUE) {
- // Out-arguments of interface arrays need to be Vec<Option<...>> so resize_out_vec
- // can initialize all elements to None.
- name = "Option<" + name + ">";
+ }
+ if (type.IsGeneric()) {
+ name += "<";
+ for (const auto& param : type.GetTypeParameters()) {
+ name += GetRustName(*param, typenames, mode);
+ name += ",";
}
+ name += ">";
}
return name;
}
@@ -215,6 +210,7 @@ std::string RustNameOf(const AidlTypeSpecifier& type, const AidlTypenames& typen
StorageMode mode, Lifetime lifetime) {
std::string rust_name;
if (type.IsArray() || typenames.IsList(type)) {
+ const auto& element_type = type.IsGeneric() ? (*type.GetTypeParameters().at(0)) : type;
StorageMode element_mode;
if (type.IsFixedSizeArray() && mode == StorageMode::PARCELABLE_FIELD) {
// Elements of fixed-size array field need to have Default.
@@ -225,16 +221,21 @@ std::string RustNameOf(const AidlTypeSpecifier& type, const AidlTypenames& typen
} else {
element_mode = StorageMode::VALUE;
}
- rust_name = GetRustName(type, typenames, element_mode);
- if (type.IsNullable() && UsesOptionInNullableVector(type, typenames)) {
- // The mapping for nullable string arrays is
- // optional<vector<optional<string>>> in the NDK,
- // so we do the same
- // However, we don't need to when GetRustName() already wraps it with Option.
- if (!base::StartsWith(rust_name, "Option<")) {
- rust_name = "Option<" + rust_name + ">";
- }
+ if (type.IsArray() && element_type.GetName() == "byte") {
+ rust_name = "u8";
+ } else {
+ rust_name = GetRustName(element_type, typenames, element_mode);
+ }
+
+ // Needs `Option` wrapping because type is not default constructible
+ const bool default_option =
+ element_mode == StorageMode::DEFAULT_VALUE && !AutoConstructor(element_type, typenames);
+ // Needs `Option` wrapping due to being a nullable, non-primitive, non-enum type in a vector.
+ const bool nullable_option = type.IsNullable() && UsesOptionInNullableVector(type, typenames);
+ if (default_option || nullable_option) {
+ rust_name = "Option<" + rust_name + ">";
}
+
if (mode == StorageMode::UNSIZED_ARGUMENT) {
rust_name = "[" + rust_name + "]";
} else if (type.IsFixedSizeArray()) {
diff --git a/aidl_unittest.cpp b/aidl_unittest.cpp
index ee0de540..7111a863 100644
--- a/aidl_unittest.cpp
+++ b/aidl_unittest.cpp
@@ -88,6 +88,10 @@ p/Foo.aidl :
} // namespace
+const string INVALID_INT8_VALUE = "Invalid type specifier for an int8 literal";
+const string INVALID_FLOAT_VALUE = "Invalid type specifier for a literal float";
+const string INVALID_OPERATION = "Cannot perform operation";
+
class AidlTest : public ::testing::TestWithParam<Options::Language> {
protected:
AidlDefinedType* Parse(const string& path, const string& contents, AidlTypenames& typenames_,
@@ -104,6 +108,7 @@ class AidlTest : public ::testing::TestWithParam<Options::Language> {
for (const string& f : preprocessed_files_) {
args.emplace_back("--preprocessed=" + f);
}
+ args.emplace_back("--include=.");
for (const string& i : import_paths_) {
args.emplace_back("--include=" + i);
}
@@ -128,6 +133,22 @@ class AidlTest : public ::testing::TestWithParam<Options::Language> {
return defined_types.front().get();
}
+ void EvaluateInvalidAssignment(string content, string expected_stderr, AidlTypenames& typenames_,
+ Options::Language lang) {
+ AidlError error;
+ CaptureStderr();
+ EXPECT_EQ(nullptr, Parse("a/IFoo.aidl", content, typenames_, lang, &error));
+ EXPECT_THAT(GetCapturedStderr(), HasSubstr(expected_stderr));
+ };
+
+ void EvaluateValidAssignment(string content, string expected_stderr, AidlTypenames& typenames_,
+ Options::Language lang) {
+ AidlError error;
+ CaptureStderr();
+ EXPECT_NE(nullptr, Parse("a/IFoo.aidl", content, typenames_, lang, &error));
+ EXPECT_THAT(GetCapturedStderr(), HasSubstr(expected_stderr));
+ };
+
Options::Language GetLanguage() { return GetParam(); }
FakeIoDelegate io_delegate_;
@@ -457,7 +478,7 @@ TEST_P(AidlTest, TypesShouldHaveVintfStabilityWhenCompilingWithTheVintfFlag) {
string code =
"@VintfStability\n"
"parcelable Foo {\n"
- " interface INested {}"
+ " interface INested { interface INastyNester {} }"
"}";
EXPECT_NE(nullptr, Parse("Foo.aidl", code, typenames_, GetLanguage(), nullptr,
{"--structured", "--stability", "vintf"}));
@@ -465,21 +486,26 @@ TEST_P(AidlTest, TypesShouldHaveVintfStabilityWhenCompilingWithTheVintfFlag) {
auto nested = typenames_.TryGetDefinedType("Foo.INested");
ASSERT_NE(nullptr, nested);
ASSERT_TRUE(nested->IsVintfStability());
+
+ auto nastyNester = typenames_.TryGetDefinedType("Foo.INested.INastyNester");
+ ASSERT_NE(nullptr, nastyNester);
+ ASSERT_TRUE(nastyNester->IsVintfStability());
}
TEST_P(AidlTest, VintfStabilityAppliesToNestedTypesAsWell) {
CaptureStderr();
EXPECT_EQ(nullptr, Parse("Foo.aidl", "parcelable Foo {}", typenames_, GetLanguage(), nullptr,
{"--structured", "--stability", "vintf"}));
- EXPECT_THAT(GetCapturedStderr(), HasSubstr("Foo does not have VINTF level stability"));
+ EXPECT_THAT(GetCapturedStderr(),
+ HasSubstr("Foo does not have VINTF level stability (marked @VintfStability)"));
}
TEST_F(AidlTest, ParsesJavaOnlyStableParcelable) {
- Options java_options = Options::From("aidl -o out --structured a/Foo.aidl");
- Options cpp_options = Options::From("aidl --lang=cpp -o out -h out/include a/Foo.aidl");
+ Options java_options = Options::From("aidl -I . -o out --structured a/Foo.aidl");
+ Options cpp_options = Options::From("aidl -I . --lang=cpp -o out -h out/include a/Foo.aidl");
Options cpp_structured_options =
- Options::From("aidl --lang=cpp --structured -o out -h out/include a/Foo.aidl");
- Options rust_options = Options::From("aidl --lang=rust -o out --structured a/Foo.aidl");
+ Options::From("aidl --lang=cpp -I . --structured -o out -h out/include a/Foo.aidl");
+ Options rust_options = Options::From("aidl -I . --lang=rust -o out --structured a/Foo.aidl");
io_delegate_.SetFileContents(
"a/Foo.aidl",
StringPrintf("package a; @JavaOnlyStableParcelable parcelable Foo cpp_header \"Foo.h\" ;"));
@@ -496,10 +522,62 @@ TEST_F(AidlTest, ParsesJavaOnlyStableParcelable) {
EXPECT_THAT(GetCapturedStderr(), HasSubstr("Cannot declare unstructured"));
}
+TEST_F(AidlTest, ParsesNdkOnlyStableParcelable) {
+ Options java_options = Options::From("aidl -I . -o out --structured a/Foo.aidl");
+ Options ndk_structured_options =
+ Options::From("aidl --lang=ndk --structured -I . -o out -h out/include a/Foo.aidl");
+ Options rust_options = Options::From("aidl --lang=rust -I . -o out --structured a/Foo.aidl");
+ Options cpp_options = Options::From("aidl --lang=cpp -I . -o out -h out/include a/Foo.aidl");
+ io_delegate_.SetFileContents(
+ "a/Foo.aidl",
+ StringPrintf("package a; @NdkOnlyStableParcelable parcelable Foo cpp_header \"Foo.h\" ;"));
+
+ EXPECT_TRUE(compile_aidl(cpp_options, io_delegate_));
+
+ // not considered unstructured, but it still can't be compiled directly with
+ // --structured AIDL - it can only be used as an import
+ CaptureStderr();
+ EXPECT_FALSE(compile_aidl(ndk_structured_options, io_delegate_));
+ EXPECT_THAT(GetCapturedStderr(),
+ HasSubstr("Refusing to generate code with unstructured parcelables"));
+
+ CaptureStderr();
+ EXPECT_FALSE(compile_aidl(java_options, io_delegate_));
+ EXPECT_THAT(GetCapturedStderr(), HasSubstr("Cannot declare unstructured"));
+
+ CaptureStderr();
+ EXPECT_FALSE(compile_aidl(rust_options, io_delegate_));
+ EXPECT_THAT(GetCapturedStderr(), HasSubstr("Cannot declare unstructured"));
+}
+
+TEST_P(AidlTest, NdkAndJavaStabilityIsVintfStable) {
+ CaptureStderr();
+
+ io_delegate_.SetFileContents("NonPortableThing.aidl",
+ "@NdkOnlyStableParcelable @JavaOnlyStableParcelable parcelable "
+ "NonPortableThing ndk_header \"lol.h\" cpp_header \"lolol.h\";");
+ import_paths_.emplace("");
+
+ auto result =
+ Parse("IFoo.aidl",
+ "import NonPortableThing; @VintfStability interface IFoo { NonPortableThing get(); }",
+ typenames_, GetLanguage(), nullptr, {"--structured", "--stability", "vintf"});
+
+ if (GetLanguage() == Options::Language::NDK || GetLanguage() == Options::Language::JAVA) {
+ EXPECT_NE(result, nullptr);
+ EXPECT_EQ(GetCapturedStderr(), "");
+ } else {
+ EXPECT_EQ(result, nullptr);
+ EXPECT_THAT(
+ GetCapturedStderr(),
+ HasSubstr("NonPortableThing does not have VINTF level stability (marked @VintfStability)"));
+ }
+}
+
TEST_F(AidlTest, ParcelableSupportJavaDeriveToString) {
io_delegate_.SetFileContents("a/Foo.aidl", R"(package a;
@JavaDerive(toString=true) parcelable Foo { int a; float b; })");
- Options java_options = Options::From("aidl --lang=java -o out a/Foo.aidl");
+ Options java_options = Options::From("aidl --lang=java -I . -o out a/Foo.aidl");
EXPECT_TRUE(compile_aidl(java_options, io_delegate_));
string java_out;
@@ -507,10 +585,10 @@ TEST_F(AidlTest, ParcelableSupportJavaDeriveToString) {
EXPECT_THAT(java_out, testing::HasSubstr("public String toString() {"));
// Other backends shouldn't be bothered
- Options cpp_options = Options::From("aidl --lang=cpp -o out -h out a/Foo.aidl");
+ Options cpp_options = Options::From("aidl --lang=cpp -I . -o out -h out a/Foo.aidl");
EXPECT_TRUE(compile_aidl(cpp_options, io_delegate_));
- Options ndk_options = Options::From("aidl --lang=ndk -o out -h out a/Foo.aidl");
+ Options ndk_options = Options::From("aidl --lang=ndk -I . -o out -h out a/Foo.aidl");
EXPECT_TRUE(compile_aidl(ndk_options, io_delegate_));
}
@@ -518,7 +596,7 @@ TEST_F(AidlTest, UnionSupportJavaDeriveToString) {
io_delegate_.SetFileContents("a/Foo.aidl", R"(package a;
@JavaDerive(toString=true) union Foo { int a; int[] b; })");
CaptureStderr();
- Options java_options = Options::From("aidl --lang=java -o out a/Foo.aidl");
+ Options java_options = Options::From("aidl --lang=java -I . -o out a/Foo.aidl");
EXPECT_TRUE(compile_aidl(java_options, io_delegate_));
EXPECT_EQ("", GetCapturedStderr());
@@ -542,7 +620,7 @@ TEST_F(AidlTest, ParcelableSupportJavaDeriveEquals) {
io_delegate_.SetFileContents("a/Foo.aidl", R"(package a;
@JavaDerive(equals=true) parcelable Foo { int a; float b; })");
CaptureStderr();
- Options java_options = Options::From("aidl --lang=java -o out a/Foo.aidl");
+ Options java_options = Options::From("aidl --lang=java -I . -o out a/Foo.aidl");
EXPECT_TRUE(compile_aidl(java_options, io_delegate_));
EXPECT_EQ("", GetCapturedStderr());
@@ -573,7 +651,7 @@ TEST_F(AidlTest, UnionSupportJavaDeriveEquals) {
io_delegate_.SetFileContents("a/Foo.aidl", R"(package a;
@JavaDerive(equals=true) union Foo { int a; int[] b; })");
CaptureStderr();
- Options java_options = Options::From("aidl --lang=java -o out a/Foo.aidl");
+ Options java_options = Options::From("aidl --lang=java -I . -o out a/Foo.aidl");
EXPECT_TRUE(compile_aidl(java_options, io_delegate_));
EXPECT_EQ("", GetCapturedStderr());
@@ -604,7 +682,7 @@ TEST_F(AidlTest, RejectsJavaDeriveAnnotation) {
{
io_delegate_.SetFileContents("a/Foo.aidl",
"package a; @JavaDerive(blah=true) parcelable Foo{}");
- Options java_options = Options::From("aidl --lang=java -o out a/Foo.aidl");
+ Options java_options = Options::From("aidl --lang=java -I . -o out a/Foo.aidl");
CaptureStderr();
EXPECT_FALSE(compile_aidl(java_options, io_delegate_));
const std::string expected_stderr =
@@ -615,7 +693,7 @@ TEST_F(AidlTest, RejectsJavaDeriveAnnotation) {
{
io_delegate_.SetFileContents("a/IFoo.aidl", "package a; @JavaDerive interface IFoo{}");
- Options java_options = Options::From("aidl --lang=java -o out a/IFoo.aidl");
+ Options java_options = Options::From("aidl --lang=java -I . -o out a/IFoo.aidl");
CaptureStderr();
EXPECT_FALSE(compile_aidl(java_options, io_delegate_));
EXPECT_THAT(GetCapturedStderr(), HasSubstr("@JavaDerive is not available."));
@@ -732,7 +810,7 @@ TEST_P(AidlTest, WritesComments) {
TEST_P(AidlTest, CppHeaderCanBeIdentifierAsWell) {
io_delegate_.SetFileContents("p/cpp_header.aidl",
R"(package p;
- parcelable cpp_header cpp_header "bar/header";)");
+ parcelable cpp_header cpp_header "bar/header" ndk_header "ndk/bar/header";)");
import_paths_.emplace("");
const string input_path = "p/IFoo.aidl";
const string input = R"(package p;
@@ -750,10 +828,10 @@ TEST_P(AidlTest, CppHeaderCanBeIdentifierAsWell) {
TEST_F(AidlTest, RejectsIfCppHeaderIsMissing) {
io_delegate_.SetFileContents("Foo.aidl", "parcelable Foo;");
- Options options = Options::From("aidl --lang cpp -h h -o o Foo.aidl");
+ Options options = Options::From("aidl -I . --lang cpp -h h -o o Foo.aidl");
CaptureStderr();
EXPECT_FALSE(compile_aidl(options, io_delegate_));
- EXPECT_THAT(GetCapturedStderr(), HasSubstr("must have C++ header defined"));
+ EXPECT_THAT(GetCapturedStderr(), HasSubstr("must have cpp_header defined"));
}
TEST_F(AidlTest, RejectsIfTypeRefsCppHeaderIsMissing) {
@@ -762,7 +840,7 @@ TEST_F(AidlTest, RejectsIfTypeRefsCppHeaderIsMissing) {
Options options = Options::From("aidl -I . --lang cpp -h h -o o IBar.aidl");
CaptureStderr();
EXPECT_FALSE(compile_aidl(options, io_delegate_));
- EXPECT_THAT(GetCapturedStderr(), HasSubstr("must have C++ header defined"));
+ EXPECT_THAT(GetCapturedStderr(), HasSubstr("must have cpp_header defined"));
}
TEST_F(AidlTest, ParsesPreprocessedFile) {
@@ -904,7 +982,7 @@ TEST_F(AidlTest, PreprocessVariousThings) {
"package a; parcelable Foo { const int y = foo.bar.Bar.BAR; }");
io_delegate_.SetFileContents("preprocessed", preprocessed);
CaptureStderr();
- auto options = Options::From("aidl --lang java -o out a/Foo.aidl -ppreprocessed");
+ auto options = Options::From("aidl --lang java -I . -o out a/Foo.aidl -ppreprocessed");
EXPECT_TRUE(compile_aidl(options, io_delegate_));
EXPECT_EQ("", GetCapturedStderr());
string code;
@@ -923,7 +1001,7 @@ TEST_F(AidlTest, AllowMultipleUnstructuredNestedParcelablesInASingleDocument) {
"package x;\n"
"parcelable Outer.Inner1;\n"
"parcelable Outer.Inner2;\n");
- auto opt = Options::From("aidl -Iimported --lang=java p/IFoo.aidl");
+ auto opt = Options::From("aidl -I . -Iimported --lang=java p/IFoo.aidl");
CaptureStderr();
EXPECT_TRUE(compile_aidl(opt, io_delegate_));
EXPECT_EQ("", GetCapturedStderr());
@@ -1002,7 +1080,7 @@ TEST_P(AidlTest, SupportDeprecated) {
std::vector<std::pair<Options::Language, TestCase>> expectations) {
io_delegate_.SetFileContents(filename, contents);
- auto options = Options::From("aidl --lang=" + to_string(GetLanguage()) + " " + filename +
+ auto options = Options::From("aidl -I . --lang=" + to_string(GetLanguage()) + " " + filename +
" --out=out --header_out=out");
EXPECT_TRUE(compile_aidl(options, io_delegate_));
for (const auto& [lang, test_case] : expectations) {
@@ -1154,7 +1232,9 @@ TEST_P(AidlTest, SupportDeprecated) {
}
TEST_P(AidlTest, RequireOuterClass) {
- const string expected_stderr = "ERROR: p/IFoo.aidl:1.54-60: Failed to resolve 'Inner'\n";
+ const string expected_stderr =
+ "ERROR: p/IFoo.aidl: Couldn't find import for class Inner. Searched here:\n - ./\nERROR: "
+ "p/IFoo.aidl:1.54-60: Failed to resolve 'Inner'\n";
io_delegate_.SetFileContents("p/Outer.aidl",
"package p; parcelable Outer.Inner;");
import_paths_.emplace("");
@@ -1166,7 +1246,9 @@ TEST_P(AidlTest, RequireOuterClass) {
}
TEST_P(AidlTest, ParseCompoundParcelableFromPreprocess) {
- io_delegate_.SetFileContents("preprocessed", "parcelable p.Outer.Inner cpp_header \"inner.h\";");
+ io_delegate_.SetFileContents(
+ "preprocessed",
+ "parcelable p.Outer.Inner cpp_header \"inner.h\" ndk_header \"ndk/inner.h\";");
preprocessed_files_.push_back("preprocessed");
auto parse_result = Parse("p/IFoo.aidl", "package p; interface IFoo { void f(in Inner c); }",
typenames_, GetLanguage());
@@ -1177,7 +1259,7 @@ TEST_P(AidlTest, ParseCompoundParcelableFromPreprocess) {
TEST_F(AidlTest, ApiMappingAcceptsUnstructuredParcelables) {
io_delegate_.SetFileContents("p/Foo.aidl", "package p; parcelable Foo;");
- Options options1 = Options::From("aidl --apimapping mapping.txt p/Foo.aidl");
+ Options options1 = Options::From("aidl -I . --apimapping mapping.txt p/Foo.aidl");
CaptureStderr();
EXPECT_EQ(0, aidl_entry(options1, io_delegate_));
EXPECT_EQ("", GetCapturedStderr());
@@ -1191,13 +1273,13 @@ TEST_F(AidlTest, FailOnParcelable) {
io_delegate_.SetFileContents("p/IFoo.aidl", "package p; parcelable IFoo;");
// By default, we shouldn't fail on parcelable.
- Options options1 = Options::From("aidl p/IFoo.aidl");
+ Options options1 = Options::From("aidl -I . p/IFoo.aidl");
CaptureStderr();
EXPECT_TRUE(compile_aidl(options1, io_delegate_));
EXPECT_EQ("", GetCapturedStderr());
// -b considers this an error
- Options options2 = Options::From("aidl -b p/IFoo.aidl");
+ Options options2 = Options::From("aidl -I . -b p/IFoo.aidl");
CaptureStderr();
EXPECT_FALSE(compile_aidl(options2, io_delegate_));
EXPECT_EQ(expected_foo_stderr, GetCapturedStderr());
@@ -1209,11 +1291,11 @@ TEST_F(AidlTest, FailOnParcelable) {
io_delegate_.SetFileContents("p/IBar.aidl", "package p; parcelable Foo; interface IBar{}");
// With '-b' option, a parcelable and an interface should fail.
- Options options3 = Options::From("aidl p/IBar.aidl");
+ Options options3 = Options::From("aidl -I . p/IBar.aidl");
CaptureStderr();
EXPECT_TRUE(compile_aidl(options3, io_delegate_));
EXPECT_EQ("", GetCapturedStderr());
- Options options4 = Options::From("aidl -b p/IBar.aidl");
+ Options options4 = Options::From("aidl -I . -b p/IBar.aidl");
CaptureStderr();
EXPECT_FALSE(compile_aidl(options4, io_delegate_));
EXPECT_EQ(expected_bar_stderr, GetCapturedStderr());
@@ -1232,10 +1314,10 @@ TEST_P(AidlTest, ImportingJavaStyleBuiltinTypesIsAllowed) {
TEST_P(AidlTest, StructuredFailOnUnstructuredParcelable) {
const string expected_stderr =
- "ERROR: o/WhoKnowsWhat.aidl:1.22-35: o.WhoKnowsWhat is not structured, but this is a "
- "structured interface.\n";
+ "o.WhoKnowsWhat is not structured, but this is a structured interface";
io_delegate_.SetFileContents("o/WhoKnowsWhat.aidl",
- "package o; parcelable WhoKnowsWhat cpp_header \"who_knows.h\";");
+ "package o; parcelable WhoKnowsWhat cpp_header \"who_knows.h\" "
+ "ndk_header \"ndk/who_knows.h\";");
import_paths_.emplace("");
AidlError error;
CaptureStderr();
@@ -1244,7 +1326,7 @@ TEST_P(AidlTest, StructuredFailOnUnstructuredParcelable) {
Parse("p/IFoo.aidl",
"package p; import o.WhoKnowsWhat; interface IFoo { void f(in WhoKnowsWhat thisIs); }",
typenames_, GetLanguage(), &error, {"--structured"}));
- EXPECT_EQ(expected_stderr, GetCapturedStderr());
+ EXPECT_THAT(GetCapturedStderr(), HasSubstr(expected_stderr));
EXPECT_EQ(AidlError::NOT_STRUCTURED, error);
}
@@ -1332,7 +1414,7 @@ TEST_P(AidlTest, FailOnTooBigConstant) {
TEST_F(AidlTest, BoolConstantsEvaluatesToIntegers) {
io_delegate_.SetFileContents("a/Foo.aidl", "package a; parcelable Foo { const int y = true; }");
CaptureStderr();
- auto options = Options::From("aidl --lang java -o out a/Foo.aidl");
+ auto options = Options::From("aidl -I . --lang java -o out a/Foo.aidl");
EXPECT_TRUE(compile_aidl(options, io_delegate_));
EXPECT_EQ("", GetCapturedStderr());
string code;
@@ -1431,26 +1513,94 @@ TEST_P(AidlTest, FailOnMalformedConstHexValue) {
TEST_P(AidlTest, FailOnMalformedQualifiedNameAsIdentifier) {
AidlError error;
const string expected_stderr =
- "ERROR: p/IFoo.aidl:1.25-26: syntax error, unexpected ';', expecting identifier or "
- "cpp_header (which can also be used as an identifier)\n";
+ "ERROR: p/IFoo.aidl:1.25-26: syntax error, unexpected ';', expecting identifier";
CaptureStderr();
// Notice the trailing dot(.) in the name, which isn't a correct name
EXPECT_EQ(nullptr, Parse("p/IFoo.aidl", R"(package p; parcelable A.; )", typenames_,
GetLanguage(), &error));
- EXPECT_EQ(expected_stderr, GetCapturedStderr());
+ EXPECT_THAT(GetCapturedStderr(), HasSubstr(expected_stderr));
EXPECT_EQ(AidlError::PARSE_ERROR, error);
}
+TEST_P(AidlTest, FailOnAssigningDoubleInFloatConst) {
+ EvaluateInvalidAssignment(R"(package a; interface IFoo { const float DOUBLE_VALUE = 1.1; })",
+ INVALID_FLOAT_VALUE, typenames_, GetLanguage());
+}
+
+TEST_P(AidlTest, FailOnAssigningFloatInDoubleConst) {
+ EvaluateValidAssignment(R"(package a; interface IFoo { const double FLOAT_VALUE = 1.1f; })", "",
+ typenames_, GetLanguage());
+}
+
+TEST_P(AidlTest, FailOnAssigningIntInFloatConst) {
+ EvaluateInvalidAssignment(R"(package a; interface IFoo { const float INT_VALUE = 1; })",
+ INVALID_INT8_VALUE, typenames_, GetLanguage());
+}
+
+TEST_P(AidlTest, FailOnAssigningFloatInIntConst) {
+ EvaluateInvalidAssignment(R"(package a; interface IFoo { const int FLOAT_VALUE = 1.1f; })",
+ INVALID_FLOAT_VALUE, typenames_, GetLanguage());
+}
+
+TEST_P(AidlTest, FailOnAssigningIntInDoubleConst) {
+ EvaluateInvalidAssignment(R"(package a; interface IFoo { const double INT_VALUE = 1; })",
+ INVALID_INT8_VALUE, typenames_, GetLanguage());
+}
+
+TEST_P(AidlTest, FailOnAssigningDoubleInIntConst) {
+ EvaluateInvalidAssignment(R"(package a; interface IFoo { const int DOUBLE_VALUE = 1.1; })",
+ INVALID_FLOAT_VALUE, typenames_, GetLanguage());
+}
+
+TEST_P(AidlTest, FailOnAssigningFloatPlusIntConst) {
+ EvaluateInvalidAssignment(R"(package a; interface IFoo { const float FLOAT_VALUE = 1.1f + 1; })",
+ INVALID_OPERATION, typenames_, GetLanguage());
+}
+
+TEST_P(AidlTest, FailOnAssigningIntPlusFloatConst) {
+ EvaluateInvalidAssignment(R"(package a; interface IFoo { const float FLOAT_VALUE = 1 + 1.1f; })",
+ INVALID_OPERATION, typenames_, GetLanguage());
+}
+
+TEST_P(AidlTest, FailOnAssigningDoublePlusIntConst) {
+ EvaluateInvalidAssignment(R"(package a; interface IFoo { const double DOUBLE_VALUE = 1.1 + 1; })",
+ INVALID_OPERATION, typenames_, GetLanguage());
+}
+
+TEST_P(AidlTest, FailOnAssigningIntPlusDoubleConst) {
+ EvaluateInvalidAssignment(R"(package a; interface IFoo { const double DOUBLE_VALUE = 1 + 1.1; })",
+ INVALID_OPERATION, typenames_, GetLanguage());
+}
+
+TEST_P(AidlTest, FailOnAssigningTooLargeFloatConst) {
+ EvaluateInvalidAssignment(R"(package a; interface IFoo { const float DOUBLE_VALUE = 1e50f; })",
+ INVALID_FLOAT_VALUE, typenames_, GetLanguage());
+}
+
+TEST_P(AidlTest, FailOnAssigningTooLargeDoubleConst) {
+ EvaluateInvalidAssignment(R"(package a; interface IFoo { const double DOUBLE_VALUE = 1e310; })",
+ INVALID_FLOAT_VALUE, typenames_, GetLanguage());
+}
+
+TEST_P(AidlTest, PassOnAssigningLargeFloatConst) {
+ EvaluateValidAssignment(R"(package a; interface IFoo { const float DOUBLE_VALUE = 1e20f; })", "",
+ typenames_, GetLanguage());
+}
+
+TEST_P(AidlTest, PassOnAssigningLargeDoubleConst) {
+ EvaluateValidAssignment(R"(package a; interface IFoo { const double DOUBLE_VALUE = 1e150; })", "",
+ typenames_, GetLanguage());
+}
+
TEST_P(AidlTest, FailOnMalformedQualifiedNameAsPackage) {
AidlError error;
const string expected_stderr =
- "ERROR: p/IFoo.aidl:1.11-12: syntax error, unexpected ';', expecting identifier or "
- "cpp_header (which can also be used as an identifier)\n";
+ "ERROR: p/IFoo.aidl:1.11-12: syntax error, unexpected ';', expecting identifier";
CaptureStderr();
// Notice the trailing dot(.) in the package name
EXPECT_EQ(nullptr, Parse("p/IFoo.aidl", R"(package p.; parcelable A; )", typenames_,
GetLanguage(), &error));
- EXPECT_EQ(expected_stderr, GetCapturedStderr());
+ EXPECT_THAT(GetCapturedStderr(), HasSubstr(expected_stderr));
EXPECT_EQ(AidlError::PARSE_ERROR, error);
}
@@ -1531,8 +1681,9 @@ TEST_F(AidlTest, ByteAndByteArrayDifferInNdk) {
}
TEST_P(AidlTest, UnderstandsNestedUnstructuredParcelables) {
- io_delegate_.SetFileContents("p/Outer.aidl",
- "package p; parcelable Outer.Inner cpp_header \"baz/header\";");
+ io_delegate_.SetFileContents(
+ "p/Outer.aidl",
+ "package p; parcelable Outer.Inner cpp_header \"baz/header\" ndk_header \"ndk/baz/header\";");
import_paths_.emplace("");
const string input_path = "p/IFoo.aidl";
const string input = "package p; import p.Outer; interface IFoo"
@@ -1549,8 +1700,9 @@ TEST_P(AidlTest, UnderstandsNestedUnstructuredParcelables) {
}
TEST_P(AidlTest, UnderstandsNestedUnstructuredParcelablesWithoutImports) {
- io_delegate_.SetFileContents("p/Outer.aidl",
- "package p; parcelable Outer.Inner cpp_header \"baz/header\";");
+ io_delegate_.SetFileContents(
+ "p/Outer.aidl",
+ "package p; parcelable Outer.Inner cpp_header \"baz/header\" ndk_header \"ndk/baz/header\";");
import_paths_.emplace("");
const string input_path = "p/IFoo.aidl";
const string input = "package p; interface IFoo { p.Outer.Inner get(); }";
@@ -1968,6 +2120,41 @@ TEST_F(AidlTest, RejectsNestedTypesWithCyclicDeps) {
EXPECT_THAT(GetCapturedStderr(), HasSubstr("IFoo has nested types with cyclic references."));
}
+TEST_F(AidlTest, RejectsCyclicNestedInterfaces) {
+ Options options = Options::From(
+ "aidl --lang cpp -I. -oout -hout "
+ "p/IFoo.aidl p/IBar.aidl p/IQux.aidl");
+ io_delegate_.SetFileContents("p/IFoo.aidl",
+ "package p; import p.IBar; "
+ "interface IFoo { IBar getBar(); }");
+ io_delegate_.SetFileContents("p/IBar.aidl",
+ "package p; import p.IQux; "
+ "interface IBar { IQux.Inner getQux(); }");
+ io_delegate_.SetFileContents("p/IQux.aidl",
+ "package p; import p.IFoo; "
+ "interface IQux { interface Inner { IFoo getFoo(); } }");
+ CaptureStderr();
+ EXPECT_FALSE(compile_aidl(options, io_delegate_));
+ EXPECT_THAT(GetCapturedStderr(),
+ HasSubstr("ERROR: p/IQux.aidl:1.43-53: has cyclic references to nested types."));
+}
+
+TEST_F(AidlTest, RejectsCyclicNestedInterfacesAndParcelables) {
+ Options options = Options::From(
+ "aidl --lang cpp -I. -oout -hout "
+ "p/IFoo.aidl p/Bar.aidl");
+ io_delegate_.SetFileContents("p/IFoo.aidl",
+ "package p; import p.Bar; "
+ "interface IFoo { interface Inner { Bar getBar(); } }");
+ io_delegate_.SetFileContents("p/Bar.aidl",
+ "package p; import p.IFoo; "
+ "parcelable Bar { IFoo.Inner foo; }");
+ CaptureStderr();
+ EXPECT_FALSE(compile_aidl(options, io_delegate_));
+ EXPECT_THAT(GetCapturedStderr(),
+ HasSubstr("ERROR: p/IFoo.aidl:1.42-52: has cyclic references to nested types."));
+}
+
TEST_F(AidlTest, CppNameOf_GenericType) {
const string input_path = "p/Wrapper.aidl";
const string input = "package p; parcelable Wrapper<T> {}";
@@ -2045,11 +2232,7 @@ TEST_F(AidlTest, WritesCorrectDependencyFile) {
// While the in tree build system always gives us an output file name,
// other android tools take advantage of our ability to infer the intended
// file name. This test makes sure we handle this correctly.
- vector<string> args = {
- "aidl",
- "-d dep/file/path",
- "-o place/for/output",
- "p/IFoo.aidl"};
+ vector<string> args = {"aidl", "-I .", "-d dep/file/path", "-o place/for/output", "p/IFoo.aidl"};
Options options = Options::From(args);
io_delegate_.SetFileContents(options.InputFiles().front(), "package p; interface IFoo {}");
EXPECT_TRUE(compile_aidl(options, io_delegate_));
@@ -2062,12 +2245,8 @@ TEST_F(AidlTest, WritesCorrectDependencyFileNinja) {
// While the in tree build system always gives us an output file name,
// other android tools take advantage of our ability to infer the intended
// file name. This test makes sure we handle this correctly.
- vector<string> args = {
- "aidl",
- "-d dep/file/path",
- "--ninja",
- "-o place/for/output",
- "p/IFoo.aidl"};
+ vector<string> args = {"aidl", "-I .", "-d dep/file/path", "--ninja", "-o place/for/output",
+ "p/IFoo.aidl"};
Options options = Options::From(args);
io_delegate_.SetFileContents(options.InputFiles().front(), "package p; interface IFoo {}");
EXPECT_TRUE(compile_aidl(options, io_delegate_));
@@ -2082,11 +2261,7 @@ TEST_F(AidlTest, WritesTrivialDependencyFileForParcelableDeclaration) {
// generated dependency files. Those that reference .java output files are
// for interfaces and those that do not are parcelables. However, for both
// parcelables and interfaces, we *must* generate a non-empty dependency file.
- vector<string> args = {
- "aidl",
- "-o place/for/output",
- "-d dep/file/path",
- "p/Foo.aidl"};
+ vector<string> args = {"aidl", "-I .", "-o place/for/output", "-d dep/file/path", "p/Foo.aidl"};
Options options = Options::From(args);
io_delegate_.SetFileContents(options.InputFiles().front(), "package p; parcelable Foo;");
EXPECT_TRUE(compile_aidl(options, io_delegate_));
@@ -2097,11 +2272,7 @@ TEST_F(AidlTest, WritesTrivialDependencyFileForParcelableDeclaration) {
TEST_F(AidlTest, WritesDependencyFileForStructuredParcelable) {
vector<string> args = {
- "aidl",
- "--structured",
- "-o place/for/output",
- "-d dep/file/path",
- "p/Foo.aidl"};
+ "aidl", "-I .", "--structured", "-o place/for/output", "-d dep/file/path", "p/Foo.aidl"};
Options options = Options::From(args);
io_delegate_.SetFileContents(options.InputFiles().front(), "package p; parcelable Foo {int a;}");
EXPECT_TRUE(compile_aidl(options, io_delegate_));
@@ -2111,11 +2282,7 @@ TEST_F(AidlTest, WritesDependencyFileForStructuredParcelable) {
}
TEST_F(AidlTest, NoJavaOutputForParcelableDeclaration) {
- vector<string> args = {
- "aidl",
- "--lang=java",
- "-o place/for/output",
- "p/Foo.aidl"};
+ vector<string> args = {"aidl", "-I .", "--lang=java", "-o place/for/output", "p/Foo.aidl"};
Options options = Options::From(args);
io_delegate_.SetFileContents(options.InputFiles().front(), "package p; parcelable Foo;");
EXPECT_TRUE(compile_aidl(options, io_delegate_));
@@ -2201,7 +2368,7 @@ TEST_P(AidlTest, ParcelableHolderAsArgumentType) {
TEST_P(AidlTest, RejectNullableParcelableHolderField) {
io_delegate_.SetFileContents("Foo.aidl", "parcelable Foo { @nullable ParcelableHolder ext; }");
- Options options = Options::From("aidl Foo.aidl --lang=" + to_string(GetLanguage()));
+ Options options = Options::From("aidl Foo.aidl -I . --lang=" + to_string(GetLanguage()));
const string expected_stderr = "ERROR: Foo.aidl:1.27-44: ParcelableHolder cannot be nullable.\n";
CaptureStderr();
EXPECT_FALSE(compile_aidl(options, io_delegate_));
@@ -2210,7 +2377,7 @@ TEST_P(AidlTest, RejectNullableParcelableHolderField) {
TEST_P(AidlTest, ParcelablesWithConstants) {
io_delegate_.SetFileContents("Foo.aidl", "parcelable Foo { const int BIT = 0x1 << 3; }");
- Options options = Options::From("aidl Foo.aidl --lang=" + to_string(GetLanguage()));
+ Options options = Options::From("aidl Foo.aidl -I . --lang=" + to_string(GetLanguage()));
CaptureStderr();
EXPECT_TRUE(compile_aidl(options, io_delegate_));
EXPECT_EQ("", GetCapturedStderr());
@@ -2218,7 +2385,7 @@ TEST_P(AidlTest, ParcelablesWithConstants) {
TEST_P(AidlTest, UnionWithConstants) {
io_delegate_.SetFileContents("Foo.aidl", "union Foo { const int BIT = 0x1 << 3; int n; }");
- Options options = Options::From("aidl Foo.aidl --lang=" + to_string(GetLanguage()));
+ Options options = Options::From("aidl Foo.aidl -I . --lang=" + to_string(GetLanguage()));
CaptureStderr();
EXPECT_TRUE(compile_aidl(options, io_delegate_));
EXPECT_EQ("", GetCapturedStderr());
@@ -2230,7 +2397,7 @@ TEST_F(AidlTest, ConstantsWithAnnotations) {
" @JavaPassthrough(annotation=\"@Foo\")\n"
" const @JavaPassthrough(annotation=\"@Bar\") int FOO = 0;\n"
"}");
- Options options = Options::From("aidl IFoo.aidl --lang=java -o out");
+ Options options = Options::From("aidl IFoo.aidl -I . --lang=java -o out");
CaptureStderr();
EXPECT_TRUE(compile_aidl(options, io_delegate_));
EXPECT_EQ("", GetCapturedStderr());
@@ -2329,7 +2496,7 @@ TEST_F(AidlTest, ApiDumpWithManualIds) {
" int baz() = 10;\n"
"}\n");
- vector<string> args = {"aidl", "--dumpapi", "-o dump", "foo/bar/IFoo.aidl"};
+ vector<string> args = {"aidl", "-I . ", "--dumpapi", "-o dump", "foo/bar/IFoo.aidl"};
Options options = Options::From(args);
bool result = dump_api(options, io_delegate_);
ASSERT_TRUE(result);
@@ -2357,7 +2524,7 @@ TEST_F(AidlTest, ApiDumpWithManualIdsOnlyOnSomeMethods) {
" int baz() = 10;\n"
"}\n");
- vector<string> args = {"aidl", "--dumpapi", "-o dump", "foo/bar/IFoo.aidl"};
+ vector<string> args = {"aidl", "-I . ", "--dumpapi", "-o dump", "foo/bar/IFoo.aidl"};
Options options = Options::From(args);
CaptureStderr();
EXPECT_FALSE(dump_api(options, io_delegate_));
@@ -2372,7 +2539,7 @@ TEST_F(AidlTest, ApiDumpConstWithAnnotation) {
" const @utf8InCpp String bar = \"bar\";\n"
"}\n");
- vector<string> args = {"aidl", "--dumpapi", "-o dump", "foo/bar/IFoo.aidl"};
+ vector<string> args = {"aidl", "-I . ", "--dumpapi", "-o dump", "foo/bar/IFoo.aidl"};
Options options = Options::From(args);
CaptureStderr();
EXPECT_TRUE(dump_api(options, io_delegate_));
@@ -2405,8 +2572,8 @@ TEST_F(AidlTest, ApiDumpWithEnums) {
EXPECT_TRUE(io_delegate_.GetWrittenContents("dump/foo/bar/Enum.aidl", &actual));
EXPECT_EQ(string(kPreamble).append("package foo.bar;\n"
"enum Enum {\n"
- " FOO = 0,\n"
- " BAR = 1,\n"
+ " FOO,\n"
+ " BAR = (FOO + 1) /* 1 */,\n"
"}\n"),
actual);
}
@@ -2422,6 +2589,7 @@ TEST_F(AidlTest, ApiDumpWithEnumDefaultValues) {
"import foo.bar.Enum;\n"
"parcelable Foo {\n"
" Enum e = Enum.FOO;\n"
+ " int n = Enum.FOO;\n"
"}\n");
vector<string> args = {"aidl", "--dumpapi", "-I . ", "-o dump", "foo/bar/Foo.aidl"};
@@ -2434,6 +2602,7 @@ TEST_F(AidlTest, ApiDumpWithEnumDefaultValues) {
EXPECT_EQ(string(kPreamble).append("package foo.bar;\n"
"parcelable Foo {\n"
" foo.bar.Enum e = foo.bar.Enum.FOO;\n"
+ " int n = foo.bar.Enum.FOO /* 0 */;\n"
"}\n"),
actual);
}
@@ -2474,7 +2643,7 @@ TEST_F(AidlTest, CheckNumGenericTypeSecifier) {
"'List<String,String>'\n";
const string expected_map_stderr =
"ERROR: p/IFoo.aidl:1.37-40: Map must have 0 or 2 type parameters, but got 'Map<String>'\n";
- Options options = Options::From("aidl p/IFoo.aidl IFoo.java");
+ Options options = Options::From("aidl -I . p/IFoo.aidl IFoo.java");
io_delegate_.SetFileContents(options.InputFiles().front(),
"package p; interface IFoo {"
"void foo(List<String, String> a);}");
@@ -2521,7 +2690,7 @@ TEST_F(AidlTest, CheckTypeParameterInMapType) {
TEST_F(AidlTest, WrongGenericType) {
const string expected_stderr = "ERROR: p/IFoo.aidl:1.28-34: String is not a generic type.\n";
- Options options = Options::From("aidl p/IFoo.aidl IFoo.java");
+ Options options = Options::From("aidl -I . p/IFoo.aidl IFoo.java");
io_delegate_.SetFileContents(options.InputFiles().front(),
"package p; interface IFoo {"
"String<String> foo(); }");
@@ -2569,9 +2738,9 @@ TEST_F(AidlTest, UserDefinedUnstructuredGenericParcelableType) {
}
TEST_F(AidlTest, FailOnMultipleTypesInSingleFile) {
- std::vector<std::string> rawOptions{"aidl --lang=java -o out foo/bar/Foo.aidl",
- "aidl --lang=cpp -o out -h out/include foo/bar/Foo.aidl",
- "aidl --lang=rust -o out foo/bar/Foo.aidl"};
+ std::vector<std::string> rawOptions{"aidl --lang=java -I . -o out foo/bar/Foo.aidl",
+ "aidl --lang=cpp -I . -o out -h out/include foo/bar/Foo.aidl",
+ "aidl --lang=rust -I . -o out foo/bar/Foo.aidl"};
for (const auto& rawOption : rawOptions) {
string expected_stderr =
"ERROR: foo/bar/Foo.aidl:3.1-10: You must declare only one type per file.\n";
@@ -2642,7 +2811,8 @@ TEST_F(AidlTest, MultipleInputFiles) {
}
TEST_F(AidlTest, MultipleInputFilesCpp) {
- Options options = Options::From("aidl --lang=cpp -o out -h out/include "
+ Options options = Options::From(
+ "aidl --lang=cpp -I . -o out -h out/include "
"-I . foo/bar/IFoo.aidl foo/bar/Data.aidl");
io_delegate_.SetFileContents(options.InputFiles().at(0),
@@ -2696,7 +2866,7 @@ TEST_F(AidlTest, MultipleInputFilesRust) {
TEST_F(AidlTest, ConflictWithMetaTransactionGetVersion) {
const string expected_stderr =
"ERROR: p/IFoo.aidl:1.31-51: method getInterfaceVersion() is reserved for internal use.\n";
- Options options = Options::From("aidl --lang=java -o place/for/output p/IFoo.aidl");
+ Options options = Options::From("aidl --lang=java -I . -o place/for/output p/IFoo.aidl");
// int getInterfaceVersion() is one of the meta transactions
io_delegate_.SetFileContents(options.InputFiles().front(),
"package p; interface IFoo {"
@@ -2711,7 +2881,7 @@ TEST_F(AidlTest, ConflictWithSimilarMetaTransaction) {
// prevented because return type is not part of a method signature
const string expected_stderr =
"ERROR: p/IFoo.aidl:1.35-55: method getInterfaceVersion() is reserved for internal use.\n";
- Options options = Options::From("aidl --lang=java -o place/for/output p/IFoo.aidl");
+ Options options = Options::From("aidl --lang=java -I . -o place/for/output p/IFoo.aidl");
io_delegate_.SetFileContents(options.InputFiles().front(),
"package p; interface IFoo {"
"boolean getInterfaceVersion(); }");
@@ -2724,7 +2894,7 @@ TEST_F(AidlTest, ConflictWithMetaTransactionGetName) {
// this is another reserved name
const string expected_stderr =
"ERROR: p/IFoo.aidl:1.34-53: method getTransactionName(int) is reserved for internal use.\n";
- Options options = Options::From("aidl --lang=java -o place/for/output p/IFoo.aidl");
+ Options options = Options::From("aidl --lang=java -I . -o place/for/output p/IFoo.aidl");
io_delegate_.SetFileContents(options.InputFiles().front(),
"package p; interface IFoo {"
"String getTransactionName(int code); }");
@@ -3466,6 +3636,24 @@ TEST_F(AidlTestIncompatibleChanges, ChangedBackingTypeOfEnum) {
EXPECT_EQ(expected_stderr, GetCapturedStderr());
}
+TEST_F(AidlTestIncompatibleChanges, ChangedFixedSizeArraySize) {
+ const string expected_stderr =
+ "ERROR: new/p/Data.aidl:1.28-33: Type changed: int[8] to int[9].\n";
+ io_delegate_.SetFileContents("old/p/Data.aidl",
+ "package p;"
+ "parcelable Data {"
+ " int[8] bar;"
+ "}");
+ io_delegate_.SetFileContents("new/p/Data.aidl",
+ "package p;"
+ "parcelable Data {"
+ " int[9] bar;"
+ "}");
+ CaptureStderr();
+ EXPECT_FALSE(::android::aidl::check_api(options_, io_delegate_));
+ EXPECT_EQ(expected_stderr, GetCapturedStderr());
+}
+
TEST_F(AidlTestIncompatibleChanges, ChangedAnnatationParams) {
const string expected_stderr =
"ERROR: new/p/Foo.aidl:1.55-59: Changed annotations: @JavaPassthrough(annotation=\"Alice\") "
@@ -3720,9 +3908,8 @@ TEST_F(AidlTest, RejectAmbiguousImports) {
const string expected_stderr =
"ERROR: p/IFoo.aidl: Duplicate files found for q.IBar from:\n"
"dir1/q/IBar.aidl\n"
- "dir2/q/IBar.aidl\n"
- "ERROR: p/IFoo.aidl: Couldn't find import for class q.IBar\n";
- Options options = Options::From("aidl --lang=java -o out -I dir1 -I dir2 p/IFoo.aidl");
+ "dir2/q/IBar.aidl\n";
+ Options options = Options::From("aidl --lang=java -o out -I . -I dir1 -I dir2 p/IFoo.aidl");
io_delegate_.SetFileContents("p/IFoo.aidl", "package p; import q.IBar; interface IFoo{}");
io_delegate_.SetFileContents("dir1/q/IBar.aidl", "package q; interface IBar{}");
io_delegate_.SetFileContents("dir2/q/IBar.aidl", "package q; interface IBar{}");
@@ -3750,7 +3937,7 @@ TEST_F(AidlTest, HandleManualIdAssignments) {
TEST_P(AidlTest, ParcelFileDescriptorIsBuiltinType) {
Options options =
- Options::From("aidl --lang=" + to_string(GetLanguage()) + " -h out -o out p/IFoo.aidl");
+ Options::From("aidl -I . --lang=" + to_string(GetLanguage()) + " -h out -o out p/IFoo.aidl");
// use without import
io_delegate_.SetFileContents("p/IFoo.aidl",
@@ -3806,7 +3993,7 @@ TEST_P(AidlTest, RejectsArgumentDirectionNotSpecified) {
}
TEST_F(AidlTest, ManualIds) {
- Options options = Options::From("aidl --lang=java -o out IFoo.aidl");
+ Options options = Options::From("aidl --lang=java -I . -o out IFoo.aidl");
io_delegate_.SetFileContents("IFoo.aidl",
"interface IFoo {\n"
" void foo() = 0;\n"
@@ -3816,7 +4003,7 @@ TEST_F(AidlTest, ManualIds) {
}
TEST_F(AidlTest, ManualIdsWithMetaTransactions) {
- Options options = Options::From("aidl --lang=java --version 10 -o out IFoo.aidl");
+ Options options = Options::From("aidl --lang=java -I . --version 10 -o out IFoo.aidl");
io_delegate_.SetFileContents("IFoo.aidl",
"interface IFoo {\n"
" void foo() = 0;\n"
@@ -3828,7 +4015,7 @@ TEST_F(AidlTest, ManualIdsWithMetaTransactions) {
TEST_F(AidlTest, FailOnDuplicatedIds) {
const string expected_stderr =
"ERROR: IFoo.aidl:3.7-11: Found duplicate method id (3) for method bar\n";
- Options options = Options::From("aidl --lang=java --version 10 -o out IFoo.aidl");
+ Options options = Options::From("aidl --lang=java -I . --version 10 -o out IFoo.aidl");
io_delegate_.SetFileContents("IFoo.aidl",
"interface IFoo {\n"
" void foo() = 3;\n"
@@ -3844,7 +4031,7 @@ TEST_F(AidlTest, FailOnOutOfRangeIds) {
const string expected_stderr =
"ERROR: IFoo.aidl:3.7-11: Found out of bounds id (16777115) for method bar. "
"Value for id must be between 0 and 16777114 inclusive.\n";
- Options options = Options::From("aidl --lang=java --version 10 -o out IFoo.aidl");
+ Options options = Options::From("aidl --lang=java -I . --version 10 -o out IFoo.aidl");
io_delegate_.SetFileContents("IFoo.aidl",
"interface IFoo {\n"
" void foo() = 3;\n"
@@ -3858,7 +4045,7 @@ TEST_F(AidlTest, FailOnOutOfRangeIds) {
TEST_F(AidlTest, FailOnPartiallyAssignedIds) {
const string expected_stderr =
"ERROR: IFoo.aidl:3.7-11: You must either assign id's to all methods or to none of them.\n";
- Options options = Options::From("aidl --lang=java --version 10 -o out IFoo.aidl");
+ Options options = Options::From("aidl --lang=java -I . --version 10 -o out IFoo.aidl");
io_delegate_.SetFileContents("IFoo.aidl",
"interface IFoo {\n"
" void foo() = 3;\n"
@@ -3893,28 +4080,12 @@ TEST_F(AidlTest, AssignedIds) {
}
TEST_F(AidlTest, AllowDuplicatedImportPaths) {
- Options options = Options::From("aidl --lang=java -I dir -I dir IFoo.aidl");
+ Options options = Options::From("aidl --lang=java -I . -I dir -I dir IFoo.aidl");
io_delegate_.SetFileContents("dir/IBar.aidl", "interface IBar{}");
io_delegate_.SetFileContents("IFoo.aidl", "import IBar; interface IFoo{}");
EXPECT_TRUE(compile_aidl(options, io_delegate_));
}
-TEST_F(AidlTest, FailOnAmbiguousImports) {
- const string expected_stderr =
- "ERROR: IFoo.aidl: Duplicate files found for IBar from:\n"
- "dir/IBar.aidl\n"
- "dir2/IBar.aidl\n"
- "ERROR: IFoo.aidl: Couldn't find import for class IBar\n";
-
- Options options = Options::From("aidl --lang=java -I dir -I dir2 IFoo.aidl");
- io_delegate_.SetFileContents("dir/IBar.aidl", "interface IBar{}");
- io_delegate_.SetFileContents("dir2/IBar.aidl", "interface IBar{}");
- io_delegate_.SetFileContents("IFoo.aidl", "import IBar; interface IFoo{}");
- CaptureStderr();
- EXPECT_FALSE(compile_aidl(options, io_delegate_));
- EXPECT_EQ(expected_stderr, GetCapturedStderr());
-}
-
TEST_F(AidlTest, UnusedImportDoesNotContributeInclude) {
io_delegate_.SetFileContents("a/b/IFoo.aidl",
"package a.b;\n"
@@ -3993,7 +4164,7 @@ TEST_F(AidlTest, ParseRustDerive) {
int a;
})");
- Options rust_options = Options::From("aidl --lang=rust -o out a/Foo.aidl");
+ Options rust_options = Options::From("aidl -I . --lang=rust -o out a/Foo.aidl");
EXPECT_TRUE(compile_aidl(rust_options, io_delegate_));
string rust_out;
@@ -4001,16 +4172,30 @@ TEST_F(AidlTest, ParseRustDerive) {
EXPECT_THAT(rust_out, testing::HasSubstr("#[derive(Debug, Clone)]"));
// Other backends shouldn't be bothered
- Options cpp_options = Options::From("aidl --lang=cpp -o out -h out a/Foo.aidl");
+ Options cpp_options = Options::From("aidl --lang=cpp -I . -o out -h out a/Foo.aidl");
EXPECT_TRUE(compile_aidl(cpp_options, io_delegate_));
- Options ndk_options = Options::From("aidl --lang=ndk -o out -h out a/Foo.aidl");
+ Options ndk_options = Options::From("aidl --lang=ndk -I . -o out -h out a/Foo.aidl");
EXPECT_TRUE(compile_aidl(ndk_options, io_delegate_));
- Options java_options = Options::From("aidl --lang=java -o out a/Foo.aidl");
+ Options java_options = Options::From("aidl --lang=java -I . -o out a/Foo.aidl");
EXPECT_TRUE(compile_aidl(java_options, io_delegate_));
}
+TEST_P(AidlTest, TypesShouldHaveRustDerive) {
+ CaptureStderr();
+ string code =
+ "@RustDerive(PartialEq=true)\n"
+ "parcelable Foo {\n"
+ " parcelable Bar {}\n"
+ " Bar bar;\n"
+ "}";
+ EXPECT_EQ(nullptr, Parse("Foo.aidl", code, typenames_, GetLanguage(), nullptr, {}));
+ EXPECT_THAT(
+ GetCapturedStderr(),
+ testing::HasSubstr("Field bar of type with @RustDerive PartialEq also needs to derive this"));
+}
+
TEST_F(AidlTest, EmptyEnforceAnnotation) {
io_delegate_.SetFileContents("a/IFoo.aidl", R"(package a;
interface IFoo {
@@ -4018,7 +4203,7 @@ TEST_F(AidlTest, EmptyEnforceAnnotation) {
void Protected();
})");
- Options options = Options::From("aidl --lang=java -o out a/IFoo.aidl");
+ Options options = Options::From("aidl --lang=java -I . -o out a/IFoo.aidl");
CaptureStderr();
EXPECT_FALSE(compile_aidl(options, io_delegate_));
EXPECT_THAT(GetCapturedStderr(), HasSubstr("Unable to parse @EnforcePermission annotation"));
@@ -4031,7 +4216,7 @@ TEST_F(AidlTest, InterfaceEnforceCondition) {
void Protected();
})");
- Options options = Options::From("aidl --lang=java -o out a/IFoo.aidl");
+ Options options = Options::From("aidl --lang=java -I . -o out a/IFoo.aidl");
EXPECT_TRUE(compile_aidl(options, io_delegate_));
}
@@ -4042,7 +4227,7 @@ TEST_F(AidlTest, EnforceConditionAny) {
void Protected();
})");
- Options options = Options::From("aidl --lang=java -o out a/IFoo.aidl");
+ Options options = Options::From("aidl --lang=java -I . -o out a/IFoo.aidl");
EXPECT_TRUE(compile_aidl(options, io_delegate_));
}
@@ -4053,7 +4238,7 @@ TEST_F(AidlTest, EnforceConditionAll) {
void Protected();
})");
- Options options = Options::From("aidl --lang=java -o out a/IFoo.aidl");
+ Options options = Options::From("aidl --lang=java -I . -o out a/IFoo.aidl");
EXPECT_TRUE(compile_aidl(options, io_delegate_));
}
@@ -4065,8 +4250,11 @@ TEST_F(AidlTest, InterfaceAndMethodEnforceCondition) {
void Protected();
})");
- Options options = Options::From("aidl --lang=java -o out a/IFoo.aidl");
- EXPECT_TRUE(compile_aidl(options, io_delegate_));
+ Options options = Options::From("aidl --lang=java -I . -o out a/IFoo.aidl");
+ CaptureStderr();
+ EXPECT_FALSE(compile_aidl(options, io_delegate_));
+ EXPECT_THAT(GetCapturedStderr(), HasSubstr("The interface IFoo uses a permission annotation but "
+ "the method Protected is also annotated"));
}
TEST_F(AidlTest, NoPermissionInterfaceEnforceMethod) {
@@ -4077,11 +4265,11 @@ TEST_F(AidlTest, NoPermissionInterfaceEnforceMethod) {
void Protected();
})");
- Options options = Options::From("aidl --lang=java -o out a/IFoo.aidl");
+ Options options = Options::From("aidl --lang=java -I . -o out a/IFoo.aidl");
CaptureStderr();
EXPECT_FALSE(compile_aidl(options, io_delegate_));
- EXPECT_THAT(GetCapturedStderr(),
- HasSubstr("The interface IFoo is annotated as requiring no permission"));
+ EXPECT_THAT(GetCapturedStderr(), HasSubstr("The interface IFoo uses a permission annotation but "
+ "the method Protected is also annotated"));
}
TEST_F(AidlTest, ManualPermissionInterfaceEnforceMethod) {
@@ -4092,12 +4280,11 @@ TEST_F(AidlTest, ManualPermissionInterfaceEnforceMethod) {
void Protected();
})");
- Options options = Options::From("aidl --lang=java -o out a/IFoo.aidl");
+ Options options = Options::From("aidl --lang=java -I . -o out a/IFoo.aidl");
CaptureStderr();
EXPECT_FALSE(compile_aidl(options, io_delegate_));
- EXPECT_THAT(
- GetCapturedStderr(),
- HasSubstr("The interface IFoo is annotated as manually implementing permission checks"));
+ EXPECT_THAT(GetCapturedStderr(), HasSubstr("The interface IFoo uses a permission annotation but "
+ "the method Protected is also annotated"));
}
TEST_F(AidlTest, EnforceInterfaceNoPermissionsMethod) {
@@ -4108,11 +4295,11 @@ TEST_F(AidlTest, EnforceInterfaceNoPermissionsMethod) {
void Protected();
})");
- Options options = Options::From("aidl --lang=java -o out a/IFoo.aidl");
+ Options options = Options::From("aidl --lang=java -I . -o out a/IFoo.aidl");
CaptureStderr();
EXPECT_FALSE(compile_aidl(options, io_delegate_));
- EXPECT_THAT(GetCapturedStderr(),
- HasSubstr("The interface IFoo enforces permissions using annotations"));
+ EXPECT_THAT(GetCapturedStderr(), HasSubstr("The interface IFoo uses a permission annotation but "
+ "the method Protected is also annotated"));
}
TEST_F(AidlTest, EnforceInterfaceManualPermissionMethod) {
@@ -4123,11 +4310,11 @@ TEST_F(AidlTest, EnforceInterfaceManualPermissionMethod) {
void Protected();
})");
- Options options = Options::From("aidl --lang=java -o out a/IFoo.aidl");
+ Options options = Options::From("aidl --lang=java -I . -o out a/IFoo.aidl");
CaptureStderr();
EXPECT_FALSE(compile_aidl(options, io_delegate_));
- EXPECT_THAT(GetCapturedStderr(),
- HasSubstr("The interface IFoo enforces permissions using annotations"));
+ EXPECT_THAT(GetCapturedStderr(), HasSubstr("The interface IFoo uses a permission annotation but "
+ "the method Protected is also annotated"));
}
TEST_F(AidlTest, JavaSuppressLint) {
@@ -4136,7 +4323,7 @@ TEST_F(AidlTest, JavaSuppressLint) {
interface IFoo {
})");
- Options options = Options::From("aidl --lang=java -o out a/IFoo.aidl");
+ Options options = Options::From("aidl --lang=java -I . -o out a/IFoo.aidl");
CaptureStderr();
EXPECT_TRUE(compile_aidl(options, io_delegate_));
EXPECT_EQ(GetCapturedStderr(), "");
@@ -4161,22 +4348,24 @@ class AidlOutputPathTest : public AidlTest {
TEST_F(AidlOutputPathTest, OutDirWithNoOutputFile) {
// <out_dir> / <package_name> / <type_name>.java
- Test(Options::From("aidl -o out sub/dir/foo/bar/IFoo.aidl"), "out/foo/bar/IFoo.java");
+ Test(Options::From("aidl -I sub/dir -o out sub/dir/foo/bar/IFoo.aidl"), "out/foo/bar/IFoo.java");
}
TEST_F(AidlOutputPathTest, OutDirWithOutputFile) {
// when output file is explicitly set, it is always respected. -o option is
// ignored.
- Test(Options::From("aidl -o out sub/dir/foo/bar/IFoo.aidl output/IFoo.java"), "output/IFoo.java");
+ Test(Options::From("aidl -I sub/dir -o out sub/dir/foo/bar/IFoo.aidl output/IFoo.java"),
+ "output/IFoo.java");
}
TEST_F(AidlOutputPathTest, NoOutDirWithOutputFile) {
- Test(Options::From("aidl -o out sub/dir/foo/bar/IFoo.aidl output/IFoo.java"), "output/IFoo.java");
+ Test(Options::From("aidl -I sub/dir -o out sub/dir/foo/bar/IFoo.aidl output/IFoo.java"),
+ "output/IFoo.java");
}
TEST_F(AidlOutputPathTest, NoOutDirWithNoOutputFile) {
// output is the same as the input file except for the suffix
- Test(Options::From("aidl sub/dir/foo/bar/IFoo.aidl"), "sub/dir/foo/bar/IFoo.java");
+ Test(Options::From("aidl -I sub/dir sub/dir/foo/bar/IFoo.aidl"), "sub/dir/foo/bar/IFoo.java");
}
TEST_P(AidlTest, FailOnOutOfBoundsInt32MaxConstInt) {
@@ -4378,7 +4567,7 @@ TEST_F(AidlTest, ImmutableParcelableCannotBeOut) {
TEST_F(AidlTest, ImmutableParcelableFieldNameRestriction) {
io_delegate_.SetFileContents("Foo.aidl", "@JavaOnlyImmutable parcelable Foo { int a; int A; }");
- Options options = Options::From("aidl --lang=java Foo.aidl");
+ Options options = Options::From("aidl -I . --lang=java Foo.aidl");
const string expected_stderr =
"ERROR: Foo.aidl:1.47-49: 'Foo' has duplicate field name 'A' after capitalizing the first "
"letter\n";
@@ -4424,7 +4613,7 @@ TEST_P(AidlTest, UnionRejectsFirstEnumWithNoDefaults) {
TEST_P(AidlTest, GenericStructuredParcelable) {
io_delegate_.SetFileContents("Foo.aidl", "parcelable Foo<T, U> { int a; int A; }");
- Options options = Options::From("aidl Foo.aidl --lang=" + to_string(GetLanguage()));
+ Options options = Options::From("aidl -I . Foo.aidl --lang=" + to_string(GetLanguage()));
const string expected_stderr = "";
CaptureStderr();
EXPECT_TRUE(compile_aidl(options, io_delegate_));
@@ -4434,8 +4623,8 @@ TEST_P(AidlTest, GenericStructuredParcelable) {
TEST_F(AidlTest, GenericStructuredParcelableWithStringConstants_Cpp) {
io_delegate_.SetFileContents("Foo.aidl",
"parcelable Foo<T, U> { int a; const String s = \"\"; }");
- Options options =
- Options::From("aidl Foo.aidl --lang=" + to_string(Options::Language::CPP) + " -o out -h out");
+ Options options = Options::From("aidl Foo.aidl -I . --lang=" + to_string(Options::Language::CPP) +
+ " -o out -h out");
const string expected_stderr = "";
CaptureStderr();
EXPECT_TRUE(compile_aidl(options, io_delegate_));
@@ -4453,8 +4642,8 @@ const ::android::String16& Foo<T,U>::s() {
TEST_F(AidlTest, GenericStructuredParcelableWithStringConstants_Ndk) {
io_delegate_.SetFileContents("Foo.aidl",
"parcelable Foo<T, U> { int a; const String s = \"\"; }");
- Options options =
- Options::From("aidl Foo.aidl --lang=" + to_string(Options::Language::NDK) + " -o out -h out");
+ Options options = Options::From("aidl Foo.aidl -I . --lang=" + to_string(Options::Language::NDK) +
+ " -o out -h out");
const string expected_stderr = "";
CaptureStderr();
EXPECT_TRUE(compile_aidl(options, io_delegate_));
@@ -4692,7 +4881,7 @@ TEST_F(GenericAidlTest, ImportGenericParameterTypesNDK) {
TEST_P(AidlTest, RejectGenericStructuredParcelabelRepeatedParam) {
io_delegate_.SetFileContents("Foo.aidl", "parcelable Foo<T,T> { int a; int A; }");
- Options options = Options::From("aidl Foo.aidl --lang=" + to_string(GetLanguage()));
+ Options options = Options::From("aidl Foo.aidl -I . --lang=" + to_string(GetLanguage()));
const string expected_stderr =
"ERROR: Foo.aidl:1.11-15: Every type parameter should be unique.\n";
CaptureStderr();
@@ -4702,8 +4891,10 @@ TEST_P(AidlTest, RejectGenericStructuredParcelabelRepeatedParam) {
TEST_P(AidlTest, RejectGenericStructuredParcelableField) {
io_delegate_.SetFileContents("Foo.aidl", "parcelable Foo<T,T> { T a; int A; }");
- Options options = Options::From("aidl Foo.aidl --lang=" + to_string(GetLanguage()));
- const string expected_stderr = "ERROR: Foo.aidl:1.22-24: Failed to resolve 'T'\n";
+ Options options = Options::From("aidl Foo.aidl -I . --lang=" + to_string(GetLanguage()));
+ const string expected_stderr =
+ "ERROR: Foo.aidl: Couldn't find import for class T. Searched here:\n - ./\nERROR: "
+ "Foo.aidl:1.22-24: Failed to resolve 'T'\n";
CaptureStderr();
EXPECT_FALSE(compile_aidl(options, io_delegate_));
EXPECT_EQ(expected_stderr, GetCapturedStderr());
@@ -4711,7 +4902,7 @@ TEST_P(AidlTest, RejectGenericStructuredParcelableField) {
TEST_P(AidlTest, LongCommentWithinConstExpression) {
io_delegate_.SetFileContents("Foo.aidl", "enum Foo { FOO = (1 << 1) /* comment */ | 0x0 }");
- Options options = Options::From("aidl Foo.aidl --lang=" + to_string(GetLanguage()));
+ Options options = Options::From("aidl Foo.aidl -I . --lang=" + to_string(GetLanguage()));
CaptureStderr();
EXPECT_TRUE(compile_aidl(options, io_delegate_));
EXPECT_EQ("", GetCapturedStderr());
@@ -4719,7 +4910,7 @@ TEST_P(AidlTest, LongCommentWithinConstExpression) {
TEST_F(AidlTest, RejectUntypdeListAndMapInUnion) {
io_delegate_.SetFileContents("a/Foo.aidl", "package a; union Foo { List l; Map m; }");
- Options options = Options::From("aidl a/Foo.aidl --lang=java -o out");
+ Options options = Options::From("aidl a/Foo.aidl -I . --lang=java -o out");
std::string expectedErr =
"ERROR: a/Foo.aidl:1.28-30: "
"Encountered an untyped List or Map. The use of untyped List/Map is "
@@ -4736,7 +4927,7 @@ TEST_F(AidlTest, RejectUntypdeListAndMapInUnion) {
TEST_F(AidlTest, RejectUntypdeListAndMapInUnstructuredParcelable) {
io_delegate_.SetFileContents("a/Foo.aidl", "package a; parcelable Foo { List l; Map m; }");
- Options options = Options::From("aidl a/Foo.aidl --lang=java -o out");
+ Options options = Options::From("aidl a/Foo.aidl -I . --lang=java -o out");
std::string expectedErr =
"ERROR: a/Foo.aidl:1.33-35: "
"Encountered an untyped List or Map. The use of untyped List/Map is "
@@ -4847,8 +5038,8 @@ parcelable Foo {
EXPECT_THAT(code, testing::HasSubstr(R"(
fn default() -> Self {
Self {
- n: 42,
- e: crate::mangled::_1_p_4_Enum::BAR,
+ r#n: 42,
+ r#e: crate::mangled::_1_p_4_Enum::BAR,
}
})"));
}
@@ -4871,9 +5062,10 @@ parcelable Foo {
EXPECT_EQ("int e = 3", fields[0]->ToString());
}
-TEST_P(AidlTest, EnumeratorIsConstantValue_CanDefineOtherEnumerator) {
+TEST_F(AidlTest, EnumeratorIsConstantValue_CanDefineOtherEnumerator) {
CaptureStderr();
const AidlDefinedType* type = Parse("a/p/Foo.aidl", R"(
+package a.p;
@Backing(type="int")
enum Foo {
STANDARD_SHIFT = 16,
@@ -4881,14 +5073,14 @@ enum Foo {
STANDARD_BT601_625 = 2 << STANDARD_SHIFT,
}
)",
- typenames_, GetLanguage());
+ typenames_, Options::Language::JAVA);
auto err = GetCapturedStderr();
EXPECT_EQ("", err);
- EXPECT_TRUE(type);
+ ASSERT_NE(type, nullptr);
const auto& enum_type = type->AsEnumDeclaration();
string code;
auto writer = CodeWriter::ForString(&code);
- DumpVisitor visitor(*writer);
+ DumpVisitor visitor(*writer, /*inline_constants=*/true);
visitor.Visit(*enum_type);
writer->Close();
EXPECT_EQ(R"--(@Backing(type="int")
@@ -4901,6 +5093,70 @@ enum Foo {
code);
}
+TEST_F(AidlTest, DumpApiWithConstantReferences) {
+ io_delegate_.SetFileContents("foo/bar/Foo.aidl", R"(
+package foo.bar;
+import foo.bar.Bar;
+import foo.bar.Enum;
+parcelable Foo {
+ int n = Bar.A + 1;
+ int[] ns = {1, Bar.A, Bar.B + 1};
+ Enum e = Enum.A;
+ Enum[] es = {Enum.A, Enum.B};
+}
+)");
+ io_delegate_.SetFileContents("foo/bar/Bar.aidl", R"(
+package foo.bar;
+parcelable Bar {
+ const int A = 1;
+ const int B = A + 1;
+}
+)");
+ io_delegate_.SetFileContents("foo/bar/Enum.aidl", R"(
+package foo.bar;
+enum Enum {
+ A,
+ B = A + 2,
+}
+)");
+ vector<string> args = {"aidl",
+ "--dumpapi",
+ "--out=dump",
+ "--include=.",
+ "foo/bar/Foo.aidl",
+ "foo/bar/Bar.aidl",
+ "foo/bar/Enum.aidl"};
+ ASSERT_TRUE(dump_api(Options::From(args), io_delegate_));
+
+ string actual;
+ EXPECT_TRUE(io_delegate_.GetWrittenContents("dump/foo/bar/Foo.aidl", &actual));
+ EXPECT_EQ(string(kPreamble).append(R"(package foo.bar;
+parcelable Foo {
+ int n = (foo.bar.Bar.A + 1) /* 2 */;
+ int[] ns = {1, foo.bar.Bar.A /* 1 */, (foo.bar.Bar.B + 1) /* 3 */};
+ foo.bar.Enum e = foo.bar.Enum.A;
+ foo.bar.Enum[] es = {foo.bar.Enum.A, foo.bar.Enum.B};
+}
+)"),
+ actual);
+ EXPECT_TRUE(io_delegate_.GetWrittenContents("dump/foo/bar/Bar.aidl", &actual));
+ EXPECT_EQ(string(kPreamble).append(R"(package foo.bar;
+parcelable Bar {
+ const int A = 1;
+ const int B = (A + 1) /* 2 */;
+}
+)"),
+ actual);
+ EXPECT_TRUE(io_delegate_.GetWrittenContents("dump/foo/bar/Enum.aidl", &actual));
+ EXPECT_EQ(string(kPreamble).append(R"(package foo.bar;
+enum Enum {
+ A,
+ B = (A + 2) /* 2 */,
+}
+)"),
+ actual);
+}
+
TEST_F(AidlTest, EnumDefaultShouldBeEnumerators) {
io_delegate_.SetFileContents("a/p/Enum.aidl", "package p; enum Enum { FOO = 1, BAR = 2}");
io_delegate_.SetFileContents("a/p/Foo.aidl", R"(
@@ -4949,8 +5205,8 @@ TEST_P(AidlTest, RejectRefsInAnnotation) {
" @JavaPassthrough(annotation=ANNOTATION) void foo();\n"
"}");
CaptureStderr();
- auto options =
- Options::From("aidl --lang " + to_string(GetLanguage()) + " -o out -h out a/p/IFoo.aidl");
+ auto options = Options::From("aidl -I a --lang " + to_string(GetLanguage()) +
+ " -o out -h out a/p/IFoo.aidl");
EXPECT_FALSE(compile_aidl(options, io_delegate_));
auto err = GetCapturedStderr();
EXPECT_EQ(
@@ -5031,7 +5287,7 @@ TEST_P(AidlTest, ConstRefsCanPointToTheSameValue) {
TEST_P(AidlTest, UnknownConstReference) {
io_delegate_.SetFileContents("Foo.aidl", " parcelable Foo { int field = UNKNOWN_REF; }");
auto options =
- Options::From("aidl --lang " + to_string(GetLanguage()) + " -o out -h out Foo.aidl");
+ Options::From("aidl -I . --lang " + to_string(GetLanguage()) + " -o out -h out Foo.aidl");
const string err =
"ERROR: Foo.aidl:1.30-42: Can't find UNKNOWN_REF in Foo\n"
"ERROR: Foo.aidl:1.30-42: Unknown reference 'UNKNOWN_REF'\n";
@@ -5050,22 +5306,23 @@ interface IFoo {}
}
TEST_P(AidlTest, WarningInterfaceName) {
- io_delegate_.SetFileContents("p/Foo.aidl", "interface Foo {}");
- auto options = Options::From("aidl --lang " + to_string(GetLanguage()) +
+ io_delegate_.SetFileContents("p/Foo.aidl", "package p; interface Foo {}");
+ auto options = Options::From("aidl -I . --lang " + to_string(GetLanguage()) +
" -Winterface-name -o out -h out p/Foo.aidl");
CaptureStderr();
EXPECT_TRUE(compile_aidl(options, io_delegate_));
- EXPECT_EQ("WARNING: p/Foo.aidl:1.1-10: Interface names should start with I. [-Winterface-name]\n",
- GetCapturedStderr());
+ EXPECT_EQ(
+ "WARNING: p/Foo.aidl:1.11-21: Interface names should start with I. [-Winterface-name]\n",
+ GetCapturedStderr());
}
TEST_P(AidlTest, ErrorInterfaceName) {
- io_delegate_.SetFileContents("p/Foo.aidl", "interface Foo {}");
- auto options = Options::From("aidl --lang " + to_string(GetLanguage()) +
+ io_delegate_.SetFileContents("p/Foo.aidl", "package p; interface Foo {}");
+ auto options = Options::From("aidl -I . --lang " + to_string(GetLanguage()) +
" -Winterface-name -Werror -o out -h out p/Foo.aidl");
CaptureStderr();
EXPECT_FALSE(compile_aidl(options, io_delegate_));
- EXPECT_EQ("ERROR: p/Foo.aidl:1.1-10: Interface names should start with I. [-Winterface-name]\n",
+ EXPECT_EQ("ERROR: p/Foo.aidl:1.11-21: Interface names should start with I. [-Winterface-name]\n",
GetCapturedStderr());
}
@@ -5073,10 +5330,9 @@ TEST_F(AidlTest, RejectsIncorrectOutputFilePathOnLegacyCppInput) {
const std::string input_file = "base/p/q/IFoo.aidl";
const std::string header_dir = "out/";
const std::string output_file = "out/base/p/q/IFoo.cpp";
- const std::string package = "p.q"; // not base.p.q
- io_delegate_.SetFileContents(input_file, "package " + package + "; interface IFoo {}");
+ io_delegate_.SetFileContents(input_file, "package p.q; interface IFoo {}");
- auto options = Options::From({"aidl-cpp", input_file, header_dir, output_file});
+ auto options = Options::From({"aidl-cpp", "-I base", input_file, header_dir, output_file});
CaptureStderr();
EXPECT_FALSE(compile_aidl(options, io_delegate_));
EXPECT_THAT(
@@ -5125,15 +5381,15 @@ TEST_F(AidlTest, SuppressWarningsIsNotForArgs) {
"interface IFoo {\n"
" void foo(in @SuppressWarnings(value={\"inout-parameter\"}) int x);\n"
"}");
- auto options = Options::From("aidl --lang=java IFoo.aidl");
+ auto options = Options::From("aidl -I . --lang=java IFoo.aidl");
CaptureStderr();
EXPECT_FALSE(compile_aidl(options, io_delegate_));
EXPECT_THAT(GetCapturedStderr(), HasSubstr("@SuppressWarnings is not available"));
}
TEST_F(AidlTest, VoidCantBeUsedInMethodParameterType) {
- io_delegate_.SetFileContents("p/IFoo.aidl", "interface IFoo{ void j(void n);}");
- auto options = Options::From("aidl --lang=java -o out p/IFoo.aidl");
+ io_delegate_.SetFileContents("p/IFoo.aidl", "package p; interface IFoo{ void j(void n);}");
+ auto options = Options::From("aidl -I . --lang=java -o out p/IFoo.aidl");
CaptureStderr();
EXPECT_FALSE(compile_aidl(options, io_delegate_));
EXPECT_THAT(GetCapturedStderr(), HasSubstr("'void' is an invalid type for the parameter 'n'"));
@@ -5141,21 +5397,23 @@ TEST_F(AidlTest, VoidCantBeUsedInMethodParameterType) {
TEST_F(AidlTest, InterfaceVectorIsAvailableAfterTiramisu) {
io_delegate_.SetFileContents("p/IFoo.aidl",
+ "package p;\n"
"interface IFoo{\n"
" void foo(in IFoo[] n);\n"
" void bar(in List<IFoo> n);\n"
"}");
CaptureStderr();
- EXPECT_FALSE(compile_aidl(
- Options::From("aidl --lang=java --min_sdk_version 30 -o out p/IFoo.aidl"), io_delegate_));
+ EXPECT_FALSE(
+ compile_aidl(Options::From("aidl -I . --lang=java --min_sdk_version 30 -o out p/IFoo.aidl"),
+ io_delegate_));
auto captured_stderr = GetCapturedStderr();
EXPECT_THAT(captured_stderr, HasSubstr("Array of interfaces is available since"));
EXPECT_THAT(captured_stderr, HasSubstr("List of interfaces is available since"));
CaptureStderr();
- EXPECT_TRUE(
- compile_aidl(Options::From("aidl --lang=java --min_sdk_version Tiramisu -o out p/IFoo.aidl"),
- io_delegate_));
+ EXPECT_TRUE(compile_aidl(
+ Options::From("aidl -I . --lang=java --min_sdk_version Tiramisu -o out p/IFoo.aidl"),
+ io_delegate_));
EXPECT_EQ(GetCapturedStderr(), "");
}
diff --git a/analyzer/Analyzer.cpp b/analyzer/Analyzer.cpp
new file mode 100644
index 00000000..1b48d2cc
--- /dev/null
+++ b/analyzer/Analyzer.cpp
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "include/Analyzer.h"
+
+using std::unique_ptr;
+using std::unordered_map;
+
+namespace android {
+namespace aidl {
+
+using analyzeFn = android::status_t (*)(uint32_t _aidl_code, const android::Parcel& _aidl_data,
+ const android::Parcel& _aidl_reply);
+
+Analyzer::Analyzer(const std::string& package, const std::string& interface, analyzeFn function)
+ : mPackageName(package), mInterfaceName(interface), mAnalyzeFunction(function) {}
+
+const std::string& Analyzer::getPackageName() const {
+ return mPackageName;
+}
+
+const std::string& Analyzer::getInterfaceName() const {
+ return mInterfaceName;
+}
+
+const analyzeFn& Analyzer::getAnalyzeFunction() const {
+ return mAnalyzeFunction;
+}
+
+unordered_map<std::string, unique_ptr<Analyzer>>& Analyzer::getAnalyzers() {
+ static unordered_map<std::string, unique_ptr<Analyzer>> gAnalyzers;
+ return gAnalyzers;
+}
+
+void Analyzer::installAnalyzer(std::unique_ptr<Analyzer> install) {
+ getAnalyzers().insert_or_assign(install->getPackageName(), std::move(install));
+}
+
+} // namespace aidl
+} // namespace android
diff --git a/analyzer/analyzerMain.cpp b/analyzer/analyzerMain.cpp
new file mode 100644
index 00000000..515df5ef
--- /dev/null
+++ b/analyzer/analyzerMain.cpp
@@ -0,0 +1,410 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <android-base/file.h>
+#include <android-base/logging.h>
+#include <binder/BpBinder.h>
+#include <binder/IServiceManager.h>
+#include <binder/Parcel.h>
+#include <binder/RecordedTransaction.h>
+#include <signal.h>
+#include <fstream>
+#include <sstream>
+#include "include/Analyzer.h"
+
+using android::IBinder;
+using android::NO_ERROR;
+using android::sp;
+using android::status_t;
+using android::String16;
+using android::aidl::Analyzer;
+using android::binder::debug::RecordedTransaction;
+using std::string;
+
+namespace {
+
+static volatile size_t gCtrlCCount = 0;
+static constexpr size_t kCtrlCLimit = 3;
+static const char kStandardRecordingPath[] = "/data/local/recordings/";
+
+status_t startRecording(const sp<IBinder>& binder, const string& filePath) {
+ if (auto mkdir_return = mkdir(kStandardRecordingPath, 0666);
+ mkdir_return != 0 && errno != EEXIST) {
+ std::cout << "Failed to create recordings directory.\n";
+ return android::NO_ERROR;
+ }
+
+ int openFlags = O_WRONLY | O_CREAT | O_APPEND | O_CLOEXEC | O_BINARY;
+ android::base::unique_fd fd(open(filePath.c_str(), openFlags, 0666));
+ if (fd == -1) {
+ std::cout << "Failed to open file for recording with error: " << strerror(errno) << '\n';
+ return android::BAD_VALUE;
+ }
+
+ // TODO (b/245804633): this still requires setenforce 0, but nothing above does
+ if (status_t err = binder->remoteBinder()->startRecordingBinder(fd); err != android::NO_ERROR) {
+ auto checkSE = std::ifstream("/sys/fs/selinux/enforce");
+ bool recommendSetenforce = false;
+ if ((checkSE.rdstate() & std::ifstream::failbit) != 0) {
+ std::cout << "Failed to determine selinux state.";
+ recommendSetenforce = true;
+ } else {
+ char seState = checkSE.get();
+ if (checkSE.good()) {
+ if (seState == '1') {
+ std::cout << "SELinux must be permissive.";
+ recommendSetenforce = true;
+ } else if (seState == '0') {
+ std::cout << "SELinux is permissive. Failing for some other reason.\n";
+ }
+ } else {
+ std::cout << "Failed to determine SELinux state.";
+ recommendSetenforce = true;
+ }
+ }
+ if (recommendSetenforce) {
+ std::cout << " Try running:\n\n setenforce 0\n\n";
+ }
+ std::cout << "Failed to start recording with error: " << android::statusToString(err) << '\n';
+ return err;
+ } else {
+ std::cout << "Recording started successfully.\n";
+ return android::NO_ERROR;
+ }
+}
+
+status_t stopRecording(const sp<IBinder>& binder) {
+ if (status_t err = binder->remoteBinder()->stopRecordingBinder(); err != NO_ERROR) {
+ std::cout << "Failed to stop recording with error: " << err << '\n';
+ return err;
+ } else {
+ std::cout << "Recording stopped successfully.\n";
+ return NO_ERROR;
+ }
+}
+
+void printTransaction(const RecordedTransaction& transaction) {
+ auto& analyzers = Analyzer::getAnalyzers();
+
+ auto analyzer = analyzers.find(transaction.getInterfaceName());
+ if (analyzer != analyzers.end()) {
+ (analyzer->second)
+ ->getAnalyzeFunction()(transaction.getCode(), transaction.getDataParcel(),
+ transaction.getReplyParcel());
+ } else {
+ std::cout << "No analyzer:";
+ std::cout << " interface: " << transaction.getInterfaceName() << "\n";
+ std::cout << " code: " << transaction.getCode() << "\n";
+ std::cout << " data: " << transaction.getDataParcel().dataSize() << " bytes\n";
+ std::cout << " reply: " << transaction.getReplyParcel().dataSize() << " bytes\n";
+ }
+ std::cout << " status: " << transaction.getReturnedStatus() << "\n\n";
+}
+
+status_t inspectRecording(const string& path) {
+ auto& analyzers = Analyzer::getAnalyzers();
+
+ android::base::unique_fd fd(open(path.c_str(), O_RDONLY));
+ if (fd.get() == -1) {
+ std::cout << "Failed to open recording file with error: " << strerror(errno) << '\n';
+ return android::BAD_VALUE;
+ }
+
+ int i = 1;
+ while (auto transaction = RecordedTransaction::fromFile(fd)) {
+ std::cout << "Transaction " << i << ":\n";
+ printTransaction(transaction.value());
+ i++;
+ }
+ return NO_ERROR;
+}
+
+void incrementCtrlCCount(int signum) {
+ gCtrlCCount++;
+ if (gCtrlCCount > kCtrlCLimit) {
+ std::cout
+ << "Ctrl+C multiple times, but could not quit application. If recording still running, you "
+ "might stop it manually.\n";
+ exit(signum);
+ }
+}
+
+status_t listenToFile(const string& filePath) {
+ android::base::unique_fd listenFd(open(filePath.c_str(), O_RDONLY));
+ if (listenFd == -1) {
+ std::cout << "Failed to open listening file with error: " << strerror(errno) << '\n';
+ return android::BAD_VALUE;
+ }
+
+ auto& analyzers = Analyzer::getAnalyzers();
+
+ signal(SIGINT, incrementCtrlCCount);
+ std::cout << "Starting to listen:\n";
+ int i = 1;
+ while (gCtrlCCount == 0) {
+ auto transaction = RecordedTransaction::fromFile(listenFd);
+ if (!transaction) {
+ sleep(1);
+ continue;
+ }
+ std::cout << "Transaction " << i << ":\n";
+ printTransaction(transaction.value());
+ i++;
+ }
+ return NO_ERROR;
+}
+
+status_t replayFile(const sp<IBinder>& binder, const string& path) {
+ auto& analyzers = Analyzer::getAnalyzers();
+
+ android::base::unique_fd fd(open(path.c_str(), O_RDONLY));
+ if (fd.get() == -1) {
+ std::cout << "Failed to open recording file with error: " << strerror(errno) << '\n';
+ return android::BAD_VALUE;
+ }
+
+ int failureCount = 0;
+ int i = 1;
+ while (auto transaction = RecordedTransaction::fromFile(fd)) {
+ std::cout << "Replaying Transaction " << i << ":\n";
+ printTransaction(transaction.value());
+
+ android::Parcel send, reply;
+ send.setData(transaction->getDataParcel().data(), transaction->getDataParcel().dataSize());
+ android::status_t status = binder->remoteBinder()->transact(transaction->getCode(), send,
+ &reply, transaction->getFlags());
+ if (status != transaction->getReturnedStatus()) {
+ std::cout << "Failure: Expected status " << transaction->getReturnedStatus()
+ << " but received status " << status << "\n\n";
+ failureCount++;
+ } else {
+ std::cout << "Transaction replayed correctly."
+ << "\n\n";
+ }
+ i++;
+ }
+ std::cout << i << " transactions replayed.\n";
+ if (failureCount > 0) {
+ std::cout << failureCount << " transactions had unexpected status. See logs for details.\n";
+ return android::UNKNOWN_ERROR;
+ } else {
+ return NO_ERROR;
+ }
+}
+
+status_t listAvailableInterfaces(int, char**) {
+ auto& analyzers = Analyzer::getAnalyzers();
+ std::cout << "Available Interfaces (" << analyzers.size() << "):\n";
+ for (auto a = analyzers.begin(); a != analyzers.end(); a++) {
+ std::cout << " " << a->second->getInterfaceName() << '\n';
+ }
+ return NO_ERROR;
+}
+
+struct AnalyzerCommand {
+ std::function<status_t(int, char*[])> command;
+ std::string overview;
+ std::string compactArguments;
+ std::string helpDetail;
+};
+
+status_t helpCommandEntryPoint(int argc, char* argv[]);
+
+const AnalyzerCommand helpCommand = {helpCommandEntryPoint, "Show help information.", "<command>",
+ ""};
+
+const AnalyzerCommand listCommand = {listAvailableInterfaces,
+ "Prints a list of available interfaces.", "", ""};
+
+status_t startCommandEntryPoint(int argc, char* argv[]) {
+ if (argc != 3) {
+ helpCommandEntryPoint(argc, argv);
+ return android::BAD_VALUE;
+ }
+
+ sp<IBinder> binder = android::defaultServiceManager()->checkService(String16(argv[2]));
+
+ string filename = argv[2];
+ std::replace(filename.begin(), filename.end(), '/', '.');
+ auto filePath = kStandardRecordingPath + filename;
+
+ return startRecording(binder, filePath);
+}
+
+const AnalyzerCommand startCommand = {
+ startCommandEntryPoint, "Start recording Binder transactions from a given service.",
+ "<service>", " <service>\tService to record. See 'dumpsys -l'"};
+
+status_t stopCommandEntryPoint(int argc, char* argv[]) {
+ if (argc != 3) {
+ helpCommandEntryPoint(argc, argv);
+ return android::BAD_VALUE;
+ }
+
+ sp<IBinder> binder = android::defaultServiceManager()->checkService(String16(argv[2]));
+ return stopRecording(binder);
+}
+
+const AnalyzerCommand stopCommand = {
+ stopCommandEntryPoint,
+ "Stops recording Binder transactions from a given process. (See 'start')", "<service>",
+ " <service>\tService to stop recording; <service> argument to previous 'start' command."};
+
+status_t inspectCommandEntryPoint(int argc, char* argv[]) {
+ if (argc != 3) {
+ helpCommandEntryPoint(argc, argv);
+ return android::BAD_VALUE;
+ }
+ std::string path = kStandardRecordingPath + string(argv[2]);
+
+ return inspectRecording(path);
+}
+
+const AnalyzerCommand inspectCommand = {
+ inspectCommandEntryPoint,
+ "Writes the binder transactions in <file-name> to stdout in a human-friendly format.",
+ "<file-name>",
+ " <file-name>\tA recording in /data/local/recordings/, and the name of the service"};
+
+status_t listenCommandEntryPoint(int argc, char* argv[]) {
+ if (argc != 3) {
+ helpCommandEntryPoint(argc, argv);
+ return android::BAD_VALUE;
+ }
+
+ sp<IBinder> binder = android::defaultServiceManager()->checkService(String16(argv[2]));
+
+ string filename = argv[2];
+ std::replace(filename.begin(), filename.end(), '/', '.');
+ auto filePath = kStandardRecordingPath + filename;
+
+ if (status_t startErr = startRecording(binder, filePath); startErr != NO_ERROR) {
+ return startErr;
+ }
+
+ status_t listenStatus = listenToFile(filePath);
+
+ if (status_t stopErr = stopRecording(binder); stopErr != NO_ERROR) {
+ return stopErr;
+ }
+
+ return listenStatus;
+}
+
+const AnalyzerCommand listenCommand = {
+ listenCommandEntryPoint,
+ "Starts recording binder transactions in <service> and writes transactions to "
+ "stdout.",
+ "<service>", " <service>\t?\n"};
+
+int replayFunction(int argc, char* argv[]) {
+ if (argc != 4) {
+ return helpCommandEntryPoint(argc, argv);
+ }
+
+ sp<IBinder> binder = android::defaultServiceManager()->checkService(String16(argv[2]));
+ std::string path = kStandardRecordingPath + string(argv[3]);
+
+ return replayFile(binder, path);
+}
+
+const AnalyzerCommand replayCommand = {
+ replayFunction, "No overview", "<service> <file-name>",
+ " <service>\t?\n"
+ " <file-name>\tThe name of a file in /data/local/recordings/"};
+
+auto& commands = *new std::map<std::string, AnalyzerCommand>{
+ {"start", startCommand}, {"stop", stopCommand}, {"inspect", inspectCommand},
+ {"listen", listenCommand}, {"replay", replayCommand}, {"help", helpCommand}};
+
+void printGeneralHelp(std::string& toolName) {
+ std::cout << "USAGE: " << toolName << " <command> [<args>]\n\n";
+ std::cout << "COMMANDS:\n";
+ // Display overview this many characters from the start of a line.
+ // Subtract the length of the command name to calculate padding.
+ const size_t commandOverviewDisplayAlignment = 12;
+ for (const auto& command : commands) {
+ if (command.first == "help") {
+ continue;
+ }
+ std::cout << " " << command.first
+ << std::string(commandOverviewDisplayAlignment - command.first.length(), ' ')
+ << command.second.overview << "\n";
+ }
+ std::cout << "\n See '" << toolName << " help <command>' for detailed help.\n";
+}
+
+status_t helpCommandEntryPoint(int argc, char* argv[]) {
+ std::string toolName = argv[0];
+
+ if (argc < 2) {
+ printGeneralHelp(toolName);
+ return 0;
+ }
+
+ std::string commandName = argv[1];
+
+ if (commandName == "help") {
+ if (argc < 3) {
+ printGeneralHelp(toolName);
+ return 0;
+ }
+ commandName = argv[2];
+ } else {
+ commandName = argv[1];
+ }
+
+ auto command = commands.find(commandName);
+ if (command == commands.end()) {
+ std::cout << "Unrecognized command: " << commandName << "\n";
+ printGeneralHelp(toolName);
+ return -1;
+ }
+
+ std::cout << "OVERVIEW: " << command->second.overview << "\n\n";
+ std::cout << "USAGE: " << toolName << " " << commandName << " "
+ << command->second.compactArguments << "\n\n";
+ std::cout << "ARGUMENTS:\n" << command->second.helpDetail << "\n";
+
+ return 0;
+}
+
+} // namespace
+
+int main(int argc, char* argv[]) {
+ std::string toolName = argv[0];
+
+ auto& analyzers = Analyzer::getAnalyzers();
+ if (analyzers.size() >= 1) {
+ commands["list"] = listCommand;
+ }
+
+ if (argc < 2 ||
+ (argc >= 2 && ((strcmp(argv[1], "--help") == 0) || (strcmp(argv[1], "-h") == 0)))) {
+ // General help
+ printGeneralHelp(toolName);
+ return 0;
+ }
+
+ auto command = commands.find(argv[1]);
+ if (command == commands.end()) {
+ std::cout << "Unrecognized command: " << argv[1] << "\n";
+ printGeneralHelp(toolName);
+ return -1;
+ }
+
+ return command->second.command(argc, argv);
+}
diff --git a/analyzer/include/Analyzer.h b/analyzer/include/Analyzer.h
new file mode 100644
index 00000000..ba712b99
--- /dev/null
+++ b/analyzer/include/Analyzer.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include <binder/Parcel.h>
+#include <unordered_map>
+
+using std::unique_ptr;
+using std::unordered_map;
+
+using analyzeFn = android::status_t (*)(uint32_t _aidl_code, const android::Parcel& _aidl_data,
+ const android::Parcel& _aidl_reply);
+
+namespace android {
+namespace aidl {
+
+class Analyzer {
+ public:
+ Analyzer(const std::string& package, const std::string& interface, analyzeFn function);
+
+ const std::string& getPackageName() const;
+ const std::string& getInterfaceName() const;
+ const analyzeFn& getAnalyzeFunction() const;
+
+ static unordered_map<std::string, unique_ptr<Analyzer>>& getAnalyzers();
+ static void installAnalyzer(std::unique_ptr<Analyzer> install);
+
+ private:
+ std::string mPackageName;
+ std::string mInterfaceName;
+ analyzeFn mAnalyzeFunction;
+};
+
+} // namespace aidl
+} // namespace android
diff --git a/build/Android.bp b/build/Android.bp
index 5fe0892c..a24dd0c6 100644
--- a/build/Android.bp
+++ b/build/Android.bp
@@ -28,6 +28,7 @@ bootstrap_go_package {
"blueprint",
"soong",
"soong-android",
+ "soong-bp2build",
"soong-cc",
"soong-genrule",
"soong-phony",
@@ -40,14 +41,15 @@ bootstrap_go_package {
"aidl_api.go",
"aidl_gen_rule.go",
"aidl_interface_backends.go",
+ "aidl_interface_defaults.go",
"aidl_interface_headers.go",
"aidl_interface_metadata_singleton.go",
- "aidl_mapping.go",
"aidl_rust_source_provider.go",
"aidl_utils.go",
],
testSrcs: [
"aidl_test.go",
+ "aidl_interface_bp2build_test.go",
],
pluginFor: ["soong_build"],
}
@@ -93,6 +95,7 @@ aidl_interface {
name: "test-piece-1",
local_include_dir: "tests_1",
vendor_available: true,
+ product_available: true,
double_loadable: true,
host_supported: true,
flags: ["-Werror"],
@@ -107,6 +110,11 @@ aidl_interface {
"3",
"4",
],
+ backend: {
+ rust: {
+ enabled: true,
+ },
+ },
}
aidl_interface {
@@ -119,8 +127,17 @@ aidl_interface {
"tests_1/some_package/sub_package/*.aidl", // testing glob w/o filegroup
],
unstable: true,
- backend: { ndk: { sdk_version: "29", }, },
+ backend: {
+ rust: {
+ enabled: true,
+ },
+ ndk: {
+ sdk_version: "29",
+ cflags: ["-U__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__"],
+ },
+ },
}
+
aidl_interface {
name: "test-piece-ndk-sdk-30",
local_include_dir: "tests_1",
@@ -131,8 +148,17 @@ aidl_interface {
"tests_1/some_package/sub_package/*.aidl", // testing glob w/o filegroup
],
unstable: true,
- backend: { ndk: { sdk_version: "30", }, },
+ backend: {
+ rust: {
+ enabled: true,
+ },
+ ndk: {
+ sdk_version: "30",
+ cflags: ["-U__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__"],
+ },
+ },
}
+
aidl_interface {
name: "test-piece-ndk-sdk-31",
local_include_dir: "tests_1",
@@ -143,7 +169,82 @@ aidl_interface {
"tests_1/some_package/sub_package/*.aidl", // testing glob w/o filegroup
],
unstable: true,
- backend: { ndk: { sdk_version: "31", }, },
+ backend: {
+ rust: {
+ enabled: true,
+ },
+ ndk: {
+ sdk_version: "31",
+ cflags: ["-U__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__"],
+ },
+ },
+}
+
+aidl_interface {
+ name: "test-piece-ndk-sdk-32",
+ local_include_dir: "tests_1",
+ flags: ["-Werror"],
+ srcs: [
+ "tests_1/some_package/IFoo.aidl",
+ "tests_1/some_package/Thing.aidl",
+ "tests_1/some_package/sub_package/*.aidl", // testing glob w/o filegroup
+ ],
+ unstable: true,
+ backend: {
+ rust: {
+ enabled: true,
+ },
+ ndk: {
+ sdk_version: "32",
+ cflags: ["-U__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__"],
+ },
+ },
+}
+
+aidl_interface {
+ name: "test-piece-ndk-sdk-33",
+ local_include_dir: "tests_1",
+ flags: ["-Werror"],
+ srcs: [
+ "tests_1/some_package/IFoo.aidl",
+ "tests_1/some_package/Thing.aidl",
+ "tests_1/some_package/sub_package/*.aidl", // testing glob w/o filegroup
+ ],
+ unstable: true,
+ backend: {
+ rust: {
+ enabled: true,
+ },
+ ndk: {
+ sdk_version: "33",
+ cflags: ["-U__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__"],
+ },
+ },
+}
+
+aidl_interface {
+ name: "tests-vintf",
+ local_include_dir: "tests_vintf",
+ srcs: ["tests_vintf/vintf/IFoo.aidl"],
+ stability: "vintf",
+ backend: {
+ rust: {
+ enabled: true,
+ },
+ ndk: {
+ sdk_version: "31",
+ },
+ java: {
+ sdk_version: "system_current",
+ },
+ },
+ versions_with_info: [
+ {
+ version: "1",
+ imports: [],
+ },
+ ],
+
}
aidl_interface {
@@ -158,6 +259,9 @@ aidl_interface {
"test-piece-1-V3",
],
backend: {
+ rust: {
+ enabled: true,
+ },
java: {
platform_apis: true,
},
@@ -177,18 +281,40 @@ aidl_interface {
local_include_dir: "tests_1",
flags: ["-Werror"],
srcs: [
+ "tests_1/other_package/Enum.aidl",
"tests_1/other_package/IBaz.aidl",
],
imports: [
"test-piece-2-V1",
],
backend: {
+ rust: {
+ enabled: true,
+ },
java: {
platform_apis: true,
+ gen_trace: true,
},
},
gen_trace: true,
- versions: ["1"],
+ versions_with_info: [
+ {
+ version: "1",
+ imports: ["test-piece-2-V1"],
+ },
+ {
+ version: "2",
+ imports: ["test-piece-2-V1"],
+ },
+
+ ],
+ frozen: true,
+}
+
+cc_test_library {
+ name: "client-using-test-piece-3",
+ srcs: ["client-using-test-piece-3.cpp"],
+ shared_libs: ["test-piece-3-V2-cpp"],
}
aidl_interface {
@@ -202,6 +328,9 @@ aidl_interface {
"test-piece-1-V3",
],
backend: {
+ rust: {
+ enabled: true,
+ },
java: {
platform_apis: true,
},
@@ -223,6 +352,9 @@ aidl_interface {
"test-piece-2-V1",
],
backend: {
+ rust: {
+ enabled: true,
+ },
java: {
platform_apis: true,
},
diff --git a/build/aidl_api.go b/build/aidl_api.go
index fe821a6c..e6256d60 100644
--- a/build/aidl_api.go
+++ b/build/aidl_api.go
@@ -16,6 +16,7 @@ package aidl
import (
"android/soong/android"
+ "reflect"
"fmt"
"io"
@@ -58,6 +59,7 @@ type aidlApiProperties struct {
Headers []string
Versions []string
Dumpapi DumpApiProperties
+ Frozen *bool
}
type aidlApi struct {
@@ -90,6 +92,27 @@ func (m *aidlApi) nextVersion() string {
return nextVersion(m.properties.Versions)
}
+func (m *aidlApi) hasVersion() bool {
+ return len(m.properties.Versions) > 0
+}
+
+func (m *aidlApi) latestVersion() string {
+ if !m.hasVersion() {
+ return "0"
+ }
+ return m.properties.Versions[len(m.properties.Versions)-1]
+}
+
+func (m *aidlApi) isFrozen() bool {
+ return proptools.Bool(m.properties.Frozen)
+}
+
+// in order to keep original behavior for certain operations, we may want to
+// check if frozen is set.
+func (m *aidlApi) isExplicitlyUnFrozen() bool {
+ return m.properties.Frozen != nil && !proptools.Bool(m.properties.Frozen)
+}
+
type apiDump struct {
version string
dir android.Path
@@ -247,6 +270,11 @@ func (m *aidlApi) migrateAndAppendVersion(ctx android.ModuleContext, rb *android
}
}
rbc.Text("]}' ").
+ Text(android.PathForModuleSrc(ctx, "Android.bp").String()).
+ Text("&&").
+ BuiltTool("bpmodify").
+ Text("-w -m " + m.properties.BaseName).
+ Text("-parameter frozen -set-bool true").
Text(android.PathForModuleSrc(ctx, "Android.bp").String())
}, isFreezingApi)
} else {
@@ -254,7 +282,12 @@ func (m *aidlApi) migrateAndAppendVersion(ctx android.ModuleContext, rb *android
if hasVersionSuffix(im) {
imports = append(imports, im)
} else {
- imports = append(imports, im+"-V"+importIfaces[im].latestVersion())
+ versionSuffix := importIfaces[im].latestVersion()
+ if !importIfaces[im].hasVersion() ||
+ importIfaces[im].isExplicitlyUnFrozen() {
+ versionSuffix = importIfaces[im].nextVersion()
+ }
+ imports = append(imports, im+"-V"+versionSuffix)
}
}
importsStr := strings.Join(wrap(`"`, imports, `"`), ", ")
@@ -265,6 +298,11 @@ func (m *aidlApi) migrateAndAppendVersion(ctx android.ModuleContext, rb *android
rbc.BuiltTool("bpmodify").
Text("-w -m " + m.properties.BaseName).
Text("-parameter versions_with_info -add-literal '" + data + "' ").
+ Text(android.PathForModuleSrc(ctx, "Android.bp").String()).
+ Text("&&").
+ BuiltTool("bpmodify").
+ Text("-w -m " + m.properties.BaseName).
+ Text("-parameter frozen -set-bool true").
Text(android.PathForModuleSrc(ctx, "Android.bp").String())
}, isFreezingApi)
}
@@ -297,16 +335,22 @@ func (m *aidlApi) makeApiDumpAsVersion(ctx android.ModuleContext, dump apiDump,
m.migrateAndAppendVersion(ctx, rb, &version, transitive)
} else {
actionWord = "Updating"
+ if m.isFrozen() {
+ rb.Command().BuiltTool("bpmodify").
+ Text("-w -m " + m.properties.BaseName).
+ Text("-parameter frozen -set-bool false").
+ Text(android.PathForModuleSrc(ctx, "Android.bp").String())
+
+ }
// We are updating the current version. Don't copy .hash to the current dump
rb.Command().Text("mkdir -p " + targetDir)
- rb.Command().Text("rm -rf " + targetDir + "/*")
- rb.Command().Text("cp -rf " + dump.dir.String() + "/* " + targetDir).Implicits(dump.files)
-
+ rb.Command().Text("rsync --recursive --update --delete-before " + dump.dir.String() + "/* " + targetDir).Implicits(dump.files)
m.migrateAndAppendVersion(ctx, rb, nil, false)
}
- timestampFile := android.PathForModuleOut(ctx, "updateapi_"+version+".timestamp")
- rb.Command().Text("touch").Output(timestampFile)
+ timestampFile := android.PathForModuleOut(ctx, "update_or_freeze_api_"+version+".timestamp")
+ // explicitly don't touch timestamp, so that the command can be run repeatedly
+ rb.Command().Text("true").ImplicitOutput(timestampFile)
rb.Build("dump_aidl_api_"+m.properties.BaseName+"_"+version, actionWord+" AIDL API dump version "+version+" for "+m.properties.BaseName+" (see "+targetDir+")")
return timestampFile
@@ -341,6 +385,7 @@ func getDeps(ctx android.ModuleContext, versionedImports map[string]string) deps
// add imported module's checkapiTimestamps as implicits to make sure that imported apiDump is up-to-date
deps.implicits = append(deps.implicits, api.checkApiTimestamps.Paths()...)
deps.implicits = append(deps.implicits, api.checkHashTimestamps.Paths()...)
+ deps.implicits = append(deps.implicits, api.hasDevelopment)
case interfaceHeadersDepTag:
headerInfo, ok := ctx.OtherModuleProvider(dep, AidlInterfaceHeadersProvider).(AidlInterfaceHeadersInfo)
if !ok {
@@ -399,7 +444,12 @@ func (m *aidlApi) checkEquality(ctx android.ModuleContext, oldDump apiDump, newD
// In case when it is finalized, we should never allow updating the already frozen API.
// If it's not finalized, we let users to update the current version by invoking
// `m <name>-update-api`.
- messageFile := android.PathForSource(ctx, "system/tools/aidl/build/message_check_equality.txt")
+ var messageFile android.SourcePath
+ if m.isFrozen() {
+ messageFile = android.PathForSource(ctx, "system/tools/aidl/build/message_check_equality_frozen.txt")
+ } else {
+ messageFile = android.PathForSource(ctx, "system/tools/aidl/build/message_check_equality.txt")
+ }
sdkIsFinal := !ctx.Config().DefaultAppTargetSdk(ctx).IsPreview()
if sdkIsFinal {
messageFile = android.PathForSource(ctx, "system/tools/aidl/build/message_check_equality_release.txt")
@@ -435,24 +485,89 @@ func (m *aidlApi) checkIntegrity(ctx android.ModuleContext, dump apiDump) androi
return timestampFile
}
+// Get the `latest` versions of the imported AIDL interfaces. If an interface is frozen, this is the
+// last frozen version, if it is `frozen: false` this is the last frozen version + 1, if `frozen` is
+// not set this is the last frozen version because we don't know if there are changes or not to the
+// interface.
+// map["foo":"3", "bar":1]
+func (m *aidlApi) getLatestImportVersions(ctx android.ModuleContext) map[string]string {
+ var latest_versions = make(map[string]string)
+ ctx.VisitDirectDeps(func(dep android.Module) {
+ switch ctx.OtherModuleDependencyTag(dep).(type) {
+ case apiDepTag:
+ api := dep.(*aidlApi)
+ if len(api.properties.Versions) > 0 {
+ if api.properties.Frozen == nil || api.isFrozen() {
+ latest_versions[api.properties.BaseName] = api.latestVersion()
+ } else {
+ latest_versions[api.properties.BaseName] = api.nextVersion()
+ }
+ } else {
+ latest_versions[api.properties.BaseName] = "1"
+ }
+ }
+ })
+ return latest_versions
+}
+
func (m *aidlApi) checkForDevelopment(ctx android.ModuleContext, latestVersionDump *apiDump, totDump apiDump) android.WritablePath {
hasDevPath := android.PathForModuleOut(ctx, "has_development")
rb := android.NewRuleBuilder(pctx, ctx)
rb.Command().Text("rm -f " + hasDevPath.String())
if latestVersionDump != nil {
- hasDevCommand := rb.Command()
- hasDevCommand.BuiltTool("aidl").FlagWithArg("--checkapi=", "equal")
- if m.properties.Stability != nil {
- hasDevCommand.FlagWithArg("--stability ", *m.properties.Stability)
+ current_imports := m.getImports(ctx, currentVersion)
+ last_frozen_imports := m.getImports(ctx, m.properties.Versions[len(m.properties.Versions)-1])
+ var latest_versions = m.getLatestImportVersions(ctx)
+ // replace any "latest" version with the version number from latest_versions
+ for import_name, latest_version := range current_imports {
+ if latest_version == "latest" {
+ current_imports[import_name] = latest_versions[import_name]
+ }
+ }
+ for import_name, latest_version := range last_frozen_imports {
+ if latest_version == "latest" {
+ last_frozen_imports[import_name] = latest_versions[import_name]
+ }
+ }
+ different_imports := false
+ if !reflect.DeepEqual(current_imports, last_frozen_imports) {
+ if m.isFrozen() {
+ ctx.ModuleErrorf("This interface is 'frozen: true' but the imports have changed. Set 'frozen: false' to allow changes: \n Version %s imports: %s\n Version %s imports: %s\n",
+ currentVersion,
+ fmt.Sprint(current_imports),
+ m.properties.Versions[len(m.properties.Versions)-1],
+ fmt.Sprint(last_frozen_imports))
+ return hasDevPath
+ }
+ different_imports = true
}
// checkapi(latest, tot) should use imports for nextVersion(=tot)
- deps := getDeps(ctx, m.getImports(ctx, m.nextVersion()))
- hasDevCommand.
- FlagForEachArg("-I", deps.imports).Implicits(deps.implicits).
- FlagForEachInput("-p", deps.preprocessed).
- Text(latestVersionDump.dir.String()).Implicits(latestVersionDump.files).
- Text(totDump.dir.String()).Implicits(totDump.files).
- Text("2> /dev/null; echo $? >").Output(hasDevPath)
+ hasDevCommand := rb.Command()
+ if !different_imports {
+ hasDevCommand.BuiltTool("aidl").FlagWithArg("--checkapi=", "equal")
+ if m.properties.Stability != nil {
+ hasDevCommand.FlagWithArg("--stability ", *m.properties.Stability)
+ }
+ deps := getDeps(ctx, m.getImports(ctx, m.nextVersion()))
+ hasDevCommand.
+ FlagForEachArg("-I", deps.imports).Implicits(deps.implicits).
+ FlagForEachInput("-p", deps.preprocessed).
+ Text(latestVersionDump.dir.String()).Implicits(latestVersionDump.files).
+ Text(totDump.dir.String()).Implicits(totDump.files)
+ if m.isExplicitlyUnFrozen() {
+ // Throw an error if checkapi returns with no differences
+ msg := fmt.Sprintf("echo \"Interface %s can not be marked \\`frozen: false\\` if there are no changes "+
+ "between the current version and the last frozen version.\"", m.properties.BaseName)
+ hasDevCommand.
+ Text(fmt.Sprintf("2> /dev/null && %s && exit -1 || echo $? >", msg)).Output(hasDevPath)
+ } else {
+ hasDevCommand.
+ Text("2> /dev/null; echo $? >").Output(hasDevPath)
+ }
+ } else {
+ // We know there are different imports which means has_development must be true
+ hasDevCommand.Text("echo 1 >").Output(hasDevPath)
+ }
} else {
rb.Command().Text("echo 1 >").Output(hasDevPath)
}
@@ -483,8 +598,7 @@ func (m *aidlApi) GenerateAndroidBuildActions(ctx android.ModuleContext) {
rb := android.NewRuleBuilder(pctx, ctx)
ifaceName := m.properties.BaseName
rb.Command().Text(fmt.Sprintf(`echo "API dump for the current version of AIDL interface %s does not exist."`, ifaceName))
- rb.Command().Text(fmt.Sprintf(`echo Run "m %s-update-api", or add "unstable: true" to the build rule `+
- `for the interface if it does not need to be versioned`, ifaceName))
+ rb.Command().Text(fmt.Sprintf(`echo "Run the command \"m %s-update-api\" or add \"unstable: true\" to the build rule for the interface if it does not need to be versioned"`, ifaceName))
// This file will never be created. Otherwise, the build will pass simply by running 'm; m'.
alwaysChecked := android.PathForModuleOut(ctx, "checkapi_current.timestamp")
rb.Command().Text("false").ImplicitOutput(alwaysChecked)
@@ -509,7 +623,7 @@ func (m *aidlApi) GenerateAndroidBuildActions(ctx android.ModuleContext) {
if !dump.hashFile.Valid() {
// We should show the source path of hash_gen because aidl_hash_gen cannot be built due to build error.
cmd := fmt.Sprintf(`(croot && system/tools/aidl/build/hash_gen.sh %s %s %s)`, apiDir, versionForHashGen(ver), hashFilePath)
- ctx.ModuleErrorf("A frozen aidl_interface must have '.hash' file, but %s-V%s doesn't have it. Use the command below to generate hash.\n%s\n",
+ ctx.ModuleErrorf("A frozen aidl_interface must have '.hash' file, but %s-V%s doesn't have it. Use the command below to generate a hash (DANGER: this should not normally happen. If an interface is changed downstream, it may cause undefined behavior, test failures, unexplained weather conditions, or otherwise broad malfunction of society. DO NOT RUN THIS COMMAND TO BREAK APIS. DO NOT!).\n%s\n",
m.properties.BaseName, ver, cmd)
}
dumps = append(dumps, dump)
@@ -548,6 +662,11 @@ func (m *aidlApi) GenerateAndroidBuildActions(ctx android.ModuleContext) {
// API dump from source is frozen as the next stable version. Triggered by `m <name>-freeze-api`
nextVersion := m.nextVersion()
m.freezeApiTimestamp = m.makeApiDumpAsVersion(ctx, totApiDump, nextVersion, latestVersionDump)
+
+ nextApiDir := filepath.Join(ctx.ModuleDir(), m.apiDir(), nextVersion)
+ if android.ExistentPathForSource(ctx, nextApiDir).Valid() {
+ ctx.ModuleErrorf("API Directory exists for version %s path %s exists, but it is not specified in versions field.", nextVersion, nextApiDir)
+ }
}
func (m *aidlApi) AndroidMk() android.AndroidMkData {
@@ -576,7 +695,7 @@ func aidlApiFactory() android.Module {
return m
}
-func addApiModule(mctx android.LoadHookContext, i *aidlInterface) string {
+func addApiModule(mctx android.DefaultableHookContext, i *aidlInterface) string {
apiModule := i.ModuleBase.Name() + aidlApiSuffix
srcs, aidlRoot := i.srcsForVersion(mctx, i.nextVersion())
mctx.CreateModule(aidlApiFactory, &nameProperties{
@@ -590,6 +709,7 @@ func addApiModule(mctx android.LoadHookContext, i *aidlInterface) string {
Headers: i.properties.Headers,
Versions: i.getVersions(),
Dumpapi: i.properties.Dumpapi,
+ Frozen: i.properties.Frozen,
})
return apiModule
}
diff --git a/build/aidl_api/test-piece-3/2/.hash b/build/aidl_api/test-piece-3/2/.hash
new file mode 100644
index 00000000..c815cf28
--- /dev/null
+++ b/build/aidl_api/test-piece-3/2/.hash
@@ -0,0 +1 @@
+4be68328b234e427de4c612783612c3eda330235
diff --git a/build/aidl_api/test-piece-3/2/other_package/Enum.aidl b/build/aidl_api/test-piece-3/2/other_package/Enum.aidl
new file mode 100644
index 00000000..cbfbaf95
--- /dev/null
+++ b/build/aidl_api/test-piece-3/2/other_package/Enum.aidl
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package other_package;
+enum Enum {
+ ZERO,
+ ONE,
+}
diff --git a/build/aidl_api/test-piece-3/2/other_package/IBaz.aidl b/build/aidl_api/test-piece-3/2/other_package/IBaz.aidl
new file mode 100644
index 00000000..7cba2e4b
--- /dev/null
+++ b/build/aidl_api/test-piece-3/2/other_package/IBaz.aidl
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package other_package;
+interface IBaz {
+ void CanYouDealWithThisBar(in some_package.IBar bar);
+ const int ZERO = other_package.Enum.ZERO /* 0 */;
+}
diff --git a/build/aidl_api/test-piece-3/current/other_package/Enum.aidl b/build/aidl_api/test-piece-3/current/other_package/Enum.aidl
new file mode 100644
index 00000000..5862b2ca
--- /dev/null
+++ b/build/aidl_api/test-piece-3/current/other_package/Enum.aidl
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package other_package;
+enum Enum {
+ ZERO = 0,
+ ONE = 1,
+}
diff --git a/build/aidl_api/test-piece-3/current/other_package/IBaz.aidl b/build/aidl_api/test-piece-3/current/other_package/IBaz.aidl
index bc3d50c9..e64e56a8 100644
--- a/build/aidl_api/test-piece-3/current/other_package/IBaz.aidl
+++ b/build/aidl_api/test-piece-3/current/other_package/IBaz.aidl
@@ -34,4 +34,5 @@
package other_package;
interface IBaz {
void CanYouDealWithThisBar(in some_package.IBar bar);
+ const int ZERO = 0;
}
diff --git a/build/aidl_api/tests-vintf/1/.hash b/build/aidl_api/tests-vintf/1/.hash
new file mode 100644
index 00000000..f7e48ad4
--- /dev/null
+++ b/build/aidl_api/tests-vintf/1/.hash
@@ -0,0 +1 @@
+76be80502c7d4b9097cbed126e03a5a618c4cca3
diff --git a/build/aidl_api/tests-vintf/1/vintf/IFoo.aidl b/build/aidl_api/tests-vintf/1/vintf/IFoo.aidl
new file mode 100644
index 00000000..6661ebb7
--- /dev/null
+++ b/build/aidl_api/tests-vintf/1/vintf/IFoo.aidl
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package vintf;
+@VintfStability
+interface IFoo {
+ vintf.IFoo.Foo[] abar(in vintf.IFoo.Foo[] f);
+ ParcelFileDescriptor afd(in ParcelFileDescriptor fd);
+ vintf.IFoo.E ae(in vintf.IFoo.E e);
+ vintf.IFoo.A aa(in vintf.IFoo.A a);
+ parcelable Foo {
+ String a;
+ }
+ union A {
+ String a;
+ int b;
+ }
+ enum E {
+ A = 0,
+ B = 1,
+ C = 2,
+ }
+}
diff --git a/build/aidl_api/tests-vintf/current/vintf/IFoo.aidl b/build/aidl_api/tests-vintf/current/vintf/IFoo.aidl
new file mode 100644
index 00000000..6661ebb7
--- /dev/null
+++ b/build/aidl_api/tests-vintf/current/vintf/IFoo.aidl
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package vintf;
+@VintfStability
+interface IFoo {
+ vintf.IFoo.Foo[] abar(in vintf.IFoo.Foo[] f);
+ ParcelFileDescriptor afd(in ParcelFileDescriptor fd);
+ vintf.IFoo.E ae(in vintf.IFoo.E e);
+ vintf.IFoo.A aa(in vintf.IFoo.A a);
+ parcelable Foo {
+ String a;
+ }
+ union A {
+ String a;
+ int b;
+ }
+ enum E {
+ A = 0,
+ B = 1,
+ C = 2,
+ }
+}
diff --git a/build/aidl_gen_rule.go b/build/aidl_gen_rule.go
index 6a326d16..9e7c9505 100644
--- a/build/aidl_gen_rule.go
+++ b/build/aidl_gen_rule.go
@@ -63,23 +63,24 @@ var (
)
type aidlGenProperties struct {
- Srcs []string `android:"path"`
- AidlRoot string // base directory for the input aidl file
- Imports []string
- Headers []string
- Stability *string
- Min_sdk_version *string
- Platform_apis bool
- Lang string // target language [java|cpp|ndk|rust]
- BaseName string
- GenLog bool
- Version string
- GenRpc bool
- GenTrace bool
- Unstable *bool
- NotFrozen bool
- Visibility []string
- Flags []string
+ Srcs []string `android:"path"`
+ AidlRoot string // base directory for the input aidl file
+ Imports []string
+ Headers []string
+ Stability *string
+ Min_sdk_version *string
+ Platform_apis bool
+ Lang string // target language [java|cpp|ndk|rust]
+ BaseName string
+ GenLog bool
+ Version string
+ GenRpc bool
+ GenTrace bool
+ Unstable *bool
+ NotFrozen bool
+ RequireFrozenReason string
+ Visibility []string
+ Flags []string
}
type aidlGenRule struct {
@@ -171,8 +172,13 @@ func (g *aidlGenRule) generateBuildActionsForSingleAidl(ctx android.ModuleContex
implicits := g.implicitInputs
optionalFlags := append([]string{}, g.properties.Flags...)
- if g.properties.Version != "" {
- optionalFlags = append(optionalFlags, "--version "+g.properties.Version)
+ if proptools.Bool(g.properties.Unstable) != true {
+ // default version is 1 for any stable interface
+ version := "1"
+ if g.properties.Version != "" {
+ version = g.properties.Version
+ }
+ optionalFlags = append(optionalFlags, "--version "+version)
hash := "notfrozen"
if !strings.HasPrefix(baseDir, ctx.Config().SoongOutDir()) {
@@ -245,12 +251,11 @@ func (g *aidlGenRule) generateBuildActionsForSingleAidl(ctx android.ModuleContex
prefix = "aidl"
}
- headers = append(headers, g.genHeaderDir.Join(ctx, prefix, packagePath,
- typeName+".h"))
- headers = append(headers, g.genHeaderDir.Join(ctx, prefix, packagePath,
- "Bp"+baseName+".h"))
- headers = append(headers, g.genHeaderDir.Join(ctx, prefix, packagePath,
- "Bn"+baseName+".h"))
+ if g.properties.Lang != langCppAnalyzer {
+ headers = append(headers, g.genHeaderDir.Join(ctx, prefix, packagePath, typeName+".h"))
+ headers = append(headers, g.genHeaderDir.Join(ctx, prefix, packagePath, "Bp"+baseName+".h"))
+ headers = append(headers, g.genHeaderDir.Join(ctx, prefix, packagePath, "Bn"+baseName+".h"))
+ }
if g.properties.GenLog {
optionalFlags = append(optionalFlags, "--log")
diff --git a/build/aidl_interface.go b/build/aidl_interface.go
index e853c243..0330ed1e 100644
--- a/build/aidl_interface.go
+++ b/build/aidl_interface.go
@@ -16,6 +16,7 @@ package aidl
import (
"android/soong/android"
+ "android/soong/bazel"
"android/soong/cc"
"android/soong/java"
"android/soong/phony"
@@ -41,6 +42,7 @@ const (
langJava = "java"
langNdk = "ndk"
langRust = "rust"
+ langCppAnalyzer = "cpp-analyzer"
// TODO(b/161456198) remove the NDK platform backend as the 'platform' variant of the NDK
// backend serves the same purpose.
langNdkPlatform = "ndk_platform"
@@ -48,9 +50,7 @@ const (
currentVersion = "current"
)
-var (
- pctx = android.NewPackageContext("android/aidl")
-)
+var pctx = android.NewPackageContext("android/aidl")
func init() {
pctx.Import("android/soong/android")
@@ -58,7 +58,7 @@ func init() {
pctx.HostBinToolVariable("aidlHashGen", "aidl_hash_gen")
pctx.SourcePathVariable("aidlToJniCmd", "system/tools/aidl/build/aidl_to_jni.py")
pctx.SourcePathVariable("aidlRustGlueCmd", "system/tools/aidl/build/aidl_rust_glue.py")
- android.RegisterModuleType("aidl_interface", aidlInterfaceFactory)
+ android.RegisterModuleType("aidl_interface", AidlInterfaceFactory)
android.PreArchMutators(registerPreArchMutators)
android.PreArchBp2BuildMutators(registerPreArchMutators)
android.PostDepsMutators(registerPostDepsMutators)
@@ -102,22 +102,24 @@ func isAidlGeneratedModule(module android.Module) bool {
return false
}
-// AildVersionInfo keeps the *-source module for each (aidl_interface & lang) and the list of
+// AidlVersionInfo keeps the *-source module for each (aidl_interface & lang) and the list of
// not-frozen versions (which shouldn't be used by other modules)
-type AildVersionInfo struct {
- notFrozen []string
- sourceMap map[string]string
+type AidlVersionInfo struct {
+ notFrozen []string
+ requireFrozenReasons []string
+ sourceMap map[string]string
}
-var AidlVersionInfoProvider = blueprint.NewMutatorProvider(AildVersionInfo{}, "checkAidlGeneratedModules")
+var AidlVersionInfoProvider = blueprint.NewMutatorProvider(AidlVersionInfo{}, "checkAidlGeneratedModules")
// Merges `other` version info into this one.
// Returns the pair of mismatching versions when there's conflict. Otherwise returns nil.
// For example, when a module depends on 'foo-V2-ndk', the map contains an entry of (foo, foo-V2-ndk-source).
// Merging (foo, foo-V1-ndk-source) and (foo, foo-V2-ndk-source) will fail and returns
// {foo-V1-ndk-source, foo-V2-ndk-source}.
-func (info *AildVersionInfo) merge(other AildVersionInfo) []string {
+func (info *AidlVersionInfo) merge(other AidlVersionInfo) []string {
info.notFrozen = append(info.notFrozen, other.notFrozen...)
+ info.requireFrozenReasons = append(info.requireFrozenReasons, other.requireFrozenReasons...)
if other.sourceMap == nil {
return nil
@@ -137,15 +139,15 @@ func (info *AildVersionInfo) merge(other AildVersionInfo) []string {
return nil
}
-func reportUsingNotFrozenError(ctx android.BaseModuleContext, notFrozen []string) {
+func reportUsingNotFrozenError(ctx android.BaseModuleContext, notFrozen []string, requireFrozenReason []string) {
// TODO(b/154066686): Replace it with a common method instead of listing up module types.
// Test libraries are exempted.
if android.InList(ctx.ModuleType(), []string{"cc_test_library", "android_test", "cc_benchmark", "cc_test"}) {
return
}
- for _, name := range notFrozen {
- ctx.ModuleErrorf("%v is disallowed in release version because it is unstable, and its \"owner\" property is missing.",
- name)
+ for i, name := range notFrozen {
+ reason := requireFrozenReason[i]
+ ctx.ModuleErrorf("%v is an unfrozen development version, and it can't be used because %q", name, reason)
}
}
@@ -172,29 +174,32 @@ func checkAidlGeneratedModules(mctx android.BottomUpMutatorContext) {
}
if gen, ok := mctx.Module().(*aidlGenRule); ok {
var notFrozen []string
+ var requireFrozenReasons []string
if gen.properties.NotFrozen {
notFrozen = []string{strings.TrimSuffix(mctx.ModuleName(), "-source")}
+ requireFrozenReasons = []string{gen.properties.RequireFrozenReason}
}
- mctx.SetProvider(AidlVersionInfoProvider, AildVersionInfo{
- notFrozen: notFrozen,
+ mctx.SetProvider(AidlVersionInfoProvider, AidlVersionInfo{
+ notFrozen: notFrozen,
+ requireFrozenReasons: requireFrozenReasons,
sourceMap: map[string]string{
gen.properties.BaseName + "-" + gen.properties.Lang: gen.Name(),
},
})
return
}
- // Collect/merge AildVersionInfos from direct dependencies
- var info AildVersionInfo
+ // Collect/merge AidlVersionInfos from direct dependencies
+ var info AidlVersionInfo
mctx.VisitDirectDeps(func(dep android.Module) {
if mctx.OtherModuleHasProvider(dep, AidlVersionInfoProvider) {
- otherInfo := mctx.OtherModuleProvider(dep, AidlVersionInfoProvider).(AildVersionInfo)
+ otherInfo := mctx.OtherModuleProvider(dep, AidlVersionInfoProvider).(AidlVersionInfo)
if violators := info.merge(otherInfo); violators != nil {
reportMultipleVersionError(mctx, violators)
}
}
})
if !isAidlGeneratedModule(mctx.Module()) && len(info.notFrozen) > 0 {
- reportUsingNotFrozenError(mctx, info.notFrozen)
+ reportUsingNotFrozenError(mctx, info.notFrozen, info.requireFrozenReasons)
}
if mctx.Failed() {
return
@@ -244,7 +249,9 @@ func isRelativePath(path string) bool {
type CommonBackendProperties struct {
// Whether to generate code in the corresponding backend.
- // Default: true
+ // Default:
+ // - for Java/NDK/CPP backends - True
+ // - for Rust backend - False
Enabled *bool
Apex_available []string
@@ -252,10 +259,22 @@ type CommonBackendProperties struct {
// For native modules, the property needs to be set when a module is a part of mainline modules(APEX).
// Forwarded to generated java/native module.
Min_sdk_version *string
+
+ // Whether tracing should be added to the interface.
+ Gen_trace *bool
}
type CommonNativeBackendProperties struct {
CommonBackendProperties
+
+ // Must be NDK libraries, for stable types.
+ Additional_shared_libraries []string
+
+ // cflags to forward to native compilation. This is expected to be
+ // used more for AIDL compiler developers than being actually
+ // practical.
+ Cflags []string
+
// Whether to generate additional code for gathering information
// about the transactions.
// Default: false
@@ -327,6 +346,12 @@ type aidlInterfaceProperties struct {
// interface must be kept stable as long as it is used.
Stability *string
+ // If true, this interface is frozen and does not have any changes since the last
+ // frozen version.
+ // If false, there are changes to this interface between the last frozen version (N) and
+ // the current version (N + 1).
+ Frozen *bool
+
// Deprecated: Use `versions_with_info` instead. Don't use `versions` property directly.
Versions []string
@@ -414,6 +439,8 @@ type aidlInterfaceProperties struct {
type aidlInterface struct {
android.ModuleBase
+ android.BazelModuleBase
+ android.DefaultableModuleBase
properties aidlInterfaceProperties
@@ -479,6 +506,38 @@ func (i *aidlInterface) minSdkVersion(lang string) *string {
return ver
}
+func (i *aidlInterface) genTrace(lang string) bool {
+ var ver *bool
+ switch lang {
+ case langCpp:
+ ver = i.properties.Backend.Cpp.Gen_trace
+ if ver == nil {
+ // Enable tracing for all cpp backends by default
+ ver = proptools.BoolPtr(true)
+ }
+ case langJava:
+ ver = i.properties.Backend.Java.Gen_trace
+ if ver == nil && proptools.Bool(i.properties.Backend.Java.Platform_apis) {
+ // Enable tracing for all Java backends using platform APIs
+ // TODO(161393989) Once we generate ATRACE_TAG_APP instead of ATRACE_TAG_AIDL,
+ // this can be removed and we can start generating traces in all apps.
+ ver = proptools.BoolPtr(true)
+ }
+ case langNdk, langNdkPlatform:
+ ver = i.properties.Backend.Ndk.Gen_trace
+ case langRust: // unsupported b/236880829
+ ver = i.properties.Backend.Rust.Gen_trace
+ case langCppAnalyzer:
+ *ver = false
+ default:
+ panic(fmt.Errorf("unsupported language backend %q\n", lang))
+ }
+ if ver == nil {
+ ver = i.properties.Gen_trace
+ }
+ return proptools.Bool(ver)
+}
+
// Dep to *-api module(aidlApi)
type apiDepTag struct {
blueprint.BaseDependencyTag
@@ -519,9 +578,12 @@ func addImportedInterfaceDeps(ctx android.BottomUpMutatorContext, imports []stri
// Run custom "Deps" mutator between AIDL modules created at LoadHook stage.
// We can't use the "DepsMutator" for these dependencies because
// - We need to create library modules (cc/java/...) before "arch" mutator. Note that cc_library
-// should be mutated by os/image/arch mutators as well.
+//
+// should be mutated by os/image/arch mutators as well.
+//
// - When creating library modules, we need to access the original interface and its imported
-// interfaces to determine which version to use. See aidlInterface.getImportWithVersion.
+//
+// interfaces to determine which version to use. See aidlInterface.getImportWithVersion.
func addInterfaceDeps(mctx android.BottomUpMutatorContext) {
switch i := mctx.Module().(type) {
case *aidlInterface:
@@ -594,8 +656,17 @@ func checkImports(mctx android.BottomUpMutatorContext) {
anImport := other.ModuleBase.Name()
anImportWithVersion := tag.anImport
_, version := parseModuleWithVersion(tag.anImport)
- if version != "" {
- candidateVersions := concat(other.getVersions(), []string{other.nextVersion()})
+
+ candidateVersions := other.getVersions()
+ if !proptools.Bool(other.properties.Frozen) {
+ candidateVersions = concat(candidateVersions, []string{other.nextVersion()})
+ }
+
+ if version == "" {
+ if !proptools.Bool(other.properties.Unstable) {
+ mctx.PropertyErrorf("imports", "%q depends on %q but does not specify a version (must be one of %q)", i.ModuleBase.Name(), anImport, candidateVersions)
+ }
+ } else {
if !android.InList(version, candidateVersions) {
mctx.PropertyErrorf("imports", "%q depends on %q version %q(%q), which doesn't exist. The version must be one of %q", i.ModuleBase.Name(), anImport, version, anImportWithVersion, candidateVersions)
}
@@ -619,11 +690,22 @@ func checkImports(mctx android.BottomUpMutatorContext) {
mctx.PropertyErrorf("backend.rust.enabled",
"Rust backend not enabled in the imported AIDL interface %q", anImport)
}
+
+ if i.isFrozen() && other.isExplicitlyUnFrozen() && version == "" {
+ mctx.PropertyErrorf("frozen",
+ "%q imports %q which is not frozen. Either %q must set 'frozen: false' or must explicitly import %q where * is one of %q",
+ i.ModuleBase.Name(), anImport, i.ModuleBase.Name(), anImport+"-V*", candidateVersions)
+ }
+ if i.Owner() == "" && other.Owner() != "" {
+ mctx.PropertyErrorf("imports",
+ "%q imports %q which is an interface owned by %q. This is not allowed because the owned interface will not be frozen at the same time.",
+ i.ModuleBase.Name(), anImport, other.Owner())
+ }
})
}
}
-func (i *aidlInterface) checkGenTrace(mctx android.LoadHookContext) {
+func (i *aidlInterface) checkGenTrace(mctx android.DefaultableHookContext) {
if !proptools.Bool(i.properties.Gen_trace) {
return
}
@@ -632,7 +714,7 @@ func (i *aidlInterface) checkGenTrace(mctx android.LoadHookContext) {
}
}
-func (i *aidlInterface) checkStability(mctx android.LoadHookContext) {
+func (i *aidlInterface) checkStability(mctx android.DefaultableHookContext) {
if i.properties.Stability == nil {
return
}
@@ -648,7 +730,7 @@ func (i *aidlInterface) checkStability(mctx android.LoadHookContext) {
mctx.PropertyErrorf("stability", "must be empty or \"vintf\"")
}
}
-func (i *aidlInterface) checkVersions(mctx android.LoadHookContext) {
+func (i *aidlInterface) checkVersions(mctx android.DefaultableHookContext) {
if len(i.properties.Versions) > 0 && len(i.properties.Versions_with_info) > 0 {
mctx.ModuleErrorf("versions:%q and versions_with_info:%q cannot be used at the same time. Use versions_with_info instead of versions.", i.properties.Versions, i.properties.Versions_with_info)
}
@@ -693,14 +775,10 @@ func (i *aidlInterface) checkVersions(mctx android.LoadHookContext) {
mctx.PropertyErrorf("versions", "should be sorted, but is %v", i.getVersions())
}
}
-func (i *aidlInterface) checkVndkUseVersion(mctx android.LoadHookContext) {
+func (i *aidlInterface) checkVndkUseVersion(mctx android.DefaultableHookContext) {
if i.properties.Vndk_use_version == nil {
return
}
- if !i.hasVersion() {
- mctx.PropertyErrorf("vndk_use_version", "This does not make sense when no 'versions' are specified.")
-
- }
if *i.properties.Vndk_use_version == i.nextVersion() {
return
}
@@ -746,6 +824,16 @@ func (i *aidlInterface) getVersions() []string {
return i.properties.VersionsInternal
}
+func (i *aidlInterface) isFrozen() bool {
+ return proptools.Bool(i.properties.Frozen)
+}
+
+// in order to keep original behavior for certain operations, we may want to
+// check if frozen is set.
+func (i *aidlInterface) isExplicitlyUnFrozen() bool {
+ return i.properties.Frozen != nil && !proptools.Bool(i.properties.Frozen)
+}
+
func hasVersionSuffix(moduleName string) bool {
hasVersionSuffix, _ := regexp.MatchString("-V\\d+$", moduleName)
return hasVersionSuffix
@@ -769,7 +857,35 @@ func trimVersionSuffixInList(moduleNames []string) []string {
})
}
-func aidlInterfaceHook(mctx android.LoadHookContext, i *aidlInterface) {
+func (i *aidlInterface) checkRequireFrozenAndReason(mctx android.EarlyModuleContext) (bool, string) {
+ if proptools.Bool(i.properties.Unstable) {
+ return false, "it's an unstable interface"
+ }
+
+ if proptools.Bool(i.properties.Frozen) {
+ return true, "it's explicitly marked as `frozen: true`"
+ }
+
+ if i.Owner() == "" {
+ if !mctx.Config().DefaultAppTargetSdk(mctx).IsPreview() {
+ return true, "this is a release branch - freeze it or set 'owners:'"
+ } else if mctx.Config().IsEnvTrue("AIDL_FROZEN_REL") {
+ return true, "this is a release branch (simulated by setting AIDL_FROZEN_REL) - freeze it or set 'owners:'"
+ }
+ } else {
+ // has an OWNER
+ // REL branches don't enforce downstream interfaces or owned interfaces
+ // to be frozen. Instead, these interfaces are verified by other tests
+ // like vts_treble_vintf_vendor_test
+ if android.InList(i.Owner(), strings.Fields(mctx.Config().Getenv("AIDL_FROZEN_OWNERS"))) {
+ return true, "the owner field is in environment variable AIDL_FROZEN_OWNERS"
+ }
+ }
+
+ return false, "by default, we don't require the interface to be frozen"
+}
+
+func aidlInterfaceHook(mctx android.DefaultableHookContext, i *aidlInterface) {
if hasVersionSuffix(i.ModuleBase.Name()) {
mctx.PropertyErrorf("name", "aidl_interface should not have '-V<number> suffix")
}
@@ -801,22 +917,35 @@ func aidlInterfaceHook(mctx android.LoadHookContext, i *aidlInterface) {
}
}
- sdkIsFinal := !mctx.Config().DefaultAppTargetSdk(mctx).IsPreview()
- requireFrozenNoOwner := i.Owner() == "" && (sdkIsFinal || mctx.Config().IsEnvTrue("AIDL_FROZEN_REL"))
- requireFrozenWithOwner := i.Owner() != "" && android.InList(i.Owner(), strings.Fields(mctx.Config().Getenv("AIDL_FROZEN_OWNERS")))
- requireFrozenByOwner := requireFrozenNoOwner || requireFrozenWithOwner
+ if i.isFrozen() {
+ if !i.hasVersion() {
+ mctx.PropertyErrorf("frozen", "cannot be frozen without versions")
+ return
+ }
+ }
+
+ if !unstable && mctx.Namespace().Path != "." && i.Owner() == "" {
+ mctx.PropertyErrorf("owner", "aidl_interface in a soong_namespace must have the 'owner' property set.")
+ }
- // Two different types of 'unstable' here
- // - 'unstable: true' meaning the module is never stable
- // - current unfrozen ToT version
- //
- // OEM branches may remove 'i.Owner()' here to apply the check to all interfaces, in
- // addition to core platform interfaces. Otherwise, we rely on vts_treble_vintf_vendor_test.
- requireFrozenVersion := !unstable && requireFrozenByOwner
+ requireFrozenVersion, requireFrozenReason := i.checkRequireFrozenAndReason(mctx)
// surface error early, main check is via checkUnstableModuleMutator
if requireFrozenVersion && !i.hasVersion() {
- mctx.PropertyErrorf("versions", "must be set (need to be frozen) when \"unstable\" is false, PLATFORM_VERSION_CODENAME is REL, and \"owner\" property is missing.")
+ mctx.PropertyErrorf("versions", "must be set (need to be frozen) because: %q", requireFrozenReason)
+ }
+
+ vndkEnabled := proptools.Bool(i.properties.VndkProperties.Vndk.Enabled) ||
+ proptools.Bool(i.properties.Backend.Cpp.CommonNativeBackendProperties.VndkProperties.Vndk.Enabled) ||
+ proptools.Bool(i.properties.Backend.Ndk.CommonNativeBackendProperties.VndkProperties.Vndk.Enabled)
+
+ if vndkEnabled && !proptools.Bool(i.properties.Unstable) {
+ if i.properties.Frozen == nil {
+ mctx.PropertyErrorf("frozen", "true or false must be specified when the VNDK is enabled on a versioned interface (not `unstable: true`)")
+ }
+ if !proptools.Bool(i.properties.Frozen) && i.properties.Vndk_use_version == nil {
+ mctx.PropertyErrorf("vndk_use_version", "must be specified if interface is unfrozen (or specify 'frozen: false')")
+ }
}
versions := i.getVersions()
@@ -837,12 +966,18 @@ func aidlInterfaceHook(mctx android.LoadHookContext, i *aidlInterface) {
if !shouldGenerate {
continue
}
- libs = append(libs, addLibrary(mctx, i, nextVersion, lang, requireFrozenVersion))
+ libs = append(libs, addLibrary(mctx, i, nextVersion, lang, requireFrozenVersion, requireFrozenReason))
for _, version := range versions {
- libs = append(libs, addLibrary(mctx, i, version, lang, false))
+ libs = append(libs, addLibrary(mctx, i, version, lang, false, "this is a known frozen version"))
}
}
+ // In the future, we may want to force the -cpp backend to be on host,
+ // and limit its visibility, even if it's not created normally
+ if i.shouldGenerateCppBackend() && len(i.properties.Imports) == 0 {
+ libs = append(libs, addLibrary(mctx, i, nextVersion, langCppAnalyzer, false, "analysis always uses latest version even if frozen"))
+ }
+
if unstable {
apiDirRoot := filepath.Join(aidlApiDir, i.ModuleBase.Name())
aidlDumps, _ := mctx.GlobWithDeps(filepath.Join(mctx.ModuleDir(), apiDirRoot, "**/*.aidl"), nil)
@@ -854,12 +989,6 @@ func aidlInterfaceHook(mctx android.LoadHookContext, i *aidlInterface) {
addApiModule(mctx, i)
}
- if proptools.Bool(i.properties.VndkProperties.Vndk.Enabled) {
- if "vintf" != proptools.String(i.properties.Stability) {
- mctx.PropertyErrorf("stability", "must be \"vintf\" if the module is for VNDK.")
- }
- }
-
// Reserve this module name for future use
mctx.CreateModule(phony.PhonyFactory, &phonyProperties{
Name: proptools.StringPtr(i.ModuleBase.Name()),
@@ -980,10 +1109,216 @@ func (i *aidlInterface) DepsMutator(ctx android.BottomUpMutatorContext) {
ctx.AddReverseDependency(ctx.Module(), nil, aidlMetadataSingletonName)
}
-func aidlInterfaceFactory() android.Module {
+func AidlInterfaceFactory() android.Module {
i := &aidlInterface{}
i.AddProperties(&i.properties)
android.InitAndroidModule(i)
- android.AddLoadHook(i, func(ctx android.LoadHookContext) { aidlInterfaceHook(ctx, i) })
+ android.InitBazelModule(i)
+ android.InitDefaultableModule(i)
+ i.SetDefaultableHook(func(ctx android.DefaultableHookContext) { aidlInterfaceHook(ctx, i) })
return i
}
+
+type aidlInterfaceAttributes struct {
+ aidlLibraryAttributes
+ Stability *string
+ Versions_with_info []versionWithInfoAttribute
+ Java_config *javaConfigAttributes
+ Cpp_config *cppConfigAttributes
+ Ndk_config *ndkConfigAttributes
+ // Backend_Configs backendConfigAttributes
+ Unstable *bool
+ Frozen *bool
+}
+
+type javaConfigAttributes struct {
+ commonBackendAttributes
+}
+type cppConfigAttributes struct {
+ commonNativeBackendAttributes
+}
+type ndkConfigAttributes struct {
+ commonNativeBackendAttributes
+}
+
+type commonBackendAttributes struct {
+ Enabled bool
+ Min_sdk_version *string
+ Tags []string
+}
+
+type commonNativeBackendAttributes struct {
+ commonBackendAttributes
+}
+
+type versionWithInfoAttribute struct {
+ Version string
+ // Versions_with_info.Deps in Bazel is analogous to Versions_with_info.Imports in Soong.
+ // Deps is chosen to be consistent with other Bazel rules/macros for AIDL
+ Deps bazel.LabelListAttribute
+}
+
+type aidlLibraryAttributes struct {
+ Srcs bazel.LabelListAttribute
+ Hdrs bazel.LabelListAttribute
+ Deps bazel.LabelListAttribute
+ Strip_import_prefix *string
+ Flags []string
+}
+
+// getBazelLabelListForImports returns a bazel label list converted from
+// aidl_interface.imports or aidl_interface.versions_with_info.imports prop
+func getBazelLabelListForImports(ctx android.BazelConversionPathContext, imports []string) bazel.LabelList {
+ type nameAndVersion struct {
+ name string
+ version string
+ }
+ // An aidl_interface with a version designation doesn't correspond to a specific
+ // module, but rather just imforms Soong on which collection of sources to provide
+ // from a particular interface module.
+ // However in Bazel, we will be creating an aidl_library for each version, so we can
+ // depend directly on a "versioned" module. But, we must look up the "unversioned"
+ // module name in BazelLabelForModuleDeps and then re-attach the version information.
+ namesAndVersions := make([]nameAndVersion, len(imports))
+ names := make([]string, len(imports))
+ for i, dep := range imports {
+ // Split dep into two parts
+ name, version := parseModuleWithVersion(dep)
+ if version == "" {
+ version = "-latest"
+ } else {
+ version = "-V" + version
+ }
+ namesAndVersions[i] = nameAndVersion{
+ name: name,
+ version: version,
+ }
+ names[i] = name
+ }
+ // Look up bazel label by name without version
+ bazelLabels := android.BazelLabelForModuleDeps(ctx, names)
+ for i := range bazelLabels.Includes {
+ // Re-attach the version to the name
+ bazelLabels.Includes[i].Label = bazelLabels.Includes[i].Label + namesAndVersions[i].version
+ }
+ return bazelLabels
+}
+
+func (i *aidlInterface) ConvertWithBp2build(ctx android.TopDownMutatorContext) {
+ var javaConfig *javaConfigAttributes
+ var cppConfig *cppConfigAttributes
+ var ndkConfig *ndkConfigAttributes
+ if i.shouldGenerateJavaBackend() {
+ javaConfig = &javaConfigAttributes{}
+ javaConfig.Enabled = true
+ javaConfig.Min_sdk_version = i.minSdkVersion(langJava)
+ javaConfig.Tags = android.ConvertApexAvailableToTagsWithoutTestApexes(ctx, i.properties.Backend.Java.Apex_available)
+ }
+ if i.shouldGenerateCppBackend() {
+ cppConfig = &cppConfigAttributes{}
+ cppConfig.Enabled = true
+ cppConfig.Min_sdk_version = i.minSdkVersion(langCpp)
+ cppConfig.Tags = android.ConvertApexAvailableToTagsWithoutTestApexes(ctx, i.properties.Backend.Cpp.Apex_available)
+ }
+ if i.shouldGenerateNdkBackend() {
+ ndkConfig = &ndkConfigAttributes{}
+ ndkConfig.Enabled = true
+ ndkConfig.Min_sdk_version = i.minSdkVersion(langNdk)
+ ndkConfig.Tags = android.ConvertApexAvailableToTagsWithoutTestApexes(ctx, i.properties.Backend.Ndk.Apex_available)
+ }
+
+ imports := getBazelLabelListForImports(ctx, i.properties.Imports)
+
+ var versionsWithInfos []versionWithInfoAttribute
+
+ if len(i.properties.Versions_with_info) > 0 {
+ for _, versionWithInfo := range i.properties.Versions_with_info {
+ versionedImports := getBazelLabelListForImports(ctx, versionWithInfo.Imports)
+ if !versionedImports.IsEmpty() {
+ versionsWithInfos = append(
+ versionsWithInfos,
+ versionWithInfoAttribute{
+ Version: versionWithInfo.Version,
+ Deps: bazel.MakeLabelListAttribute(versionedImports),
+ },
+ )
+ } else {
+ versionsWithInfos = append(
+ versionsWithInfos,
+ versionWithInfoAttribute{
+ Version: versionWithInfo.Version,
+ },
+ )
+ }
+ }
+ } else if len(i.properties.Versions) > 0 {
+ for _, version := range i.properties.Versions {
+ if !imports.IsEmpty() {
+ versionsWithInfos = append(
+ versionsWithInfos,
+ versionWithInfoAttribute{
+ Version: version,
+ Deps: bazel.MakeLabelListAttribute(imports),
+ },
+ )
+ } else {
+ versionsWithInfos = append(
+ versionsWithInfos,
+ versionWithInfoAttribute{
+ Version: version,
+ },
+ )
+ }
+ }
+ }
+
+ var deps bazel.LabelListAttribute
+
+ if len(i.properties.Srcs) > 0 && !imports.IsEmpty() {
+ // imports is only needed for (non-frozen) srcs
+ // frozen verions use imports in versions_with_info
+ deps = bazel.MakeLabelListAttribute(imports)
+ }
+
+ deps.Append(
+ bazel.MakeLabelListAttribute(
+ android.BazelLabelForModuleDeps(
+ ctx,
+ i.properties.Headers,
+ ),
+ ),
+ )
+
+ srcsAttr := bazel.MakeLabelListAttribute(android.BazelLabelForModuleSrc(ctx, i.properties.Srcs))
+ var stripImportPrefixAttr *string = nil
+ if i.properties.Local_include_dir != "" && !srcsAttr.IsEmpty() {
+ stripImportPrefixAttr = &i.properties.Local_include_dir
+ }
+
+ attrs := &aidlInterfaceAttributes{
+ aidlLibraryAttributes: aidlLibraryAttributes{
+ Srcs: srcsAttr,
+ Flags: i.properties.Flags,
+ Deps: deps,
+ Strip_import_prefix: stripImportPrefixAttr,
+ },
+ Stability: i.properties.Stability,
+ Versions_with_info: versionsWithInfos,
+ Java_config: javaConfig,
+ Cpp_config: cppConfig,
+ Ndk_config: ndkConfig,
+ Unstable: i.properties.Unstable,
+ Frozen: i.properties.Frozen,
+ }
+
+ interfaceName := strings.TrimSuffix(i.Name(), "_interface")
+
+ ctx.CreateBazelTargetModule(
+ bazel.BazelTargetModuleProperties{
+ Rule_class: "aidl_interface",
+ Bzl_load_location: "//build/bazel/rules/aidl:aidl_interface.bzl",
+ },
+ android.CommonAttributes{Name: interfaceName},
+ attrs,
+ )
+}
diff --git a/build/aidl_interface_backends.go b/build/aidl_interface_backends.go
index 54948ce1..de3b14a2 100644
--- a/build/aidl_interface_backends.go
+++ b/build/aidl_interface_backends.go
@@ -20,22 +20,28 @@ import (
"android/soong/java"
"android/soong/rust"
+ "fmt"
"path/filepath"
"strings"
"github.com/google/blueprint/proptools"
)
-func addLibrary(mctx android.LoadHookContext, i *aidlInterface, version string, lang string, notFrozen bool) string {
+func addLibrary(mctx android.DefaultableHookContext, i *aidlInterface, version string, lang string, notFrozen bool, requireFrozenReason string) string {
if lang == langJava {
- return addJavaLibrary(mctx, i, version, notFrozen)
+ return addJavaLibrary(mctx, i, version, notFrozen, requireFrozenReason)
} else if lang == langRust {
- return addRustLibrary(mctx, i, version, notFrozen)
+ return addRustLibrary(mctx, i, version, notFrozen, requireFrozenReason)
+ } else if lang == langCppAnalyzer {
+ return addCppAnalyzerLibrary(mctx, i, version, notFrozen, requireFrozenReason)
+ } else if lang == langCpp || lang == langNdk || lang == langNdkPlatform {
+ return addCppLibrary(mctx, i, version, lang, notFrozen, requireFrozenReason)
+ } else {
+ panic(fmt.Errorf("unsupported language backend %q\n", lang))
}
- return addCppLibrary(mctx, i, version, lang, notFrozen)
}
-func addCppLibrary(mctx android.LoadHookContext, i *aidlInterface, version string, lang string, notFrozen bool) string {
+func addCppLibrary(mctx android.DefaultableHookContext, i *aidlInterface, version string, lang string, notFrozen bool, requireFrozenReason string) string {
cppSourceGen := i.versionedName(version) + "-" + lang + "-source"
cppModuleGen := i.versionedName(version) + "-" + lang
@@ -68,35 +74,36 @@ func addCppLibrary(mctx android.LoadHookContext, i *aidlInterface, version strin
}
genLog := proptools.Bool(commonProperties.Gen_log)
- genTrace := proptools.Bool(i.properties.Gen_trace)
+ genTrace := i.genTrace(lang)
mctx.CreateModule(aidlGenFactory, &nameProperties{
Name: proptools.StringPtr(cppSourceGen),
}, &aidlGenProperties{
- Srcs: srcs,
- AidlRoot: aidlRoot,
- Imports: i.getImportsForVersion(version),
- Headers: i.properties.Headers,
- Stability: i.properties.Stability,
- Min_sdk_version: i.minSdkVersion(lang),
- Lang: lang,
- BaseName: i.ModuleBase.Name(),
- GenLog: genLog,
- Version: i.versionForInitVersionCompat(version),
- GenTrace: genTrace,
- Unstable: i.properties.Unstable,
- NotFrozen: notFrozen,
- Flags: i.flagsForAidlGenRule(version),
+ Srcs: srcs,
+ AidlRoot: aidlRoot,
+ Imports: i.getImportsForVersion(version),
+ Headers: i.properties.Headers,
+ Stability: i.properties.Stability,
+ Min_sdk_version: i.minSdkVersion(lang),
+ Lang: lang,
+ BaseName: i.ModuleBase.Name(),
+ GenLog: genLog,
+ Version: i.versionForInitVersionCompat(version),
+ GenTrace: genTrace,
+ Unstable: i.properties.Unstable,
+ NotFrozen: notFrozen,
+ RequireFrozenReason: requireFrozenReason,
+ Flags: i.flagsForAidlGenRule(version),
})
importExportDependencies := []string{}
- var sharedLibDependency []string
+ sharedLibDependency := commonProperties.Additional_shared_libraries
var headerLibs []string
var sdkVersion *string
var stl *string
var cpp_std *string
var hostSupported *bool
- var addCflags []string
+ addCflags := commonProperties.Cflags
targetProp := ccTargetProperties{
Darwin: darwinProperties{Enabled: proptools.BoolPtr(false)},
}
@@ -187,18 +194,121 @@ func addCppLibrary(mctx android.LoadHookContext, i *aidlInterface, version strin
Target: targetProp,
Tidy: proptools.BoolPtr(true),
// Do the tidy check only for the generated headers
- Tidy_flags: []string{"--header-filter=" + android.PathForOutput(mctx).String() + ".*"},
- Tidy_checks_as_errors: []string{"*"},
+ Tidy_flags: []string{"--header-filter=" + android.PathForOutput(mctx).String() + ".*"},
+ Tidy_checks_as_errors: []string{
+ "*",
+ "-clang-analyzer-deadcode.DeadStores", // b/253079031
+ "-clang-analyzer-cplusplus.NewDeleteLeaks", // b/253079031
+ "-clang-analyzer-optin.performance.Padding", // b/253079031
+ },
+ Include_build_directory: proptools.BoolPtr(false), // b/254682497
}, &i.properties.VndkProperties,
&commonProperties.VndkProperties,
&overrideVndkProperties,
+ // the logic to create implementation libraries has been reimplemented
+ // in a Bazel macro, so these libraries should not be converted with
+ // bp2build
+ // TODO(b/237810289) perhaps do something different here so that we aren't
+ // also disabling these modules in mixed builds
+ &bazelProperties{
+ &Bazel_module{
+ Bp2build_available: proptools.BoolPtr(false),
+ },
+ },
},
})
return cppModuleGen
}
-func addJavaLibrary(mctx android.LoadHookContext, i *aidlInterface, version string, notFrozen bool) string {
+func addCppAnalyzerLibrary(mctx android.DefaultableHookContext, i *aidlInterface, version string, notFrozen bool, requireFrozenReason string) string {
+ cppAnalyzerSourceGen := i.versionedName("") + "-cpp-analyzer-source"
+ cppAnalyzerModuleGen := i.versionedName("") + "-cpp-analyzer"
+
+ srcs, aidlRoot := i.srcsForVersion(mctx, version)
+ if len(srcs) == 0 {
+ return ""
+ }
+
+ mctx.CreateModule(aidlGenFactory, &nameProperties{
+ Name: proptools.StringPtr(cppAnalyzerSourceGen),
+ }, &aidlGenProperties{
+ Srcs: srcs,
+ AidlRoot: aidlRoot,
+ Imports: i.getImportsForVersion(version),
+ Stability: i.properties.Stability,
+ Min_sdk_version: i.minSdkVersion(langCpp),
+ Lang: langCppAnalyzer,
+ BaseName: i.ModuleBase.Name(),
+ Version: i.versionForInitVersionCompat(version),
+ Unstable: i.properties.Unstable,
+ NotFrozen: notFrozen,
+ RequireFrozenReason: requireFrozenReason,
+ Flags: i.flagsForAidlGenRule(version),
+ })
+
+ importExportDependencies := []string{}
+ var hostSupported *bool
+ var addCflags []string // not using cpp backend cflags for now
+ targetProp := ccTargetProperties{
+ Darwin: darwinProperties{Enabled: proptools.BoolPtr(false)},
+ }
+
+ importExportDependencies = append(importExportDependencies, "libbinder", "libutils")
+ hostSupported = i.properties.Host_supported
+
+ vendorAvailable := i.properties.Vendor_available
+ odmAvailable := i.properties.Odm_available
+ productAvailable := i.properties.Product_available
+ recoveryAvailable := i.properties.Recovery_available
+ productAvailable = nil
+
+ g := aidlImplementationGeneratorProperties{
+ ModuleProperties: []interface{}{
+ &ccProperties{
+ Name: proptools.StringPtr(cppAnalyzerModuleGen),
+ Vendor_available: vendorAvailable,
+ Odm_available: odmAvailable,
+ Product_available: productAvailable,
+ Recovery_available: recoveryAvailable,
+ Host_supported: hostSupported,
+ Defaults: []string{"aidl-cpp-module-defaults"},
+ Double_loadable: i.properties.Double_loadable,
+ Installable: proptools.BoolPtr(true),
+ Generated_sources: []string{cppAnalyzerSourceGen},
+ Generated_headers: []string{cppAnalyzerSourceGen},
+ Export_generated_headers: []string{cppAnalyzerSourceGen},
+ Shared_libs: append(importExportDependencies, i.versionedName(version)+"-"+langCpp),
+ Static_libs: []string{"aidl-analyzer-main"},
+ Export_shared_lib_headers: importExportDependencies,
+ Cflags: append(addCflags, "-Wextra", "-Wall", "-Werror", "-Wextra-semi"),
+ Min_sdk_version: i.minSdkVersion(langCpp),
+ Target: targetProp,
+ Tidy: proptools.BoolPtr(true),
+ // Do the tidy check only for the generated headers
+ Tidy_flags: []string{"--header-filter=" + android.PathForOutput(mctx).String() + ".*"},
+ Tidy_checks_as_errors: []string{
+ "*",
+ "-clang-diagnostic-deprecated-declarations", // b/253081572
+ "-clang-analyzer-deadcode.DeadStores", // b/253079031
+ "-clang-analyzer-cplusplus.NewDeleteLeaks", // b/253079031
+ "-clang-analyzer-optin.performance.Padding", // b/253079031
+ },
+ },
+ // TODO(b/237810289) disable converting -cpp-analyzer module in bp2build
+ &bazelProperties{
+ &Bazel_module{
+ Bp2build_available: proptools.BoolPtr(false),
+ },
+ },
+ },
+ }
+
+ mctx.CreateModule(wrapLibraryFactory(cc.BinaryFactory), g.ModuleProperties...)
+ return cppAnalyzerModuleGen
+}
+
+func addJavaLibrary(mctx android.DefaultableHookContext, i *aidlInterface, version string, notFrozen bool, requireFrozenReason string) string {
javaSourceGen := i.versionedName(version) + "-java-source"
javaModuleGen := i.versionedName(version) + "-java"
srcs, aidlRoot := i.srcsForVersion(mctx, version)
@@ -222,21 +332,22 @@ func addJavaLibrary(mctx android.LoadHookContext, i *aidlInterface, version stri
mctx.CreateModule(aidlGenFactory, &nameProperties{
Name: proptools.StringPtr(javaSourceGen),
}, &aidlGenProperties{
- Srcs: srcs,
- AidlRoot: aidlRoot,
- Imports: i.getImportsForVersion(version),
- Headers: i.properties.Headers,
- Stability: i.properties.Stability,
- Min_sdk_version: minSdkVersion,
- Platform_apis: proptools.Bool(i.properties.Backend.Java.Platform_apis),
- Lang: langJava,
- BaseName: i.ModuleBase.Name(),
- Version: version,
- GenRpc: proptools.Bool(i.properties.Backend.Java.Gen_rpc),
- GenTrace: proptools.Bool(i.properties.Gen_trace),
- Unstable: i.properties.Unstable,
- NotFrozen: notFrozen,
- Flags: i.flagsForAidlGenRule(version),
+ Srcs: srcs,
+ AidlRoot: aidlRoot,
+ Imports: i.getImportsForVersion(version),
+ Headers: i.properties.Headers,
+ Stability: i.properties.Stability,
+ Min_sdk_version: minSdkVersion,
+ Platform_apis: proptools.Bool(i.properties.Backend.Java.Platform_apis),
+ Lang: langJava,
+ BaseName: i.ModuleBase.Name(),
+ Version: version,
+ GenRpc: proptools.Bool(i.properties.Backend.Java.Gen_rpc),
+ GenTrace: i.genTrace(langJava),
+ Unstable: i.properties.Unstable,
+ NotFrozen: notFrozen,
+ RequireFrozenReason: requireFrozenReason,
+ Flags: i.flagsForAidlGenRule(version),
})
mctx.CreateModule(aidlImplementationGeneratorFactory, &nameProperties{
@@ -246,22 +357,35 @@ func addJavaLibrary(mctx android.LoadHookContext, i *aidlInterface, version stri
AidlInterfaceName: i.ModuleBase.Name(),
Version: version,
Imports: i.getImportsForVersion(version),
- ModuleProperties: []interface{}{&javaProperties{
- Name: proptools.StringPtr(javaModuleGen),
- Installable: proptools.BoolPtr(true),
- Defaults: []string{"aidl-java-module-defaults"},
- Sdk_version: sdkVersion,
- Platform_apis: i.properties.Backend.Java.Platform_apis,
- Srcs: []string{":" + javaSourceGen},
- Apex_available: i.properties.Backend.Java.Apex_available,
- Min_sdk_version: i.minSdkVersion(langJava),
- }, &i.properties.Backend.Java.LintProperties},
+ ModuleProperties: []interface{}{
+ &javaProperties{
+ Name: proptools.StringPtr(javaModuleGen),
+ Installable: proptools.BoolPtr(true),
+ Defaults: []string{"aidl-java-module-defaults"},
+ Sdk_version: sdkVersion,
+ Platform_apis: i.properties.Backend.Java.Platform_apis,
+ Srcs: []string{":" + javaSourceGen},
+ Apex_available: i.properties.Backend.Java.Apex_available,
+ Min_sdk_version: i.minSdkVersion(langJava),
+ },
+ &i.properties.Backend.Java.LintProperties,
+ // the logic to create implementation libraries has been reimplemented
+ // in a Bazel macro, so these libraries should not be converted with
+ // bp2build
+ // TODO(b/237810289) perhaps do something different here so that we aren't
+ // also disabling these modules in mixed builds
+ &bazelProperties{
+ &Bazel_module{
+ Bp2build_available: proptools.BoolPtr(false),
+ },
+ },
+ },
})
return javaModuleGen
}
-func addRustLibrary(mctx android.LoadHookContext, i *aidlInterface, version string, notFrozen bool) string {
+func addRustLibrary(mctx android.DefaultableHookContext, i *aidlInterface, version string, notFrozen bool, requireFrozenReason string) string {
rustSourceGen := i.versionedName(version) + "-rust-source"
rustModuleGen := i.versionedName(version) + "-rust"
srcs, aidlRoot := i.srcsForVersion(mctx, version)
@@ -275,33 +399,35 @@ func addRustLibrary(mctx android.LoadHookContext, i *aidlInterface, version stri
mctx.CreateModule(aidlGenFactory, &nameProperties{
Name: proptools.StringPtr(rustSourceGen),
}, &aidlGenProperties{
- Srcs: srcs,
- AidlRoot: aidlRoot,
- Imports: i.getImportsForVersion(version),
- Headers: i.properties.Headers,
- Stability: i.properties.Stability,
- Min_sdk_version: i.minSdkVersion(langRust),
- Lang: langRust,
- BaseName: i.ModuleBase.Name(),
- Version: i.versionForInitVersionCompat(version),
- Unstable: i.properties.Unstable,
- NotFrozen: notFrozen,
- Flags: i.flagsForAidlGenRule(version),
+ Srcs: srcs,
+ AidlRoot: aidlRoot,
+ Imports: i.getImportsForVersion(version),
+ Headers: i.properties.Headers,
+ Stability: i.properties.Stability,
+ Min_sdk_version: i.minSdkVersion(langRust),
+ Lang: langRust,
+ BaseName: i.ModuleBase.Name(),
+ Version: i.versionForInitVersionCompat(version),
+ Unstable: i.properties.Unstable,
+ NotFrozen: notFrozen,
+ RequireFrozenReason: requireFrozenReason,
+ Flags: i.flagsForAidlGenRule(version),
})
versionedRustName := fixRustName(i.versionedName(version))
rustCrateName := fixRustName(i.ModuleBase.Name())
mctx.CreateModule(wrapLibraryFactory(aidlRustLibraryFactory), &rustProperties{
- Name: proptools.StringPtr(rustModuleGen),
- Crate_name: rustCrateName,
- Stem: proptools.StringPtr("lib" + versionedRustName),
- Defaults: []string{"aidl-rust-module-defaults"},
- Host_supported: i.properties.Host_supported,
- Vendor_available: i.properties.Vendor_available,
- Apex_available: i.properties.Backend.Rust.Apex_available,
- Min_sdk_version: i.minSdkVersion(langRust),
- Target: rustTargetProperties{Darwin: darwinProperties{Enabled: proptools.BoolPtr(false)}},
+ Name: proptools.StringPtr(rustModuleGen),
+ Crate_name: rustCrateName,
+ Stem: proptools.StringPtr("lib" + versionedRustName),
+ Defaults: []string{"aidl-rust-module-defaults"},
+ Host_supported: i.properties.Host_supported,
+ Vendor_available: i.properties.Vendor_available,
+ Product_available: i.properties.Product_available,
+ Apex_available: i.properties.Backend.Rust.Apex_available,
+ Min_sdk_version: i.minSdkVersion(langRust),
+ Target: rustTargetProperties{Darwin: darwinProperties{Enabled: proptools.BoolPtr(false)}},
}, &rust.SourceProviderProperties{
Source_stem: proptools.StringPtr(versionedRustName),
}, &aidlRustSourceProviderProperties{
@@ -367,8 +493,8 @@ func (i *aidlInterface) flagsForAidlGenRule(version string) (flags []string) {
func (i *aidlInterface) isModuleForVndk(version string) bool {
if i.properties.Vndk_use_version != nil {
- if !i.hasVersion() {
- panic("does not make sense, vndk_use_version specififed")
+ if !i.hasVersion() && version != *i.properties.Vndk_use_version {
+ panic("unrecognized vndk_use_version")
}
// Will be exactly one of the version numbers
return version == *i.properties.Vndk_use_version
@@ -454,6 +580,9 @@ func (g *aidlImplementationGenerator) GenerateImplementation(ctx android.TopDown
p.Shared_libs = append(p.Shared_libs, imports...)
p.Export_shared_lib_headers = append(p.Export_shared_lib_headers, imports...)
}
- ctx.CreateModule(wrapLibraryFactory(cc.LibraryFactory), g.properties.ModuleProperties...)
+ module := ctx.CreateModule(wrapLibraryFactory(cc.LibraryFactory), g.properties.ModuleProperties...)
+ // AIDL-generated CC modules can't be used across system/vendor boundary. So marking it
+ // as MustUseVendorVariant. See build/soong/cc/config/vndk.go
+ module.(*cc.Module).Properties.MustUseVendorVariant = true
}
}
diff --git a/build/aidl_interface_bp2build_test.go b/build/aidl_interface_bp2build_test.go
new file mode 100644
index 00000000..b60c5dcb
--- /dev/null
+++ b/build/aidl_interface_bp2build_test.go
@@ -0,0 +1,437 @@
+package aidl
+
+import (
+ "android/soong/android"
+ "android/soong/bp2build"
+ "testing"
+)
+
+func runAidlInterfaceTestCase(t *testing.T, tc bp2build.Bp2buildTestCase) {
+ t.Helper()
+ bp2build.RunBp2BuildTestCase(
+ t,
+ func(ctx android.RegistrationContext) {
+ ctx.RegisterModuleType("aidl_interface", AidlInterfaceFactory)
+ ctx.RegisterModuleType("aidl_interface_headers", AidlInterfaceHeadersFactory)
+ },
+ tc,
+ )
+}
+
+func TestAidlInterfaceHeaders(t *testing.T) {
+ runAidlInterfaceTestCase(t, bp2build.Bp2buildTestCase{
+ Description: `aidl_interface_headers`,
+ Blueprint: `
+ aidl_interface_headers {
+ name: "aidl-interface-headers",
+ include_dir: "src",
+ srcs: [
+ "src/A.aidl",
+ ],
+ }`,
+ ExpectedBazelTargets: []string{
+ bp2build.MakeBazelTargetNoRestrictions("aidl_library", "aidl-interface-headers", bp2build.AttrNameToString{
+ "strip_import_prefix": `"src"`,
+ "hdrs": `["src/A.aidl"]`,
+ }),
+ },
+ })
+}
+
+func TestAidlInterface(t *testing.T) {
+ runAidlInterfaceTestCase(t, bp2build.Bp2buildTestCase{
+ Description: `aidl_interface with single "latest" aidl_interface import`,
+ Blueprint: `
+ aidl_interface_headers {
+ name: "aidl-interface-headers",
+ }
+ aidl_interface {
+ name: "aidl-interface-import",
+ versions: [
+ "1",
+ "2",
+ ],
+ }
+ aidl_interface {
+ name: "aidl-interface1",
+ flags: ["--flag1"],
+ imports: [
+ "aidl-interface-import-V1",
+ ],
+ headers: [
+ "aidl-interface-headers",
+ ],
+ versions: [
+ "1",
+ "2",
+ "3",
+ ],
+ }`,
+ ExpectedBazelTargets: []string{
+ bp2build.MakeBazelTargetNoRestrictions("aidl_library", "aidl-interface-headers", bp2build.AttrNameToString{}),
+ bp2build.MakeBazelTargetNoRestrictions("aidl_interface", "aidl-interface-import", bp2build.AttrNameToString{
+ "java_config": `{
+ "enabled": True,
+ }`,
+ "cpp_config": `{
+ "enabled": True,
+ }`,
+ "ndk_config": `{
+ "enabled": True,
+ }`,
+ "versions_with_info": `[
+ {
+ "version": "1",
+ },
+ {
+ "version": "2",
+ },
+ ]`,
+ }),
+ bp2build.MakeBazelTargetNoRestrictions("aidl_interface", "aidl-interface1", bp2build.AttrNameToString{
+ "java_config": `{
+ "enabled": True,
+ }`,
+ "cpp_config": `{
+ "enabled": True,
+ }`,
+ "ndk_config": `{
+ "enabled": True,
+ }`,
+ "deps": `[":aidl-interface-headers"]`,
+ "flags": `["--flag1"]`,
+ "versions_with_info": `[
+ {
+ "deps": [":aidl-interface-import-V1"],
+ "version": "1",
+ },
+ {
+ "deps": [":aidl-interface-import-V1"],
+ "version": "2",
+ },
+ {
+ "deps": [":aidl-interface-import-V1"],
+ "version": "3",
+ },
+ ]`,
+ }),
+ },
+ })
+}
+
+func TestAidlInterfaceWithNoProperties(t *testing.T) {
+ runAidlInterfaceTestCase(t, bp2build.Bp2buildTestCase{
+ Description: `aidl_interface no properties set`,
+ Blueprint: `
+ aidl_interface {
+ name: "aidl-interface1",
+ }`,
+ ExpectedBazelTargets: []string{
+ bp2build.MakeBazelTargetNoRestrictions("aidl_interface", "aidl-interface1", bp2build.AttrNameToString{
+ "java_config": `{
+ "enabled": True,
+ }`,
+ "cpp_config": `{
+ "enabled": True,
+ }`,
+ "ndk_config": `{
+ "enabled": True,
+ }`,
+ }),
+ },
+ })
+}
+
+func TestAidlInterfaceWithDisabledBackends(t *testing.T) {
+ runAidlInterfaceTestCase(t, bp2build.Bp2buildTestCase{
+ Description: `aidl_interface with some backends disabled`,
+ Blueprint: `
+ aidl_interface {
+ name: "aidl-interface1",
+ backend: {
+ ndk: {
+ enabled: false,
+ },
+ cpp: {
+ enabled: false,
+ },
+ },
+ }`,
+ ExpectedBazelTargets: []string{
+ bp2build.MakeBazelTargetNoRestrictions("aidl_interface", "aidl-interface1", bp2build.AttrNameToString{
+ "java_config": `{
+ "enabled": True,
+ }`,
+ }),
+ },
+ })
+}
+
+func TestAidlInterfaceWithLatestImport(t *testing.T) {
+ runAidlInterfaceTestCase(t, bp2build.Bp2buildTestCase{
+ Description: `aidl_interface with single "latest" aidl_interface import`,
+ Blueprint: `
+ aidl_interface {
+ name: "aidl-interface-import",
+ versions: [
+ "1",
+ "2",
+ ],
+ }
+ aidl_interface {
+ name: "aidl-interface1",
+ imports: [
+ "aidl-interface-import",
+ ],
+ versions: [
+ "1",
+ "2",
+ "3",
+ ],
+ }`,
+ ExpectedBazelTargets: []string{
+ bp2build.MakeBazelTargetNoRestrictions("aidl_interface", "aidl-interface-import", bp2build.AttrNameToString{
+ "java_config": `{
+ "enabled": True,
+ }`,
+ "cpp_config": `{
+ "enabled": True,
+ }`,
+ "ndk_config": `{
+ "enabled": True,
+ }`,
+ "versions_with_info": `[
+ {
+ "version": "1",
+ },
+ {
+ "version": "2",
+ },
+ ]`,
+ }),
+ bp2build.MakeBazelTargetNoRestrictions("aidl_interface", "aidl-interface1", bp2build.AttrNameToString{
+ "java_config": `{
+ "enabled": True,
+ }`,
+ "cpp_config": `{
+ "enabled": True,
+ }`,
+ "ndk_config": `{
+ "enabled": True,
+ }`,
+ "versions_with_info": `[
+ {
+ "deps": [":aidl-interface-import-latest"],
+ "version": "1",
+ },
+ {
+ "deps": [":aidl-interface-import-latest"],
+ "version": "2",
+ },
+ {
+ "deps": [":aidl-interface-import-latest"],
+ "version": "3",
+ },
+ ]`,
+ }),
+ },
+ })
+}
+
+func TestAidlInterfaceWithVersionedImport(t *testing.T) {
+ runAidlInterfaceTestCase(t, bp2build.Bp2buildTestCase{
+ Description: `aidl_interface with single versioned aidl_interface import`,
+ Blueprint: `
+ aidl_interface {
+ name: "aidl-interface-import",
+ versions: [
+ "1",
+ "2",
+ ],
+ }
+ aidl_interface {
+ name: "aidl-interface1",
+ imports: [
+ "aidl-interface-import-V2",
+ ],
+ versions: [
+ "1",
+ "2",
+ "3",
+ ],
+ }`,
+ ExpectedBazelTargets: []string{
+ bp2build.MakeBazelTargetNoRestrictions("aidl_interface", "aidl-interface-import", bp2build.AttrNameToString{
+ "java_config": `{
+ "enabled": True,
+ }`,
+ "cpp_config": `{
+ "enabled": True,
+ }`,
+ "ndk_config": `{
+ "enabled": True,
+ }`,
+ "versions_with_info": `[
+ {
+ "version": "1",
+ },
+ {
+ "version": "2",
+ },
+ ]`,
+ }),
+ bp2build.MakeBazelTargetNoRestrictions("aidl_interface", "aidl-interface1", bp2build.AttrNameToString{
+ "java_config": `{
+ "enabled": True,
+ }`,
+ "cpp_config": `{
+ "enabled": True,
+ }`,
+ "ndk_config": `{
+ "enabled": True,
+ }`,
+ "versions_with_info": `[
+ {
+ "deps": [":aidl-interface-import-V2"],
+ "version": "1",
+ },
+ {
+ "deps": [":aidl-interface-import-V2"],
+ "version": "2",
+ },
+ {
+ "deps": [":aidl-interface-import-V2"],
+ "version": "3",
+ },
+ ]`,
+ }),
+ },
+ })
+}
+
+func TestAidlInterfaceWithCppAndNdkConfigs(t *testing.T) {
+ runAidlInterfaceTestCase(t, bp2build.Bp2buildTestCase{
+ Description: `aidl_interface with cpp and ndk configs`,
+ Blueprint: `
+ aidl_interface {
+ name: "foo",
+ backend: {
+ java: {
+ enabled: false,
+ },
+ cpp: {
+ min_sdk_version: "2",
+ },
+ ndk: {
+ min_sdk_version: "1",
+ },
+ }
+ }`,
+ ExpectedBazelTargets: []string{
+ bp2build.MakeBazelTargetNoRestrictions("aidl_interface", "foo", bp2build.AttrNameToString{
+ "cpp_config": `{
+ "enabled": True,
+ "min_sdk_version": "2",
+ }`,
+ "ndk_config": `{
+ "enabled": True,
+ "min_sdk_version": "1",
+ }`,
+ }),
+ },
+ })
+}
+
+func TestAidlInterfaceWithUnstablePropSet(t *testing.T) {
+ runAidlInterfaceTestCase(t, bp2build.Bp2buildTestCase{
+ Description: `aidl_interface with unstable prop set`,
+ Blueprint: `
+ aidl_interface {
+ name: "foo",
+ unstable: true,
+ backend: {
+ java: {
+ enabled: false,
+ },
+ cpp: {
+ enabled: false,
+ },
+ }
+ }`,
+ ExpectedBazelTargets: []string{
+ bp2build.MakeBazelTargetNoRestrictions("aidl_interface", "foo", bp2build.AttrNameToString{
+ "unstable": "True",
+ "ndk_config": `{
+ "enabled": True,
+ }`,
+ }),
+ },
+ })
+}
+
+func TestAidlInterfaceWithFrozenPropSet(t *testing.T) {
+ runAidlInterfaceTestCase(t, bp2build.Bp2buildTestCase{
+ Description: `aidl_interface with frozen prop set`,
+ Blueprint: `
+ aidl_interface {
+ name: "foo",
+ frozen: true,
+ versions: ["1"],
+ backend: {
+ java: {
+ enabled: false,
+ },
+ cpp: {
+ enabled: false,
+ },
+ }
+ }`,
+ ExpectedBazelTargets: []string{
+ bp2build.MakeBazelTargetNoRestrictions("aidl_interface", "foo", bp2build.AttrNameToString{
+ "frozen": "True",
+ "versions_with_info": `[{
+ "version": "1",
+ }]`,
+ "ndk_config": `{
+ "enabled": True,
+ }`,
+ }),
+ },
+ })
+}
+
+func TestAidlInterfaceWithApexAvailable(t *testing.T) {
+ runAidlInterfaceTestCase(t, bp2build.Bp2buildTestCase{
+ Description: `aidl_interface apex_available`,
+ Blueprint: `
+ aidl_interface {
+ name: "aidl-interface1",
+ backend: {
+ java: {
+ enabled: false,
+ },
+ cpp: {
+ enabled: false,
+ },
+ ndk: {
+ enabled: true,
+ apex_available: [
+ "com.android.abd",
+ "//apex_available:platform",
+ ],
+ },
+ }
+ }`,
+ ExpectedBazelTargets: []string{
+ bp2build.MakeBazelTargetNoRestrictions("aidl_interface", "aidl-interface1", bp2build.AttrNameToString{
+ "ndk_config": `{
+ "enabled": True,
+ "tags": [
+ "apex_available=com.android.abd",
+ "apex_available=//apex_available:platform",
+ ],
+ }`,
+ }),
+ },
+ })
+}
diff --git a/build/aidl_interface_defaults.go b/build/aidl_interface_defaults.go
new file mode 100644
index 00000000..50d93e31
--- /dev/null
+++ b/build/aidl_interface_defaults.go
@@ -0,0 +1,32 @@
+package aidl
+
+import (
+ "android/soong/android"
+)
+
+func init() {
+ android.RegisterModuleType("aidl_interface_defaults", AidlInterfaceDefaultsFactory)
+}
+
+type Defaults struct {
+ android.ModuleBase
+ android.DefaultsModuleBase
+}
+
+func (d *Defaults) GenerateAndroidBuildActions(ctx android.ModuleContext) {
+}
+
+func (d *Defaults) DepsMutator(ctx android.BottomUpMutatorContext) {
+}
+
+func AidlInterfaceDefaultsFactory() android.Module {
+ module := &Defaults{}
+
+ module.AddProperties(
+ &aidlInterfaceProperties{},
+ )
+
+ android.InitDefaultsModule(module)
+
+ return module
+}
diff --git a/build/aidl_interface_headers.go b/build/aidl_interface_headers.go
index 0d59c4d7..523526e2 100644
--- a/build/aidl_interface_headers.go
+++ b/build/aidl_interface_headers.go
@@ -18,13 +18,14 @@ import (
"path/filepath"
"android/soong/android"
+ "android/soong/bazel"
"github.com/google/blueprint"
"github.com/google/blueprint/proptools"
)
func init() {
- android.RegisterModuleType("aidl_interface_headers", aidlInterfaceHeadersFactory)
+ android.RegisterModuleType("aidl_interface_headers", AidlInterfaceHeadersFactory)
}
type AidlInterfaceHeadersInfo struct {
@@ -44,6 +45,7 @@ type aidlInterfaceHeadersProperties struct {
type aidlInterfaceHeaders struct {
android.ModuleBase
+ android.BazelModuleBase
properties aidlInterfaceHeadersProperties
@@ -54,13 +56,32 @@ type aidlInterfaceHeaders struct {
// aidl tool. No language bindings are generated from these modules. Typically this will
// be used to provide includes for UnstructuredParcelable AIDL definitions such as those
// coming from framework modules.
-func aidlInterfaceHeadersFactory() android.Module {
+func AidlInterfaceHeadersFactory() android.Module {
i := &aidlInterfaceHeaders{}
i.AddProperties(&i.properties)
android.InitAndroidModule(i)
+ android.InitBazelModule(i)
return i
}
+func (i *aidlInterfaceHeaders) ConvertWithBp2build(ctx android.TopDownMutatorContext) {
+ srcs := android.BazelLabelForModuleSrc(ctx, i.properties.Srcs)
+
+ attrs := &aidlLibraryAttributes{
+ Hdrs: bazel.MakeLabelListAttribute(srcs),
+ Strip_import_prefix: i.properties.Include_dir,
+ }
+
+ ctx.CreateBazelTargetModule(
+ bazel.BazelTargetModuleProperties{
+ Rule_class: "aidl_library",
+ Bzl_load_location: "//build/bazel/rules/aidl:aidl_library.bzl",
+ },
+ android.CommonAttributes{Name: i.Name()},
+ attrs,
+ )
+}
+
func (i *aidlInterfaceHeaders) GenerateAndroidBuildActions(ctx android.ModuleContext) {
ctx.SetProvider(AidlInterfaceHeadersProvider, AidlInterfaceHeadersInfo{
Srcs: android.PathsForModuleSrc(ctx, i.properties.Srcs),
diff --git a/build/aidl_interface_metadata_singleton.go b/build/aidl_interface_metadata_singleton.go
index 8b421a52..ef3af3c8 100644
--- a/build/aidl_interface_metadata_singleton.go
+++ b/build/aidl_interface_metadata_singleton.go
@@ -116,7 +116,7 @@ func (m *aidlInterfacesMetadataSingleton) GenerateAndroidBuildActions(ctx androi
})
var metadataOutputs android.Paths
- for _, name := range android.SortedStringKeys(moduleInfos) {
+ for _, name := range android.SortedKeys(moduleInfos) {
info := moduleInfos[name]
metadataPath := android.PathForModuleOut(ctx, "metadata_"+name)
metadataOutputs = append(metadataOutputs, metadataPath)
diff --git a/build/aidl_mapping.go b/build/aidl_mapping.go
deleted file mode 100644
index 596285ef..00000000
--- a/build/aidl_mapping.go
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright (C) 2021 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package aidl
-
-import (
- "android/soong/android"
-
- "fmt"
- "io"
-
- "github.com/google/blueprint"
-)
-
-var (
- aidlDumpMappingsRule = pctx.StaticRule("aidlDumpMappingsRule", blueprint.RuleParams{
- Command: `rm -rf "${outDir}" && mkdir -p "${outDir}" && ` +
- `${aidlCmd} --apimapping ${outDir}/intermediate.txt ${in} ${imports} && ` +
- `${aidlToJniCmd} ${outDir}/intermediate.txt ${out}`,
- CommandDeps: []string{"${aidlCmd}"},
- }, "imports", "outDir")
-)
-
-func init() {
- android.RegisterModuleType("aidl_mapping", aidlMappingFactory)
-}
-
-type aidlMappingProperties struct {
- // Source file of this prebuilt.
- Srcs []string `android:"path"`
- Output string
-}
-
-type aidlMapping struct {
- android.ModuleBase
- properties aidlMappingProperties
- outputFilePath android.WritablePath
-}
-
-func (s *aidlMapping) DepsMutator(ctx android.BottomUpMutatorContext) {
-}
-
-func (s *aidlMapping) GenerateAndroidBuildActions(ctx android.ModuleContext) {
- srcs, imports := getPaths(ctx, s.properties.Srcs, "")
-
- s.outputFilePath = android.PathForModuleOut(ctx, s.properties.Output)
- outDir := android.PathForModuleGen(ctx)
- ctx.Build(pctx, android.BuildParams{
- Rule: aidlDumpMappingsRule,
- Inputs: srcs,
- Output: s.outputFilePath,
- Args: map[string]string{
- "imports": android.JoinWithPrefix(imports, " -I"),
- "outDir": outDir.String(),
- },
- })
-}
-
-func InitAidlMappingModule(s *aidlMapping) {
- s.AddProperties(&s.properties)
-}
-
-func aidlMappingFactory() android.Module {
- module := &aidlMapping{}
- InitAidlMappingModule(module)
- android.InitAndroidModule(module)
- return module
-}
-
-func (m *aidlMapping) AndroidMk() android.AndroidMkData {
- return android.AndroidMkData{
- Custom: func(w io.Writer, name, prefix, moduleDir string, data android.AndroidMkData) {
- android.WriteAndroidMkData(w, data)
- targetName := m.Name()
- fmt.Fprintln(w, ".PHONY:", targetName)
- fmt.Fprintln(w, targetName+":", m.outputFilePath.String())
- },
- }
-}
diff --git a/build/aidl_rust_glue.py b/build/aidl_rust_glue.py
index acbd8710..a110618d 100755
--- a/build/aidl_rust_glue.py
+++ b/build/aidl_rust_glue.py
@@ -87,7 +87,7 @@ def main(output, root, inputs, imports):
lib_rs_file.write(" pub(crate) use %s::mangled::*;\n" % imp)
lib_rs_file.write("}\n")
-if __name__ == "__main__":
+def execute():
parser = argparse.ArgumentParser(description='Generate the top-level lib.rs.')
parser.add_argument('output', help='Path to output .rs file')
parser.add_argument('root', help='Common ancestor of all input files')
@@ -100,3 +100,6 @@ if __name__ == "__main__":
sys.exit(1)
sys.exit(main(args.output, args.root, args.inputs, args.imports))
+
+if __name__ == "__main__":
+ execute()
diff --git a/build/aidl_rust_source_provider.go b/build/aidl_rust_source_provider.go
index 16050fbb..1b916002 100644
--- a/build/aidl_rust_source_provider.go
+++ b/build/aidl_rust_source_provider.go
@@ -120,6 +120,6 @@ func aidlRustLibraryFactory() android.Module {
properties: aidlRustSourceProviderProperties{},
}
- module := rust.NewSourceProviderModule(android.HostAndDeviceSupported, sourceProvider, false)
+ module := rust.NewSourceProviderModule(android.HostAndDeviceSupported, sourceProvider, false, false)
return module.Init()
}
diff --git a/build/aidl_test.go b/build/aidl_test.go
index 11f8dd94..f0a951bb 100644
--- a/build/aidl_test.go
+++ b/build/aidl_test.go
@@ -95,12 +95,19 @@ func _testAidl(t *testing.T, bp string, customizers ...android.FixturePreparer)
name: "libbinder",
recovery_available: true,
}
+ cc_library_static {
+ name: "aidl-analyzer-main",
+ host_supported: true,
+ vendor_available: true,
+ recovery_available: true,
+ }
cc_library {
name: "libutils",
recovery_available: true,
}
cc_library {
name: "libcutils",
+ recovery_available: true,
}
cc_library {
name: "libbinder_ndk",
@@ -173,9 +180,10 @@ func _testAidl(t *testing.T, bp string, customizers ...android.FixturePreparer)
preparers = append(preparers,
rust.PrepareForTestWithRustBuildComponents,
android.FixtureRegisterWithContext(func(ctx android.RegistrationContext) {
- ctx.RegisterModuleType("aidl_interface", aidlInterfaceFactory)
+ ctx.RegisterModuleType("aidl_interface", AidlInterfaceFactory)
+ ctx.RegisterModuleType("aidl_interface_headers", AidlInterfaceHeadersFactory)
+ ctx.RegisterModuleType("aidl_interface_defaults", AidlInterfaceDefaultsFactory)
ctx.RegisterModuleType("aidl_interfaces_metadata", aidlInterfacesMetadataSingletonFactory)
- ctx.RegisterModuleType("aidl_interface_headers", aidlInterfaceHeadersFactory)
ctx.RegisterModuleType("rust_defaults", func() android.Module {
return rust.DefaultsFactory()
})
@@ -218,7 +226,7 @@ func assertModulesExists(t *testing.T, ctx *android.TestContext, names ...string
ctx.VisitAllModules(func(m blueprint.Module) {
allModuleNames[ctx.ModuleName(m)] = true
})
- t.Errorf("expected modules(%v) not found. all modules: %v", missing, android.SortedStringKeys(allModuleNames))
+ t.Errorf("expected modules(%v) not found. all modules: %v", missing, android.SortedKeys(allModuleNames))
}
}
@@ -254,7 +262,7 @@ func TestVintfWithoutVersionInRelease(t *testing.T) {
},
},
}`
- expectedError := `module "foo_interface": versions: must be set \(need to be frozen\) when "unstable" is false, PLATFORM_VERSION_CODENAME is REL, and "owner" property is missing.`
+ expectedError := `module "foo_interface": versions: must be set \(need to be frozen\) because`
testAidlError(t, expectedError, vintfWithoutVersionBp, setReleaseEnv())
testAidlError(t, expectedError, vintfWithoutVersionBp, setTestFreezeEnv())
@@ -283,9 +291,10 @@ func TestUnstableVersionUsageInRelease(t *testing.T) {
"aidl_api/foo/1/.hash": nil,
})
- expectedError := `foo-V2-java is disallowed in release version because it is unstable.`
- testAidlError(t, expectedError, unstableVersionUsageInJavaBp, setReleaseEnv(), files)
- testAidlError(t, expectedError, unstableVersionUsageInJavaBp, setTestFreezeEnv(), files)
+ expectedError1 := `foo-V2-java is an unfrozen development version, and it can't be used because "this is a release branch - freeze it or set 'owners:'"`
+ testAidlError(t, expectedError1, unstableVersionUsageInJavaBp, setReleaseEnv(), files)
+ expectedError2 := `foo-V2-java is an unfrozen development version, and it can't be used because "this is a release branch \(simulated by setting AIDL_FROZEN_REL\) - freeze it or set 'owners:'"`
+ testAidlError(t, expectedError2, unstableVersionUsageInJavaBp, setTestFreezeEnv(), files)
testAidl(t, unstableVersionUsageInJavaBp, files)
// A stable version can be used in release version
@@ -333,12 +342,391 @@ func TestUsingUnstableVersionIndirectlyInRelease(t *testing.T) {
"aidl_api/xxx/1/.hash": nil,
})
- expectedError := `xxx-V2-java is disallowed in release version because it is unstable.`
+ expectedError := `xxx-V2-java is an unfrozen development version`
testAidlError(t, expectedError, unstableVersionUsageInJavaBp, setReleaseEnv(), files)
testAidlError(t, expectedError, unstableVersionUsageInJavaBp, setTestFreezeEnv(), files)
testAidl(t, unstableVersionUsageInJavaBp, files)
}
+func TestFrozenTrueSimple(t *testing.T) {
+ frozenTest := `
+ aidl_interface {
+ name: "foo",
+ versions: ["1"],
+ frozen: true,
+ srcs: ["IFoo.aidl"],
+ }`
+ files := withFiles(map[string][]byte{
+ "aidl_api/foo/1/foo.1.aidl": nil,
+ "aidl_api/foo/1/.hash": nil,
+ })
+
+ testAidl(t, frozenTest, files, setReleaseEnv())
+ testAidl(t, frozenTest, files, setTestFreezeEnv())
+ testAidl(t, frozenTest, files)
+}
+
+func TestFrozenWithNoVersions(t *testing.T) {
+ frozenTest := `
+ aidl_interface {
+ name: "foo",
+ frozen: true,
+ srcs: ["IFoo.aidl"],
+ }`
+ files := withFiles(map[string][]byte{
+ "aidl_api/foo/1/foo.1.aidl": nil,
+ "aidl_api/foo/1/.hash": nil,
+ })
+
+ expectedError := `cannot be frozen without versions`
+ testAidlError(t, expectedError, frozenTest, files, setReleaseEnv())
+ testAidlError(t, expectedError, frozenTest, files, setTestFreezeEnv())
+ testAidlError(t, expectedError, frozenTest, files)
+}
+
+func TestFrozenImportingFrozen(t *testing.T) {
+ frozenTest := `
+ aidl_interface {
+ name: "xxx",
+ srcs: ["IFoo.aidl"],
+ frozen: true,
+ versions: ["1"],
+ }
+ aidl_interface {
+ name: "foo",
+ imports: ["xxx-V1"],
+ versions: ["1"],
+ frozen: true,
+ srcs: ["IFoo.aidl"],
+ }`
+ files := withFiles(map[string][]byte{
+ "aidl_api/foo/1/foo.1.aidl": nil,
+ "aidl_api/foo/1/.hash": nil,
+ "aidl_api/xxx/1/foo.1.aidl": nil,
+ "aidl_api/xxx/1/.hash": nil,
+ })
+
+ testAidl(t, frozenTest, files, setReleaseEnv())
+ testAidl(t, frozenTest, files, setTestFreezeEnv())
+ testAidl(t, frozenTest, files)
+}
+
+func TestFrozenImportingVersionUnfrozen(t *testing.T) {
+ frozenTest := `
+ aidl_interface {
+ name: "xxx",
+ srcs: ["IFoo.aidl"],
+ frozen: false,
+ versions: ["1"],
+ }
+ aidl_interface {
+ name: "foo",
+ imports: ["xxx-V1"],
+ versions: ["1"],
+ frozen: true,
+ srcs: ["IFoo.aidl"],
+ }`
+ files := withFiles(map[string][]byte{
+ "aidl_api/foo/1/foo.1.aidl": nil,
+ "aidl_api/foo/1/.hash": nil,
+ "aidl_api/xxx/1/foo.1.aidl": nil,
+ "aidl_api/xxx/1/.hash": nil,
+ })
+
+ testAidl(t, frozenTest, files, setReleaseEnv())
+ testAidl(t, frozenTest, files, setTestFreezeEnv())
+ testAidl(t, frozenTest, files)
+}
+
+func TestFrozenImportingUnfrozenWithFrozen(t *testing.T) {
+ frozenTest := `
+ aidl_interface {
+ name: "xxx",
+ srcs: ["IFoo.aidl"],
+ frozen: false,
+ versions: ["1"],
+ }
+ aidl_interface {
+ name: "foo",
+ imports: ["xxx"],
+ versions: ["1"],
+ frozen: true,
+ srcs: ["IFoo.aidl"],
+ }`
+ files := withFiles(map[string][]byte{
+ "aidl_api/foo/1/foo.1.aidl": nil,
+ "aidl_api/foo/1/.hash": nil,
+ "aidl_api/xxx/1/foo.1.aidl": nil,
+ "aidl_api/xxx/1/.hash": nil,
+ })
+
+ expectedError := `"foo" imports "xxx" which is not frozen. Either "foo" must`
+ testAidlError(t, expectedError, frozenTest, files, setReleaseEnv())
+ testAidlError(t, expectedError, frozenTest, files, setTestFreezeEnv())
+ testAidlError(t, expectedError, frozenTest, files)
+}
+
+func TestFrozenImportingUnfrozen(t *testing.T) {
+ frozenTest := `
+ aidl_interface {
+ name: "xxx",
+ srcs: ["IFoo.aidl"],
+ frozen: false,
+ }
+ aidl_interface {
+ name: "foo",
+ imports: ["xxx"],
+ versions: ["1"],
+ frozen: true,
+ srcs: ["IFoo.aidl"],
+ }`
+ files := withFiles(map[string][]byte{
+ "aidl_api/foo/1/foo.1.aidl": nil,
+ "aidl_api/foo/1/.hash": nil,
+ "aidl_api/xxx/1/foo.1.aidl": nil,
+ "aidl_api/xxx/1/.hash": nil,
+ })
+
+ expectedError := `versions: must be set \(need to be frozen\) because`
+ testAidlError(t, expectedError, frozenTest, files, setReleaseEnv())
+ testAidlError(t, expectedError, frozenTest, files, setTestFreezeEnv())
+
+ expectedError = `"foo" imports "xxx" which is not frozen. Either "foo" must`
+ testAidlError(t, expectedError, frozenTest, files)
+}
+
+// This is allowed to keep legacy behavior. It could be prevented directly after API-freeze
+// if all frozen interfaces are explicitly marked `frozen: true,`.
+func TestFrozenImportingUnSpecified(t *testing.T) {
+ frozenTrueSimple := `
+ aidl_interface {
+ name: "xxx",
+ srcs: ["IFoo.aidl"],
+ versions: ["1"],
+ }
+ aidl_interface {
+ name: "foo",
+ imports: ["xxx-V1"],
+ versions: ["1"],
+ frozen: true,
+ srcs: ["IFoo.aidl"],
+ }`
+ files := withFiles(map[string][]byte{
+ "aidl_api/foo/1/foo.1.aidl": nil,
+ "aidl_api/foo/1/.hash": nil,
+ "aidl_api/xxx/1/foo.1.aidl": nil,
+ "aidl_api/xxx/1/.hash": nil,
+ })
+
+ testAidl(t, frozenTrueSimple, files, setReleaseEnv())
+ testAidl(t, frozenTrueSimple, files, setTestFreezeEnv())
+ testAidl(t, frozenTrueSimple, files)
+}
+
+// Keeping legacy behavior if "frozen" is not specified
+func TestImportingNewLegacy(t *testing.T) {
+ frozenTest := `
+ aidl_interface {
+ name: "xxx",
+ srcs: ["IFoo.aidl"],
+ versions: ["1"],
+ }
+ aidl_interface {
+ name: "foo",
+ imports: ["xxx-V2"],
+ versions_with_info: [
+ {version: "1", imports: ["xxx-V1"]},
+ ],
+ srcs: ["IFoo.aidl"],
+ }`
+ files := withFiles(map[string][]byte{
+ "aidl_api/foo/1/foo.1.aidl": nil,
+ "aidl_api/foo/1/.hash": nil,
+ "aidl_api/xxx/1/foo.1.aidl": nil,
+ "aidl_api/xxx/1/.hash": nil,
+ })
+
+ testAidl(t, frozenTest, files, setReleaseEnv())
+ testAidl(t, frozenTest, files, setTestFreezeEnv())
+ testAidl(t, frozenTest, files)
+}
+
+// We don't have a way to know if if "xxx" has changes to it and will
+// need a new version without the "frozen" attribute. So we keep the
+// legacy behavior and assume "foo" is still importing the old version.
+func TestFrozenImportingNewLegacy(t *testing.T) {
+ frozenTest := `
+ aidl_interface {
+ name: "xxx",
+ srcs: ["IFoo.aidl"],
+ versions: ["1"],
+ }
+ aidl_interface {
+ name: "foo",
+ imports: ["xxx-V1"],
+ frozen: true,
+ versions_with_info: [
+ {version: "1", imports: ["xxx-V1"]},
+ ],
+ srcs: ["IFoo.aidl"],
+ }`
+ files := withFiles(map[string][]byte{
+ "aidl_api/foo/1/foo.1.aidl": nil,
+ "aidl_api/foo/1/.hash": nil,
+ "aidl_api/xxx/1/foo.1.aidl": nil,
+ "aidl_api/xxx/1/.hash": nil,
+ })
+
+ testAidl(t, frozenTest, files, setReleaseEnv())
+ testAidl(t, frozenTest, files, setTestFreezeEnv())
+ testAidl(t, frozenTest, files)
+}
+
+func TestFrozenImportingNewImplicit(t *testing.T) {
+ frozenTest := `
+ aidl_interface {
+ name: "xxx",
+ srcs: ["IFoo.aidl"],
+ frozen: false,
+ versions: ["1"],
+ }
+ aidl_interface {
+ name: "foo",
+ imports: ["xxx"],
+ frozen: true,
+ versions_with_info: [
+ {version: "1", imports: ["xxx-V1"]},
+ ],
+ srcs: ["IFoo.aidl"],
+ }`
+ files := withFiles(map[string][]byte{
+ "aidl_api/foo/1/foo.1.aidl": nil,
+ "aidl_api/foo/1/.hash": nil,
+ "aidl_api/xxx/1/foo.1.aidl": nil,
+ "aidl_api/xxx/1/.hash": nil,
+ })
+
+ expectedError := `"foo" imports "xxx" which is not frozen. Either "foo" must`
+ testAidlError(t, expectedError, frozenTest, files, setReleaseEnv())
+ testAidlError(t, expectedError, frozenTest, files, setTestFreezeEnv())
+ testAidlError(t, expectedError, frozenTest, files)
+}
+
+func TestImportingOwned(t *testing.T) {
+ frozenTest := `
+ aidl_interface {
+ name: "xxx",
+ srcs: ["IFoo.aidl"],
+ owner: "unknown-owner",
+ frozen: false,
+ }
+ aidl_interface {
+ name: "foo",
+ imports: ["xxx-V1"],
+ frozen: false,
+ versions_with_info: [
+ {version: "1", imports: []},
+ ],
+ srcs: ["IFoo.aidl"],
+ }`
+ files := withFiles(map[string][]byte{
+ "aidl_api/foo/1/foo.1.aidl": nil,
+ "aidl_api/foo/1/.hash": nil,
+ })
+
+ expectedError := "Android.bp:10:10: module \"foo_interface\": imports: \"foo\" imports \"xxx\" which is an interface owned by \"unknown-owner\". This is not allowed because the owned interface will not be frozen at the same time."
+ testAidlError(t, expectedError, frozenTest, files, setReleaseEnv())
+ testAidlError(t, expectedError, frozenTest, files, setTestFreezeEnv())
+ testAidlError(t, expectedError, frozenTest, files)
+}
+
+func TestImportingOwnedBothOwned(t *testing.T) {
+ frozenTest := `
+ aidl_interface {
+ name: "xxx",
+ srcs: ["IFoo.aidl"],
+ owner: "unknown-owner",
+ frozen: false,
+ }
+ aidl_interface {
+ name: "foo",
+ imports: ["xxx-V1"],
+ frozen: false,
+ versions_with_info: [
+ {version: "1", imports: []},
+ ],
+ srcs: ["IFoo.aidl"],
+ owner: "unknown-owner-any",
+ }`
+ files := withFiles(map[string][]byte{
+ "aidl_api/foo/1/foo.1.aidl": nil,
+ "aidl_api/foo/1/.hash": nil,
+ })
+
+ testAidl(t, frozenTest, files, setReleaseEnv())
+ testAidl(t, frozenTest, files, setTestFreezeEnv())
+ testAidl(t, frozenTest, files)
+}
+
+func TestFrozenImportingNewExplicit(t *testing.T) {
+ frozenTest := `
+ aidl_interface {
+ name: "xxx",
+ srcs: ["IFoo.aidl"],
+ frozen: false,
+ versions: ["1"],
+ }
+ aidl_interface {
+ name: "foo",
+ imports: ["xxx-V2"],
+ frozen: true,
+ versions_with_info: [
+ {version: "1", imports: ["xxx-V1"]},
+ ],
+ srcs: ["IFoo.aidl"],
+ }`
+ files := withFiles(map[string][]byte{
+ "aidl_api/foo/1/foo.1.aidl": nil,
+ "aidl_api/foo/1/.hash": nil,
+ "aidl_api/xxx/1/foo.1.aidl": nil,
+ "aidl_api/xxx/1/.hash": nil,
+ })
+
+ expectedError := "This interface is 'frozen: true' but the imports have changed. Set 'frozen: false' to allow changes: \\n Version current imports: map\\[xxx:2\\]\\n Version 1 imports: map\\[xxx:1\\]\\n"
+ testAidlError(t, expectedError, frozenTest, files, setReleaseEnv())
+ testAidlError(t, expectedError, frozenTest, files, setTestFreezeEnv())
+ testAidlError(t, expectedError, frozenTest, files)
+}
+
+func TestNonFrozenImportingNewImplicit(t *testing.T) {
+ frozenTest := `
+ aidl_interface {
+ name: "xxx",
+ srcs: ["IFoo.aidl"],
+ frozen: false,
+ versions: ["1"],
+ }
+ aidl_interface {
+ name: "foo",
+ imports: ["xxx-V1"],
+ frozen: false,
+ versions_with_info: [
+ {version: "1", imports: ["xxx-V1"]},
+ ],
+ srcs: ["IFoo.aidl"],
+ }`
+ files := withFiles(map[string][]byte{
+ "aidl_api/foo/1/foo.1.aidl": nil,
+ "aidl_api/foo/1/.hash": nil,
+ "aidl_api/xxx/1/foo.1.aidl": nil,
+ "aidl_api/xxx/1/.hash": nil,
+ })
+
+ testAidl(t, frozenTest, files, setReleaseEnv())
+ testAidl(t, frozenTest, files, setTestFreezeEnv())
+ testAidl(t, frozenTest, files)
+}
+
// The module which has never been frozen and is not "unstable" is not allowed in release version.
func TestNonVersionedModuleUsageInRelease(t *testing.T) {
nonVersionedModuleUsageInJavaBp := `
@@ -354,7 +742,7 @@ func TestNonVersionedModuleUsageInRelease(t *testing.T) {
libs: ["foo-V1-java"],
}`
- expectedError := `"foo_interface": versions: must be set \(need to be frozen\) when "unstable" is false, PLATFORM_VERSION_CODENAME is REL, and "owner" property is missing.`
+ expectedError := `"foo_interface": versions: must be set \(need to be frozen\) because`
testAidlError(t, expectedError, nonVersionedModuleUsageInJavaBp, setReleaseEnv())
testAidlError(t, expectedError, nonVersionedModuleUsageInJavaBp, setTestFreezeEnv())
testAidl(t, nonVersionedModuleUsageInJavaBp)
@@ -393,7 +781,7 @@ func TestNonVersionedModuleOwnedByTestUsageInRelease(t *testing.T) {
libs: ["foo-V1-java"],
}`
- expectedError := `"foo_interface": versions: must be set \(need to be frozen\) when "unstable" is false, PLATFORM_VERSION_CODENAME is REL, and "owner" property is missing.`
+ expectedError := `"foo_interface": versions: must be set \(need to be frozen\) because`
testAidl(t, nonVersionedModuleUsageInJavaBp, setReleaseEnv())
testAidlError(t, expectedError, nonVersionedModuleUsageInJavaBp, setTestFreezeEnv())
testAidl(t, nonVersionedModuleUsageInJavaBp)
@@ -465,7 +853,7 @@ func TestUnstableVersionedModuleUsageInRelease(t *testing.T) {
libs: ["foo-V2-java"],
}`
- expectedError := `Android.bp:10:2: module \"bar\" variant \"android_common\": foo-V2-java is disallowed in release version because it is unstable, and its \"owner\" property is missing.`
+ expectedError := `Android.bp:10:2: module \"bar\" variant \"android_common\": foo-V2-java is an unfrozen development version`
testAidlError(t, expectedError, nonVersionedModuleUsageInJavaBp, setReleaseEnv())
testAidlError(t, expectedError, nonVersionedModuleUsageInJavaBp, setTestFreezeEnv())
testAidl(t, nonVersionedModuleUsageInJavaBp, withFiles(map[string][]byte{
@@ -494,12 +882,38 @@ func TestUnstableVersionedModuleOwnedByTestUsageInRelease(t *testing.T) {
"aidl_api/foo/1/.hash": nil,
})
- expectedError := `Android.bp:11:2: module \"bar\" variant \"android_common\": foo-V2-java is disallowed in release version because it is unstable, and its \"owner\" property is missing.`
+ expectedError := `Android.bp:11:2: module \"bar\" variant \"android_common\": foo-V2-java is an unfrozen development version`
testAidl(t, nonVersionedModuleUsageInJavaBp, setReleaseEnv(), files)
testAidlError(t, expectedError, nonVersionedModuleUsageInJavaBp, setTestFreezeEnv(), files)
testAidl(t, nonVersionedModuleUsageInJavaBp, files)
}
+func TestFrozenModuleUsageInAllEnvs(t *testing.T) {
+ bp := `
+ aidl_interface {
+ name: "foo",
+ frozen: true,
+ srcs: [
+ "IFoo.aidl",
+ ],
+ versions: ["1"],
+ }
+
+ java_library {
+ name: "bar",
+ libs: ["foo-V2-java"],
+ }`
+ files := withFiles(map[string][]byte{
+ "aidl_api/foo/1/foo.1.aidl": nil,
+ "aidl_api/foo/1/.hash": nil,
+ })
+
+ expectedError := `Android.bp:11:2: module \"bar\" variant \"android_common\": foo-V2-java is an unfrozen development version`
+ testAidlError(t, expectedError, bp, setReleaseEnv(), files)
+ testAidlError(t, expectedError, bp, setTestFreezeEnv(), files)
+ testAidlError(t, expectedError, bp, files)
+}
+
func TestUnstableVersionedModuleOwnedByOtherUsageInRelease(t *testing.T) {
nonVersionedModuleUsageInJavaBp := `
aidl_interface {
@@ -849,9 +1263,28 @@ func TestImports(t *testing.T) {
}
`)
- ctx, _ := testAidl(t, `
+ testAidlError(t, `imports: "foo" depends on "bar" but does not specify a version`, `
aidl_interface {
name: "foo",
+ unstable: true,
+ srcs: [
+ "IFoo.aidl",
+ ],
+ imports: [
+ "bar",
+ ]
+ }
+ aidl_interface {
+ name: "bar",
+ srcs: [
+ "IBar.aidl",
+ ],
+ }
+ `)
+
+ ctx, _ := testAidl(t, `
+ aidl_interface_defaults {
+ name: "foo-defaults",
srcs: [
"IFoo.aidl",
],
@@ -865,6 +1298,10 @@ func TestImports(t *testing.T) {
]
}
aidl_interface {
+ name: "foo",
+ defaults: ["foo-defaults"],
+ }
+ aidl_interface {
name: "bar.1",
srcs: [
"IBar.aidl",
@@ -1026,25 +1463,26 @@ func TestDuplicatedVersions(t *testing.T) {
}))
}
-func TestUnstableVndkModule(t *testing.T) {
- testAidlError(t, `module "myiface_interface": stability: must be "vintf" if the module is for VNDK.`, `
+func TestVndkRequiresFrozen(t *testing.T) {
+ testAidlError(t, `frozen: true or false must be specified when the VNDK is enabled on a versioned interface`, `
aidl_interface {
name: "myiface",
- srcs: ["IFoo.aidl"],
vendor_available: true,
product_available: true,
- unstable: true,
+ srcs: ["IFoo.aidl"],
vndk: {
enabled: true,
},
}
`)
- testAidlError(t, `module "myiface_interface": stability: must be "vintf" if the module is for VNDK.`, `
+ testAidlError(t, `vndk_use_version: must be specified if interface is unfrozen`, `
aidl_interface {
name: "myiface",
vendor_available: true,
product_available: true,
srcs: ["IFoo.aidl"],
+ stability: "vintf",
+ frozen: false,
vndk: {
enabled: true,
},
@@ -1057,6 +1495,8 @@ func TestUnstableVndkModule(t *testing.T) {
product_available: true,
srcs: ["IFoo.aidl"],
stability: "vintf",
+ frozen: false,
+ vndk_use_version: "1",
vndk: {
enabled: true,
},
@@ -1603,6 +2043,7 @@ func TestDuplicateInterfacesWithTheSameNameInDifferentSoongNamespaces(t *testing
"vendor/a/foo/Android.bp": []byte(`
aidl_interface {
name: "foo",
+ owner: "vendor",
srcs: ["IFoo.aidl"],
imports: ["common-V1"],
}
@@ -1613,6 +2054,7 @@ func TestDuplicateInterfacesWithTheSameNameInDifferentSoongNamespaces(t *testing
"vendor/b/foo/Android.bp": []byte(`
aidl_interface {
name: "foo",
+ owner: "vendor",
srcs: ["IFoo.aidl"],
imports: ["common-V2"],
}
@@ -1634,6 +2076,7 @@ func TestUnstableChecksForAidlInterfacesInDifferentNamespaces(t *testing.T) {
"vendor/a/foo/Android.bp": []byte(`
aidl_interface {
name: "foo",
+ owner: "vendor",
srcs: ["IFoo.aidl"],
versions: ["1", "2"],
}
@@ -1652,6 +2095,7 @@ func TestUnstableChecksForAidlInterfacesInDifferentNamespaces(t *testing.T) {
"vendor/b/foo/Android.bp": []byte(`
aidl_interface {
name: "foo",
+ owner: "vendor",
srcs: ["IFoo.aidl"],
versions: ["1"],
}
@@ -1709,7 +2153,7 @@ func TestVersionsWithInfo(t *testing.T) {
aidl_interface {
name: "foo",
srcs: ["IFoo.aidl"],
- imports: ["common"],
+ imports: ["common-V3"],
versions_with_info: [
{version: "1", imports: ["common-V1"]},
{version: "2", imports: ["common-V2"]},
@@ -1768,13 +2212,14 @@ func TestFreezeApiDeps(t *testing.T) {
for _, testcase := range []struct {
string
bool
- }{{"common", true}, {"common-V3", true}, {"common-V2", false}} {
+ }{{"common-V3", true}, {"common-V2", false}} {
im := testcase.string
customizers := []android.FixturePreparer{
withFiles(map[string][]byte{
"common/Android.bp": []byte(`
aidl_interface {
name: "common",
+ frozen: false,
srcs: ["ICommon.aidl"],
versions: ["1", "2"],
}
@@ -1788,6 +2233,7 @@ func TestFreezeApiDeps(t *testing.T) {
name: "foo",
srcs: ["IFoo.aidl"],
imports: ["%s"],
+ frozen: false,
versions_with_info: [
{version: "1", imports: ["common-V1"]},
{version: "2", imports: ["common-V2"]},
@@ -1806,8 +2252,8 @@ func TestFreezeApiDeps(t *testing.T) {
ctx, _ := testAidl(t, ``, customizers...)
shouldHaveDep := transitive && testcase.bool
- fooFreezeApiRule := ctx.ModuleForTests("foo-api", "").Output("updateapi_3.timestamp")
- commonFreezeApiOutput := ctx.ModuleForTests("common-api", "").Output("updateapi_3.timestamp").Output.String()
+ fooFreezeApiRule := ctx.ModuleForTests("foo-api", "").Output("update_or_freeze_api_3.timestamp")
+ commonFreezeApiOutput := ctx.ModuleForTests("common-api", "").Output("update_or_freeze_api_3.timestamp").Output.String()
testMethod := android.AssertStringListDoesNotContain
if shouldHaveDep {
testMethod = android.AssertStringListContains
diff --git a/build/client-using-test-piece-3.cpp b/build/client-using-test-piece-3.cpp
new file mode 100644
index 00000000..dd52b2ef
--- /dev/null
+++ b/build/client-using-test-piece-3.cpp
@@ -0,0 +1,6 @@
+#include <other_package/IBaz.h>
+
+// Enum type should be available here since IBaz.h includes Enum.h
+void acceptEnum(other_package::Enum n) {
+ (void)n;
+}
diff --git a/build/hash_gen.sh b/build/hash_gen.sh
index 9bb7e830..536cdedc 100755
--- a/build/hash_gen.sh
+++ b/build/hash_gen.sh
@@ -20,4 +20,8 @@ if [ $# != 3 ]; then
echo "Usage: hash_gen.sh <api_path> <latest-version> <hash_file_path>"
exit 1
fi
+
+# This adds a new hash to the file if one already exists.
+# We can have multiple hashes in a hash file so we can still identify previous
+# iterations of this interfaces that were released.
(cd $1 && find ./ -name "*.aidl" -print0 | LC_ALL=C sort -z | xargs -0 sha1sum && echo $2) | sha1sum | cut -d " " -f 1 >> $3
diff --git a/build/message_check_equality.txt b/build/message_check_equality.txt
index bb9f5c91..c76a3b46 100644
--- a/build/message_check_equality.txt
+++ b/build/message_check_equality.txt
@@ -4,4 +4,5 @@
Above AIDL file(s) has changed. Run `m %s-update-api` to reflect the changes
to the current version so that it is reviewed by
android-aidl-api-council@google.com
-And then you need to change dependency on %s-* to %s-unstable-* to use new APIs. \ No newline at end of file
+And then you need to change dependency on %s-V(n)-* to %s-V(n+1)-* to use
+new APIs.
diff --git a/build/message_check_equality_frozen.txt b/build/message_check_equality_frozen.txt
new file mode 100644
index 00000000..08b169a4
--- /dev/null
+++ b/build/message_check_equality_frozen.txt
@@ -0,0 +1,9 @@
+###############################################################################
+# ERROR: AIDL API change detected on frozen interface #
+###############################################################################
+Above AIDL file(s) has changed. The AIDL API is marked `frozen: true` so it
+cannot be modified. Change this to `frozen: false`, then run `m %s-update-api`
+to reflect the changes to the current version so that it is reviewed by
+android-aidl-api-council@google.com.
+And then you need to change dependency on %s-V(n)-* to %s-V(n+1)-* to use
+new APIs.
diff --git a/build/properties.go b/build/properties.go
index a37453a7..8c477929 100644
--- a/build/properties.go
+++ b/build/properties.go
@@ -55,9 +55,11 @@ type ccProperties struct {
Product_available *bool
Recovery_available *bool
Host_supported *bool
+ Installable *bool
Generated_sources []string
Generated_headers []string
Shared_libs []string
+ Static_libs []string
Export_shared_lib_headers []string
Export_generated_headers []string
Header_libs []string
@@ -72,6 +74,7 @@ type ccProperties struct {
Tidy *bool
Tidy_flags []string
Tidy_checks_as_errors []string
+ Include_build_directory *bool
}
type javaProperties struct {
@@ -88,18 +91,26 @@ type javaProperties struct {
}
type rustProperties struct {
- Name *string
- Crate_name string
- Owner *string
- Defaults []string
- Host_supported *bool
- Vendor_available *bool
- Srcs []string
- Rustlibs []string
- Stem *string
- Target rustTargetProperties
- Apex_available []string
- Min_sdk_version *string
+ Name *string
+ Crate_name string
+ Owner *string
+ Defaults []string
+ Host_supported *bool
+ Vendor_available *bool
+ Product_available *bool
+ Srcs []string
+ Rustlibs []string
+ Stem *string
+ Target rustTargetProperties
+ Apex_available []string
+ Min_sdk_version *string
+}
+
+type Bazel_module struct {
+ Bp2build_available *bool
+}
+type bazelProperties struct {
+ *Bazel_module
}
type phonyProperties struct {
diff --git a/build/tests_1/other_package/Enum.aidl b/build/tests_1/other_package/Enum.aidl
new file mode 100644
index 00000000..dc005a5d
--- /dev/null
+++ b/build/tests_1/other_package/Enum.aidl
@@ -0,0 +1,19 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package other_package;
+
+enum Enum { ZERO, ONE }
diff --git a/build/tests_1/other_package/IBaz.aidl b/build/tests_1/other_package/IBaz.aidl
index 3d75b6aa..9d04692c 100644
--- a/build/tests_1/other_package/IBaz.aidl
+++ b/build/tests_1/other_package/IBaz.aidl
@@ -16,8 +16,10 @@
package other_package;
+import other_package.Enum;
import some_package.IBar;
interface IBaz {
+ const int ZERO = Enum.ZERO;
void CanYouDealWithThisBar(in IBar bar);
}
diff --git a/build/tests_bp2build/Android.bp b/build/tests_bp2build/Android.bp
new file mode 100644
index 00000000..c9875d85
--- /dev/null
+++ b/build/tests_bp2build/Android.bp
@@ -0,0 +1,87 @@
+// Copyright (C) 2022 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "system_tools_aidl_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["system_tools_aidl_license"],
+}
+
+aidl_interface {
+ name: "example-dep-aidl-interfaces",
+ local_include_dir: "src",
+ srcs: [
+ "src/a/b/AB.aidl",
+ ],
+ backend: {
+ java: {
+ min_sdk_version: "29",
+ },
+ ndk: {
+ enabled: false,
+ },
+ cpp: {
+ enabled: false,
+ },
+ },
+ versions: [
+ "1",
+ ],
+
+}
+
+aidl_interface {
+ name: "example-aidl-interfaces",
+ local_include_dir: "src",
+ srcs: [
+ "src/c/d/CD.aidl",
+ "src/c/d/CD2.aidl",
+ ],
+ backend: {
+ java: {
+ min_sdk_version: "29",
+ },
+ ndk: {
+ enabled: false,
+ },
+ cpp: {
+ enabled: false,
+ },
+ },
+ imports: ["example-dep-aidl-interfaces-V1"],
+ versions: [
+ "1",
+ "2",
+ ],
+}
+
+java_library {
+ name: "example-aidl-latest",
+ sdk_version: "system_current",
+ min_sdk_version: "29",
+ static_libs: [
+ "example-aidl-interfaces-V2-java",
+ ],
+}
+
+java_library {
+ name: "example-aidl-test",
+ sdk_version: "system_current",
+ min_sdk_version: "29",
+ srcs: ["src/android/Test.java"],
+ static_libs: ["example-aidl-latest"],
+}
diff --git a/build/tests_bp2build/aidl_api/example-aidl-interfaces/1/.hash b/build/tests_bp2build/aidl_api/example-aidl-interfaces/1/.hash
new file mode 100644
index 00000000..0dc8683a
--- /dev/null
+++ b/build/tests_bp2build/aidl_api/example-aidl-interfaces/1/.hash
@@ -0,0 +1 @@
+75e4c4fe9993977f16577571a51e8f40468ab7bf
diff --git a/build/tests_bp2build/aidl_api/example-aidl-interfaces/1/c/d/CD.aidl b/build/tests_bp2build/aidl_api/example-aidl-interfaces/1/c/d/CD.aidl
new file mode 100644
index 00000000..412a2977
--- /dev/null
+++ b/build/tests_bp2build/aidl_api/example-aidl-interfaces/1/c/d/CD.aidl
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package c.d;
+parcelable CD {
+ int cd;
+ a.b.AB ab;
+}
diff --git a/build/tests_bp2build/aidl_api/example-aidl-interfaces/2/.hash b/build/tests_bp2build/aidl_api/example-aidl-interfaces/2/.hash
new file mode 100644
index 00000000..f3406308
--- /dev/null
+++ b/build/tests_bp2build/aidl_api/example-aidl-interfaces/2/.hash
@@ -0,0 +1 @@
+b40733528cd90cf1c4457b08e3be2cc05ea146bd
diff --git a/build/tests_bp2build/aidl_api/example-aidl-interfaces/2/c/d/CD.aidl b/build/tests_bp2build/aidl_api/example-aidl-interfaces/2/c/d/CD.aidl
new file mode 100644
index 00000000..412a2977
--- /dev/null
+++ b/build/tests_bp2build/aidl_api/example-aidl-interfaces/2/c/d/CD.aidl
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package c.d;
+parcelable CD {
+ int cd;
+ a.b.AB ab;
+}
diff --git a/build/tests_bp2build/aidl_api/example-aidl-interfaces/2/c/d/CD2.aidl b/build/tests_bp2build/aidl_api/example-aidl-interfaces/2/c/d/CD2.aidl
new file mode 100644
index 00000000..392354c4
--- /dev/null
+++ b/build/tests_bp2build/aidl_api/example-aidl-interfaces/2/c/d/CD2.aidl
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package c.d;
+parcelable CD2 {
+ int cd;
+ a.b.AB ab;
+}
diff --git a/build/tests_bp2build/aidl_api/example-aidl-interfaces/current/c/d/CD.aidl b/build/tests_bp2build/aidl_api/example-aidl-interfaces/current/c/d/CD.aidl
new file mode 100644
index 00000000..412a2977
--- /dev/null
+++ b/build/tests_bp2build/aidl_api/example-aidl-interfaces/current/c/d/CD.aidl
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package c.d;
+parcelable CD {
+ int cd;
+ a.b.AB ab;
+}
diff --git a/build/tests_bp2build/aidl_api/example-aidl-interfaces/current/c/d/CD2.aidl b/build/tests_bp2build/aidl_api/example-aidl-interfaces/current/c/d/CD2.aidl
new file mode 100644
index 00000000..392354c4
--- /dev/null
+++ b/build/tests_bp2build/aidl_api/example-aidl-interfaces/current/c/d/CD2.aidl
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package c.d;
+parcelable CD2 {
+ int cd;
+ a.b.AB ab;
+}
diff --git a/build/tests_bp2build/aidl_api/example-dep-aidl-interfaces/1/.hash b/build/tests_bp2build/aidl_api/example-dep-aidl-interfaces/1/.hash
new file mode 100644
index 00000000..f76e0988
--- /dev/null
+++ b/build/tests_bp2build/aidl_api/example-dep-aidl-interfaces/1/.hash
@@ -0,0 +1 @@
+19b952f31738360300aa261bef511d97d6001196
diff --git a/build/tests_bp2build/aidl_api/example-dep-aidl-interfaces/1/a/b/AB.aidl b/build/tests_bp2build/aidl_api/example-dep-aidl-interfaces/1/a/b/AB.aidl
new file mode 100644
index 00000000..52939572
--- /dev/null
+++ b/build/tests_bp2build/aidl_api/example-dep-aidl-interfaces/1/a/b/AB.aidl
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package a.b;
+parcelable AB {
+ int ab;
+}
diff --git a/build/tests_bp2build/aidl_api/example-dep-aidl-interfaces/current/a/b/AB.aidl b/build/tests_bp2build/aidl_api/example-dep-aidl-interfaces/current/a/b/AB.aidl
new file mode 100644
index 00000000..52939572
--- /dev/null
+++ b/build/tests_bp2build/aidl_api/example-dep-aidl-interfaces/current/a/b/AB.aidl
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package a.b;
+parcelable AB {
+ int ab;
+}
diff --git a/build/tests_bp2build/src/a/b/AB.aidl b/build/tests_bp2build/src/a/b/AB.aidl
new file mode 100644
index 00000000..8665cbc4
--- /dev/null
+++ b/build/tests_bp2build/src/a/b/AB.aidl
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package a.b;
+
+parcelable AB {
+ int ab;
+}
diff --git a/build/tests_bp2build/src/a/b/AB2.aidl b/build/tests_bp2build/src/a/b/AB2.aidl
new file mode 100644
index 00000000..31d0cbc2
--- /dev/null
+++ b/build/tests_bp2build/src/a/b/AB2.aidl
@@ -0,0 +1,21 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package a.b;
+
+parcelable AB2 {
+ int ab;
+}
diff --git a/build/tests_bp2build/src/android/Test.java b/build/tests_bp2build/src/android/Test.java
new file mode 100644
index 00000000..32389778
--- /dev/null
+++ b/build/tests_bp2build/src/android/Test.java
@@ -0,0 +1,23 @@
+// Copyright (C) 2022 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package android;
+
+import c.d.CD;
+import c.d.CD2;
+
+class Test {
+ CD cd;
+ CD2 cd2;
+}
diff --git a/build/tests_bp2build/src/c/d/CD.aidl b/build/tests_bp2build/src/c/d/CD.aidl
new file mode 100644
index 00000000..17a3af4e
--- /dev/null
+++ b/build/tests_bp2build/src/c/d/CD.aidl
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package c.d;
+
+import a.b.AB;
+
+parcelable CD {
+ int cd;
+ AB ab;
+}
diff --git a/build/tests_bp2build/src/c/d/CD2.aidl b/build/tests_bp2build/src/c/d/CD2.aidl
new file mode 100644
index 00000000..e10f9590
--- /dev/null
+++ b/build/tests_bp2build/src/c/d/CD2.aidl
@@ -0,0 +1,24 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package c.d;
+
+import a.b.AB;
+
+parcelable CD2 {
+ int cd;
+ AB ab;
+}
diff --git a/build/tests_vintf/vintf/IFoo.aidl b/build/tests_vintf/vintf/IFoo.aidl
new file mode 100644
index 00000000..67d3ab1f
--- /dev/null
+++ b/build/tests_vintf/vintf/IFoo.aidl
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package vintf;
+
+@VintfStability
+interface IFoo {
+ parcelable Foo {
+ String a;
+ }
+ union A {
+ String a;
+ int b;
+ }
+ enum E { A, B, C }
+
+ Foo[] abar(in Foo[] f);
+ ParcelFileDescriptor afd(in ParcelFileDescriptor fd);
+ E ae(in E e);
+ A aa(in A a);
+}
diff --git a/check_valid.cpp b/check_valid.cpp
index e7bcb8d3..b572d7d4 100644
--- a/check_valid.cpp
+++ b/check_valid.cpp
@@ -23,6 +23,7 @@ namespace android {
namespace aidl {
using TypePredicate = std::function<bool(const AidlTypeSpecifier&)>;
+using DefinedTypePredicate = std::function<bool(const AidlDefinedType&)>;
namespace {
bool IsListOf(const AidlTypeSpecifier& type, TypePredicate pred) {
@@ -40,6 +41,7 @@ bool IsInterface(const AidlTypeSpecifier& type) {
struct CheckTypeVisitor : AidlVisitor {
bool success = true;
std::vector<TypePredicate> checkers;
+ std::vector<DefinedTypePredicate> defined_checkers;
void Visit(const AidlTypeSpecifier& type) override {
for (auto& checker : checkers) {
@@ -48,8 +50,23 @@ struct CheckTypeVisitor : AidlVisitor {
}
}
}
+ void Visit(const AidlInterface& t) override { CheckDefinedType(t); }
+ void Visit(const AidlEnumDeclaration& t) override { CheckDefinedType(t); }
+ void Visit(const AidlStructuredParcelable& t) override { CheckDefinedType(t); }
+ void Visit(const AidlUnionDecl& t) override { CheckDefinedType(t); }
+ void Visit(const AidlParcelable& t) override { CheckDefinedType(t); }
void Check(TypePredicate checker) { checkers.push_back(std::move(checker)); }
+ void Check(DefinedTypePredicate checker) { defined_checkers.push_back(std::move(checker)); }
+
+ private:
+ void CheckDefinedType(const AidlDefinedType& type) {
+ for (auto& checker : defined_checkers) {
+ if (!checker(type)) {
+ success = false;
+ }
+ }
+ }
};
bool CheckValid(const AidlDocument& doc, const Options& options) {
@@ -80,6 +97,74 @@ bool CheckValid(const AidlDocument& doc, const Options& options) {
return true;
});
+ // Check all nested types for potential #include cycles that would contain
+ // them. The algorithm performs a depth-first search on a graph with the
+ // following properties:
+ //
+ // * Graph nodes are top-level (non-nested) types, under the assumption that
+ // there is a 1:1 mapping between top-level types and included headers. This
+ // implies that a cycle between these types will be equivalent to a cycle
+ // between headers.
+ //
+ // * Each edge U -> V represents a "declare V before U" relationship between
+ // types. This means that V.h needs to be included by U.h, or the V type
+ // needs to be forward-declared before U. For any type U, its neighbors
+ // are all nodes V such that U or its nested types have a reference to V
+ // or any type nested in it.
+ //
+ // * The algorithm tries to find a cycle containing start_type. Such a
+ // cycle exists if the following hold true:
+ // * There exists a path from start_type to another top-level type T
+ // (different from start_type)
+ // * There is a back edge from T to start_type which closes the cycle
+ v.Check([&](const AidlDefinedType& start_type) {
+ if (start_type.GetParentType() == nullptr) {
+ return true;
+ }
+
+ std::set<const AidlDefinedType*> visited;
+ std::function<bool(const AidlDefinedType*)> dfs = [&](const AidlDefinedType* type) {
+ if (!visited.insert(type).second) {
+ // Already visited
+ return false;
+ }
+
+ for (const auto& t : Collect<AidlTypeSpecifier>(*type)) {
+ auto defined_type = t->GetDefinedType();
+ if (!defined_type) {
+ // Skip primitive/builtin types
+ continue;
+ }
+
+ auto top_type = defined_type->GetRootType();
+ if (top_type == type) {
+ // Skip type references within the same top-level type
+ continue;
+ }
+
+ if (defined_type == &start_type) {
+ // Found a cycle back to the starting nested type
+ return true;
+ }
+
+ if (dfs(top_type)) {
+ // Found a cycle while visiting the top type for the next node
+ return true;
+ }
+ }
+
+ return false;
+ };
+
+ bool has_cycle = dfs(start_type.GetRootType());
+ if (has_cycle) {
+ AIDL_ERROR(start_type) << "has cyclic references to nested types.";
+ return false;
+ }
+
+ return true;
+ });
+
VisitTopDown(v, doc);
return v.success;
}
diff --git a/diagnostics.cpp b/diagnostics.cpp
index 0eca8ae1..d3f04b5b 100644
--- a/diagnostics.cpp
+++ b/diagnostics.cpp
@@ -307,7 +307,7 @@ struct DiagnosePermissionAnnotations : DiagnosticsVisitor {
"required using @EnforcePermission. If permissions are manually "
"verified within the implementation, use @PermissionManuallyEnforced. "
"If no permissions are required, use @RequiresNoPermission.";
- if (intf.EnforceExpression() || intf.IsPermissionManual() || intf.IsPermissionNone()) {
+ if (intf.IsPermissionAnnotated()) {
return;
}
const auto& methods = intf.GetMethods();
@@ -317,8 +317,7 @@ struct DiagnosePermissionAnnotations : DiagnosticsVisitor {
auto& m = methods[i];
if (!m->IsUserDefined()) continue;
num_user_defined_methods++;
- if (m->GetType().EnforceExpression() || m->GetType().IsPermissionManual() ||
- m->GetType().IsPermissionNone()) {
+ if (m->GetType().IsPermissionAnnotated()) {
continue;
}
methods_without_annotations.push_back(i);
diff --git a/generate_cpp.cpp b/generate_cpp.cpp
index 988ac2b9..874fa138 100644
--- a/generate_cpp.cpp
+++ b/generate_cpp.cpp
@@ -31,7 +31,7 @@
#include "aidl_language.h"
#include "aidl_to_cpp.h"
-#include "code_writer.h"
+
#include "logging.h"
#include "os.h"
@@ -67,11 +67,12 @@ const char kAndroidStatusBadValue[] = "::android::BAD_VALUE";
const char kBinderStatusLiteral[] = "::android::binder::Status";
const char kIBinderHeader[] = "binder/IBinder.h";
const char kIInterfaceHeader[] = "binder/IInterface.h";
+const char kBinderDelegateHeader[] = "binder/Delegate.h";
const char kParcelHeader[] = "binder/Parcel.h";
const char kStabilityHeader[] = "binder/Stability.h";
const char kStatusHeader[] = "binder/Status.h";
const char kString16Header[] = "utils/String16.h";
-const char kTraceHeader[] = "utils/Trace.h";
+const char kTraceHeader[] = "binder/Trace.h";
const char kStrongPointerHeader[] = "utils/StrongPointer.h";
const char kAndroidBaseMacrosHeader[] = "android-base/macros.h";
@@ -190,8 +191,9 @@ void GenerateClientTransaction(CodeWriter& out, const AidlTypenames& typenames,
out.Write("%s %s;\n", kBinderStatusLiteral, kStatusVarName);
if (options.GenTraces()) {
- out.Write("::android::ScopedTrace %s(ATRACE_TAG_AIDL, \"AIDL::cpp::%s::%s::cppClient\");\n",
- kTraceVarName, interface.GetName().c_str(), method.GetName().c_str());
+ out.Write(
+ "::android::binder::ScopedTrace %s(ATRACE_TAG_AIDL, \"AIDL::cpp::%s::%s::cppClient\");\n",
+ kTraceVarName, interface.GetName().c_str(), method.GetName().c_str());
}
if (options.GenLog()) {
@@ -434,6 +436,10 @@ void GenerateConstantDeclarations(CodeWriter& out, const AidlDefinedType& type,
out << "static const " << cpp_type << "& " << constant->GetName() << "()";
GenerateDeprecated(out, *constant);
out << ";\n";
+ } else if (type.Signature() == "float" || type.Signature() == "double") {
+ out << "static constexpr " << cpp_type << " " << constant->GetName();
+ GenerateDeprecated(out, *constant);
+ out << " = " << constant->ValueString(ConstantValueDecorator) << ";\n";
} else {
out << "enum : " << cpp_type << " { " << constant->GetName();
GenerateDeprecated(out, *constant);
@@ -465,8 +471,9 @@ void GenerateServerTransaction(CodeWriter& out, const AidlInterface& interface,
out.Write("}\n");
if (options.GenTraces()) {
- out.Write("::android::ScopedTrace %s(ATRACE_TAG_AIDL, \"AIDL::cpp::%s::%s::cppServer\");\n",
- kTraceVarName, interface.GetName().c_str(), method.GetName().c_str());
+ out.Write(
+ "::android::binder::ScopedTrace %s(ATRACE_TAG_AIDL, \"AIDL::cpp::%s::%s::cppServer\");\n",
+ kTraceVarName, interface.GetName().c_str(), method.GetName().c_str());
}
if (interface.EnforceExpression() || method.GetType().EnforceExpression()) {
@@ -774,6 +781,42 @@ void GenerateClientHeader(CodeWriter& out, const AidlInterface& interface,
LeaveNamespace(out, interface);
}
+// Some interfaces are declared in .aidl files, but defined elsewhere.
+// These interfaces can not have Delegators and need to be avoided.
+// TODO(b/242920522) These should all be defined in .aidl files.
+bool isKnownUndefinedInterface(const std::string& canonicalName) {
+ static const auto* kKnownUndefinedInterfaces = new std::set<std::string>{
+ "android.hardware.ICamera", "android.hardware.ICameraClient",
+ "android.IOMXNode", "android.IMediaExtractor",
+ "android.IDataSource",
+ };
+ return kKnownUndefinedInterfaces->find(canonicalName) != kKnownUndefinedInterfaces->end();
+};
+
+bool isDelegateable(const AidlTypeSpecifier& type) {
+ return type.GetDefinedType() && type.GetDefinedType()->AsInterface() &&
+ !isKnownUndefinedInterface(type.GetDefinedType()->GetCanonicalName()) && !type.IsArray();
+}
+
+void wrapDelegate(CodeWriter& out, const std::string& argName, const AidlTypeSpecifier& type,
+ bool in) {
+ const std::string argRef = in ? argName : "*" + argName;
+ const std::string targetArgName = in ? "_" + argName : argName;
+ const std::string targetArgRef = in ? targetArgName : "*" + targetArgName;
+ // input binders need local variables for each arg to pass to the delegate
+ // because the parameters are const
+ if (in) {
+ out << "::android::sp<::" << Join(type.GetSplitName(), "::") << "Delegator> " << targetArgName
+ << ";\n";
+ }
+ out << "if (" << argRef << ") {\n";
+ out.Indent();
+ out << targetArgRef << " = ::android::sp<::" << Join(type.GetSplitName(), "::")
+ << "Delegator>::cast(delegate(" << argRef << "));\n";
+ out.Dedent();
+ out << "}\n";
+}
+
void GenerateServerClassDecl(CodeWriter& out, const AidlInterface& interface,
const AidlTypenames& typenames, const Options& options) {
const string bn_name = ClassName(interface, ClassNames::SERVER);
@@ -813,9 +856,10 @@ void GenerateServerClassDecl(CodeWriter& out, const AidlInterface& interface,
out << " " << d_name << " : public " << bn_name << " {\n";
out << "public:\n";
out.Indent();
- out << "explicit " << d_name << "(" << StringPrintf("::android::sp<%s> &impl", iface.c_str())
- << ") " << StringPrintf(": %s(impl)", kDelegateImplVarName) << " {}\n\n";
-
+ out << "explicit " << d_name << "("
+ << StringPrintf("const ::android::sp<%s> &impl", iface.c_str()) << ") "
+ << StringPrintf(": %s(impl)", kDelegateImplVarName) << " {}\n\n";
+ out << "::android::sp<" << iface << "> getImpl() { return " << kDelegateImplVarName << "; }\n";
for (const auto& method : interface.GetMethods()) {
if (method->IsUserDefined()) {
GenerateMethodDecl(out, typenames, *method, /*clazz=*/"");
@@ -823,19 +867,52 @@ void GenerateServerClassDecl(CodeWriter& out, const AidlInterface& interface,
GenerateDeprecated(out, *method);
std::vector<std::string> args;
+
+ // arg name, type
+ std::vector<pair<const std::string, const AidlTypeSpecifier&>> outBinders;
+ std::vector<pair<const std::string, const AidlTypeSpecifier&>> inBinders;
for (const auto& arg : method->GetArguments()) {
- if (IsNonCopyableType(arg->GetType(), typenames)) {
- args.push_back(StringPrintf("std::move(%s)", arg->GetName().c_str()));
+ if (isDelegateable(arg->GetType())) {
+ if (arg->IsOut()) {
+ outBinders.push_back({arg->GetName(), arg->GetType()});
+ } else if (arg->IsIn()) {
+ inBinders.push_back({arg->GetName(), arg->GetType()});
+ } else {
+ AIDL_FATAL(*arg) << "inout interface?";
+ }
+ AIDL_FATAL_IF(!arg->IsIn() && !arg->IsOut(), *arg) << "Not in or out?";
+ args.push_back("_" + arg->GetName());
} else {
- args.push_back(arg->GetName());
+ if (IsNonCopyableType(arg->GetType(), typenames)) {
+ args.push_back(StringPrintf("std::move(%s)", arg->GetName().c_str()));
+ } else {
+ args.push_back(arg->GetName());
+ }
}
}
if (method->GetType().GetName() != "void") {
+ if (isDelegateable(method->GetType())) {
+ outBinders.push_back({kReturnVarName, method->GetType()});
+ }
args.push_back(kReturnVarName);
}
- out << " {\n"
- << " return " << kDelegateImplVarName << "->" << method->GetName() << "("
- << base::Join(args, ", ") << ");\n";
+ out << " {\n";
+ out.Indent();
+ for (const auto binder : inBinders) {
+ wrapDelegate(out, binder.first, binder.second, true);
+ }
+ if (outBinders.empty()) {
+ out << "return " << kDelegateImplVarName << "->" << method->GetName() << "("
+ << base::Join(args, ", ") << ");\n";
+ } else {
+ out << "auto _status = " << kDelegateImplVarName << "->" << method->GetName() << "("
+ << base::Join(args, ", ") << ");\n";
+ for (const auto& binder : outBinders) {
+ wrapDelegate(out, binder.first, binder.second, false);
+ }
+ out << "return _status;\n";
+ }
+ out.Dedent();
out << "}\n";
} else if (method->GetName() == kGetInterfaceVersion && options.Version()) {
out << "int32_t " << kGetInterfaceVersion << "()"
@@ -862,6 +939,43 @@ void GenerateServerClassDecl(CodeWriter& out, const AidlInterface& interface,
out << "}; // class " << d_name << "\n";
}
+// Collect all includes for the type's server header. Nested types are visited as well via
+// VisitTopDown.
+void GenerateServerHeaderIncludes(CodeWriter& out, const AidlDefinedType& defined_type,
+ const AidlTypenames& typenames, const Options& options) {
+ struct Visitor : AidlVisitor {
+ const AidlTypenames& typenames;
+ const Options& options;
+ std::set<std::string> includes;
+ Visitor(const AidlTypenames& typenames, const Options& options)
+ : typenames(typenames), options(options) {}
+
+ // Collect includes for each type reference
+ void Visit(const AidlTypeSpecifier& type) override {
+ // Add Bn* header files for types used in this header. The *Delegator
+ // definitions require them.
+ const auto defined_type = type.GetDefinedType();
+ if (defined_type && defined_type->AsInterface()) {
+ if (!isKnownUndefinedInterface(defined_type->GetCanonicalName())) {
+ includes.insert(HeaderFile(*defined_type, ClassNames::SERVER, /*use_os_sep=*/false));
+ }
+ }
+ }
+
+ // Collect implementation-specific includes for each type definition
+ void Visit(const AidlInterface& iface) override {
+ includes.insert(HeaderFile(iface, ClassNames::SERVER, false));
+ }
+ } v(typenames, options);
+ VisitTopDown(v, defined_type);
+
+ v.includes.insert(kBinderDelegateHeader);
+ for (const auto& path : v.includes) {
+ out << "#include <" << path << ">\n";
+ }
+ out << "\n";
+}
+
void GenerateServerHeader(CodeWriter& out, const AidlInterface& interface,
const AidlTypenames& typenames, const Options& options) {
out << "#pragma once\n\n";
@@ -871,6 +985,7 @@ void GenerateServerHeader(CodeWriter& out, const AidlInterface& interface,
out << "#include <functional>\n"; // for std::function
out << "#include <android/binder_to_string.h>\n";
}
+ GenerateServerHeaderIncludes(out, interface, typenames, options);
out << "\n";
EnterNamespace(out, interface);
GenerateServerClassDecl(out, interface, typenames, options);
@@ -889,12 +1004,13 @@ void GenerateNestedTypeDecls(CodeWriter& out, const AidlDefinedType& type,
void GenerateInterfaceClassDecl(CodeWriter& out, const AidlInterface& interface,
const AidlTypenames& typenames, const Options& options) {
const string i_name = ClassName(interface, ClassNames::INTERFACE);
-
+ out << "class " << ClassName(interface, ClassNames::DELEGATOR_IMPL) << ";\n\n";
out << "class";
GenerateDeprecated(out, interface);
out << " " << i_name << " : public ::android::IInterface {\n";
out << "public:\n";
out.Indent();
+ out << "typedef " << ClassName(interface, ClassNames::DELEGATOR_IMPL) << " DefaultDelegator;\n";
out << "DECLARE_META_INTERFACE(" << ClassName(interface, ClassNames::BASE) << ")\n";
if (options.Version() > 0) {
out << "const int32_t VERSION = " << std::to_string(options.Version()) << ";\n";
@@ -980,7 +1096,7 @@ void GenerateReadFromParcel(CodeWriter& out, const AidlStructuredParcelable& par
out << "}\n";
out << "if (_aidl_parcelable_raw_size < 4) return ::android::BAD_VALUE;\n";
out << "size_t _aidl_parcelable_size = static_cast<size_t>(_aidl_parcelable_raw_size);\n";
- out << "if (_aidl_start_pos > SIZE_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;\n";
+ out << "if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;\n";
for (const auto& variable : parcel.GetFields()) {
string method = ParcelReadMethodOf(variable->GetType(), typenames);
string arg = ParcelReadCastOf(variable->GetType(), typenames, "&" + variable->GetName());
@@ -1089,6 +1205,7 @@ void GenerateParcelClassDecl(CodeWriter& out, const ParcelableType& parcel,
const AidlTypenames& typenames, const Options& options) {
const string clazz = parcel.GetName();
+ ClangDiagnosticIgnoreDeprecated guard(out, HasDeprecatedField(parcel));
out << TemplateDecl(parcel);
out << "class";
GenerateDeprecated(out, parcel);
@@ -1111,8 +1228,8 @@ void GenerateParcelClassDecl(CodeWriter& out, const ParcelableType& parcel,
const string canonical_name = parcel.GetCanonicalName();
out << "static const ::android::String16& getParcelableDescriptor() {\n"
- << " static const ::android::StaticString16 DESCIPTOR (u\"" << canonical_name << "\");\n"
- << " return DESCIPTOR;\n"
+ << " static const ::android::StaticString16 DESCRIPTOR (u\"" << canonical_name << "\");\n"
+ << " return DESCRIPTOR;\n"
<< "}\n";
GenerateToString(out, parcel);
@@ -1143,21 +1260,24 @@ void GenerateParcelSource(CodeWriter& out, const T& parcel, const AidlTypenames&
EnterNamespace(out, parcel);
GenerateConstantDefinitions(out, parcel, typenames, TemplateDecl(parcel), q_name);
- out << TemplateDecl(parcel);
- out << "::android::status_t " << q_name << "::readFromParcel(const ::android::Parcel* "
- << kParcelVarName << ") {\n";
- out.Indent();
- GenerateReadFromParcel(out, parcel, typenames);
- out.Dedent();
- out << "}\n";
+ {
+ ClangDiagnosticIgnoreDeprecated guard(out, HasDeprecatedField(parcel));
+ out << TemplateDecl(parcel);
+ out << "::android::status_t " << q_name << "::readFromParcel(const ::android::Parcel* "
+ << kParcelVarName << ") {\n";
+ out.Indent();
+ GenerateReadFromParcel(out, parcel, typenames);
+ out.Dedent();
+ out << "}\n";
- out << TemplateDecl(parcel);
- out << "::android::status_t " << q_name << "::writeToParcel(::android::Parcel* " << kParcelVarName
- << ") const {\n";
- out.Indent();
- GenerateWriteToParcel(out, parcel, typenames);
- out.Dedent();
- out << "}\n";
+ out << TemplateDecl(parcel);
+ out << "::android::status_t " << q_name << "::writeToParcel(::android::Parcel* "
+ << kParcelVarName << ") const {\n";
+ out.Indent();
+ GenerateWriteToParcel(out, parcel, typenames);
+ out.Dedent();
+ out << "}\n";
+ }
LeaveNamespace(out, parcel);
}
@@ -1186,31 +1306,6 @@ void GenerateClassDecl(CodeWriter& out, const AidlDefinedType& defined_type,
using namespace internals;
-// Ensures that output_file is <out_dir>/<packagename>/<typename>.cpp
-bool ValidateOutputFilePath(const string& output_file, const Options& options,
- const AidlDefinedType& defined_type) {
- const auto& out_dir =
- !options.OutputDir().empty() ? options.OutputDir() : options.OutputHeaderDir();
- if (output_file.empty() || !android::base::StartsWith(output_file, out_dir)) {
- // If output_file is not set (which happens in the unit tests) or is outside of out_dir, we can
- // help but accepting it, because the path is what the user has requested.
- return true;
- }
-
- string canonical_name = defined_type.GetCanonicalName();
- std::replace(canonical_name.begin(), canonical_name.end(), '.', OS_PATH_SEPARATOR);
- const string expected = out_dir + canonical_name + ".cpp";
- if (expected != output_file) {
- AIDL_ERROR(defined_type) << "Output file is expected to be at " << expected << ", but is "
- << output_file << ".\n If this is an Android platform "
- << "build, consider providing the input AIDL files using a filegroup "
- << "with `path:\"<base>\"` so that the AIDL files are located at "
- << "<base>/<packagename>/<typename>.aidl.";
- return false;
- }
- return true;
-}
-
// Collect all includes for the type's header. Nested types are visited as well via VisitTopDown.
void GenerateHeaderIncludes(CodeWriter& out, const AidlDefinedType& defined_type,
const AidlTypenames& typenames, const Options& options) {
@@ -1239,6 +1334,7 @@ void GenerateHeaderIncludes(CodeWriter& out, const AidlDefinedType& defined_type
// For a nested interface, client/server classes are declared the same header as well.
if (iface.GetParentType()) {
+ includes.insert(kBinderDelegateHeader); // Delegate.h
// client/server class provides logFunc when gen_log is on
if (options.GenLog()) {
includes.insert("functional"); // std::function for logFunc
@@ -1330,6 +1426,7 @@ void GenerateHeader(CodeWriter& out, const AidlDefinedType& defined_type,
}
out << "#pragma once\n\n";
GenerateHeaderIncludes(out, defined_type, typenames, options);
+ GenerateForwardDecls(out, defined_type, false);
EnterNamespace(out, defined_type);
// Each class decl contains its own nested types' class decls
GenerateClassDecl(out, defined_type, typenames, options);
diff --git a/generate_cpp_analyzer.cpp b/generate_cpp_analyzer.cpp
new file mode 100644
index 00000000..36fc0434
--- /dev/null
+++ b/generate_cpp_analyzer.cpp
@@ -0,0 +1,216 @@
+/*
+ * Copyright (C) 2022, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "generate_cpp_analyzer.h"
+
+#include <string>
+#include "aidl.h"
+#include "aidl_language.h"
+#include "aidl_to_cpp.h"
+#include "code_writer.h"
+#include "logging.h"
+
+using std::string;
+using std::unique_ptr;
+
+namespace android {
+namespace aidl {
+namespace cpp {
+namespace {
+
+const char kAndroidStatusVarName[] = "_aidl_ret_status";
+const char kReturnVarName[] = "_aidl_return";
+const char kDataVarName[] = "_aidl_data";
+const char kReplyVarName[] = "_aidl_reply";
+
+void GenerateAnalyzerTransaction(CodeWriter& out, const AidlInterface& interface,
+ const AidlMethod& method, const AidlTypenames& typenames,
+ const Options& options) {
+ // Reading past the interface descriptor and reply binder status
+ out << "_aidl_ret_status = ::android::OK;\n";
+ out.Write("if (!(%s.enforceInterface(android::String16(\"%s\")))) {\n", kDataVarName,
+ interface.GetDescriptor().c_str());
+ out.Write(" %s = ::android::BAD_TYPE;\n", kAndroidStatusVarName);
+ out << " std::cout << \" Failure: Parcel interface does not match.\" << std::endl;\n"
+ << " break;\n"
+ << "}\n";
+
+ // Declare parameters
+ for (const unique_ptr<AidlArgument>& a : method.GetArguments()) {
+ out.Write("%s %s;\n", CppNameOf(a->GetType(), typenames).c_str(), BuildVarName(*a).c_str());
+ }
+ out << "::android::binder::Status binderStatus;\n";
+ // Declare and read the return value.
+ // Read past the binder status.
+ out.Write("binderStatus.readFromParcel(%s);\n", kReplyVarName);
+ if (method.GetType().GetName() != "void") {
+ out.Write("%s %s;\n", CppNameOf(method.GetType(), typenames).c_str(), kReturnVarName);
+ out.Write("bool returnError = false;\n");
+ }
+
+ // Read Reply
+ if (method.GetType().GetName() != "void") {
+ out.Write("%s = %s.%s(%s);\n", kAndroidStatusVarName, kReplyVarName,
+ ParcelReadMethodOf(method.GetType(), typenames).c_str(),
+ ParcelReadCastOf(method.GetType(), typenames, string("&") + kReturnVarName).c_str());
+ out.Write("if (((%s) != (android::NO_ERROR))) {\n", kAndroidStatusVarName);
+ out.Indent();
+ out.Write(
+ "std::cerr << \"Failure: error in reading return value from Parcel.\" << std::endl;\n");
+ out.Write("returnError = true;\n");
+ out.Dedent();
+ out.Write("}\n");
+ }
+
+ // Reading arguments
+ out << "do { // Single-pass loop to break if argument reading fails\n";
+ out.Indent();
+ for (const auto& a : method.GetArguments()) {
+ out.Write("%s = %s.%s(%s);\n", kAndroidStatusVarName, kDataVarName,
+ ParcelReadMethodOf(a->GetType(), typenames).c_str(),
+ ParcelReadCastOf(a->GetType(), typenames, "&" + BuildVarName(*a)).c_str());
+ out.Write("if (((%s) != (android::NO_ERROR))) {\n", kAndroidStatusVarName);
+ out.Indent();
+ out.Write("std::cerr << \"Failure: error in reading argument %s from Parcel.\" << std::endl;\n",
+ a->GetName().c_str());
+ out.Dedent();
+ out.Write(" break;\n}\n");
+ }
+ out.Dedent();
+ out << "} while(false);\n";
+
+ if (!method.GetArguments().empty() && options.GetMinSdkVersion() >= SDK_VERSION_Tiramisu) {
+ out.Write(
+ "if (!%s.enforceNoDataAvail().isOk()) {\n %s = android::BAD_VALUE;\n std::cout << \" "
+ "Failure: Parcel has too much data.\" << std::endl;\n break;\n}\n",
+ kDataVarName, kAndroidStatusVarName);
+ }
+
+ // Arguments
+ out.Write("std::cout << \" arguments: \" << std::endl;\n");
+ for (const auto& a : method.GetArguments()) {
+ out.Write(
+ "std::cout << \" %s: \" << ::android::internal::ToString(%s) "
+ "<< std::endl;\n",
+ a->GetName().c_str(), BuildVarName(*a).c_str());
+ }
+
+ // Return Value
+ if (method.GetType().GetName() != "void") {
+ out.Write("if (returnError) {\n");
+ out.Indent();
+ out.Write("std::cout << \" return: <error>\" << std::endl;\n");
+ out.Dedent();
+ out.Write("} else {");
+ out.Indent();
+ out.Write("std::cout << \" return: \" << ::android::internal::ToString(%s) << std::endl;\n",
+ kReturnVarName);
+ out.Dedent();
+ out.Write("}\n");
+ } else {
+ out.Write("std::cout << \" return: void\" << std::endl;\n");
+ }
+}
+
+void GenerateAnalyzerSource(CodeWriter& out, const AidlDefinedType& defined_type,
+ const AidlTypenames& typenames, const Options& options) {
+ auto interface = AidlCast<AidlInterface>(defined_type);
+ string q_name = GetQualifiedName(*interface, ClassNames::INTERFACE);
+
+ string canonicalName = defined_type.GetCanonicalName();
+ string interfaceName = defined_type.GetName();
+
+ // Includes
+ vector<string> include_list{
+ "iostream", "binder/Parcel.h", "android/binder_to_string.h",
+ HeaderFile(*interface, ClassNames::RAW, false),
+ // HeaderFile(*interface, ClassNames::INTERFACE, false),
+ };
+ for (const auto& include : include_list) {
+ out << "#include <" << include << ">\n";
+ }
+
+ out << "namespace {\n";
+ // Function Start
+ out.Write(
+ "android::status_t analyze%s(uint32_t _aidl_code, const android::Parcel& %s, const "
+ "android::Parcel& %s) {\n",
+ q_name.c_str(), kDataVarName, kReplyVarName);
+ out.Indent();
+ out.Write("android::status_t %s;\nswitch(_aidl_code) {\n", kAndroidStatusVarName);
+ out.Indent();
+
+ // Main Switch Statement
+ for (const auto& method : interface->GetMethods()) {
+ out.Write("case ::android::IBinder::FIRST_CALL_TRANSACTION + %d:\n{\n", (method->GetId()));
+ out.Indent();
+ out.Write("std::cout << \"%s.%s()\" << std::endl;\n", interfaceName.c_str(),
+ method->GetName().c_str());
+ GenerateAnalyzerTransaction(out, *interface, *method, typenames, options);
+ out.Dedent();
+ out << "}\n";
+ out << "break;\n";
+ }
+ out << "default:\n{\n std::cout << \" Transaction code \" << _aidl_code << \" not known.\" << "
+ "std::endl;\n";
+ out.Write("%s = android::UNKNOWN_TRANSACTION;\n}\n", kAndroidStatusVarName);
+ out.Dedent();
+ out.Write("}\nreturn %s;\n", kAndroidStatusVarName);
+ out << "// To prevent unused variable warnings\n";
+ out.Write("(void)%s; (void)%s; (void)%s;\n", kAndroidStatusVarName, kDataVarName, kReplyVarName);
+ out.Dedent();
+ out << "}\n\n} // namespace\n";
+
+ out << "\n#include <Analyzer.h>\nusing android::aidl::Analyzer;\n";
+ out.Write(
+ "__attribute__((constructor)) static void addAnalyzer() {\n"
+ " Analyzer::installAnalyzer(std::make_unique<Analyzer>(\"%s\", \"%s\", &analyze%s));\n}\n",
+ canonicalName.c_str(), interfaceName.c_str(), q_name.c_str());
+}
+
+void GenerateAnalyzerPlaceholder(CodeWriter& out, const AidlDefinedType& /*defined_type*/,
+ const AidlTypenames& /*typenames*/, const Options& /*options*/) {
+ out << "// This file is intentionally left blank as placeholder for building an analyzer.\n";
+}
+
+} // namespace
+
+bool GenerateCppAnalyzer(const string& output_file, const Options& options,
+ const AidlTypenames& typenames, const AidlDefinedType& defined_type,
+ const IoDelegate& io_delegate) {
+ if (!ValidateOutputFilePath(output_file, options, defined_type)) {
+ return false;
+ }
+
+ using GenFn = void (*)(CodeWriter & out, const AidlDefinedType& defined_type,
+ const AidlTypenames& typenames, const Options& options);
+ auto gen = [&](auto file, GenFn fn) {
+ unique_ptr<CodeWriter> writer(io_delegate.GetCodeWriter(file));
+ fn(*writer, defined_type, typenames, options);
+ AIDL_FATAL_IF(!writer->Close(), defined_type) << "I/O Error!";
+ return true;
+ };
+
+ if (AidlCast<AidlInterface>(defined_type)) {
+ return gen(output_file, &GenerateAnalyzerSource);
+ } else {
+ return gen(output_file, &GenerateAnalyzerPlaceholder);
+ }
+}
+
+} // namespace cpp
+} // namespace aidl
+} // namespace android
diff --git a/generate_cpp_analyzer.h b/generate_cpp_analyzer.h
new file mode 100644
index 00000000..10bc34bc
--- /dev/null
+++ b/generate_cpp_analyzer.h
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2022, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include <memory>
+#include <string>
+
+#include "aidl_language.h"
+#include "aidl_to_cpp.h"
+#include "aidl_to_cpp_common.h"
+#include "options.h"
+
+namespace android {
+namespace aidl {
+namespace cpp {
+
+bool GenerateCppAnalyzer(const string& output_file, const Options& options,
+ const AidlTypenames& typenames, const AidlDefinedType& parsed_doc,
+ const IoDelegate& io_delegate);
+
+} // namespace cpp
+} // namespace aidl
+} // namespace android
diff --git a/generate_cpp_unittest.cpp b/generate_cpp_unittest.cpp
index d79f2250..833884b9 100644
--- a/generate_cpp_unittest.cpp
+++ b/generate_cpp_unittest.cpp
@@ -74,7 +74,8 @@ const char kOutputPath[] = "output.cpp";
const char kHeaderDir[] = "headers";
const char kInterfaceHeaderRelPath[] = "a/IFoo.h";
-const string kCmdline = string("aidl-cpp ") + kInputPath + " " + kHeaderDir + " " + kOutputPath;
+const string kCmdline =
+ string("aidl-cpp -I . ") + kInputPath + " " + kHeaderDir + " " + kOutputPath;
} // namespace test_io_handling
diff --git a/generate_java.cpp b/generate_java.cpp
index 34206692..3f332973 100644
--- a/generate_java.cpp
+++ b/generate_java.cpp
@@ -595,7 +595,7 @@ std::unique_ptr<android::aidl::java::Class> GenerateParcelableClass(
for (const auto& nested : parcel->GetNestedTypes()) {
GenerateClass(*writer, *nested, typenames, options);
}
- GenerateParcelHelpers(*writer, *parcel, options);
+ GenerateParcelHelpers(*writer, *parcel, typenames, options);
writer->Close();
parcel_class->elements.push_back(std::make_shared<LiteralClassElement>(code));
@@ -917,7 +917,7 @@ void GenerateUnionClass(CodeWriter& out, const AidlUnionDecl* decl, const AidlTy
for (const auto& nested : decl->GetNestedTypes()) {
GenerateClass(out, *nested, typenames, options);
}
- GenerateParcelHelpers(out, *decl, options);
+ GenerateParcelHelpers(out, *decl, typenames, options);
out.Dedent();
out << "}\n";
@@ -961,14 +961,18 @@ std::vector<std::string> GenerateJavaAnnotations(const AidlAnnotatable& a) {
}
}
+ return result;
+}
+
+std::optional<std::string> JavaPermissionAnnotation(const AidlAnnotatable& a) {
if (auto enforce_expr = a.EnforceExpression(); enforce_expr) {
- result.emplace_back("@android.annotation.EnforcePermission(" +
- android::aidl::perm::AsJavaAnnotation(*enforce_expr.get()) + ")");
+ return "@android.annotation.EnforcePermission(" +
+ android::aidl::perm::AsJavaAnnotation(*enforce_expr.get()) + ")";
} else if (a.IsPermissionNone()) {
- result.emplace_back("@android.annotation.RequiresNoPermission");
- } // TODO: Add annoation for @PermissionManuallyEnforced
+ return "@android.annotation.RequiresNoPermission";
+ } // TODO: Add annotation for @PermissionManuallyEnforced
- return result;
+ return {};
}
struct JavaAnnotationsVisitor : AidlVisitor {
@@ -1001,6 +1005,9 @@ struct JavaAnnotationsVisitor : AidlVisitor {
if (t.IsDeprecated()) {
result.push_back("@Deprecated");
}
+ if (auto permission_annotation = JavaPermissionAnnotation(t.GetType()); permission_annotation) {
+ result.push_back(*permission_annotation);
+ }
}
};
diff --git a/generate_java.h b/generate_java.h
index bfa23760..e986f810 100644
--- a/generate_java.h
+++ b/generate_java.h
@@ -21,6 +21,7 @@
#include "io_delegate.h"
#include "options.h"
+#include <optional>
#include <string>
namespace android {
@@ -46,6 +47,8 @@ std::string GenerateAnnotations(const AidlNode& node);
std::vector<std::string> JavaAnnotationsFor(const AidlNode& a);
+std::optional<std::string> JavaPermissionAnnotation(const AidlAnnotatable& a);
+
} // namespace java
} // namespace aidl
} // namespace android
diff --git a/generate_java_binder.cpp b/generate_java_binder.cpp
index 6f2eacc4..67bfcfa8 100644
--- a/generate_java_binder.cpp
+++ b/generate_java_binder.cpp
@@ -15,9 +15,11 @@
*/
#include "aidl.h"
+#include "aidl_language.h"
#include "aidl_to_java.h"
#include "aidl_typenames.h"
#include "ast_java.h"
+#include "code_writer.h"
#include "generate_java.h"
#include "logging.h"
#include "options.h"
@@ -101,6 +103,7 @@ class StubClass : public Class {
std::shared_ptr<Expression> GetTransactDescriptor(const AidlMethod* method);
private:
+ void MakeConstructors(const AidlInterface* interfaceType);
void MakeAsInterface(const AidlInterface* interfaceType);
std::shared_ptr<Variable> transact_descriptor;
@@ -120,26 +123,7 @@ StubClass::StubClass(const AidlInterface* interfaceType, const Options& options)
this->extends = "android.os.Binder";
this->interfaces.push_back(interfaceType->GetCanonicalName());
- // ctor
- auto ctor = std::make_shared<Method>();
- ctor->modifiers = PUBLIC;
- ctor->comment =
- "/** Construct the stub at attach it to the "
- "interface. */";
- ctor->name = "Stub";
- ctor->statements = std::make_shared<StatementBlock>();
- if (interfaceType->IsVintfStability()) {
- auto stability = std::make_shared<LiteralStatement>("this.markVintfStability();\n");
- ctor->statements->Add(stability);
- }
- auto attach = std::make_shared<MethodCall>(
- THIS_VALUE, "attachInterface",
- std::vector<std::shared_ptr<Expression>>{THIS_VALUE,
- std::make_shared<LiteralExpression>("DESCRIPTOR")});
- ctor->statements->Add(attach);
- this->elements.push_back(ctor);
-
- // asInterface
+ MakeConstructors(interfaceType);
MakeAsInterface(interfaceType);
// asBinder
@@ -151,7 +135,7 @@ StubClass::StubClass(const AidlInterface* interfaceType, const Options& options)
asBinder->statements->Add(std::make_shared<ReturnStatement>(THIS_VALUE));
this->elements.push_back(asBinder);
- if (options_.GenTransactionNames()) {
+ if (options_.GenTransactionNames() || options_.GenTraces()) {
// getDefaultTransactionName
auto getDefaultTransactionName = std::make_shared<Method>();
getDefaultTransactionName->comment = "/** @hide */";
@@ -231,7 +215,7 @@ void StubClass::Finish() {
transact_statements->Add(this->transact_switch_user);
// getTransactionName
- if (options_.GenTransactionNames()) {
+ if (options_.GenTransactionNames() || options_.GenTraces()) {
// Some transaction codes are common, e.g. INTERFACE_TRANSACTION or DUMP_TRANSACTION.
// Common transaction codes will not be resolved to a string by getTransactionName. The method
// will return NULL in this case.
@@ -276,6 +260,52 @@ std::shared_ptr<Expression> StubClass::GetTransactDescriptor(const AidlMethod* m
return transact_descriptor;
}
+void StubClass::MakeConstructors(const AidlInterface* interfaceType) {
+ string ctors_code;
+ CodeWriterPtr writer = CodeWriter::ForString(&ctors_code);
+ CodeWriter& code = *writer;
+
+ if (interfaceType->UsesPermissions()) {
+ code << "private final android.os.PermissionEnforcer mEnforcer;\n";
+ code << "/** Construct the stub using the Enforcer provided. */\n";
+ code << "public Stub(android.os.PermissionEnforcer enforcer)\n";
+ } else {
+ code << "/** Construct the stub at attach it to the interface. */\n";
+ code << "public Stub()\n";
+ }
+ code << "{\n";
+ code.Indent();
+ if (interfaceType->IsVintfStability()) {
+ code << "this.markVintfStability();\n";
+ }
+ code << "this.attachInterface(this, DESCRIPTOR);\n";
+ if (interfaceType->UsesPermissions()) {
+ code << "if (enforcer == null) {\n";
+ code.Indent();
+ code << "throw new IllegalArgumentException(\"enforcer cannot be null\");\n";
+ code.Dedent();
+ code << "}\n";
+ code << "mEnforcer = enforcer;\n";
+ }
+ code.Dedent();
+ code << "}\n";
+
+ // Setup a default constructor for permissions interfaces.
+ if (interfaceType->UsesPermissions()) {
+ code << "@Deprecated\n";
+ code << "/** Default constructor. */\n";
+ code << "public Stub() {\n";
+ code.Indent();
+ code << "this(android.os.PermissionEnforcer.fromContext(\n";
+ code << " android.app.ActivityThread.currentActivityThread().getSystemContext()));\n";
+ code.Dedent();
+ code << "}\n";
+ }
+
+ code.Close();
+ this->elements.push_back(std::make_shared<LiteralClassElement>(ctors_code));
+}
+
void StubClass::MakeAsInterface(const AidlInterface* interfaceType) {
auto obj = std::make_shared<Variable>("android.os.IBinder", "obj");
@@ -379,14 +409,12 @@ ProxyClass::~ProxyClass() {}
// =================================================
-static void GenerateWriteToParcel(std::shared_ptr<StatementBlock> addTo,
- const AidlTypenames& typenames, const AidlTypeSpecifier& type,
- const std::string& parcel, const std::string& var,
- uint32_t min_sdk_version, bool is_return_value) {
- string code;
- CodeWriterPtr writer = CodeWriter::ForString(&code);
- CodeGeneratorContext context{
- .writer = *(writer.get()),
+static void GenerateWriteToParcel(CodeWriter& out, const AidlTypenames& typenames,
+ const AidlTypeSpecifier& type, const std::string& parcel,
+ const std::string& var, uint32_t min_sdk_version,
+ bool is_return_value) {
+ WriteToParcelFor(CodeGeneratorContext{
+ .writer = out,
.typenames = typenames,
.type = type,
.parcel = parcel,
@@ -394,9 +422,16 @@ static void GenerateWriteToParcel(std::shared_ptr<StatementBlock> addTo,
.min_sdk_version = min_sdk_version,
.write_to_parcel_flag =
is_return_value ? "android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE" : "0",
- };
- WriteToParcelFor(context);
- writer->Close();
+ });
+}
+
+static void GenerateWriteToParcel(std::shared_ptr<StatementBlock> addTo,
+ const AidlTypenames& typenames, const AidlTypeSpecifier& type,
+ const std::string& parcel, const std::string& var,
+ uint32_t min_sdk_version, bool is_return_value) {
+ string code;
+ GenerateWriteToParcel(*CodeWriter::ForString(&code), typenames, type, parcel, var,
+ min_sdk_version, is_return_value);
addTo->Add(std::make_shared<LiteralStatement>(code));
}
@@ -410,13 +445,18 @@ void GenerateConstantDeclarations(CodeWriter& out, const AidlDefinedType& type)
}
}
-static std::shared_ptr<Method> GenerateInterfaceMethod(const AidlMethod& method) {
+static std::shared_ptr<Method> GenerateInterfaceMethod(const AidlInterface& iface,
+ const AidlMethod& method) {
auto decl = std::make_shared<Method>();
decl->comment = GenerateComments(method);
decl->modifiers = PUBLIC;
decl->returnType = JavaSignatureOf(method.GetType());
decl->name = method.GetName();
decl->annotations = JavaAnnotationsFor(method);
+ // If the interface has some permission annotation, add it to the method.
+ if (auto iface_annotation = JavaPermissionAnnotation(iface); iface_annotation) {
+ decl->annotations.push_back(*iface_annotation);
+ }
for (const std::unique_ptr<AidlArgument>& arg : method.GetArguments()) {
auto var = std::make_shared<Variable>(JavaSignatureOf(arg->GetType()), arg->GetName());
@@ -430,123 +470,87 @@ static std::shared_ptr<Method> GenerateInterfaceMethod(const AidlMethod& method)
}
// Visitor for the permission declared in the @EnforcePermission annotation.
-struct PermissionVisitor {
- shared_ptr<Expression> operator()(const perm::AllOf& quantifier) {
- std::shared_ptr<Expression> result;
- for (const auto& operand : quantifier.operands) {
- auto expr = (*this)(operand);
- if (result) {
- result = std::make_shared<Comparison>(result, "&&", expr);
- } else {
- result = expr;
- }
- }
- return result;
+class PermissionVisitor {
+ public:
+ PermissionVisitor(CodeWriter* code, const AidlMethod& method) : code_(code), method_(method) {}
+
+ ~PermissionVisitor() {
+ code_->Dedent();
+ *code_ << "}\n";
}
- shared_ptr<Expression> operator()(const perm::AnyOf& quantifier) {
- std::shared_ptr<Expression> result;
- for (const auto& operand : quantifier.operands) {
- auto expr = (*this)(operand);
- if (result) {
- result = std::make_shared<Comparison>(result, "||", expr);
- } else {
- result = expr;
- }
+ string Credentials() const { return "getCallingPid(), getCallingUid()"; }
+
+ void Prologue() {
+ *code_ << "/** Helper method to enforce permissions for " << method_.GetName() << " */\n";
+ *code_ << "protected void " << method_.GetName() << "_enforcePermission() "
+ << "throws SecurityException {\n";
+ code_->Indent();
+ }
+
+ void AddStaticArrayPermissions(const std::vector<std::string>& permissions) {
+ *code_ << "static final String[] PERMISSIONS_" << method_.GetName() << " = {"
+ << Join(permissions, ", ") << "};\n";
+ }
+
+ void operator()(const perm::AllOf& quantifier) {
+ std::vector<std::string> permissions;
+ permissions.reserve(quantifier.operands.size());
+ for (auto const& permission : quantifier.operands) {
+ permissions.push_back(android::aidl::perm::JavaFullName(permission));
}
- return result;
+ AddStaticArrayPermissions(permissions);
+ Prologue();
+ *code_ << "mEnforcer.enforcePermissionAllOf(PERMISSIONS_" << method_.GetName() << ", "
+ << Credentials() << ");\n";
}
- shared_ptr<Expression> operator()(const std::string& permission) {
- auto attributionSource =
- std::string("new android.content.AttributionSource(getCallingUid(), null, null)");
- for (size_t i = 0; i < method_.GetArguments().size(); i++) {
- const auto& arg = method_.GetArguments()[i];
- if (arg->GetType().GetName() == "android.content.AttributionSource") {
- attributionSource = android::base::StringPrintf("_arg%zu", i);
- break;
- }
+ void operator()(const perm::AnyOf& quantifier) {
+ std::vector<std::string> permissions;
+ permissions.reserve(quantifier.operands.size());
+ for (auto const& permission : quantifier.operands) {
+ permissions.push_back(android::aidl::perm::JavaFullName(permission));
}
+ AddStaticArrayPermissions(permissions);
+ Prologue();
+ *code_ << "mEnforcer.enforcePermissionAnyOf(PERMISSIONS_" << method_.GetName() << ", "
+ << Credentials() << ");\n";
+ }
+
+ void operator()(const std::string& permission) {
auto permissionName = android::aidl::perm::JavaFullName(permission);
- auto checkPermission =
- std::make_shared<MethodCall>(THIS_VALUE, "permissionCheckerWrapper",
- std::vector<std::shared_ptr<Expression>>{
- std::make_shared<LiteralExpression>(permissionName),
- std::make_shared<MethodCall>(THIS_VALUE, "getCallingPid"),
- std::make_shared<LiteralExpression>(attributionSource)});
- return checkPermission;
+ Prologue();
+ *code_ << "mEnforcer.enforcePermission(" << permissionName << ", " << Credentials() << ");\n";
}
+ private:
+ CodeWriter* code_;
const AidlMethod& method_;
};
-static void GeneratePermissionWrapper(Class* stubClass) {
- // TODO(b/208707422) avoid generating platform-specific API calls.
- std::string permissionCheckerWrapperCode =
- "private boolean permissionCheckerWrapper(\n"
- " String permission, int pid, android.content.AttributionSource attributionSource) {\n"
- " android.content.Context ctx =\n"
- " android.app.ActivityThread.currentActivityThread().getSystemContext();\n"
- " return (android.content.PermissionChecker.checkPermissionForDataDelivery(\n"
- " ctx, permission, pid, attributionSource, \"\" /*message*/) ==\n"
- " android.content.PermissionChecker.PERMISSION_GRANTED);\n"
- "}\n";
- auto permissionCheckerWrapper =
- std::make_shared<LiteralClassElement>(permissionCheckerWrapperCode);
- stubClass->elements.push_back(permissionCheckerWrapper);
-}
-
-static void GeneratePermissionCheck(const AidlMethod& method, const perm::Expression& expr,
- std::shared_ptr<StatementBlock> addTo) {
- auto ifstatement = std::make_shared<IfStatement>();
- auto combinedExpr = std::visit(PermissionVisitor{method}, expr);
- ifstatement->expression = std::make_shared<Comparison>(combinedExpr, "!=", TRUE_VALUE);
- ifstatement->statements = std::make_shared<StatementBlock>();
- ifstatement->statements->Add(std::make_shared<LiteralStatement>(
- android::base::StringPrintf("throw new SecurityException(\"Access denied, requires: %s\");\n",
- perm::AsJavaAnnotation(expr).c_str())));
- addTo->Add(ifstatement);
-}
+static void GeneratePermissionMethod(const AidlInterface& iface, const AidlMethod& method,
+ const std::shared_ptr<Class>& addTo) {
+ string code;
+ CodeWriterPtr writer = CodeWriter::ForString(&code);
-static void GeneratePermissionChecks(const AidlInterface& iface, const AidlMethod& method,
- std::shared_ptr<StatementBlock> addTo) {
- auto ifacePermExpr = iface.EnforceExpression();
- if (ifacePermExpr) {
- GeneratePermissionCheck(method, *ifacePermExpr.get(), addTo);
- }
- auto methodPermExpr = method.GetType().EnforceExpression();
- if (methodPermExpr) {
- GeneratePermissionCheck(method, *methodPermExpr.get(), addTo);
+ if (auto ifacePermExpr = iface.EnforceExpression(); ifacePermExpr) {
+ std::visit(PermissionVisitor(writer.get(), method), *ifacePermExpr.get());
+ } else if (auto methodPermExpr = method.GetType().EnforceExpression(); methodPermExpr) {
+ std::visit(PermissionVisitor(writer.get(), method), *methodPermExpr.get());
}
+ writer->Close();
+ addTo->elements.push_back(std::make_shared<LiteralClassElement>(code));
}
-static void GenerateStubCode(const AidlInterface& iface, const AidlMethod& method, bool oneway,
+static void GenerateStubCode(const AidlMethod& method, bool oneway,
std::shared_ptr<Variable> transact_data,
std::shared_ptr<Variable> transact_reply,
const AidlTypenames& typenames,
std::shared_ptr<StatementBlock> statement_block,
const Options& options) {
// try and finally
- auto tryStatement = std::make_shared<TryStatement>();
- auto finallyStatement = std::make_shared<FinallyStatement>();
auto& statements = statement_block;
- if (options.GenTraces()) {
- statements->Add(tryStatement);
- statements->Add(finallyStatement);
- statements = tryStatement->statements;
- tryStatement->statements->Add(std::make_shared<MethodCall>(
- std::make_shared<LiteralExpression>("android.os.Trace"), "traceBegin",
- std::vector<std::shared_ptr<Expression>>{
- std::make_shared<LiteralExpression>("android.os.Trace.TRACE_TAG_AIDL"),
- std::make_shared<StringLiteralExpression>("AIDL::java::" + iface.GetName() +
- "::" + method.GetName() + "::server")}));
- finallyStatement->statements->Add(std::make_shared<MethodCall>(
- std::make_shared<LiteralExpression>("android.os.Trace"), "traceEnd",
- std::vector<std::shared_ptr<Expression>>{
- std::make_shared<LiteralExpression>("android.os.Trace.TRACE_TAG_AIDL")}));
- }
-
auto realCall = std::make_shared<MethodCall>(THIS_VALUE, method.GetName());
// args
@@ -605,12 +609,10 @@ static void GenerateStubCode(const AidlInterface& iface, const AidlMethod& metho
}
// EOF check
- if (!method.GetArguments().empty() && options.GetMinSdkVersion() >= 32u) {
+ if (!method.GetArguments().empty() && options.GetMinSdkVersion() > 32u) {
statements->Add(std::make_shared<MethodCall>(transact_data, "enforceNoDataAvail"));
}
- GeneratePermissionChecks(iface, method, statements);
-
// the real call
if (method.GetType().GetName() == "void") {
statements->Add(realCall);
@@ -646,22 +648,20 @@ static void GenerateStubCode(const AidlInterface& iface, const AidlMethod& metho
}
}
-static void GenerateStubCase(const AidlInterface& iface, const AidlMethod& method,
- const std::string& transactCodeName, bool oneway,
- std::shared_ptr<StubClass> stubClass, const AidlTypenames& typenames,
- const Options& options) {
+static void GenerateStubCase(const AidlMethod& method, const std::string& transactCodeName,
+ bool oneway, const std::shared_ptr<StubClass>& stubClass,
+ const AidlTypenames& typenames, const Options& options) {
auto c = std::make_shared<Case>(transactCodeName);
- GenerateStubCode(iface, method, oneway, stubClass->transact_data, stubClass->transact_reply,
- typenames, c->statements, options);
+ GenerateStubCode(method, oneway, stubClass->transact_data, stubClass->transact_reply, typenames,
+ c->statements, options);
c->statements->Add(std::make_shared<BreakStatement>());
stubClass->transact_switch_user->cases.push_back(c);
}
-static void GenerateStubCaseOutline(const AidlInterface& iface, const AidlMethod& method,
- const std::string& transactCodeName, bool oneway,
- std::shared_ptr<StubClass> stubClass,
+static void GenerateStubCaseOutline(const AidlMethod& method, const std::string& transactCodeName,
+ bool oneway, const std::shared_ptr<StubClass>& stubClass,
const AidlTypenames& typenames, const Options& options) {
std::string outline_name = "onTransact$" + method.GetName() + "$";
// Generate an "outlined" method with the actual code.
@@ -678,7 +678,7 @@ static void GenerateStubCaseOutline(const AidlInterface& iface, const AidlMethod
onTransact_case->exceptions.push_back("android.os.RemoteException");
stubClass->elements.push_back(onTransact_case);
- GenerateStubCode(iface, method, oneway, transact_data, transact_reply, typenames,
+ GenerateStubCode(method, oneway, transact_data, transact_reply, typenames,
onTransact_case->statements, options);
onTransact_case->statements->Add(std::make_shared<ReturnStatement>(TRUE_VALUE));
}
@@ -697,91 +697,67 @@ static void GenerateStubCaseOutline(const AidlInterface& iface, const AidlMethod
}
}
-static std::shared_ptr<Method> GenerateProxyMethod(const AidlInterface& iface,
- const AidlMethod& method,
- const std::string& transactCodeName, bool oneway,
- std::shared_ptr<ProxyClass> proxyClass,
- const AidlTypenames& typenames,
- const Options& options) {
- auto proxy = std::make_shared<Method>();
- proxy->comment = GenerateComments(method);
- proxy->modifiers = PUBLIC | OVERRIDE;
- proxy->returnType = JavaSignatureOf(method.GetType());
- proxy->name = method.GetName();
- proxy->statements = std::make_shared<StatementBlock>();
- for (const std::unique_ptr<AidlArgument>& arg : method.GetArguments()) {
- proxy->parameters.push_back(
- std::make_shared<Variable>(JavaSignatureOf(arg->GetType()), arg->GetName()));
+template <typename Formatter>
+static std::string ArgList(const AidlMethod& method, Formatter formatter) {
+ vector<string> args;
+ for (const auto& arg : method.GetArguments()) {
+ args.push_back(std::invoke(formatter, *arg));
}
- proxy->exceptions.push_back("android.os.RemoteException");
+ return Join(args, ", ");
+}
+
+static std::string FormatArgForDecl(const AidlArgument& arg) {
+ return JavaSignatureOf(arg.GetType()) + " " + arg.GetName();
+}
+
+static void GenerateProxyMethod(CodeWriter& out, const AidlInterface& iface,
+ const AidlMethod& method, const std::string& transactCodeName,
+ bool oneway, const AidlTypenames& typenames,
+ const Options& options) {
+ bool is_void = method.GetType().GetName() == "void";
+
+ out << GenerateComments(method);
+ out << "@Override public " << JavaSignatureOf(method.GetType()) << " " << method.GetName() << "("
+ << ArgList(method, FormatArgForDecl) << ") throws android.os.RemoteException\n{\n";
+ out.Indent();
// the parcels
- auto _data = std::make_shared<Variable>("android.os.Parcel", "_data");
if (options.GenRpc()) {
- proxy->statements->Add(std::make_shared<LiteralStatement>(
- "android.os.Parcel _data = android.os.Parcel.obtain(asBinder());\n"));
+ out << "android.os.Parcel _data = android.os.Parcel.obtain(asBinder());\n";
} else {
- proxy->statements->Add(std::make_shared<LiteralStatement>(
- "android.os.Parcel _data = android.os.Parcel.obtain();\n"));
+ out << "android.os.Parcel _data = android.os.Parcel.obtain();\n";
}
if (iface.IsSensitiveData()) {
- proxy->statements->Add(std::make_shared<LiteralStatement>("_data.markSensitive();\n"));
+ out << "_data.markSensitive();\n";
}
- std::shared_ptr<Variable> _reply = nullptr;
if (!oneway) {
- _reply = std::make_shared<Variable>("android.os.Parcel", "_reply");
- proxy->statements->Add(std::make_shared<VariableDeclaration>(
- _reply, std::make_shared<MethodCall>("android.os.Parcel", "obtain")));
+ out << "android.os.Parcel _reply = android.os.Parcel.obtain();\n";
}
// the return value
- std::shared_ptr<Variable> _result = nullptr;
- if (method.GetType().GetName() != "void") {
- _result = std::make_shared<Variable>(*proxy->returnType, "_result");
- proxy->statements->Add(std::make_shared<VariableDeclaration>(_result));
+ if (!is_void) {
+ out << JavaSignatureOf(method.GetType()) << " _result;\n";
}
- // try and finally
- auto tryStatement = std::make_shared<TryStatement>();
- proxy->statements->Add(tryStatement);
- auto finallyStatement = std::make_shared<FinallyStatement>();
- proxy->statements->Add(finallyStatement);
-
- if (options.GenTraces()) {
- tryStatement->statements->Add(std::make_shared<MethodCall>(
- std::make_shared<LiteralExpression>("android.os.Trace"), "traceBegin",
- std::vector<std::shared_ptr<Expression>>{
- std::make_shared<LiteralExpression>("android.os.Trace.TRACE_TAG_AIDL"),
- std::make_shared<StringLiteralExpression>("AIDL::java::" + iface.GetName() +
- "::" + method.GetName() + "::client")}));
- }
+ out << "try {\n";
+ out.Indent();
// the interface identifier token: the DESCRIPTOR constant, marshalled as a
// string
- tryStatement->statements->Add(std::make_shared<MethodCall>(
- _data, "writeInterfaceToken",
- std::vector<std::shared_ptr<Expression>>{std::make_shared<LiteralExpression>("DESCRIPTOR")}));
+ out << "_data.writeInterfaceToken(DESCRIPTOR);\n";
// the parameters
for (const std::unique_ptr<AidlArgument>& arg : method.GetArguments()) {
- auto v = std::make_shared<Variable>(JavaSignatureOf(arg->GetType()), arg->GetName());
AidlArgument::Direction dir = arg->GetDirection();
if (dir == AidlArgument::OUT_DIR && arg->GetType().IsDynamicArray()) {
- auto checklen = std::make_shared<IfStatement>();
- checklen->expression = std::make_shared<Comparison>(v, "==", NULL_VALUE);
- checklen->statements->Add(std::make_shared<MethodCall>(
- _data, "writeInt",
- std::vector<std::shared_ptr<Expression>>{std::make_shared<LiteralExpression>("-1")}));
- checklen->elseif = std::make_shared<IfStatement>();
- checklen->elseif->statements->Add(std::make_shared<MethodCall>(
- _data, "writeInt",
- std::vector<std::shared_ptr<Expression>>{std::make_shared<FieldVariable>(v, "length")}));
- tryStatement->statements->Add(checklen);
+ // In Java we pass a pre-allocated array for an 'out' argument. For transaction,
+ // we pass the size of the array so that the remote can allocate the array with the same size.
+ out << "_data.writeInt(" << arg->GetName() << ".length);\n";
} else if (dir & AidlArgument::IN_DIR) {
- GenerateWriteToParcel(tryStatement->statements, typenames, arg->GetType(), _data->name,
- v->name, options.GetMinSdkVersion(), /*is_return_value=*/false);
+ GenerateWriteToParcel(out, typenames, arg->GetType(), "_data", arg->GetName(),
+ options.GetMinSdkVersion(), /*is_return_value=*/false);
}
}
@@ -790,24 +766,17 @@ static std::shared_ptr<Method> GenerateProxyMethod(const AidlInterface& iface,
if (iface.IsSensitiveData()) flags.push_back("android.os.IBinder.FLAG_CLEAR_BUF");
// the transact call
- auto call = std::make_shared<MethodCall>(
- proxyClass->mRemote, "transact",
- std::vector<std::shared_ptr<Expression>>{
- std::make_shared<LiteralExpression>("Stub." + transactCodeName), _data,
- _reply ? _reply : NULL_VALUE,
- std::make_shared<LiteralExpression>(flags.empty() ? "0" : Join(flags, " | "))});
- auto _status = std::make_shared<Variable>("boolean", "_status");
- tryStatement->statements->Add(std::make_shared<VariableDeclaration>(_status, call));
+ out << "boolean _status = mRemote.transact(Stub." << transactCodeName << ", _data, "
+ << (oneway ? "null" : "_reply") << ", " << (flags.empty() ? "0" : Join(flags, " | "))
+ << ");\n";
// TODO(b/151102494): annotation is applied on the return type
- if (method.GetType().IsPropagateAllowBlocking()) {
+ if (method.GetType().IsPropagateAllowBlocking() && !oneway) {
if (options.GetMinSdkVersion() < JAVA_PROPAGATE_VERSION) {
- tryStatement->statements->Add(std::make_shared<LiteralStatement>(
- "if (android.os.Build.VERSION.SDK_INT >= " + std::to_string(JAVA_PROPAGATE_VERSION) +
- ") { _reply.setPropagateAllowBlocking(); }\n"));
+ out << "if (android.os.Build.VERSION.SDK_INT >= " + std::to_string(JAVA_PROPAGATE_VERSION) +
+ ") { _reply.setPropagateAllowBlocking(); }\n";
} else {
- tryStatement->statements->Add(
- std::make_shared<LiteralStatement>("_reply.setPropagateAllowBlocking();\n"));
+ out << "_reply.setPropagateAllowBlocking();\n";
}
}
@@ -815,103 +784,87 @@ static std::shared_ptr<Method> GenerateProxyMethod(const AidlInterface& iface,
// method in the default impl, if set before. Otherwise, throw a RuntimeException if the interface
// is versioned. We can't throw the exception for unversioned interface because that would be an
// app breaking change.
- vector<string> arg_names;
- for (const auto& arg : method.GetArguments()) {
- arg_names.emplace_back(arg->GetName());
- }
- bool has_return_type = method.GetType().GetName() != "void";
-
- auto checkDefaultImpl = std::make_shared<IfStatement>();
- checkDefaultImpl->expression = std::make_shared<LiteralExpression>("getDefaultImpl() != null");
- if (has_return_type) {
- checkDefaultImpl->statements->Add(std::make_shared<LiteralStatement>(
- android::base::StringPrintf("return getDefaultImpl().%s(%s);\n", method.GetName().c_str(),
- Join(arg_names, ", ").c_str())));
- } else {
- checkDefaultImpl->statements->Add(std::make_shared<LiteralStatement>(
- android::base::StringPrintf("getDefaultImpl().%s(%s);\n", method.GetName().c_str(),
- Join(arg_names, ", ").c_str())));
- checkDefaultImpl->statements->Add(std::make_shared<LiteralStatement>("return;\n"));
- }
-
- auto checkTransactionError = std::make_shared<IfStatement>();
- checkTransactionError->expression = std::make_shared<LiteralExpression>("!_status");
-
- if (iface.IsJavaDefault()) {
- checkTransactionError->statements->Add(checkDefaultImpl);
- }
-
- if (options.Version() > 0) {
- checkTransactionError->statements->Add(
- std::make_shared<LiteralStatement>(android::base::StringPrintf(
- "throw new android.os.RemoteException(\"Method %s is unimplemented.\");\n",
- method.GetName().c_str())));
- }
-
if (iface.IsJavaDefault() || options.Version() > 0) {
- tryStatement->statements->Add(checkTransactionError);
- }
+ out << "if (!_status) {\n";
+ out.Indent();
+
+ if (iface.IsJavaDefault()) {
+ out << "if (getDefaultImpl() != null) {\n";
+ out.Indent();
+ if (is_void) {
+ out << "getDefaultImpl()." << method.GetName() << "("
+ << ArgList(method, &AidlArgument::GetName) << ");\n";
+ out << "return;\n";
+ } else {
+ out << "return getDefaultImpl()." << method.GetName() << "("
+ << ArgList(method, &AidlArgument::GetName) << ");\n";
+ }
+ out.Dedent();
+ out << "}\n";
+ }
- // throw back exceptions.
- if (_reply) {
- auto ex = std::make_shared<MethodCall>(_reply, "readException");
- tryStatement->statements->Add(ex);
+ // TODO(b/274144762): we shouldn't have different behavior for versioned interfaces
+ // also this set to false for all exceptions, not just unimplemented methods.
+ if (options.Version() > 0) {
+ out << "throw new android.os.RemoteException(\"Method " << method.GetName()
+ << " is unimplemented.\");\n";
+ }
+
+ out.Dedent();
+ out << "}\n";
}
- // returning and cleanup
- if (_reply != nullptr) {
+ if (!oneway) {
// keep this across return value and arguments in order to create the
// classloader at most once.
bool is_classloader_created = false;
- if (_result != nullptr) {
- string code;
- CodeWriterPtr writer = CodeWriter::ForString(&code);
- CodeGeneratorContext context{.writer = *(writer.get()),
- .typenames = typenames,
- .type = method.GetType(),
- .parcel = _reply->name,
- .var = _result->name,
- .min_sdk_version = options.GetMinSdkVersion(),
- .is_classloader_created = &is_classloader_created};
- CreateFromParcelFor(context);
- writer->Close();
- tryStatement->statements->Add(std::make_shared<LiteralStatement>(code));
+
+ // throw back exceptions.
+ out << "_reply.readException();\n";
+
+ if (!is_void) {
+ CreateFromParcelFor(CodeGeneratorContext{.writer = out,
+ .typenames = typenames,
+ .type = method.GetType(),
+ .parcel = "_reply",
+ .var = "_result",
+ .min_sdk_version = options.GetMinSdkVersion(),
+ .is_classloader_created = &is_classloader_created});
}
// the out/inout parameters
for (const std::unique_ptr<AidlArgument>& arg : method.GetArguments()) {
if (arg->GetDirection() & AidlArgument::OUT_DIR) {
- string code;
- CodeWriterPtr writer = CodeWriter::ForString(&code);
- CodeGeneratorContext context{.writer = *(writer.get()),
- .typenames = typenames,
- .type = arg->GetType(),
- .parcel = _reply->name,
- .var = arg->GetName(),
- .min_sdk_version = options.GetMinSdkVersion(),
- .is_classloader_created = &is_classloader_created};
- ReadFromParcelFor(context);
- writer->Close();
- tryStatement->statements->Add(std::make_shared<LiteralStatement>(code));
+ ReadFromParcelFor(CodeGeneratorContext{.writer = out,
+ .typenames = typenames,
+ .type = arg->GetType(),
+ .parcel = "_reply",
+ .var = arg->GetName(),
+ .min_sdk_version = options.GetMinSdkVersion(),
+ .is_classloader_created = &is_classloader_created});
}
}
-
- finallyStatement->statements->Add(std::make_shared<MethodCall>(_reply, "recycle"));
}
- finallyStatement->statements->Add(std::make_shared<MethodCall>(_data, "recycle"));
- if (options.GenTraces()) {
- finallyStatement->statements->Add(std::make_shared<MethodCall>(
- std::make_shared<LiteralExpression>("android.os.Trace"), "traceEnd",
- std::vector<std::shared_ptr<Expression>>{
- std::make_shared<LiteralExpression>("android.os.Trace.TRACE_TAG_AIDL")}));
+ out.Dedent();
+ out << "}\nfinally {\n";
+ out.Indent();
+
+ // returning and cleanup
+ if (!oneway) {
+ out << "_reply.recycle();\n";
}
+ out << "_data.recycle();\n";
+
+ out.Dedent();
+ out << "}\n"; // finally
- if (_result != nullptr) {
- proxy->statements->Add(std::make_shared<ReturnStatement>(_result));
+ if (!is_void) {
+ out << "return _result;\n";
}
- return proxy;
+ out.Dedent();
+ out << "}\n"; // method body
}
static void GenerateMethods(const AidlInterface& iface, const AidlMethod& method, Class* interface,
@@ -931,7 +884,7 @@ static void GenerateMethods(const AidlInterface& iface, const AidlMethod& method
stubClass->elements.push_back(transactCode);
// getTransactionName
- if (options.GenTransactionNames()) {
+ if (options.GenTransactionNames() || options.GenTraces()) {
auto c = std::make_shared<Case>(transactCodeName);
c->statements->Add(std::make_shared<ReturnStatement>(
std::make_shared<StringLiteralExpression>(method.GetName())));
@@ -941,7 +894,7 @@ static void GenerateMethods(const AidlInterface& iface, const AidlMethod& method
// == the declaration in the interface ===================================
std::shared_ptr<ClassElement> decl;
if (method.IsUserDefined()) {
- decl = GenerateInterfaceMethod(method);
+ decl = GenerateInterfaceMethod(iface, method);
} else {
if (method.GetName() == kGetInterfaceVersion && options.Version() > 0) {
std::ostringstream code;
@@ -963,10 +916,12 @@ static void GenerateMethods(const AidlInterface& iface, const AidlMethod& method
bool outline_stub =
stubClass->transact_outline && stubClass->outline_methods.count(&method) != 0;
if (outline_stub) {
- GenerateStubCaseOutline(iface, method, transactCodeName, oneway, stubClass, typenames,
- options);
+ GenerateStubCaseOutline(method, transactCodeName, oneway, stubClass, typenames, options);
} else {
- GenerateStubCase(iface, method, transactCodeName, oneway, stubClass, typenames, options);
+ GenerateStubCase(method, transactCodeName, oneway, stubClass, typenames, options);
+ }
+ if (iface.EnforceExpression() || method.GetType().EnforceExpression()) {
+ GeneratePermissionMethod(iface, method, stubClass);
}
} else {
if (method.GetName() == kGetInterfaceVersion && options.Version() > 0) {
@@ -990,14 +945,13 @@ static void GenerateMethods(const AidlInterface& iface, const AidlMethod& method
}
// == the proxy method ===================================================
- std::shared_ptr<ClassElement> proxy = nullptr;
+ string proxy_code;
+ CodeWriterPtr writer = CodeWriter::ForString(&proxy_code);
+ CodeWriter& code = *writer;
if (method.IsUserDefined()) {
- proxy = GenerateProxyMethod(iface, method, transactCodeName, oneway, proxyClass, typenames,
- options);
-
+ GenerateProxyMethod(code, iface, method, transactCodeName, oneway, typenames, options);
} else {
if (method.GetName() == kGetInterfaceVersion && options.Version() > 0) {
- std::ostringstream code;
code << "@Override\n"
<< "public int " << kGetInterfaceVersion << "()"
<< " throws "
@@ -1029,10 +983,8 @@ static void GenerateMethods(const AidlInterface& iface, const AidlMethod& method
<< " }\n"
<< " return mCachedVersion;\n"
<< "}\n";
- proxy = std::make_shared<LiteralClassElement>(code.str());
}
if (method.GetName() == kGetInterfaceHash && !options.Hash().empty()) {
- std::ostringstream code;
code << "@Override\n"
<< "public synchronized String " << kGetInterfaceHash << "()"
<< " throws "
@@ -1064,11 +1016,11 @@ static void GenerateMethods(const AidlInterface& iface, const AidlMethod& method
<< " }\n"
<< " return mCachedHash;\n"
<< "}\n";
- proxy = std::make_shared<LiteralClassElement>(code.str());
}
}
- if (proxy != nullptr) {
- proxyClass->elements.push_back(proxy);
+ code.Close();
+ if (!proxy_code.empty()) {
+ proxyClass->elements.push_back(std::make_shared<LiteralClassElement>(proxy_code));
}
}
@@ -1106,6 +1058,10 @@ static void GenerateInterfaceDescriptors(const Options& options, const AidlInter
auto descriptor = std::make_shared<Field>(
STATIC | FINAL | PUBLIC, std::make_shared<Variable>("java.lang.String", "DESCRIPTOR"));
std::string name = iface->GetDescriptor();
+
+ // TODO(b/242862858): avoid differentiating behahavior. This is currently blocked
+ // to fix because of a metalava lint which disallows running code to generate
+ // static fields.
if (options.IsStructured()) {
// mangle the interface name at build time and demangle it at runtime, to avoid
// being renamed by jarjar. See b/153843174
@@ -1370,20 +1326,14 @@ std::unique_ptr<Class> GenerateInterfaceClass(const AidlInterface* iface,
interface->elements.push_back(std::make_shared<LiteralClassElement>(constants));
// all the declared methods of the interface
- bool permissionWrapperGenerated = false;
int max_transaction_id = 0;
for (const auto& item : iface->GetMethods()) {
- if ((iface->EnforceExpression() || item->GetType().EnforceExpression()) &&
- !permissionWrapperGenerated) {
- GeneratePermissionWrapper(stub.get());
- permissionWrapperGenerated = true;
- }
GenerateMethods(*iface, *item, interface.get(), stub, proxy, item->GetId(), typenames, options);
max_transaction_id = std::max(max_transaction_id, item->GetId());
}
// getMaxTransactionId
- if (options.GenTransactionNames()) {
+ if (options.GenTransactionNames() || options.GenTraces()) {
stub->elements.push_back(GenerateMaxTransactionId(max_transaction_id));
}
@@ -1393,7 +1343,7 @@ std::unique_ptr<Class> GenerateInterfaceClass(const AidlInterface* iface,
for (const auto& nested : iface->GetNestedTypes()) {
GenerateClass(*writer, *nested, typenames, options);
}
- GenerateParcelHelpers(*writer, *iface, options);
+ GenerateParcelHelpers(*writer, *iface, typenames, options);
writer->Close();
interface->elements.push_back(std::make_shared<LiteralClassElement>(code));
diff --git a/generate_ndk.cpp b/generate_ndk.cpp
index 4345a74a..bd554e74 100644
--- a/generate_ndk.cpp
+++ b/generate_ndk.cpp
@@ -192,6 +192,7 @@ void GenerateHeader(CodeWriter& out, const AidlTypenames& types,
const AidlDefinedType& defined_type, const Options& options) {
out << "#pragma once\n\n";
GenerateHeaderIncludes(out, types, defined_type, options);
+ cpp::GenerateForwardDecls(out, defined_type, true);
EnterNdkNamespace(out, defined_type);
GenerateClassDecl(out, types, defined_type, options);
LeaveNdkNamespace(out, defined_type);
@@ -424,6 +425,11 @@ static void GenerateConstantDeclarations(CodeWriter& out, const AidlTypenames& t
out << "static const char*";
cpp::GenerateDeprecated(out, *constant);
out << " " << constant->GetName() << ";\n";
+ } else if (type.Signature() == "float" || type.Signature() == "double") {
+ out << "static constexpr " << NdkNameOf(types, type, StorageMode::STACK) << " ";
+ out << constant->GetName();
+ cpp::GenerateDeprecated(out, *constant);
+ out << " = " << constant->ValueString(ConstantValueDecorator) << ";\n";
} else {
out << "enum : " << NdkNameOf(types, type, StorageMode::STACK) << " { ";
out << constant->GetName();
@@ -1104,12 +1110,14 @@ void GenerateServerHeader(CodeWriter& out, const AidlTypenames& types,
void GenerateInterfaceClassDecl(CodeWriter& out, const AidlTypenames& types,
const AidlInterface& defined_type, const Options& options) {
const std::string clazz = ClassName(defined_type, ClassNames::INTERFACE);
-
+ out << "class " << ClassName(defined_type, ClassNames::DELEGATOR_IMPL) << ";\n\n";
out << "class";
cpp::GenerateDeprecated(out, defined_type);
out << " " << clazz << " : public ::ndk::ICInterface {\n";
out << "public:\n";
out.Indent();
+ out << "typedef " << ClassName(defined_type, ClassNames::DELEGATOR_IMPL)
+ << " DefaultDelegator;\n";
out << "static const char* " << kDescriptor << ";\n";
out << clazz << "();\n";
out << "virtual ~" << clazz << "();\n";
@@ -1188,6 +1196,8 @@ void GenerateInterfaceClassDecl(CodeWriter& out, const AidlTypenames& types,
void GenerateParcelClassDecl(CodeWriter& out, const AidlTypenames& types,
const AidlStructuredParcelable& defined_type, const Options& options) {
const std::string clazz = ClassName(defined_type, ClassNames::RAW);
+
+ cpp::ClangDiagnosticIgnoreDeprecated guard(out, cpp::HasDeprecatedField(defined_type));
out << cpp::TemplateDecl(defined_type);
out << "class";
cpp::GenerateDeprecated(out, defined_type);
@@ -1251,6 +1261,7 @@ void GenerateParcelClassDecl(CodeWriter& out, const AidlTypenames& types,
out.Dedent();
out << "};\n";
}
+
void GenerateParcelSource(CodeWriter& out, const AidlTypenames& types,
const AidlStructuredParcelable& defined_type, const Options& options) {
std::string clazz = GetQualifiedName(defined_type);
@@ -1271,55 +1282,60 @@ void GenerateParcelSource(CodeWriter& out, const AidlTypenames& types,
GenerateConstantDefinitions(out, defined_type, clazz, cpp::TemplateDecl(defined_type));
- out << cpp::TemplateDecl(defined_type);
- out << "binder_status_t " << clazz << "::readFromParcel(const AParcel* _aidl_parcel) {\n";
- out.Indent();
- out << "binder_status_t _aidl_ret_status = STATUS_OK;\n";
- out << "int32_t _aidl_start_pos = AParcel_getDataPosition(_aidl_parcel);\n";
- out << "int32_t _aidl_parcelable_size = 0;\n";
- out << "_aidl_ret_status = AParcel_readInt32(_aidl_parcel, &_aidl_parcelable_size);\n";
- StatusCheckReturn(out);
- out << "if (_aidl_parcelable_size < 4) return STATUS_BAD_VALUE;\n";
- out << "if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return STATUS_BAD_VALUE;\n";
- for (const auto& variable : defined_type.GetFields()) {
- out << "if (AParcel_getDataPosition(_aidl_parcel) - _aidl_start_pos >= _aidl_parcelable_size) "
- "{\n"
- << " AParcel_setDataPosition(_aidl_parcel, _aidl_start_pos + _aidl_parcelable_size);\n"
- << " return _aidl_ret_status;\n"
- << "}\n";
- out << "_aidl_ret_status = ";
- ReadFromParcelFor({out, types, variable->GetType(), "_aidl_parcel", "&" + variable->GetName()});
- out << ";\n";
+ {
+ cpp::ClangDiagnosticIgnoreDeprecated guard(out, cpp::HasDeprecatedField(defined_type));
+ out << cpp::TemplateDecl(defined_type);
+ out << "binder_status_t " << clazz << "::readFromParcel(const AParcel* _aidl_parcel) {\n";
+ out.Indent();
+ out << "binder_status_t _aidl_ret_status = STATUS_OK;\n";
+ out << "int32_t _aidl_start_pos = AParcel_getDataPosition(_aidl_parcel);\n";
+ out << "int32_t _aidl_parcelable_size = 0;\n";
+ out << "_aidl_ret_status = AParcel_readInt32(_aidl_parcel, &_aidl_parcelable_size);\n";
StatusCheckReturn(out);
- }
- out << "AParcel_setDataPosition(_aidl_parcel, _aidl_start_pos + _aidl_parcelable_size);\n"
- << "return _aidl_ret_status;\n";
- out.Dedent();
- out << "}\n";
-
- out << cpp::TemplateDecl(defined_type);
- out << "binder_status_t " << clazz << "::writeToParcel(AParcel* _aidl_parcel) const {\n";
- out.Indent();
- out << "binder_status_t _aidl_ret_status;\n";
+ out << "if (_aidl_parcelable_size < 4) return STATUS_BAD_VALUE;\n";
+ out << "if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return STATUS_BAD_VALUE;\n";
+ for (const auto& variable : defined_type.GetFields()) {
+ out << "if (AParcel_getDataPosition(_aidl_parcel) - _aidl_start_pos >= "
+ "_aidl_parcelable_size) "
+ "{\n"
+ << " AParcel_setDataPosition(_aidl_parcel, _aidl_start_pos + _aidl_parcelable_size);\n"
+ << " return _aidl_ret_status;\n"
+ << "}\n";
+ out << "_aidl_ret_status = ";
+ ReadFromParcelFor(
+ {out, types, variable->GetType(), "_aidl_parcel", "&" + variable->GetName()});
+ out << ";\n";
+ StatusCheckReturn(out);
+ }
+ out << "AParcel_setDataPosition(_aidl_parcel, _aidl_start_pos + _aidl_parcelable_size);\n"
+ << "return _aidl_ret_status;\n";
+ out.Dedent();
+ out << "}\n";
- out << "size_t _aidl_start_pos = AParcel_getDataPosition(_aidl_parcel);\n";
- out << "_aidl_ret_status = AParcel_writeInt32(_aidl_parcel, 0);\n";
- StatusCheckReturn(out);
+ out << cpp::TemplateDecl(defined_type);
+ out << "binder_status_t " << clazz << "::writeToParcel(AParcel* _aidl_parcel) const {\n";
+ out.Indent();
+ out << "binder_status_t _aidl_ret_status;\n";
- for (const auto& variable : defined_type.GetFields()) {
- out << "_aidl_ret_status = ";
- WriteToParcelFor({out, types, variable->GetType(), "_aidl_parcel", variable->GetName()});
- out << ";\n";
+ out << "size_t _aidl_start_pos = AParcel_getDataPosition(_aidl_parcel);\n";
+ out << "_aidl_ret_status = AParcel_writeInt32(_aidl_parcel, 0);\n";
StatusCheckReturn(out);
- }
- out << "size_t _aidl_end_pos = AParcel_getDataPosition(_aidl_parcel);\n";
- out << "AParcel_setDataPosition(_aidl_parcel, _aidl_start_pos);\n";
- out << "AParcel_writeInt32(_aidl_parcel, _aidl_end_pos - _aidl_start_pos);\n";
- out << "AParcel_setDataPosition(_aidl_parcel, _aidl_end_pos);\n";
- out << "return _aidl_ret_status;\n";
- out.Dedent();
- out << "}\n";
+ for (const auto& variable : defined_type.GetFields()) {
+ out << "_aidl_ret_status = ";
+ WriteToParcelFor({out, types, variable->GetType(), "_aidl_parcel", variable->GetName()});
+ out << ";\n";
+ StatusCheckReturn(out);
+ }
+ out << "size_t _aidl_end_pos = AParcel_getDataPosition(_aidl_parcel);\n";
+ out << "AParcel_setDataPosition(_aidl_parcel, _aidl_start_pos);\n";
+ out << "AParcel_writeInt32(_aidl_parcel, _aidl_end_pos - _aidl_start_pos);\n";
+ out << "AParcel_setDataPosition(_aidl_parcel, _aidl_end_pos);\n";
+
+ out << "return _aidl_ret_status;\n";
+ out.Dedent();
+ out << "}\n";
+ }
out << "\n";
LeaveNdkNamespace(out, defined_type);
}
@@ -1327,6 +1343,8 @@ void GenerateParcelSource(CodeWriter& out, const AidlTypenames& types,
void GenerateParcelClassDecl(CodeWriter& out, const AidlTypenames& types,
const AidlUnionDecl& defined_type, const Options& options) {
const std::string clazz = ClassName(defined_type, ClassNames::RAW);
+
+ cpp::ClangDiagnosticIgnoreDeprecated guard(out, cpp::HasDeprecatedField(defined_type));
cpp::UnionWriter uw{defined_type, types,
[&](const AidlTypeSpecifier& type, const AidlTypenames& types) {
return NdkNameOf(types, type, StorageMode::STACK);
@@ -1366,6 +1384,7 @@ void GenerateParcelClassDecl(CodeWriter& out, const AidlTypenames& types,
out.Dedent();
out << "};\n";
}
+
void GenerateParcelSource(CodeWriter& out, const AidlTypenames& types,
const AidlUnionDecl& defined_type, const Options& options) {
std::string clazz = GetQualifiedName(defined_type);
@@ -1405,19 +1424,23 @@ void GenerateParcelSource(CodeWriter& out, const AidlTypenames& types,
GenerateConstantDefinitions(out, defined_type, clazz, cpp::TemplateDecl(defined_type));
- out << cpp::TemplateDecl(defined_type);
- out << "binder_status_t " << clazz << "::readFromParcel(const AParcel* _parcel) {\n";
- out.Indent();
- uw.ReadFromParcel(out, ctx);
- out.Dedent();
- out << "}\n";
+ {
+ cpp::ClangDiagnosticIgnoreDeprecated guard(out, cpp::HasDeprecatedField(defined_type));
+ out << cpp::TemplateDecl(defined_type);
+ out << "binder_status_t " << clazz << "::readFromParcel(const AParcel* _parcel) {\n";
+ out.Indent();
+ uw.ReadFromParcel(out, ctx);
+ out.Dedent();
+ out << "}\n";
+
+ out << cpp::TemplateDecl(defined_type);
+ out << "binder_status_t " << clazz << "::writeToParcel(AParcel* _parcel) const {\n";
+ out.Indent();
+ uw.WriteToParcel(out, ctx);
+ out.Dedent();
+ out << "}\n";
+ }
- out << cpp::TemplateDecl(defined_type);
- out << "binder_status_t " << clazz << "::writeToParcel(AParcel* _parcel) const {\n";
- out.Indent();
- uw.WriteToParcel(out, ctx);
- out.Dedent();
- out << "}\n";
out << "\n";
LeaveNdkNamespace(out, defined_type);
}
diff --git a/generate_rust.cpp b/generate_rust.cpp
index 5316c451..17beb366 100644
--- a/generate_rust.cpp
+++ b/generate_rust.cpp
@@ -48,36 +48,52 @@ static constexpr const char kArgumentPrefix[] = "_arg_";
static constexpr const char kGetInterfaceVersion[] = "getInterfaceVersion";
static constexpr const char kGetInterfaceHash[] = "getInterfaceHash";
-void GenerateMangledAliases(CodeWriter& out, const AidlDefinedType& type) {
- struct Visitor : AidlVisitor {
- CodeWriter& out;
- Visitor(CodeWriter& out) : out(out) {}
- void Visit(const AidlStructuredParcelable& type) override { VisitType(type); }
- void Visit(const AidlInterface& type) override { VisitType(type); }
- void Visit(const AidlEnumDeclaration& type) override { VisitType(type); }
- void Visit(const AidlUnionDecl& type) override { VisitType(type); }
- void VisitType(const AidlDefinedType& type) {
- out << " pub use " << Qname(type) << " as " << Mangled(type) << ";\n";
+struct MangledAliasVisitor : AidlVisitor {
+ CodeWriter& out;
+ MangledAliasVisitor(CodeWriter& out) : out(out) {}
+ void Visit(const AidlStructuredParcelable& type) override { VisitType(type); }
+ void Visit(const AidlInterface& type) override { VisitType(type); }
+ void Visit(const AidlEnumDeclaration& type) override { VisitType(type); }
+ void Visit(const AidlUnionDecl& type) override { VisitType(type); }
+ template <typename T>
+ void VisitType(const T& type) {
+ out << " pub use " << Qname(type) << " as " << Mangled(type) << ";\n";
+ }
+ // Return a mangled name for a type (including AIDL package)
+ template <typename T>
+ string Mangled(const T& type) const {
+ ostringstream alias;
+ for (const auto& component : Split(type.GetCanonicalName(), ".")) {
+ alias << "_" << component.size() << "_" << component;
}
- // Return a mangled name for a type (including AIDL package)
- string Mangled(const AidlDefinedType& type) const {
- ostringstream alias;
- for (const auto& component : Split(type.GetCanonicalName(), ".")) {
- alias << "_" << component.size() << "_" << component;
- }
- return alias.str();
+ return alias.str();
+ }
+ template <typename T>
+ string Typename(const T& type) const {
+ if constexpr (std::is_same_v<T, AidlInterface>) {
+ return ClassName(type, cpp::ClassNames::INTERFACE);
+ } else {
+ return type.GetName();
}
- // Return a fully qualified name for a type in the current file (excluding AIDL package)
- string Qname(const AidlDefinedType& type) const { return Module(type) + "::" + type.GetName(); }
- // Return a module name for a type (relative to the file)
- string Module(const AidlDefinedType& type) const {
- if (type.GetParentType()) {
- return Module(*type.GetParentType()) + "::" + type.GetName();
- } else {
- return "super";
- }
+ }
+ // Return a fully qualified name for a type in the current file (excluding AIDL package)
+ template <typename T>
+ string Qname(const T& type) const {
+ return Module(type) + "::r#" + Typename(type);
+ }
+ // Return a module name for a type (relative to the file)
+ template <typename T>
+ string Module(const T& type) const {
+ if (type.GetParentType()) {
+ return Module(*type.GetParentType()) + "::r#" + type.GetName();
+ } else {
+ return "super";
}
- } v(out);
+ }
+};
+
+void GenerateMangledAliases(CodeWriter& out, const AidlDefinedType& type) {
+ MangledAliasVisitor v(out);
out << "pub(crate) mod mangled {\n";
VisitTopDown(v, type);
out << "}\n";
@@ -148,7 +164,7 @@ string BuildMethod(const AidlMethod& method, const AidlTypenames& typenames,
parameters += BuildArg(*arg, typenames, lifetime);
}
- return fn_prefix + "fn " + method.GetName() + lifetime_str + "(" + parameters + ") -> " +
+ return fn_prefix + "fn r#" + method.GetName() + lifetime_str + "(" + parameters + ") -> " +
return_type;
}
@@ -219,7 +235,7 @@ void GenerateClientMethodHelpers(CodeWriter& out, const AidlInterface& iface,
out << "if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {\n";
out << " if let Some(_aidl_default_impl) = <Self as " << default_trait_name
<< ">::getDefaultImpl() {\n";
- out << " return _aidl_default_impl." << method.GetName() << "(" << default_args << ");\n";
+ out << " return _aidl_default_impl.r#" << method.GetName() << "(" << default_args << ");\n";
out << " }\n";
out << "}\n";
}
@@ -336,7 +352,7 @@ void GenerateClientMethod(CodeWriter& out, const AidlInterface& iface, const Aid
out << "let _aidl_data = self.build_parcel_" + method.GetName() + "(" + build_parcel_args +
")?;\n";
// Submit transaction.
- out << "let _aidl_reply = self.binder.submit_transact(transactions::" << method.GetName()
+ out << "let _aidl_reply = self.binder.submit_transact(transactions::r#" << method.GetName()
<< ", _aidl_data, " << transact_flags << ");\n";
// Deserialize response.
out << "self.read_response_" + method.GetName() + "(" + read_response_args + ")\n";
@@ -351,7 +367,7 @@ void GenerateClientMethod(CodeWriter& out, const AidlInterface& iface, const Aid
out.Dedent();
out << "};\n";
// Submit transaction.
- out << "let _aidl_reply = self.binder.submit_transact(transactions::" << method.GetName()
+ out << "let _aidl_reply = self.binder.submit_transact(transactions::r#" << method.GetName()
<< ", _aidl_data, " << transact_flags << ");\n";
// Deserialize response.
out << "std::future::ready(self.read_response_" + method.GetName() + "(" +
@@ -370,8 +386,8 @@ void GenerateClientMethod(CodeWriter& out, const AidlInterface& iface, const Aid
out << "let binder = self.binder.clone();\n";
out << "P::spawn(\n";
out.Indent();
- out << "move || binder.submit_transact(transactions::" << method.GetName() << ", _aidl_data, "
- << transact_flags << "),\n";
+ out << "move || binder.submit_transact(transactions::r#" << method.GetName()
+ << ", _aidl_data, " << transact_flags << "),\n";
out << "move |_aidl_reply| async move {\n";
out.Indent();
// Deserialize response.
@@ -389,7 +405,7 @@ void GenerateClientMethod(CodeWriter& out, const AidlInterface& iface, const Aid
void GenerateServerTransaction(CodeWriter& out, const AidlInterface& interface,
const AidlMethod& method, const AidlTypenames& typenames) {
- out << "transactions::" << method.GetName() << " => {\n";
+ out << "transactions::r#" << method.GetName() << " => {\n";
out.Indent();
if (interface.EnforceExpression() || method.GetType().EnforceExpression()) {
@@ -423,7 +439,7 @@ void GenerateServerTransaction(CodeWriter& out, const AidlInterface& interface,
}
args += TakeReference(ref_mode, arg_name);
}
- out << "let _aidl_return = _aidl_service." << method.GetName() << "(" << args << ");\n";
+ out << "let _aidl_return = _aidl_service.r#" << method.GetName() << "(" << args << ");\n";
if (!method.IsOneway()) {
out << "match &_aidl_return {\n";
@@ -484,7 +500,7 @@ void GenerateServerItems(CodeWriter& out, const AidlInterface* iface,
args += arg->GetName();
}
out << BuildMethod(*method, typenames) << " { "
- << "self.0." << method->GetName() << "(" << args << ") }\n";
+ << "self.0.r#" << method->GetName() << "(" << args << ") }\n";
}
out.Dedent();
out << "}\n";
@@ -532,14 +548,15 @@ void GenerateConstantDeclarations(CodeWriter& out, const TypeWithConstants& type
if (type.Signature() == "String") {
const_type = "&str";
} else if (type.Signature() == "byte" || type.Signature() == "int" ||
- type.Signature() == "long") {
+ type.Signature() == "long" || type.Signature() == "float" ||
+ type.Signature() == "double") {
const_type = RustNameOf(type, typenames, StorageMode::VALUE, Lifetime::NONE);
} else {
AIDL_FATAL(value) << "Unrecognized constant type: " << type.Signature();
}
GenerateDeprecated(out, *constant);
- out << "pub const " << constant->GetName() << ": " << const_type << " = "
+ out << "pub const r#" << constant->GetName() << ": " << const_type << " = "
<< constant->ValueString(ConstantValueDecoratorRef) << ";\n";
}
}
@@ -729,7 +746,7 @@ void GenerateRustInterface(CodeWriter* code_writer, const AidlInterface* iface,
*code_writer << BuildMethod(*method, typenames) << " {\n";
code_writer->Indent();
- *code_writer << "self._rt.block_on(self._inner." << method->GetName() << "(" << args
+ *code_writer << "self._rt.block_on(self._inner.r#" << method->GetName() << "(" << args
<< "))\n";
code_writer->Dedent();
*code_writer << "}\n";
@@ -770,7 +787,7 @@ void GenerateRustInterface(CodeWriter* code_writer, const AidlInterface* iface,
code_writer->Indent();
for (const auto& method : iface->GetMethods()) {
// Generate the transaction code constant
- *code_writer << "pub const " << method->GetName()
+ *code_writer << "pub const r#" << method->GetName()
<< ": binder::binder_impl::TransactionCode = "
"binder::binder_impl::FIRST_CALL_TRANSACTION + " +
std::to_string(method->GetId()) + ";\n";
@@ -837,30 +854,77 @@ void GenerateRustInterface(CodeWriter* code_writer, const AidlInterface* iface,
GenerateServerItems(*code_writer, iface, typenames);
}
+void RemoveUsed(std::set<std::string>* params, const AidlTypeSpecifier& type) {
+ if (!type.IsResolved()) {
+ params->erase(type.GetName());
+ }
+ if (type.IsGeneric()) {
+ for (const auto& param : type.GetTypeParameters()) {
+ RemoveUsed(params, *param);
+ }
+ }
+}
+
+std::set<std::string> FreeParams(const AidlStructuredParcelable* parcel) {
+ if (!parcel->IsGeneric()) {
+ return std::set<std::string>();
+ }
+ auto typeParams = parcel->GetTypeParameters();
+ std::set<std::string> unusedParams(typeParams.begin(), typeParams.end());
+ for (const auto& variable : parcel->GetFields()) {
+ RemoveUsed(&unusedParams, variable->GetType());
+ }
+ return unusedParams;
+}
+
+void WriteParams(CodeWriter& out, const AidlParameterizable<std::string>* parcel,
+ std::string extra) {
+ if (parcel->IsGeneric()) {
+ out << "<";
+ for (const auto& param : parcel->GetTypeParameters()) {
+ out << param << extra << ",";
+ }
+ out << ">";
+ }
+}
+
+void WriteParams(CodeWriter& out, const AidlParameterizable<std::string>* parcel) {
+ WriteParams(out, parcel, "");
+}
+
void GenerateParcelBody(CodeWriter& out, const AidlStructuredParcelable* parcel,
const AidlTypenames& typenames) {
GenerateDeprecated(out, *parcel);
- out << "pub struct " << parcel->GetName() << " {\n";
+ out << "pub struct r#" << parcel->GetName();
+ WriteParams(out, parcel);
+ out << " {\n";
out.Indent();
for (const auto& variable : parcel->GetFields()) {
GenerateDeprecated(out, *variable);
auto field_type =
RustNameOf(variable->GetType(), typenames, StorageMode::PARCELABLE_FIELD, Lifetime::NONE);
- out << "pub " << variable->GetName() << ": " << field_type << ",\n";
+ out << "pub r#" << variable->GetName() << ": " << field_type << ",\n";
+ }
+ for (const auto& unused_param : FreeParams(parcel)) {
+ out << "_phantom_" << unused_param << ": std::marker::PhantomData<" << unused_param << ">,\n";
}
out.Dedent();
out << "}\n";
}
void GenerateParcelDefault(CodeWriter& out, const AidlStructuredParcelable* parcel) {
- out << "impl Default for " << parcel->GetName() << " {\n";
+ out << "impl";
+ WriteParams(out, parcel, ": Default");
+ out << " Default for r#" << parcel->GetName();
+ WriteParams(out, parcel);
+ out << " {\n";
out.Indent();
out << "fn default() -> Self {\n";
out.Indent();
out << "Self {\n";
out.Indent();
for (const auto& variable : parcel->GetFields()) {
- out << variable->GetName() << ": ";
+ out << "r#" << variable->GetName() << ": ";
if (variable->GetDefaultValue()) {
out << variable->ValueString(ConstantValueDecorator);
} else {
@@ -883,6 +947,9 @@ void GenerateParcelDefault(CodeWriter& out, const AidlStructuredParcelable* parc
}
out << ",\n";
}
+ for (const auto& unused_param : FreeParams(parcel)) {
+ out << "r#_phantom_" << unused_param << ": Default::default(),\n";
+ }
out.Dedent();
out << "}\n";
out.Dedent();
@@ -897,11 +964,11 @@ void GenerateParcelSerializeBody(CodeWriter& out, const AidlStructuredParcelable
out.Indent();
for (const auto& variable : parcel->GetFields()) {
if (TypeNeedsOption(variable->GetType(), typenames)) {
- out << "let __field_ref = self." << variable->GetName()
+ out << "let __field_ref = self.r#" << variable->GetName()
<< ".as_ref().ok_or(binder::StatusCode::UNEXPECTED_NULL)?;\n";
out << "subparcel.write(__field_ref)?;\n";
} else {
- out << "subparcel.write(&self." << variable->GetName() << ")?;\n";
+ out << "subparcel.write(&self.r#" << variable->GetName() << ")?;\n";
}
}
out << "Ok(())\n";
@@ -918,9 +985,9 @@ void GenerateParcelDeserializeBody(CodeWriter& out, const AidlStructuredParcelab
out << "if subparcel.has_more_data() {\n";
out.Indent();
if (TypeNeedsOption(variable->GetType(), typenames)) {
- out << "self." << variable->GetName() << " = Some(subparcel.read()?);\n";
+ out << "self.r#" << variable->GetName() << " = Some(subparcel.read()?);\n";
} else {
- out << "self." << variable->GetName() << " = subparcel.read()?;\n";
+ out << "self.r#" << variable->GetName() << " = subparcel.read()?;\n";
}
out.Dedent();
out << "}\n";
@@ -933,7 +1000,7 @@ void GenerateParcelDeserializeBody(CodeWriter& out, const AidlStructuredParcelab
void GenerateParcelBody(CodeWriter& out, const AidlUnionDecl* parcel,
const AidlTypenames& typenames) {
GenerateDeprecated(out, *parcel);
- out << "pub enum " << parcel->GetName() << " {\n";
+ out << "pub enum r#" << parcel->GetName() << " {\n";
out.Indent();
for (const auto& variable : parcel->GetFields()) {
GenerateDeprecated(out, *variable);
@@ -946,7 +1013,11 @@ void GenerateParcelBody(CodeWriter& out, const AidlUnionDecl* parcel,
}
void GenerateParcelDefault(CodeWriter& out, const AidlUnionDecl* parcel) {
- out << "impl Default for " << parcel->GetName() << " {\n";
+ out << "impl";
+ WriteParams(out, parcel, ": Default");
+ out << " Default for r#" << parcel->GetName();
+ WriteParams(out, parcel);
+ out << " {\n";
out.Indent();
out << "fn default() -> Self {\n";
out.Indent();
@@ -1024,7 +1095,11 @@ void GenerateParcelDeserializeBody(CodeWriter& out, const AidlUnionDecl* parcel,
template <typename ParcelableType>
void GenerateParcelableTrait(CodeWriter& out, const ParcelableType* parcel,
const AidlTypenames& typenames) {
- out << "impl binder::Parcelable for " << parcel->GetName() << " {\n";
+ out << "impl";
+ WriteParams(out, parcel);
+ out << " binder::Parcelable for r#" << parcel->GetName();
+ WriteParams(out, parcel);
+ out << " {\n";
out.Indent();
out << "fn write_to_parcel(&self, "
@@ -1048,13 +1123,21 @@ void GenerateParcelableTrait(CodeWriter& out, const ParcelableType* parcel,
out << "}\n";
// Emit the outer (de)serialization traits
- out << "binder::impl_serialize_for_parcelable!(" << parcel->GetName() << ");\n";
- out << "binder::impl_deserialize_for_parcelable!(" << parcel->GetName() << ");\n";
+ out << "binder::impl_serialize_for_parcelable!(r#" << parcel->GetName();
+ WriteParams(out, parcel);
+ out << ");\n";
+ out << "binder::impl_deserialize_for_parcelable!(r#" << parcel->GetName();
+ WriteParams(out, parcel);
+ out << ");\n";
}
template <typename ParcelableType>
void GenerateMetadataTrait(CodeWriter& out, const ParcelableType* parcel) {
- out << "impl binder::binder_impl::ParcelableMetadata for " << parcel->GetName() << " {\n";
+ out << "impl";
+ WriteParams(out, parcel);
+ out << " binder::binder_impl::ParcelableMetadata for r#" << parcel->GetName();
+ WriteParams(out, parcel);
+ out << " {\n";
out.Indent();
out << "fn get_descriptor() -> &'static str { \"" << parcel->GetCanonicalName() << "\" }\n";
@@ -1071,18 +1154,12 @@ void GenerateMetadataTrait(CodeWriter& out, const ParcelableType* parcel) {
template <typename ParcelableType>
void GenerateRustParcel(CodeWriter* code_writer, const ParcelableType* parcel,
const AidlTypenames& typenames) {
+ vector<string> derives = parcel->RustDerive();
+
// Debug is always derived because all Rust AIDL types implement it
// ParcelFileDescriptor doesn't support any of the others because
// it's a newtype over std::fs::File which only implements Debug
- vector<string> derives{"Debug"};
- const AidlAnnotation* derive_annotation = parcel->RustDerive();
- if (derive_annotation != nullptr) {
- for (const auto& name_and_param : derive_annotation->AnnotationParams(ConstantValueDecorator)) {
- if (name_and_param.second == "true") {
- derives.push_back(name_and_param.first);
- }
- }
- }
+ derives.insert(derives.begin(), "Debug");
*code_writer << "#[derive(" << Join(derives, ", ") << ")]\n";
GenerateParcelBody(*code_writer, parcel, typenames);
@@ -1103,13 +1180,13 @@ void GenerateRustEnumDeclaration(CodeWriter* code_writer, const AidlEnumDeclarat
code_writer->Indent();
GenerateDeprecated(*code_writer, *enum_decl);
- *code_writer << enum_decl->GetName() << " : [" << backing_type << "; "
+ *code_writer << "r#" << enum_decl->GetName() << " : [" << backing_type << "; "
<< std::to_string(enum_decl->GetEnumerators().size()) << "] {\n";
code_writer->Indent();
for (const auto& enumerator : enum_decl->GetEnumerators()) {
auto value = enumerator->GetValue()->ValueString(aidl_backing_type, ConstantValueDecorator);
GenerateDeprecated(*code_writer, *enumerator);
- *code_writer << enumerator->GetName() << " = " << value << ",\n";
+ *code_writer << "r#" << enumerator->GetName() << " = " << value << ",\n";
}
code_writer->Dedent();
*code_writer << "}\n";
@@ -1136,7 +1213,7 @@ void GenerateClass(CodeWriter* code_writer, const AidlDefinedType& defined_type,
}
for (const auto& nested : defined_type.GetNestedTypes()) {
- (*code_writer) << "pub mod " << nested->GetName() << " {\n";
+ (*code_writer) << "pub mod r#" << nested->GetName() << " {\n";
code_writer->Indent();
GenerateClass(code_writer, *nested, types, options);
code_writer->Dedent();
diff --git a/import_resolver.cpp b/import_resolver.cpp
index 48fba3cf..c1c8593a 100644
--- a/import_resolver.cpp
+++ b/import_resolver.cpp
@@ -62,15 +62,17 @@ string ImportResolver::FindImportFile(const string& canonical_name) const {
continue;
}
if (candidates.size() == 1) {
- // found!
+ // found! ("legacy" logic: may still be ambiguous path if we try other relative paths)
return *candidates.begin();
}
if (candidates.size() > 1) {
AIDL_ERROR(input_file_name_) << "Duplicate files found for " << canonical_name << " from:\n"
<< base::Join(candidates, "\n");
- break;
+ return "";
}
}
+ AIDL_ERROR(input_file_name_) << "Couldn't find import for class " << canonical_name
+ << ". Searched here:\n - " << base::Join(import_paths_, "\n - ");
return "";
}
diff --git a/io_delegate.cpp b/io_delegate.cpp
index d40bf1dd..b903f1fa 100644
--- a/io_delegate.cpp
+++ b/io_delegate.cpp
@@ -18,6 +18,7 @@
#include <cstring>
#include <fstream>
+#include <type_traits>
#include <vector>
#ifdef _WIN32
@@ -184,10 +185,51 @@ unique_ptr<CodeWriter> IoDelegate::GetCodeWriter(
}
#ifdef _WIN32
-Result<vector<string>> IoDelegate::ListFiles(const string&) const {
- return Error() << "File listing not implemented on Windows";
-}
+static Result<void> add_list_files(const string& dirname, vector<string>* result) {
+ AIDL_FATAL_IF(result == nullptr, dirname);
+
+ WIN32_FIND_DATA find_data;
+ // Look up the first file.
+ // See https://stackoverflow.com/a/14841564/112950 for why we use remove_pointer_t
+ // here.
+ // Note: we need to use a wildcard expression like `\*` to ensure we traverse
+ // the directory. Otherwise Find{First,Next}File will only return the directory
+ // itself and stop.
+ const string path(dirname + "\\*");
+ std::unique_ptr<std::remove_pointer_t<HANDLE>, decltype(&FindClose)> search_handle(
+ FindFirstFile(path.c_str(), &find_data), FindClose);
+
+ if (search_handle.get() == INVALID_HANDLE_VALUE) {
+ return Error() << "Failed to read directory '" << dirname << "': " << GetLastError();
+ }
+
+ bool has_more_files = true;
+ do {
+ const bool skip = !strcmp(find_data.cFileName, ".") || !strcmp(find_data.cFileName, "..");
+
+ if (!skip) {
+ if (find_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
+ if (auto ret = add_list_files(dirname + OS_PATH_SEPARATOR + find_data.cFileName, result);
+ !ret.ok()) {
+ return ret;
+ }
+ } else {
+ result->emplace_back(dirname + OS_PATH_SEPARATOR + find_data.cFileName);
+ }
+ }
+
+ has_more_files = FindNextFile(search_handle.get(), &find_data);
+ if (!has_more_files) {
+ const DWORD err = GetLastError();
+ if (err != ERROR_NO_MORE_FILES) {
+ return Error() << "Failed to read directory entry in '" << dirname << "': " << err;
+ }
+ }
+ } while (has_more_files);
+
+ return Result<void>();
+}
#else
static Result<void> add_list_files(const string& dirname, vector<string>* result) {
AIDL_FATAL_IF(result == nullptr, dirname);
@@ -222,6 +264,7 @@ static Result<void> add_list_files(const string& dirname, vector<string>* result
return Result<void>();
}
+#endif
Result<vector<string>> IoDelegate::ListFiles(const string& dir) const {
vector<string> result;
@@ -230,7 +273,6 @@ Result<vector<string>> IoDelegate::ListFiles(const string& dir) const {
}
return result;
}
-#endif
string IoDelegate::CleanPath(const string& path) {
if (base::StartsWith(path, string{'.', OS_PATH_SEPARATOR})) {
diff --git a/logging.h b/logging.h
index e5401057..f2150c26 100644
--- a/logging.h
+++ b/logging.h
@@ -43,7 +43,7 @@ class AidlErrorLog {
// btw, making it movable so that functions can return it.
AidlErrorLog(AidlErrorLog&&) = default;
- AidlErrorLog& operator=(AidlErrorLog&&) = default;
+ AidlErrorLog& operator=(AidlErrorLog&&) = delete;
template <typename T>
AidlErrorLog& operator<<(T&& arg) {
diff --git a/options.cpp b/options.cpp
index b9878b87..adf1e1ba 100644
--- a/options.cpp
+++ b/options.cpp
@@ -56,14 +56,12 @@ string Options::GetUsage() const {
<< myname_ << " --preprocess OUTPUT INPUT..." << endl
<< " Create an AIDL file having declarations of AIDL file(s)." << endl
<< endl
-#ifndef _WIN32
<< myname_ << " --dumpapi --out=DIR INPUT..." << endl
<< " Dump API signature of AIDL file(s) to DIR." << endl
<< endl
<< myname_ << " --checkapi[={compatible|equal}] OLD_DIR NEW_DIR" << endl
<< " Check whether NEW_DIR API dump is {compatible|equal} extension " << endl
<< " of the API dump OLD_DIR. Default: compatible" << endl
-#endif
<< endl
<< myname_ << " --apimapping OUTPUT INPUT..." << endl
<< " Generate a mapping of declared aidl method signatures to" << endl
@@ -106,7 +104,7 @@ string Options::GetUsage() const {
<< " Generate dependency file next to the output file with the" << endl
<< " name based on the input file." << endl
<< " -b" << endl
- << " Trigger fail when trying to compile a parcelable." << endl
+ << " Trigger fail when trying to compile a parcelable declaration." << endl
<< " --ninja" << endl
<< " Generate dependency file in a format ninja understands." << endl
<< " --rpc" << endl
@@ -177,6 +175,8 @@ string to_string(Options::Language language) {
return "ndk";
case Options::Language::RUST:
return "rust";
+ case Options::Language::CPP_ANALYZER:
+ return "cpp-analyzer";
case Options::Language::UNSPECIFIED:
return "unspecified";
default:
@@ -196,6 +196,7 @@ bool Options::StabilityFromString(const std::string& stability, Stability* out_s
static const std::map<std::string, uint32_t> codeNameToVersion = {
{"S", 31},
{"Tiramisu", SDK_VERSION_Tiramisu},
+ {"UpsideDownCake", SDK_VERSION_UpsideDownCake},
// this is an alias for the latest in-development platform version
{"current", SDK_VERSION_current},
// this is an alias for use of all APIs, including those not in any API surface
@@ -223,6 +224,8 @@ static uint32_t DefaultMinSdkVersionForLang(const Options::Language lang) {
return DEFAULT_SDK_VERSION_NDK;
case Options::Language::RUST:
return DEFAULT_SDK_VERSION_RUST;
+ case Options::Language::CPP_ANALYZER:
+ return DEFAULT_SDK_VERSION_CPP;
case Options::Language::UNSPECIFIED:
return DEFAULT_SDK_VERSION_JAVA; // The safest option
default:
@@ -263,11 +266,9 @@ Options::Options(int argc, const char* const raw_argv[], Options::Language defau
static struct option long_options[] = {
{"lang", required_argument, 0, 'l'},
{"preprocess", no_argument, 0, 's'},
-#ifndef _WIN32
{"dumpapi", no_argument, 0, 'u'},
{"no_license", no_argument, 0, 'x'},
{"checkapi", optional_argument, 0, 'A'},
-#endif
{"apimapping", required_argument, 0, 'i'},
{"include", required_argument, 0, 'I'},
{"preprocessed", required_argument, 0, 'p'},
@@ -315,6 +316,9 @@ Options::Options(int argc, const char* const raw_argv[], Options::Language defau
} else if (lang == "rust") {
language_ = Options::Language::RUST;
task_ = Options::Task::COMPILE;
+ } else if (lang == "cpp-analyzer") {
+ language_ = Options::Language::CPP_ANALYZER;
+ task_ = Options::Task::COMPILE;
} else {
error_message_ << "Unsupported language: '" << lang << "'" << endl;
return;
@@ -324,7 +328,6 @@ Options::Options(int argc, const char* const raw_argv[], Options::Language defau
case 's':
task_ = Options::Task::PREPROCESS;
break;
-#ifndef _WIN32
case 'u':
task_ = Options::Task::DUMP_API;
break;
@@ -346,7 +349,6 @@ Options::Options(int argc, const char* const raw_argv[], Options::Language defau
}
}
break;
-#endif
case 'I': {
import_dirs_.emplace(Trim(optarg));
break;
@@ -612,6 +614,8 @@ Options::Options(int argc, const char* const raw_argv[], Options::Language defau
return;
}
+ if (min_sdk_version_ >= rpc_version) gen_rpc_ = true;
+
AIDL_FATAL_IF(!output_dir_.empty() && output_dir_.back() != OS_PATH_SEPARATOR, output_dir_);
AIDL_FATAL_IF(!output_header_dir_.empty() && output_header_dir_.back() != OS_PATH_SEPARATOR,
output_header_dir_);
diff --git a/options.h b/options.h
index 5208424a..01cd00c4 100644
--- a/options.h
+++ b/options.h
@@ -40,6 +40,7 @@ constexpr uint32_t DEFAULT_SDK_VERSION_RUST = 31;
constexpr uint32_t SDK_VERSION_current = 10000;
constexpr uint32_t SDK_VERSION_Tiramisu = 33;
+constexpr uint32_t SDK_VERSION_UpsideDownCake = 34;
constexpr uint32_t JAVA_PROPAGATE_VERSION = SDK_VERSION_Tiramisu;
@@ -88,9 +89,15 @@ class WarningOptions {
std::set<std::string> no_errors_; // -Wno-error=foo
};
+// Options for AIDL
+//
+// These are passed all throughout the compiler, but they should not affect the
+// code which is generated. In order to avoid ODR issues, and also in order to
+// make sure the language is orthogonal and portable, we should only generate
+// different things based on the file contents themselves.
class Options final {
public:
- enum class Language { UNSPECIFIED, JAVA, CPP, NDK, RUST };
+ enum class Language { UNSPECIFIED, JAVA, CPP, NDK, RUST, CPP_ANALYZER };
enum class Task { HELP, COMPILE, PREPROCESS, DUMP_API, CHECK_API, DUMP_MAPPINGS };
@@ -121,7 +128,10 @@ class Options final {
uint32_t GetMinSdkVersion() const { return min_sdk_version_; }
Language TargetLanguage() const { return language_; }
- bool IsCppOutput() const { return language_ == Language::CPP || language_ == Language::NDK; }
+ bool IsCppOutput() const {
+ return language_ == Language::CPP || language_ == Language::NDK ||
+ language_ == Language::CPP_ANALYZER;
+ }
Task GetTask() const { return task_; }
diff --git a/options_unittest.cpp b/options_unittest.cpp
index 2931bc60..4bec8a73 100644
--- a/options_unittest.cpp
+++ b/options_unittest.cpp
@@ -454,7 +454,7 @@ TEST(OptionsTest, AcceptValidMinSdkVersion) {
EXPECT_EQ(30u, options->GetMinSdkVersion());
}
-TEST(OptionsTests, AcceptCodeNameAsMinSdkVersion) {
+TEST(OptionsTests, AcceptTCodeNameAsMinSdkVersion) {
const char* args[] = {
"aidl", "--lang=java", "--min_sdk_version=Tiramisu", "--out=out", "input.aidl", nullptr,
};
@@ -463,6 +463,15 @@ TEST(OptionsTests, AcceptCodeNameAsMinSdkVersion) {
EXPECT_EQ(33u, options->GetMinSdkVersion());
}
+TEST(OptionsTests, AcceptUCodeNameAsMinSdkVersion) {
+ const char* args[] = {
+ "aidl", "--lang=java", "--min_sdk_version=UpsideDownCake", "--out=out", "input.aidl", nullptr,
+ };
+ auto options = GetOptions(args);
+ EXPECT_TRUE(options->Ok());
+ EXPECT_EQ(34u, options->GetMinSdkVersion());
+}
+
TEST(OptionsTest, DefaultMinSdkVersion) {
const char* args[] = {
"aidl", "--lang=java", "--out=out", "input.aidl", nullptr,
diff --git a/preprocess.cpp b/preprocess.cpp
index b332f2e0..41f76ae3 100644
--- a/preprocess.cpp
+++ b/preprocess.cpp
@@ -91,6 +91,9 @@ struct PreprocessVisitor : AidlVisitor {
if (const auto& cpp_header = t.GetCppHeader(); !cpp_header.empty()) {
out << " cpp_header " << cpp_header;
}
+ if (const auto& ndk_header = t.GetNdkHeader(); !ndk_header.empty()) {
+ out << " ndk_header " << ndk_header;
+ }
out << ";\n";
}
void Visit(const AidlStructuredParcelable& t) override {
@@ -148,4 +151,4 @@ bool Preprocess(const Options& options, const IoDelegate& io_delegate) {
}
} // namespace aidl
-} // namespace android \ No newline at end of file
+} // namespace android
diff --git a/scripts/example_dep_build_failure_output.txt b/scripts/example_dep_build_failure_output.txt
new file mode 100644
index 00000000..50aa3973
--- /dev/null
+++ b/scripts/example_dep_build_failure_output.txt
@@ -0,0 +1,88 @@
+============================================
+PLATFORM_VERSION_CODENAME=UpsideDownCake
+PLATFORM_VERSION=UpsideDownCake
+TARGET_PRODUCT=aosp_cf_x86_64_phone
+TARGET_BUILD_VARIANT=userdebug
+TARGET_ARCH=x86_64
+TARGET_ARCH_VARIANT=silvermont
+TARGET_2ND_ARCH=x86
+TARGET_2ND_ARCH_VARIANT=silvermont
+HOST_OS=linux
+HOST_OS_EXTRA=Linux-5.18.16-1rodete1-amd64-x86_64-Debian-GNU/Linux-rodete
+HOST_CROSS_OS=windows
+BUILD_ID=AOSP.MASTER
+OUT_DIR=out
+============================================
+[100% 1/1] analyzing Android.bp files and generating ninja file at out/soong/build.ninja
+FAILED: out/soong/build.ninja
+cd "$(dirname "out/host/linux-x86/bin/soong_build")" && BUILDER="$PWD/$(basename "out/host/linux-x86/bin/soong_build")" && cd / && env -i "$BUILDER" --top "$TOP" --soong_out "out/soong" --out "out" -o out/soong/build.ninja --globListDir build --globFile out/soong/globs-build.ninja -t -l out/.module_paths/Android.bp.list --available_env out/soong/soong.environment.available --used_env out/soong/soong.environment.used.build Android.bp
+error: hardware/interfaces/automotive/audiocontrol/aidl/Android.bp:12:1: module "android.hardware.automotive.audiocontrol-V2-java" variant "android_common" (created by module "android.hardware.automotive.audiocontrol-V2-java-generator" (created by module "android.hardware.automotive.audiocontrol_interface")): depends on multiple versions of the same aidl_interface: android.media.audio.common.types-V1-java-source, android.media.audio.common.types-V2-java-source
+error: hardware/interfaces/automotive/audiocontrol/aidl/Android.bp:12:1: module "android.hardware.automotive.audiocontrol-V2-java" variant "android_common" (created by module "android.hardware.automotive.audiocontrol-V2-java-generator" (created by module "android.hardware.automotive.audiocontrol_interface")): Dependency path:
+ via tag java.dependencyTag: { name:staticlib runtimeLinked:false toolchain:false}
+ -> android.hardware.audio.common-V1-java{os:android,arch:common,apex:}
+ via tag java.dependencyTag: { name:staticlib runtimeLinked:false toolchain:false}
+ -> android.media.audio.common.types-V1-java{os:android,arch:common,apex:}
+ via tag android.sourceOrOutputDependencyTag: { moduleName:android.media.audio.common.types-V1-java-source tag:}
+ -> android.media.audio.common.types-V1-java-source{}
+error: hardware/interfaces/automotive/audiocontrol/aidl/Android.bp:12:1: module "android.hardware.automotive.audiocontrol-V2-java" variant "android_common" (created by module "android.hardware.automotive.audiocontrol-V2-java-generator" (created by module "android.hardware.automotive.audiocontrol_interface")): Dependency path:
+ via tag java.dependencyTag: { name:staticlib runtimeLinked:false toolchain:false}
+ -> android.media.audio.common.types-V2-java{os:android,arch:common,apex:}
+ via tag android.sourceOrOutputDependencyTag: { moduleName:android.media.audio.common.types-V2-java-source tag:}
+ -> android.media.audio.common.types-V2-java-source{}
+error: hardware/interfaces/automotive/audiocontrol/aidl/Android.bp:12:1: module "android.hardware.automotive.audiocontrol-V1-java" variant "android_common" (created by module "android.hardware.automotive.audiocontrol-V1-java-generator" (created by module "android.hardware.automotive.audiocontrol_interface")): depends on multiple versions of the same aidl_interface: android.media.audio.common.types-V1-java-source, android.media.audio.common.types-V2-java-source
+error: hardware/interfaces/automotive/audiocontrol/aidl/Android.bp:12:1: module "android.hardware.automotive.audiocontrol-V1-java" variant "android_common" (created by module "android.hardware.automotive.audiocontrol-V1-java-generator" (created by module "android.hardware.automotive.audiocontrol_interface")): Dependency path:
+ via tag java.dependencyTag: { name:staticlib runtimeLinked:false toolchain:false}
+ -> android.hardware.audio.common-V1-java{os:android,arch:common,apex:}
+ via tag java.dependencyTag: { name:staticlib runtimeLinked:false toolchain:false}
+ -> android.media.audio.common.types-V1-java{os:android,arch:common,apex:}
+ via tag android.sourceOrOutputDependencyTag: { moduleName:android.media.audio.common.types-V1-java-source tag:}
+ -> android.media.audio.common.types-V1-java-source{}
+error: hardware/interfaces/automotive/audiocontrol/aidl/Android.bp:12:1: module "android.hardware.automotive.audiocontrol-V1-java" variant "android_common" (created by module "android.hardware.automotive.audiocontrol-V1-java-generator" (created by module "android.hardware.automotive.audiocontrol_interface")): Dependency path:
+ via tag java.dependencyTag: { name:staticlib runtimeLinked:false toolchain:false}
+ -> android.media.audio.common.types-V2-java{os:android,arch:common,apex:}
+ via tag android.sourceOrOutputDependencyTag: { moduleName:android.media.audio.common.types-V2-java-source tag:}
+ -> android.media.audio.common.types-V2-java-source{}
+error: hardware/interfaces/audio/aidl/Android.bp:90:1: module "android.hardware.audio.core-V1-java" variant "android_common" (created by module "android.hardware.audio.core-V1-java-generator" (created by module "android.hardware.audio.core_interface")): depends on multiple versions of the same aidl_interface: android.media.audio.common.types-V1-java-source, android.media.audio.common.types-V2-java-source
+error: hardware/interfaces/audio/aidl/Android.bp:90:1: module "android.hardware.audio.core-V1-java" variant "android_common" (created by module "android.hardware.audio.core-V1-java-generator" (created by module "android.hardware.audio.core_interface")): Dependency path:
+ via tag java.dependencyTag: { name:staticlib runtimeLinked:false toolchain:false}
+ -> android.hardware.audio.common-V1-java{os:android,arch:common,apex:}
+ via tag java.dependencyTag: { name:staticlib runtimeLinked:false toolchain:false}
+ -> android.media.audio.common.types-V1-java{os:android,arch:common,apex:}
+ via tag android.sourceOrOutputDependencyTag: { moduleName:android.media.audio.common.types-V1-java-source tag:}
+ -> android.media.audio.common.types-V1-java-source{}
+error: hardware/interfaces/audio/aidl/Android.bp:90:1: module "android.hardware.audio.core-V1-java" variant "android_common" (created by module "android.hardware.audio.core-V1-java-generator" (created by module "android.hardware.audio.core_interface")): Dependency path:
+ via tag java.dependencyTag: { name:staticlib runtimeLinked:false toolchain:false}
+ -> android.media.audio.common.types-V2-java{os:android,arch:common,apex:}
+ via tag android.sourceOrOutputDependencyTag: { moduleName:android.media.audio.common.types-V2-java-source tag:}
+ -> android.media.audio.common.types-V2-java-source{}
+error: hardware/interfaces/automotive/audiocontrol/aidl/Android.bp:12:1: module "android.hardware.automotive.audiocontrol-V3-java" variant "android_common" (created by module "android.hardware.automotive.audiocontrol-V3-java-generator" (created by module "android.hardware.automotive.audiocontrol_interface")): depends on multiple versions of the same aidl_interface: android.media.audio.common.types-V1-java-source, android.media.audio.common.types-V2-java-source
+error: hardware/interfaces/automotive/audiocontrol/aidl/Android.bp:12:1: module "android.hardware.automotive.audiocontrol-V3-java" variant "android_common" (created by module "android.hardware.automotive.audiocontrol-V3-java-generator" (created by module "android.hardware.automotive.audiocontrol_interface")): Dependency path:
+ via tag java.dependencyTag: { name:staticlib runtimeLinked:false toolchain:false}
+ -> android.hardware.audio.common-V1-java{os:android,arch:common,apex:}
+ via tag java.dependencyTag: { name:staticlib runtimeLinked:false toolchain:false}
+ -> android.media.audio.common.types-V1-java{os:android,arch:common,apex:}
+ via tag android.sourceOrOutputDependencyTag: { moduleName:android.media.audio.common.types-V1-java-source tag:}
+ -> android.media.audio.common.types-V1-java-source{}
+error: hardware/interfaces/automotive/audiocontrol/aidl/Android.bp:12:1: module "android.hardware.automotive.audiocontrol-V3-java" variant "android_common" (created by module "android.hardware.automotive.audiocontrol-V3-java-generator" (created by module "android.hardware.automotive.audiocontrol_interface")): Dependency path:
+ via tag java.dependencyTag: { name:staticlib runtimeLinked:false toolchain:false}
+ -> android.media.audio.common.types-V2-java{os:android,arch:common,apex:}
+ via tag android.sourceOrOutputDependencyTag: { moduleName:android.media.audio.common.types-V2-java-source tag:}
+ -> android.media.audio.common.types-V2-java-source{}
+error: hardware/interfaces/audio/aidl/Android.bp:147:1: module "android.hardware.audio.effect-V1-java" variant "android_common" (created by module "android.hardware.audio.effect-V1-java-generator" (created by module "android.hardware.audio.effect_interface")): depends on multiple versions of the same aidl_interface: android.media.audio.common.types-V1-java-source, android.media.audio.common.types-V2-java-source
+error: hardware/interfaces/audio/aidl/Android.bp:147:1: module "android.hardware.audio.effect-V1-java" variant "android_common" (created by module "android.hardware.audio.effect-V1-java-generator" (created by module "android.hardware.audio.effect_interface")): Dependency path:
+ via tag java.dependencyTag: { name:staticlib runtimeLinked:false toolchain:false}
+ -> android.hardware.audio.common-V1-java{os:android,arch:common,apex:}
+ via tag java.dependencyTag: { name:staticlib runtimeLinked:false toolchain:false}
+ -> android.media.audio.common.types-V1-java{os:android,arch:common,apex:}
+ via tag android.sourceOrOutputDependencyTag: { moduleName:android.media.audio.common.types-V1-java-source tag:}
+ -> android.media.audio.common.types-V1-java-source{}
+error: hardware/interfaces/audio/aidl/Android.bp:147:1: module "android.hardware.audio.effect-V1-java" variant "android_common" (created by module "android.hardware.audio.effect-V1-java-generator" (created by module "android.hardware.audio.effect_interface")): Dependency path:
+ via tag java.dependencyTag: { name:staticlib runtimeLinked:false toolchain:false}
+ -> android.media.audio.common.types-V2-java{os:android,arch:common,apex:}
+ via tag android.sourceOrOutputDependencyTag: { moduleName:android.media.audio.common.types-V2-java-source tag:}
+ -> android.media.audio.common.types-V2-java-source{}
+ninja: build stopped: subcommand failed.
+21:43:11 soong bootstrap failed with: exit status 1
+
+#### failed to build some targets (46 seconds) ####
+
diff --git a/scripts/redundancy_check/Android.bp b/scripts/redundancy_check/Android.bp
new file mode 100644
index 00000000..0ad95ea0
--- /dev/null
+++ b/scripts/redundancy_check/Android.bp
@@ -0,0 +1,35 @@
+
+package {
+ default_applicable_licenses: ["system_tools_aidl_license"],
+}
+
+// Example usage:
+//
+// m aidl_redundancy_check
+// aidl_redundancy_check \
+// --installed-files-json $OUT/installed-files.json \
+// --aidl-metadata-json $ANDROID_BUILD_TOP/out/soong/.intermediates/system/tools/aidl/build/aidl_metadata_json/aidl_metadata.json
+rust_binary_host {
+ name: "aidl_redundancy_check",
+ srcs: ["srcs/main.rs"],
+ rustlibs: [
+ "libanyhow",
+ "libregex",
+ "libserde",
+ "libserde_json",
+ "libclap",
+ ],
+}
+
+rust_test_host {
+ name: "aidl_redundancy_check.test",
+ srcs: ["srcs/main.rs"],
+ rustlibs: [
+ "libanyhow",
+ "libregex",
+ "libserde",
+ "libserde_json",
+ "libclap",
+ ],
+ test_suites: ["general-tests"],
+}
diff --git a/scripts/redundancy_check/srcs/main.rs b/scripts/redundancy_check/srcs/main.rs
new file mode 100644
index 00000000..401eeb74
--- /dev/null
+++ b/scripts/redundancy_check/srcs/main.rs
@@ -0,0 +1,175 @@
+/*
+ * Copyright (C) 2022, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//! Reports redundant AIDL libraries included in a partition.
+
+use anyhow::{Context, Result};
+use clap::Parser;
+use std::collections::BTreeMap;
+use std::fs::File;
+use std::io::BufReader;
+use std::path::{Path, PathBuf};
+
+#[derive(Parser, Debug)]
+#[structopt()]
+struct Opt {
+ /// JSON file with list of files installed in a partition, e.g. "$OUT/installed-files.json".
+ #[clap(long)]
+ installed_files_json: PathBuf,
+
+ /// JSON file with metadata for AIDL interfaces. Optional, but fewer checks are performed when
+ /// unset.
+ #[clap(long)]
+ aidl_metadata_json: Option<PathBuf>,
+}
+
+/// "aidl_metadata.json" entry.
+#[derive(Debug, serde::Deserialize)]
+struct AidlInterfaceMetadata {
+ /// Name of module defining package.
+ name: String,
+}
+
+/// "installed-files.json" entry.
+#[derive(Debug, serde::Deserialize)]
+struct InstalledFile {
+ /// Full file path.
+ #[serde(rename = "Name")]
+ name: String,
+ /// File size.
+ #[serde(rename = "Size")]
+ size: u64,
+}
+
+#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)]
+enum LibDir {
+ Lib,
+ Lib64,
+}
+
+/// An instance of an AIDL interface lib.
+#[derive(Debug, PartialEq, Eq, PartialOrd, Ord)]
+struct AidlInstance {
+ installed_path: String,
+ size: u64,
+ name: String,
+ variant: String, // e.g. "ndk" or "cpp"
+ version: usize,
+ lib_dir: LibDir,
+}
+
+/// Deserializes a JSON file at `path` into an object of type `T`.
+fn read_json_file<T: serde::de::DeserializeOwned>(path: &Path) -> Result<T> {
+ let file = File::open(path).with_context(|| format!("failed to open: {}", path.display()))?;
+ serde_json::from_reader(BufReader::new(file))
+ .with_context(|| format!("failed to read: {}", path.display()))
+}
+
+/// Extracts AIDL lib info an `InstalledFile`, mainly by parsing the file path. Returns `None` if
+/// it doesn't look like an AIDL lib.
+fn extract_aidl_instance(installed_file: &InstalledFile) -> Option<AidlInstance> {
+ // example: android.hardware.security.keymint-V2-ndk.so
+ let lib_regex = regex::Regex::new(r#".*/(lib|lib64)/([^-]*)-V(\d+)-([^.]+)\."#)
+ .expect("failed to parse regex");
+ let captures = lib_regex.captures(&installed_file.name)?;
+ let (dir, name, version, variant) = (&captures[1], &captures[2], &captures[3], &captures[4]);
+ Some(AidlInstance {
+ installed_path: installed_file.name.clone(),
+ size: installed_file.size,
+ name: name.to_string(),
+ variant: variant.to_string(),
+ version: version.parse().unwrap(),
+ lib_dir: if dir == "lib64" { LibDir::Lib64 } else { LibDir::Lib },
+ })
+}
+
+fn main() -> Result<()> {
+ let args = Opt::parse();
+
+ // Read the metadata file if available.
+ let metadata_list: Option<Vec<AidlInterfaceMetadata>> = match &args.aidl_metadata_json {
+ Some(aidl_metadata_json) => read_json_file(aidl_metadata_json)?,
+ None => None,
+ };
+ let is_valid_aidl_lib = |name: &str| match &metadata_list {
+ Some(x) => x.iter().any(|metadata| metadata.name == name),
+ None => true,
+ };
+
+ // Read the "installed-files.json" and create a list of AidlInstance.
+ let installed_files: Vec<InstalledFile> = read_json_file(&args.installed_files_json)?;
+ let instances: Vec<AidlInstance> = installed_files
+ .iter()
+ .filter_map(extract_aidl_instance)
+ .filter(|instance| {
+ if !is_valid_aidl_lib(&instance.name) {
+ eprintln!(
+ "WARNING: {} looks like an AIDL lib, but has no metadata",
+ &instance.installed_path
+ );
+ return false;
+ }
+ true
+ })
+ .collect();
+
+ // Group redundant AIDL lib instances together.
+ let groups: BTreeMap<(String, LibDir), Vec<&AidlInstance>> =
+ instances.iter().fold(BTreeMap::new(), |mut acc, x| {
+ let key = (x.name.clone(), x.lib_dir);
+ acc.entry(key).or_default().push(x);
+ acc
+ });
+ let mut total_wasted_bytes = 0;
+ for (group_key, mut instances) in groups {
+ if instances.len() > 1 {
+ instances.sort();
+ // Prefer the highest version, break ties favoring ndk.
+ let preferred_instance = instances
+ .iter()
+ .max_by_key(|x| (x.version, i32::from(x.variant == "ndk")))
+ .unwrap();
+ let wasted_bytes: u64 =
+ instances.iter().filter(|x| *x != preferred_instance).map(|x| x.size).sum();
+ println!("Found redundant AIDL instances for {:?}", group_key);
+ for instance in instances.iter() {
+ println!(
+ "\t{}\t({:.2} KiB){}",
+ instance.installed_path,
+ instance.size as f64 / 1024.0,
+ if instance == preferred_instance { " <- preferred" } else { "" }
+ );
+ }
+ total_wasted_bytes += wasted_bytes;
+ println!("\t(potential savings: {:.2} KiB)", wasted_bytes as f64 / 1024.0);
+ println!();
+ }
+ }
+ println!("total potential savings: {:.2} KiB", total_wasted_bytes as f64 / 1024.0);
+
+ Ok(())
+}
+
+#[cfg(test)]
+mod tests {
+ use super::*;
+ use clap::CommandFactory;
+
+ #[test]
+ fn verify_opt() {
+ Opt::command().debug_assert();
+ }
+}
diff --git a/scripts/vis_aidl_ver_errors.py b/scripts/vis_aidl_ver_errors.py
new file mode 100755
index 00000000..71c31606
--- /dev/null
+++ b/scripts/vis_aidl_ver_errors.py
@@ -0,0 +1,56 @@
+#!/usr/bin/env python3
+
+# note - needs
+# sudo apt-get install python3-networkx python3-matplotlib
+import matplotlib.pyplot as plt
+import networkx as nx
+
+import re
+import fileinput
+
+# okay - not actually using this now
+# groups : 1 -> module name, 2 -> ultimate deps
+RE_highlevel = re.compile("error: [^ ]* module \"([^\"]*)\" variant \"[^\"]*\" .*? depends on multiple versions of the same aidl_interface: (.*)\n")
+
+# groups : 1 -> module name
+RE_dependencyStart = re.compile("error: [^ ]* module \"([^\"]*)\" variant \"[^\"]*\" .*? Dependency path.*\n")
+
+# groups : 1 -> module name
+RE_dependencyCont = re.compile(" *-> ([^{]*){.*\n")
+
+RE_ignore= re.compile(" *via tag.*{.*}.*\n")
+
+# [(module, module)]
+graph = []
+
+last = None
+
+for i in fileinput.input():
+ # could validate consistency of this graph based on this
+ if RE_highlevel.fullmatch(i): continue
+
+ m = RE_dependencyStart.fullmatch(i)
+ if m:
+ last = m.groups()[0]
+ continue
+
+ m = RE_dependencyCont.fullmatch(i)
+ if m:
+ curr = m.groups()[0]
+ graph += [(last, curr)]
+ last = curr
+ continue
+
+ if RE_ignore.fullmatch(i): continue
+
+ print("UNRECOGNIZED LINE", i.strip())
+
+#for a,b in graph:
+# print(a,b)
+
+G = nx.MultiDiGraph()
+G.add_edges_from(graph)
+plt.figure(figsize=(10,10))
+nx.draw(G, connectionstyle='arc3,rad=0.01', with_labels=True)
+plt.show()
+
diff --git a/tests/aidl_integration_test.py b/tests/aidl_integration_test.py
index 5f086da1..ae73531a 100755
--- a/tests/aidl_integration_test.py
+++ b/tests/aidl_integration_test.py
@@ -1,6 +1,8 @@
#!/usr/bin/env python3
from itertools import product
+from time import sleep
+
import pipes
import re
import subprocess
@@ -192,6 +194,36 @@ class JavaVersionTestServer:
' /data/framework android.aidl.sdkversion.service.AidlJavaVersionTestService',
background=True)
+class JavaPermissionClient:
+ def __init__(self, host, bitness):
+ self.name = "java_client_permission_%s" % pretty_bitness(bitness)
+ self.host = host
+ self.bitness = bitness
+ def cleanup(self):
+ self.host.run('killall ' + APP_PROCESS_FOR_PRETTY_BITNESS % pretty_bitness(self.bitness),
+ ignore_status=True)
+ def run(self):
+ result = self.host.run('CLASSPATH=/data/framework/aidl_test_java_client_permission.jar '
+ + APP_PROCESS_FOR_PRETTY_BITNESS % pretty_bitness(self.bitness) +
+ ' /data/framework android.aidl.permission.tests.PermissionTests')
+ print(result.printable_string())
+ if re.search(INSTRUMENTATION_SUCCESS_PATTERN, result.stdout) is None:
+ raise TestFail(result.stdout)
+
+class JavaPermissionServer:
+ def __init__(self, host, bitness):
+ self.name = "java_server_permission_%s" % pretty_bitness(bitness)
+ self.host = host
+ self.bitness = bitness
+ def cleanup(self):
+ self.host.run('killall ' + APP_PROCESS_FOR_PRETTY_BITNESS % pretty_bitness(self.bitness),
+ ignore_status=True)
+ def run(self):
+ return self.host.run('CLASSPATH=/data/framework/aidl_test_java_service_permission.jar '
+ + APP_PROCESS_FOR_PRETTY_BITNESS % pretty_bitness(self.bitness) +
+ ' /data/framework android.aidl.permission.service.PermissionTestService',
+ background=True)
+
def getprop(host, prop):
return host.run('getprop "%s"' % prop).stdout.strip()
@@ -243,8 +275,14 @@ class TestAidl(unittest.TestCase):
def make_test(client, server):
def test(self):
try:
- client.cleanup()
+ # Server is unregistered first so that we give more time
+ # for servicemanager to clear the old notification.
+ # Otherwise, it may race that the client gets ahold
+ # of the service.
server.cleanup()
+ client.cleanup()
+ sleep(0.2)
+
server.run()
client.run()
finally:
@@ -292,5 +330,11 @@ if __name__ == '__main__':
server = JavaVersionTestServer(host, s_bitness, s_version)
add_test(client, server)
+ # TODO(b/218914259): Interfaces with permission are only supported for the
+ # Java backend. Once C++ and/or Rust are supported, move the test back into
+ # JavaClient and JavaServer.
+ for bitness in bitnesses:
+ add_test(JavaPermissionClient(host, bitness), JavaPermissionServer(host, bitness))
+
suite = unittest.TestLoader().loadTestsFromTestCase(TestAidl)
sys.exit(not unittest.TextTestRunner(verbosity=2).run(suite).wasSuccessful())
diff --git a/tests/aidl_integration_test.xml b/tests/aidl_integration_test.xml
index 4e56e303..c7018faf 100644
--- a/tests/aidl_integration_test.xml
+++ b/tests/aidl_integration_test.xml
@@ -47,12 +47,15 @@
<option name="push" value="aidl_test_java_client_sdk1.jar->/data/framework/aidl_test_java_client_sdk1.jar" />
<option name="push" value="aidl_test_java_service_sdk1.jar->/data/framework/aidl_test_java_service_sdk1.jar" />
+ <option name="push" value="aidl_test_java_client_permission.jar->/data/framework/aidl_test_java_client_permission.jar" />
+ <option name="push" value="aidl_test_java_service_permission.jar->/data/framework/aidl_test_java_service_permission.jar" />
+
<option name="cleanup" value="true" />
</target_preparer>
<test class="com.android.tradefed.testtype.python.PythonBinaryHostTest" >
<option name="par-file-name" value="aidl_integration_test" />
- <option name="test-timeout" value="2m" />
+ <option name="test-timeout" value="5m" />
</test>
</configuration>
diff --git a/tests/aidl_parser_fuzzer.dict b/tests/aidl_parser_fuzzer.dict
index 20a270ac..4cbe8b88 100644
--- a/tests/aidl_parser_fuzzer.dict
+++ b/tests/aidl_parser_fuzzer.dict
@@ -6,6 +6,7 @@
" out "
" inout "
" cpp_header "
+" ndk_header "
" const "
" true "
" false "
@@ -49,6 +50,7 @@
" @SystemApi "
" @JavaPassthrough "
" @JavaOnlyStableParcelable "
+" @NdkOnlyStableParcelable "
" @Backing "
" @FixedSize "
" @Descriptor "
diff --git a/tests/aidl_test_client.h b/tests/aidl_test_client.h
index 9dc17c13..6c91174a 100644
--- a/tests/aidl_test_client.h
+++ b/tests/aidl_test_client.h
@@ -19,6 +19,7 @@
#include <android/aidl/tests/ICppJavaTests.h>
#include <android/aidl/tests/ITestService.h>
#include <binder/IServiceManager.h>
+#include <binder/ProcessState.h>
#include <gtest/gtest.h>
#include <utils/String16.h>
@@ -30,11 +31,13 @@ using android::aidl::tests::ITestService;
class AidlTest : public testing::Test {
public:
void SetUp() override {
- using android::getService;
using android::OK;
using android::String16;
+ using android::waitForService;
- ASSERT_EQ(OK, getService(ITestService::descriptor, &service));
+ android::ProcessState::self()->setThreadPoolMaxThreadCount(1);
+ android::ProcessState::self()->startThreadPool();
+ service = waitForService<ITestService>(ITestService::descriptor);
ASSERT_NE(nullptr, service);
sp<android::IBinder> ibinder;
diff --git a/tests/aidl_test_client_delegate.cpp b/tests/aidl_test_client_delegate.cpp
index c1711799..aaa28b75 100644
--- a/tests/aidl_test_client_delegate.cpp
+++ b/tests/aidl_test_client_delegate.cpp
@@ -16,15 +16,20 @@
#include "aidl_test_client.h"
#include "gmock/gmock.h"
+#include "android/aidl/tests/BnNamedCallback.h"
#include "android/aidl/tests/BnTestService.h"
using android::binder::Status;
+using android::String16;
+using android::aidl::tests::INamedCallback;
using android::aidl::tests::ITestService;
using android::aidl::tests::ITestServiceDelegator;
static constexpr int8_t kCustomByte = 8;
+static_assert(std::is_same<ITestService::DefaultDelegator, ITestServiceDelegator>::value);
+
struct CustomDelegator : public ITestServiceDelegator {
public:
CustomDelegator(sp<ITestService>& impl) : ITestServiceDelegator(impl) {}
@@ -37,8 +42,7 @@ struct CustomDelegator : public ITestServiceDelegator {
};
TEST_F(AidlTest, Delegator) {
- std::unique_ptr<ITestServiceDelegator> delegator =
- std::make_unique<ITestServiceDelegator>(service);
+ auto delegator = sp<ITestServiceDelegator>::make(service);
int8_t returned_value;
auto status = delegator->RepeatByte(12, &returned_value);
@@ -47,10 +51,117 @@ TEST_F(AidlTest, Delegator) {
}
TEST_F(AidlTest, CustomDelegator) {
- std::unique_ptr<CustomDelegator> delegator = std::make_unique<CustomDelegator>(service);
+ auto delegator = sp<CustomDelegator>::make(service);
int8_t returned_value;
auto status = delegator->RepeatByte(12, &returned_value);
ASSERT_TRUE(status.isOk()) << status;
EXPECT_EQ(kCustomByte, returned_value);
}
+
+TEST_F(AidlTest, DelegatorWithBinders) {
+ auto delegator = sp<ITestServiceDelegator>::make(service);
+
+ sp<INamedCallback> callback;
+ auto status = delegator->GetOtherTestService(String16("callback1"), &callback);
+ ASSERT_TRUE(status.isOk()) << status;
+
+ bool verified = false;
+ status = delegator->VerifyName(callback, String16("callback1"), &verified);
+ ASSERT_TRUE(status.isOk()) << status;
+ EXPECT_TRUE(verified);
+}
+
+TEST_F(AidlTest, DelegatorSimpl) {
+ auto delegator = sp<ITestServiceDelegator>::make(service);
+ sp<ITestService> impl = delegator->getImpl();
+}
+
+TEST_F(AidlTest, DelegateWrapAndGet) {
+ auto delegator = delegate(service);
+ auto delegator2 = delegate(service);
+ EXPECT_EQ(delegator, delegator2);
+}
+
+TEST_F(AidlTest, DelegateWrapAndUnwrap) {
+ sp<ITestServiceDelegator> delegator = sp<ITestServiceDelegator>::cast(delegate(service));
+ EXPECT_NE(service, delegator);
+
+ sp<ITestService> service2 = delegator->getImpl();
+ EXPECT_EQ(service, service2);
+
+ auto delegator2 = delegate(sp<ITestService>::cast(delegator));
+ EXPECT_EQ(service, delegator2);
+}
+
+TEST_F(AidlTest, DelegatorSetAndGetBinder) {
+ auto delegator = sp<ITestServiceDelegator>::make(service);
+
+ sp<INamedCallback> callback;
+ auto status = delegator->GetCallback(false, &callback);
+ ASSERT_TRUE(status.isOk()) << status;
+
+ // callback will be wrapped for first time and the delegator will be sent
+ bool already_existing;
+ status = delegator->SetOtherTestService(String16("same_one"), callback, &already_existing);
+ ASSERT_TRUE(status.isOk()) << status;
+ ASSERT_FALSE(already_existing);
+
+ // unwrap the delegator here and get the original binder
+ sp<INamedCallback> callback2;
+ status = delegator->GetOtherTestService(String16("same_one"), &callback2);
+ ASSERT_TRUE(status.isOk()) << status;
+ EXPECT_EQ(callback, callback2);
+}
+
+TEST_F(AidlTest, DelegatorSettingSameBinders) {
+ auto delegator = sp<ITestServiceDelegator>::make(service);
+
+ sp<INamedCallback> callback;
+ auto status = delegator->GetCallback(false, &callback);
+ ASSERT_TRUE(status.isOk()) << status;
+
+ bool already_existing = false;
+ status = delegator->SetOtherTestService(String16("same_two"), callback, &already_existing);
+ ASSERT_TRUE(status.isOk()) << status;
+ ASSERT_FALSE(already_existing);
+
+ status = delegator->SetOtherTestService(String16("same_two"), callback, &already_existing);
+ ASSERT_TRUE(status.isOk()) << status;
+ EXPECT_TRUE(already_existing);
+}
+
+TEST_F(AidlTest, DelegatorSameBinders) {
+ auto delegator = sp<ITestServiceDelegator>::make(service);
+
+ sp<INamedCallback> callback1;
+ auto status = delegator->GetOtherTestService(String16("callback1"), &callback1);
+ ASSERT_TRUE(status.isOk()) << status;
+
+ sp<INamedCallback> callback1Copy;
+ status = delegator->GetOtherTestService(String16("callback1"), &callback1Copy);
+ ASSERT_TRUE(status.isOk()) << status;
+ EXPECT_EQ(callback1, callback1Copy);
+}
+
+TEST_F(AidlTest, DelegatorWithCallback) {
+ auto delegator = sp<ITestServiceDelegator>::make(service);
+
+ sp<INamedCallback> callback;
+ auto status = delegator->GetCallback(false, &callback);
+ ASSERT_TRUE(status.isOk()) << status;
+
+ String16 name;
+ status = callback->GetName(&name);
+ ASSERT_TRUE(status.isOk()) << status;
+ EXPECT_TRUE(name.size() != 0);
+}
+
+TEST_F(AidlTest, DelegatorWithNullCallback) {
+ auto delegator = sp<ITestServiceDelegator>::make(service);
+
+ sp<INamedCallback> callback;
+ auto status = delegator->GetCallback(true, &callback);
+ ASSERT_TRUE(status.isOk()) << status;
+ EXPECT_TRUE(callback == nullptr);
+}
diff --git a/tests/aidl_test_client_loggable_interface.cpp b/tests/aidl_test_client_loggable_interface.cpp
index a06469bb..61878af3 100644
--- a/tests/aidl_test_client_loggable_interface.cpp
+++ b/tests/aidl_test_client_loggable_interface.cpp
@@ -48,8 +48,8 @@ TEST_F(AidlTest, LoggableInterface) {
EXPECT_TRUE(status.isOk());
if (backendType != BackendType::CPP) GTEST_SKIP();
- sp<ILoggableInterface> loggable;
- EXPECT_EQ(android::OK, android::getService(ILoggableInterface::descriptor, &loggable));
+ sp<ILoggableInterface> loggable =
+ android::waitForService<ILoggableInterface>(ILoggableInterface::descriptor);
ASSERT_NE(nullptr, loggable);
BpLoggableInterface::TransactionLog log;
diff --git a/tests/aidl_test_client_ndk_delegate.cpp b/tests/aidl_test_client_ndk_delegate.cpp
index 6bec01af..0f567d20 100644
--- a/tests/aidl_test_client_ndk_delegate.cpp
+++ b/tests/aidl_test_client_ndk_delegate.cpp
@@ -15,6 +15,7 @@
*/
#include <android/binder_auto_utils.h>
#include <android/binder_manager.h>
+#include <binder/ProcessState.h>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
@@ -27,6 +28,8 @@ using aidl::android::aidl::tests::ITestServiceDelegator;
static constexpr int8_t kCustomByte = 8;
+static_assert(std::is_same<ITestService::DefaultDelegator, ITestServiceDelegator>::value);
+
struct CustomDelegator : public ITestServiceDelegator {
public:
CustomDelegator(std::shared_ptr<ITestService>& impl) : ITestServiceDelegator(impl) {}
@@ -41,7 +44,9 @@ struct CustomDelegator : public ITestServiceDelegator {
struct AidlDelegatorTest : testing::Test {
template <typename T>
std::shared_ptr<T> getService() {
- ndk::SpAIBinder binder = ndk::SpAIBinder(AServiceManager_getService(T::descriptor));
+ android::ProcessState::self()->setThreadPoolMaxThreadCount(1);
+ android::ProcessState::self()->startThreadPool();
+ ndk::SpAIBinder binder = ndk::SpAIBinder(AServiceManager_waitForService(T::descriptor));
return T::fromBinder(binder);
}
void SetUp() override { service = getService<ITestService>(); }
diff --git a/tests/aidl_test_client_ndk_loggable_interface.cpp b/tests/aidl_test_client_ndk_loggable_interface.cpp
index 4b9f0957..1f7b550d 100644
--- a/tests/aidl_test_client_ndk_loggable_interface.cpp
+++ b/tests/aidl_test_client_ndk_loggable_interface.cpp
@@ -18,6 +18,7 @@
#include <android/binder_auto_utils.h>
#include <android/binder_manager.h>
+#include <binder/ProcessState.h>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
@@ -41,7 +42,9 @@ using testing::Eq;
struct AidlTest : testing::Test {
template <typename T>
std::shared_ptr<T> getService() {
- ndk::SpAIBinder binder = ndk::SpAIBinder(AServiceManager_getService(T::descriptor));
+ android::ProcessState::self()->setThreadPoolMaxThreadCount(1);
+ android::ProcessState::self()->startThreadPool();
+ ndk::SpAIBinder binder = ndk::SpAIBinder(AServiceManager_waitForService(T::descriptor));
return T::fromBinder(binder);
}
};
@@ -123,8 +126,8 @@ TEST_F(AidlTest, LoggableInterface) {
{"in_listValue", "[mno]"},
{"in_dataValue",
"Data{num: 42, str: abc, nestedUnion: Union{str: def}, nestedEnum: FOO}"},
- {"in_binderValue", "(null)"},
- {"in_pfdValue", "(null)"},
+ {"in_binderValue", "binder:0x0"},
+ {"in_pfdValue", "fd:-1"},
{"in_pfdArray", "[]"},
}));
EXPECT_THAT(log.output_args,
@@ -137,6 +140,6 @@ TEST_F(AidlTest, LoggableInterface) {
{"in_doubleArray", "[53.000000, 54.000000]"},
{"in_stringArray", "[ghi, jkl]"},
{"in_listValue", "[mno]"},
- {"in_pfdValue", "(null)"},
+ {"in_pfdValue", "fd:-1"},
{"in_pfdArray", "[]"}}));
}
diff --git a/tests/aidl_test_client_ndk_nested.cpp b/tests/aidl_test_client_ndk_nested.cpp
index 632e5be7..686219c6 100644
--- a/tests/aidl_test_client_ndk_nested.cpp
+++ b/tests/aidl_test_client_ndk_nested.cpp
@@ -17,6 +17,7 @@
#include <android/binder_auto_utils.h>
#include <android/binder_manager.h>
#include <binder/IServiceManager.h>
+#include <binder/ProcessState.h>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <utils/String16.h>
@@ -39,7 +40,9 @@ using testing::Optional;
struct AidlTest : testing::Test {
template <typename T>
std::shared_ptr<T> getService() {
- ndk::SpAIBinder binder = ndk::SpAIBinder(AServiceManager_getService(T::descriptor));
+ android::ProcessState::self()->setThreadPoolMaxThreadCount(1);
+ android::ProcessState::self()->startThreadPool();
+ ndk::SpAIBinder binder = ndk::SpAIBinder(AServiceManager_waitForService(T::descriptor));
return T::fromBinder(binder);
}
};
diff --git a/tests/aidl_test_client_ndk_nullables.cpp b/tests/aidl_test_client_ndk_nullables.cpp
index 7b56cf9e..d80db4f2 100644
--- a/tests/aidl_test_client_ndk_nullables.cpp
+++ b/tests/aidl_test_client_ndk_nullables.cpp
@@ -16,6 +16,7 @@
#include <android/binder_auto_utils.h>
#include <android/binder_manager.h>
+#include <binder/ProcessState.h>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
@@ -29,7 +30,9 @@ using testing::Eq;
struct AidlTest : testing::Test {
template <typename T>
std::shared_ptr<T> getService() {
- ndk::SpAIBinder binder = ndk::SpAIBinder(AServiceManager_getService(T::descriptor));
+ android::ProcessState::self()->setThreadPoolMaxThreadCount(1);
+ android::ProcessState::self()->startThreadPool();
+ ndk::SpAIBinder binder = ndk::SpAIBinder(AServiceManager_waitForService(T::descriptor));
return T::fromBinder(binder);
}
void SetUp() override {
@@ -143,4 +146,4 @@ TEST_F(AidlTest, nullableBinderArray) {
ASSERT_TRUE(reversed);
std::reverse(std::begin(*reversed), std::end(*reversed));
EXPECT_THAT(input, Eq(reversed));
-} \ No newline at end of file
+}
diff --git a/tests/aidl_test_client_ndk_parcelables.cpp b/tests/aidl_test_client_ndk_parcelables.cpp
index 8b9cd19b..37d04058 100644
--- a/tests/aidl_test_client_ndk_parcelables.cpp
+++ b/tests/aidl_test_client_ndk_parcelables.cpp
@@ -20,6 +20,7 @@
#include <android/binder_auto_utils.h>
#include <android/binder_manager.h>
+#include <binder/ProcessState.h>
#include <gtest/gtest.h>
#include <aidl/android/aidl/fixedsizearray/FixedSizeArrayExample.h>
@@ -51,7 +52,9 @@ using ndk::SpAIBinder;
struct AidlTest : testing::Test {
template <typename T>
std::shared_ptr<T> getService() {
- ndk::SpAIBinder binder = ndk::SpAIBinder(AServiceManager_getService(T::descriptor));
+ android::ProcessState::self()->setThreadPoolMaxThreadCount(1);
+ android::ProcessState::self()->startThreadPool();
+ ndk::SpAIBinder binder = ndk::SpAIBinder(AServiceManager_waitForService(T::descriptor));
return T::fromBinder(binder);
}
};
diff --git a/tests/aidl_test_client_ndk_primitives_test.cpp b/tests/aidl_test_client_ndk_primitives_test.cpp
index e82354fe..56df3bea 100644
--- a/tests/aidl_test_client_ndk_primitives_test.cpp
+++ b/tests/aidl_test_client_ndk_primitives_test.cpp
@@ -16,6 +16,7 @@
#include <android/binder_auto_utils.h>
#include <android/binder_manager.h>
+#include <binder/ProcessState.h>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
@@ -28,7 +29,9 @@ using testing::Eq;
struct AidlTest : testing::Test {
template <typename T>
std::shared_ptr<T> getService() {
- ndk::SpAIBinder binder = ndk::SpAIBinder(AServiceManager_getService(T::descriptor));
+ android::ProcessState::self()->setThreadPoolMaxThreadCount(1);
+ android::ProcessState::self()->startThreadPool();
+ ndk::SpAIBinder binder = ndk::SpAIBinder(AServiceManager_waitForService(T::descriptor));
return T::fromBinder(binder);
}
};
diff --git a/tests/aidl_test_client_ndk_strings_test.cpp b/tests/aidl_test_client_ndk_strings_test.cpp
index 3623d7e2..a9873bbe 100644
--- a/tests/aidl_test_client_ndk_strings_test.cpp
+++ b/tests/aidl_test_client_ndk_strings_test.cpp
@@ -16,6 +16,7 @@
#include <android/binder_auto_utils.h>
#include <android/binder_manager.h>
+#include <binder/ProcessState.h>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
@@ -28,7 +29,9 @@ using testing::Eq;
struct AidlTest : testing::Test {
template <typename T>
std::shared_ptr<T> getService() {
- ndk::SpAIBinder binder = ndk::SpAIBinder(AServiceManager_getService(T::descriptor));
+ android::ProcessState::self()->setThreadPoolMaxThreadCount(1);
+ android::ProcessState::self()->startThreadPool();
+ ndk::SpAIBinder binder = ndk::SpAIBinder(AServiceManager_waitForService(T::descriptor));
return T::fromBinder(binder);
}
void SetUp() override {
diff --git a/tests/aidl_test_client_ndk_versioned_interface.cpp b/tests/aidl_test_client_ndk_versioned_interface.cpp
index f1d02073..9011e99f 100644
--- a/tests/aidl_test_client_ndk_versioned_interface.cpp
+++ b/tests/aidl_test_client_ndk_versioned_interface.cpp
@@ -14,13 +14,18 @@
* limitations under the License.
*/
+#include <aidl/android/aidl/tests/BackendType.h>
+#include <aidl/android/aidl/tests/ITestService.h>
#include <aidl/android/aidl/versioned/tests/IFooInterface.h>
#include <android/binder_auto_utils.h>
#include <android/binder_manager.h>
+#include <binder/ProcessState.h>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
+using aidl::android::aidl::tests::BackendType;
+using aidl::android::aidl::tests::ITestService;
using aidl::android::aidl::versioned::tests::BazUnion;
using aidl::android::aidl::versioned::tests::Foo;
using aidl::android::aidl::versioned::tests::IFooInterface;
@@ -33,11 +38,21 @@ using testing::Eq;
struct VersionedInterfaceTest : ::testing::Test {
void SetUp() override {
- ndk::SpAIBinder binder = ndk::SpAIBinder(AServiceManager_getService(IFooInterface::descriptor));
+ android::ProcessState::self()->setThreadPoolMaxThreadCount(1);
+ android::ProcessState::self()->startThreadPool();
+ ndk::SpAIBinder binder =
+ ndk::SpAIBinder(AServiceManager_waitForService(IFooInterface::descriptor));
versioned = IFooInterface::fromBinder(binder);
ASSERT_NE(nullptr, versioned);
+
+ ndk::SpAIBinder testServiceBinder =
+ ndk::SpAIBinder(AServiceManager_waitForService(ITestService::descriptor));
+ auto service = ITestService::fromBinder(testServiceBinder);
+ auto status = service->getBackendType(&backend);
+ EXPECT_TRUE(status.isOk()) << status.getDescription();
}
shared_ptr<IFooInterface> versioned;
+ BackendType backend;
};
TEST_F(VersionedInterfaceTest, getInterfaceVersion) {
@@ -54,6 +69,26 @@ TEST_F(VersionedInterfaceTest, getInterfaceHash) {
EXPECT_EQ("9e7be1859820c59d9d55dd133e71a3687b5d2e5b", hash);
}
+TEST_F(VersionedInterfaceTest, noProblemWhenPassingAUnionWithOldField) {
+ std::string result;
+ auto status =
+ versioned->acceptUnionAndReturnString(BazUnion::make<BazUnion::intNum>(42), &result);
+ EXPECT_TRUE(status.isOk()) << status.getDescription();
+ EXPECT_EQ("42", result);
+}
+
+TEST_F(VersionedInterfaceTest, errorWhenPassingAUnionWithNewField) {
+ std::string result;
+ auto status =
+ versioned->acceptUnionAndReturnString(BazUnion::make<BazUnion::longNum>(42L), &result);
+ // b/173458620 - Java and C++ return different errors
+ if (backend == BackendType::JAVA) {
+ EXPECT_EQ(EX_ILLEGAL_ARGUMENT, status.getExceptionCode());
+ } else {
+ EXPECT_EQ(STATUS_BAD_VALUE, status.getStatus());
+ }
+}
+
TEST_F(VersionedInterfaceTest, arrayOfParcelableWithNewField) {
vector<Foo> foos(42);
int32_t length;
@@ -73,3 +108,8 @@ TEST_F(VersionedInterfaceTest, readDataCorrectlyAfterParcelableWithNewField) {
EXPECT_EQ(0, inoutFoo.intDefault42);
EXPECT_EQ(0, outFoo.intDefault42);
}
+
+TEST_F(VersionedInterfaceTest, errorWhenCallingV2Api) {
+ auto status = versioned->newApi();
+ EXPECT_EQ(STATUS_UNKNOWN_TRANSACTION, status.getStatus());
+}
diff --git a/tests/aidl_test_client_nested.cpp b/tests/aidl_test_client_nested.cpp
index 9f637b13..116203c1 100644
--- a/tests/aidl_test_client_nested.cpp
+++ b/tests/aidl_test_client_nested.cpp
@@ -38,8 +38,8 @@ using testing::Eq;
using testing::Optional;
TEST_F(AidlTest, NestedService) {
- sp<INestedService> nestedService;
- EXPECT_EQ(android::OK, android::getService(INestedService::descriptor, &nestedService));
+ sp<INestedService> nestedService =
+ android::waitForService<INestedService>(INestedService::descriptor);
ASSERT_NE(nullptr, nestedService);
ParcelableWithNested p;
diff --git a/tests/aidl_test_client_parcelables.cpp b/tests/aidl_test_client_parcelables.cpp
index 119f5138..17f194d6 100644
--- a/tests/aidl_test_client_parcelables.cpp
+++ b/tests/aidl_test_client_parcelables.cpp
@@ -677,8 +677,9 @@ std::array<std::array<T, 3>, 2> Make2dArray(std::initializer_list<T> values) {
}
TEST_F(AidlTest, FixedSizeArrayOverBinder) {
- sp<IRepeatFixedSizeArray> service;
- ASSERT_EQ(OK, getService(IRepeatFixedSizeArray::descriptor, &service));
+ sp<IRepeatFixedSizeArray> service =
+ android::waitForService<IRepeatFixedSizeArray>(IRepeatFixedSizeArray::descriptor);
+ ASSERT_NE(service, nullptr);
CheckRepeat(service, &IRepeatFixedSizeArray::RepeatBytes, (std::array<uint8_t, 3>{1, 2, 3}));
@@ -707,4 +708,4 @@ TEST_F(AidlTest, FixedSizeArrayOverBinder) {
CheckRepeat(service, &IRepeatFixedSizeArray::Repeat2dParcelables,
Make2dArray<IntParcelable>({p1, p2, p3}));
-} \ No newline at end of file
+}
diff --git a/tests/aidl_test_client_primitives.cpp b/tests/aidl_test_client_primitives.cpp
index eff67c4d..040804d9 100644
--- a/tests/aidl_test_client_primitives.cpp
+++ b/tests/aidl_test_client_primitives.cpp
@@ -120,6 +120,31 @@ TEST_F(AidlPrimitiveTest, longConstants) {
}
}
+TEST_F(AidlPrimitiveTest, floatConstants) {
+ constexpr float consts[] = {
+ ITestService::FLOAT_TEST_CONSTANT, ITestService::FLOAT_TEST_CONSTANT2,
+ ITestService::FLOAT_TEST_CONSTANT3, ITestService::FLOAT_TEST_CONSTANT4,
+ ITestService::FLOAT_TEST_CONSTANT5, ITestService::FLOAT_TEST_CONSTANT6,
+ ITestService::FLOAT_TEST_CONSTANT7,
+ };
+ for (auto sent : consts) {
+ DoTest(&ITestService::RepeatFloat, sent);
+ }
+}
+
+TEST_F(AidlPrimitiveTest, doubleConstants) {
+ constexpr double consts[] = {
+ ITestService::DOUBLE_TEST_CONSTANT, ITestService::DOUBLE_TEST_CONSTANT2,
+ ITestService::DOUBLE_TEST_CONSTANT3, ITestService::DOUBLE_TEST_CONSTANT4,
+ ITestService::DOUBLE_TEST_CONSTANT5, ITestService::DOUBLE_TEST_CONSTANT6,
+ ITestService::DOUBLE_TEST_CONSTANT7, ITestService::DOUBLE_TEST_CONSTANT8,
+ ITestService::DOUBLE_TEST_CONSTANT9,
+ };
+ for (auto sent : consts) {
+ DoTest(&ITestService::RepeatDouble, sent);
+ }
+}
+
TEST_F(AidlPrimitiveTest, strings) {
std::vector<String16> strings = {
String16("Deliver us from evil."), String16(), String16("\0\0", 2),
@@ -336,4 +361,8 @@ TEST_F(AidlPrimitiveTest, constantExpressions) {
EXPECT_THAT(ITestService::A55, Eq(1));
EXPECT_THAT(ITestService::A56, Eq(1));
EXPECT_THAT(ITestService::A57, Eq(1));
+ EXPECT_THAT(ITestService::FLOAT_TEST_CONSTANT4, Eq(2.2f));
+ EXPECT_THAT(ITestService::FLOAT_TEST_CONSTANT5, Eq(-2.2f));
+ EXPECT_THAT(ITestService::DOUBLE_TEST_CONSTANT4, Eq(2.2));
+ EXPECT_THAT(ITestService::DOUBLE_TEST_CONSTANT5, Eq(-2.2));
}
diff --git a/tests/aidl_test_client_versioned_interface.cpp b/tests/aidl_test_client_versioned_interface.cpp
index 22a887b7..943752a1 100644
--- a/tests/aidl_test_client_versioned_interface.cpp
+++ b/tests/aidl_test_client_versioned_interface.cpp
@@ -17,6 +17,7 @@
#include <android/aidl/versioned/tests/BnFooInterface.h>
#include <android/aidl/versioned/tests/IFooInterface.h>
#include <binder/IServiceManager.h>
+#include <binder/ProcessState.h>
#include <gtest/gtest.h>
#include <utils/String16.h>
@@ -33,7 +34,9 @@ using android::aidl::versioned::tests::IFooInterfaceDelegator;
class VersionedInterfaceTest : public AidlTest {
public:
void SetUp() override {
- ASSERT_EQ(OK, android::getService(IFooInterface::descriptor, &versioned));
+ android::ProcessState::self()->setThreadPoolMaxThreadCount(1);
+ android::ProcessState::self()->startThreadPool();
+ versioned = android::waitForService<IFooInterface>(IFooInterface::descriptor);
ASSERT_NE(nullptr, versioned);
AidlTest::SetUp();
@@ -62,7 +65,6 @@ TEST_F(VersionedInterfaceTest, errorWhenPassingAUnionWithNewField) {
std::string result;
auto status =
versioned->acceptUnionAndReturnString(BazUnion::make<BazUnion::longNum>(42L), &result);
- EXPECT_FALSE(status.isOk());
// b/173458620 - Java and C++ return different errors
if (backend == BackendType::JAVA) {
EXPECT_EQ(::android::binder::Status::EX_ILLEGAL_ARGUMENT, status.exceptionCode()) << status;
@@ -100,3 +102,8 @@ TEST_F(VersionedInterfaceTest, newerDelegatorReturnsImplHash) {
auto delegator = sp<IFooInterfaceDelegator>::make(versioned);
EXPECT_EQ("9e7be1859820c59d9d55dd133e71a3687b5d2e5b", delegator->getInterfaceHash());
}
+
+TEST_F(VersionedInterfaceTest, errorWhenCallingV2Api) {
+ auto status = versioned->newApi();
+ EXPECT_EQ(::android::UNKNOWN_TRANSACTION, status.transactionError()) << status;
+}
diff --git a/tests/aidl_test_service.cpp b/tests/aidl_test_service.cpp
index a13547f1..810c38c0 100644
--- a/tests/aidl_test_service.cpp
+++ b/tests/aidl_test_service.cpp
@@ -15,6 +15,7 @@
*/
#include <map>
+#include <mutex>
#include <optional>
#include <sstream>
#include <string>
@@ -56,6 +57,9 @@
#include "android/aidl/tests/nested/BnNestedService.h"
+#include "android/aidl/tests/BnCircular.h"
+#include "android/aidl/tests/ICircular.h"
+
#include "android/aidl/loggable/BnLoggableInterface.h"
#include "android/aidl/loggable/Data.h"
@@ -88,19 +92,23 @@ using android::binder::Status;
// Generated code:
using android::aidl::tests::BackendType;
using android::aidl::tests::BadParcelable;
+using android::aidl::tests::BnCircular;
using android::aidl::tests::BnCppJavaTests;
using android::aidl::tests::BnNamedCallback;
using android::aidl::tests::BnNewName;
using android::aidl::tests::BnOldName;
using android::aidl::tests::BnTestService;
using android::aidl::tests::ByteEnum;
+using android::aidl::tests::CircularParcelable;
using android::aidl::tests::ConstantExpressionEnum;
using android::aidl::tests::GenericStructuredParcelable;
+using android::aidl::tests::ICircular;
using android::aidl::tests::ICppJavaTests;
using android::aidl::tests::INamedCallback;
using android::aidl::tests::INewName;
using android::aidl::tests::IntEnum;
using android::aidl::tests::IOldName;
+using android::aidl::tests::ITestService;
using android::aidl::tests::LongEnum;
using android::aidl::tests::RecursiveList;
using android::aidl::tests::SimpleParcelable;
@@ -163,6 +171,20 @@ class NewName : public BnNewName {
}
};
+class Circular : public BnCircular {
+ public:
+ Circular(sp<ITestService> srv) : mSrv(srv) {}
+ ~Circular() = default;
+
+ Status GetTestService(sp<ITestService>* _aidl_return) override {
+ *_aidl_return = mSrv;
+ return Status::ok();
+ }
+
+ private:
+ sp<ITestService> mSrv;
+};
+
template <typename T>
Status ReverseArray(const vector<T>& input, vector<T>* repeated, vector<T>* _aidl_return) {
ALOGI("Reversing array of length %zu", input.size());
@@ -400,8 +422,25 @@ class NativeService : public BnTestService {
return ReverseArray(input, repeated, _aidl_return);
}
+ Status SetOtherTestService(const String16& name, const sp<INamedCallback>& service,
+ bool* _aidl_return) override {
+ std::lock_guard<std::mutex> guard(service_map_mutex_);
+ const auto& existing = service_map_.find(name);
+ if (existing != service_map_.end() && existing->second == service) {
+ *_aidl_return = true;
+
+ return Status::ok();
+ } else {
+ *_aidl_return = false;
+ service_map_[name] = service;
+
+ return Status::ok();
+ }
+ }
+
Status GetOtherTestService(const String16& name,
sp<INamedCallback>* returned_service) override {
+ std::lock_guard<std::mutex> guard(service_map_mutex_);
if (service_map_.find(name) == service_map_.end()) {
sp<INamedCallback> new_item(new NamedCallback(name));
service_map_[name] = new_item;
@@ -761,6 +800,13 @@ class NativeService : public BnTestService {
return Status::ok();
}
+ Status GetCircular(CircularParcelable* cp, sp<ICircular>* _aidl_return) override {
+ auto srv = sp<ITestService>::fromExisting(this);
+ cp->testService = srv;
+ *_aidl_return = new Circular(srv);
+ return Status::ok();
+ }
+
android::status_t onTransact(uint32_t code, const Parcel& data, Parcel* reply,
uint32_t flags) override {
if (code == ::android::IBinder::FIRST_CALL_TRANSACTION + 0 /* UnimplementedMethod */) {
@@ -773,6 +819,7 @@ class NativeService : public BnTestService {
private:
map<String16, sp<INamedCallback>> service_map_;
+ std::mutex service_map_mutex_;
};
class VersionedService : public android::aidl::versioned::tests::BnFooInterface {
diff --git a/tests/android/aidl/tests/CircularParcelable.aidl b/tests/android/aidl/tests/CircularParcelable.aidl
new file mode 100644
index 00000000..c314a59b
--- /dev/null
+++ b/tests/android/aidl/tests/CircularParcelable.aidl
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.aidl.tests;
+
+import android.aidl.tests.ITestService;
+
+parcelable CircularParcelable {
+ @nullable ITestService testService;
+}
diff --git a/tests/android/aidl/tests/GenericStructuredParcelable.aidl b/tests/android/aidl/tests/GenericStructuredParcelable.aidl
index 066b24f1..ffbe6bdb 100644
--- a/tests/android/aidl/tests/GenericStructuredParcelable.aidl
+++ b/tests/android/aidl/tests/GenericStructuredParcelable.aidl
@@ -17,6 +17,7 @@
package android.aidl.tests;
@JavaDerive(toString=true)
+@RustDerive(PartialEq=true, Eq=true, Clone=true, Copy=true)
parcelable GenericStructuredParcelable<T, U, B> {
int a;
int b;
diff --git a/tests/android/aidl/tests/ICircular.aidl b/tests/android/aidl/tests/ICircular.aidl
new file mode 100644
index 00000000..10c857f8
--- /dev/null
+++ b/tests/android/aidl/tests/ICircular.aidl
@@ -0,0 +1,23 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.aidl.tests;
+
+import android.aidl.tests.ITestService;
+
+interface ICircular {
+ @nullable ITestService GetTestService();
+}
diff --git a/tests/android/aidl/tests/ITestService.aidl b/tests/android/aidl/tests/ITestService.aidl
index 63c0c6c2..fd8b6b55 100644
--- a/tests/android/aidl/tests/ITestService.aidl
+++ b/tests/android/aidl/tests/ITestService.aidl
@@ -18,6 +18,8 @@ package android.aidl.tests;
import android.aidl.tests.BackendType;
import android.aidl.tests.ByteEnum;
+import android.aidl.tests.CircularParcelable;
+import android.aidl.tests.ICircular;
import android.aidl.tests.INamedCallback;
import android.aidl.tests.INewName;
import android.aidl.tests.IOldName;
@@ -31,7 +33,7 @@ import android.aidl.tests.extension.ExtendableParcelable;
/**
* interface comment
*/
-@SuppressWarnings(value={"inout-parameter", "mixed-oneway", "out-array"})
+@SuppressWarnings(value={"inout-parameter", "mixed-oneway", "out-array", "interface-name"})
@SensitiveData
@JavaDefault
@JavaDelegator
@@ -67,6 +69,24 @@ interface ITestService {
const String STRING_TEST_CONSTANT = "foo";
const String STRING_TEST_CONSTANT2 = "bar";
+ const float FLOAT_TEST_CONSTANT = 1.0f;
+ const float FLOAT_TEST_CONSTANT2 = -1.0f;
+ const float FLOAT_TEST_CONSTANT3 = +1.0f;
+ const float FLOAT_TEST_CONSTANT4 = +2.2f;
+ const float FLOAT_TEST_CONSTANT5 = -2.2f;
+ const float FLOAT_TEST_CONSTANT6 = -0.0f;
+ const float FLOAT_TEST_CONSTANT7 = +0.0f;
+
+ const double DOUBLE_TEST_CONSTANT = 1.0;
+ const double DOUBLE_TEST_CONSTANT2 = -1.0;
+ const double DOUBLE_TEST_CONSTANT3 = +1.0;
+ const double DOUBLE_TEST_CONSTANT4 = +2.2;
+ const double DOUBLE_TEST_CONSTANT5 = -2.2;
+ const double DOUBLE_TEST_CONSTANT6 = -0.0;
+ const double DOUBLE_TEST_CONSTANT7 = +0.0;
+ const double DOUBLE_TEST_CONSTANT8 = 1.1f;
+ const double DOUBLE_TEST_CONSTANT9 = -1.1f;
+
const @utf8InCpp String STRING_TEST_CONSTANT_UTF8 = "baz";
// This is to emulate a method that is added after the service is implemented.
@@ -118,6 +138,8 @@ interface ITestService {
// Test that clients can send and receive Binders.
@PropagateAllowBlocking INamedCallback GetOtherTestService(String name);
+ // returns true if the same service is already registered with the same name
+ boolean SetOtherTestService(String name, INamedCallback service);
boolean VerifyName(INamedCallback service, String name);
INamedCallback[] GetInterfaceArray(in String[] names);
boolean VerifyNamesWithInterfaceArray(in INamedCallback[] services, in String[] names);
@@ -291,5 +313,19 @@ interface ITestService {
@nullable Empty[] nullable_parcel_array;
List<Empty> parcel_list;
@nullable List<Empty> nullable_parcel_list;
+
+ // interface without I-
+ interface Foo {}
+
+ parcelable HasDeprecated {
+ /** @deprecated field */
+ int deprecated;
+ }
+ union UsingHasDeprecated {
+ int n;
+ HasDeprecated m;
+ }
}
+
+ ICircular GetCircular(out CircularParcelable cp);
}
diff --git a/tests/android/aidl/tests/permission/INoPermission.aidl b/tests/android/aidl/tests/permission/INoPermission.aidl
new file mode 100644
index 00000000..f72f0bf9
--- /dev/null
+++ b/tests/android/aidl/tests/permission/INoPermission.aidl
@@ -0,0 +1,6 @@
+package android.aidl.tests.permission;
+
+@RequiresNoPermission
+interface INoPermission {
+ void foo();
+}
diff --git a/tests/android/aidl/tests/permission/IProtected.aidl b/tests/android/aidl/tests/permission/IProtected.aidl
index 34071995..d2fdba5b 100644
--- a/tests/android/aidl/tests/permission/IProtected.aidl
+++ b/tests/android/aidl/tests/permission/IProtected.aidl
@@ -9,4 +9,7 @@ interface IProtected {
@EnforcePermission("android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK")
void NonManifestPermission();
+
+ // Used by the integration tests to dynamically set permissions that are considered granted.
+ @RequiresNoPermission void SetGranted(in List<String> permissions);
}
diff --git a/tests/android/aidl/tests/permission/IProtectedInterface.aidl b/tests/android/aidl/tests/permission/IProtectedInterface.aidl
index 93166427..f8d8cb41 100644
--- a/tests/android/aidl/tests/permission/IProtectedInterface.aidl
+++ b/tests/android/aidl/tests/permission/IProtectedInterface.aidl
@@ -3,6 +3,5 @@ package android.aidl.tests.permission;
@EnforcePermission("ACCESS_FINE_LOCATION")
interface IProtectedInterface {
void Method1();
-
- @EnforcePermission("INTERNET") void Method2();
+ void Method2();
}
diff --git a/tests/corpus/overflow_in_nested_interface b/tests/corpus/overflow_in_nested_interface
new file mode 100644
index 00000000..7e00f880
--- /dev/null
+++ b/tests/corpus/overflow_in_nested_interface
@@ -0,0 +1 @@
+\ -a\ tests/IFoo.aidl\ -t\ \ tests/IFoo.aidl\ interface oo{interface o{const int a=0/0;}} \ No newline at end of file
diff --git a/tests/fake_io_delegate.cpp b/tests/fake_io_delegate.cpp
index 6bd2984c..41fa2a12 100644
--- a/tests/fake_io_delegate.cpp
+++ b/tests/fake_io_delegate.cpp
@@ -86,42 +86,6 @@ Result<vector<string>> FakeIoDelegate::ListFiles(const string& dir) const {
return files;
}
-void FakeIoDelegate::AddStubParcelable(const string& canonical_name,
- const string& cpp_header) {
- string package, class_name, rel_path;
- SplitPackageClass(canonical_name, &rel_path, &package, &class_name);
- string contents;
- if (cpp_header.empty()) {
- contents = StringPrintf("package %s;\nparcelable %s;",
- package.c_str(), class_name.c_str());
- } else {
- contents = StringPrintf("package %s;\nparcelable %s cpp_header \"%s\";",
- package.c_str(), class_name.c_str(),
- cpp_header.c_str());
- }
- SetFileContents(rel_path, contents);
-}
-
-void FakeIoDelegate::AddStubInterface(const string& canonical_name) {
- string package, class_name, rel_path;
- SplitPackageClass(canonical_name, &rel_path, &package, &class_name);
- string contents = StringPrintf("package %s;\ninterface %s { }",
- package.c_str(), class_name.c_str());
- SetFileContents(rel_path, contents);
-}
-
-void FakeIoDelegate::AddCompoundParcelable(const string& canonical_name,
- const vector<string>& subclasses) {
- string package, class_name, rel_path;
- SplitPackageClass(canonical_name, &rel_path, &package, &class_name);
- string contents = StringPrintf("package %s;\n", package.c_str());
- for (const string& subclass : subclasses) {
- StringAppendF(&contents, "parcelable %s.%s;\n",
- class_name.c_str(), subclass.c_str());
- }
- SetFileContents(rel_path, contents);
-}
-
void FakeIoDelegate::AddBrokenFilePath(const std::string& path) {
broken_files_.insert(path);
}
diff --git a/tests/fake_io_delegate.h b/tests/fake_io_delegate.h
index 81d6f898..2503ccec 100644
--- a/tests/fake_io_delegate.h
+++ b/tests/fake_io_delegate.h
@@ -48,13 +48,7 @@ class FakeIoDelegate : public IoDelegate {
android::base::Result<std::vector<std::string>> ListFiles(const std::string& dir) const override;
// Methods added to facilitate testing.
- void SetFileContents(const std::string& filename,
- const std::string& contents);
- void AddStubParcelable(const std::string& canonical_name,
- const std::string& cpp_header);
- void AddStubInterface(const std::string& canonical_name);
- void AddCompoundParcelable(const std::string& canonical_name,
- const std::vector<std::string>& subclasses);
+ void SetFileContents(const std::string& filename, const std::string& contents);
void AddBrokenFilePath(const std::string& path);
// Returns true iff we've previously written to |path|.
// When we return true, we'll set *contents to the written string.
diff --git a/tests/golden_output/aidl-test-fixedsizearray-cpp-source/gen/android/aidl/fixedsizearray/FixedSizeArrayExample.cpp b/tests/golden_output/aidl-test-fixedsizearray-cpp-source/gen/android/aidl/fixedsizearray/FixedSizeArrayExample.cpp
index faa42482..db3d59b9 100644
--- a/tests/golden_output/aidl-test-fixedsizearray-cpp-source/gen/android/aidl/fixedsizearray/FixedSizeArrayExample.cpp
+++ b/tests/golden_output/aidl-test-fixedsizearray-cpp-source/gen/android/aidl/fixedsizearray/FixedSizeArrayExample.cpp
@@ -13,7 +13,7 @@ namespace fixedsizearray {
}
if (_aidl_parcelable_raw_size < 4) return ::android::BAD_VALUE;
size_t _aidl_parcelable_size = static_cast<size_t>(_aidl_parcelable_raw_size);
- if (_aidl_start_pos > SIZE_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
+ if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
if (_aidl_parcel->dataPosition() - _aidl_start_pos >= _aidl_parcelable_size) {
_aidl_parcel->setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
return _aidl_ret_status;
@@ -718,6 +718,7 @@ FixedSizeArrayExample::BpRepeatFixedSizeArray::BpRepeatFixedSizeArray(const ::an
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::IRepeatFixedSizeArray::RepeatBytes::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -759,6 +760,7 @@ FixedSizeArrayExample::BpRepeatFixedSizeArray::BpRepeatFixedSizeArray(const ::an
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::IRepeatFixedSizeArray::RepeatInts::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -800,6 +802,7 @@ FixedSizeArrayExample::BpRepeatFixedSizeArray::BpRepeatFixedSizeArray(const ::an
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::IRepeatFixedSizeArray::RepeatBinders::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -841,6 +844,7 @@ FixedSizeArrayExample::BpRepeatFixedSizeArray::BpRepeatFixedSizeArray(const ::an
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::IRepeatFixedSizeArray::RepeatParcelables::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -882,6 +886,7 @@ FixedSizeArrayExample::BpRepeatFixedSizeArray::BpRepeatFixedSizeArray(const ::an
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::IRepeatFixedSizeArray::Repeat2dBytes::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -923,6 +928,7 @@ FixedSizeArrayExample::BpRepeatFixedSizeArray::BpRepeatFixedSizeArray(const ::an
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::IRepeatFixedSizeArray::Repeat2dInts::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -964,6 +970,7 @@ FixedSizeArrayExample::BpRepeatFixedSizeArray::BpRepeatFixedSizeArray(const ::an
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::IRepeatFixedSizeArray::Repeat2dBinders::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -1005,6 +1012,7 @@ FixedSizeArrayExample::BpRepeatFixedSizeArray::BpRepeatFixedSizeArray(const ::an
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::IRepeatFixedSizeArray::Repeat2dParcelables::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -1068,6 +1076,7 @@ FixedSizeArrayExample::BnRepeatFixedSizeArray::BnRepeatFixedSizeArray()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::IRepeatFixedSizeArray::RepeatBytes::cppServer");
_aidl_ret_status = _aidl_data.readFixedArray(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -1103,6 +1112,7 @@ FixedSizeArrayExample::BnRepeatFixedSizeArray::BnRepeatFixedSizeArray()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::IRepeatFixedSizeArray::RepeatInts::cppServer");
_aidl_ret_status = _aidl_data.readFixedArray(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -1138,6 +1148,7 @@ FixedSizeArrayExample::BnRepeatFixedSizeArray::BnRepeatFixedSizeArray()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::IRepeatFixedSizeArray::RepeatBinders::cppServer");
_aidl_ret_status = _aidl_data.readFixedArray(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -1173,6 +1184,7 @@ FixedSizeArrayExample::BnRepeatFixedSizeArray::BnRepeatFixedSizeArray()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::IRepeatFixedSizeArray::RepeatParcelables::cppServer");
_aidl_ret_status = _aidl_data.readFixedArray(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -1208,6 +1220,7 @@ FixedSizeArrayExample::BnRepeatFixedSizeArray::BnRepeatFixedSizeArray()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::IRepeatFixedSizeArray::Repeat2dBytes::cppServer");
_aidl_ret_status = _aidl_data.readFixedArray(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -1243,6 +1256,7 @@ FixedSizeArrayExample::BnRepeatFixedSizeArray::BnRepeatFixedSizeArray()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::IRepeatFixedSizeArray::Repeat2dInts::cppServer");
_aidl_ret_status = _aidl_data.readFixedArray(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -1278,6 +1292,7 @@ FixedSizeArrayExample::BnRepeatFixedSizeArray::BnRepeatFixedSizeArray()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::IRepeatFixedSizeArray::Repeat2dBinders::cppServer");
_aidl_ret_status = _aidl_data.readFixedArray(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -1313,6 +1328,7 @@ FixedSizeArrayExample::BnRepeatFixedSizeArray::BnRepeatFixedSizeArray()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::IRepeatFixedSizeArray::Repeat2dParcelables::cppServer");
_aidl_ret_status = _aidl_data.readFixedArray(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -1369,7 +1385,7 @@ namespace fixedsizearray {
}
if (_aidl_parcelable_raw_size < 4) return ::android::BAD_VALUE;
size_t _aidl_parcelable_size = static_cast<size_t>(_aidl_parcelable_raw_size);
- if (_aidl_start_pos > SIZE_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
+ if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
if (_aidl_parcel->dataPosition() - _aidl_start_pos >= _aidl_parcelable_size) {
_aidl_parcel->setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
return _aidl_ret_status;
diff --git a/tests/golden_output/aidl-test-fixedsizearray-cpp-source/gen/include/android/aidl/fixedsizearray/FixedSizeArrayExample.h b/tests/golden_output/aidl-test-fixedsizearray-cpp-source/gen/include/android/aidl/fixedsizearray/FixedSizeArrayExample.h
index 7460a38e..75aefccd 100644
--- a/tests/golden_output/aidl-test-fixedsizearray-cpp-source/gen/include/android/aidl/fixedsizearray/FixedSizeArrayExample.h
+++ b/tests/golden_output/aidl-test-fixedsizearray-cpp-source/gen/include/android/aidl/fixedsizearray/FixedSizeArrayExample.h
@@ -3,12 +3,14 @@
#include <android/aidl/fixedsizearray/FixedSizeArrayExample.h>
#include <android/binder_to_string.h>
#include <array>
+#include <binder/Delegate.h>
#include <binder/Enums.h>
#include <binder/IBinder.h>
#include <binder/IInterface.h>
#include <binder/Parcel.h>
#include <binder/ParcelFileDescriptor.h>
#include <binder/Status.h>
+#include <binder/Trace.h>
#include <cstdint>
#include <optional>
#include <string>
@@ -46,8 +48,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.fixedsizearray.FixedSizeArrayExample.IntParcelable");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.fixedsizearray.FixedSizeArrayExample.IntParcelable");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
@@ -57,8 +59,11 @@ public:
return os.str();
}
}; // class IntParcelable
+ class IRepeatFixedSizeArrayDelegator;
+
class IRepeatFixedSizeArray : public ::android::IInterface {
public:
+ typedef IRepeatFixedSizeArrayDelegator DefaultDelegator;
DECLARE_META_INTERFACE(RepeatFixedSizeArray)
virtual ::android::binder::Status RepeatBytes(const std::array<uint8_t, 3>& input, std::array<uint8_t, 3>* repeated, std::array<uint8_t, 3>* _aidl_return) = 0;
virtual ::android::binder::Status RepeatInts(const std::array<int32_t, 3>& input, std::array<int32_t, 3>* repeated, std::array<int32_t, 3>* _aidl_return) = 0;
@@ -129,8 +134,9 @@ public:
class IRepeatFixedSizeArrayDelegator : public BnRepeatFixedSizeArray {
public:
- explicit IRepeatFixedSizeArrayDelegator(::android::sp<IRepeatFixedSizeArray> &impl) : _aidl_delegate(impl) {}
+ explicit IRepeatFixedSizeArrayDelegator(const ::android::sp<IRepeatFixedSizeArray> &impl) : _aidl_delegate(impl) {}
+ ::android::sp<IRepeatFixedSizeArray> getImpl() { return _aidl_delegate; }
::android::binder::Status RepeatBytes(const std::array<uint8_t, 3>& input, std::array<uint8_t, 3>* repeated, std::array<uint8_t, 3>* _aidl_return) override {
return _aidl_delegate->RepeatBytes(input, repeated, _aidl_return);
}
@@ -167,8 +173,11 @@ public:
enum class LongEnum : int64_t {
A = 0L,
};
+ class IEmptyInterfaceDelegator;
+
class IEmptyInterface : public ::android::IInterface {
public:
+ typedef IEmptyInterfaceDelegator DefaultDelegator;
DECLARE_META_INTERFACE(EmptyInterface)
}; // class IEmptyInterface
@@ -191,8 +200,9 @@ public:
class IEmptyInterfaceDelegator : public BnEmptyInterface {
public:
- explicit IEmptyInterfaceDelegator(::android::sp<IEmptyInterface> &impl) : _aidl_delegate(impl) {}
+ explicit IEmptyInterfaceDelegator(const ::android::sp<IEmptyInterface> &impl) : _aidl_delegate(impl) {}
+ ::android::sp<IEmptyInterface> getImpl() { return _aidl_delegate; }
private:
::android::sp<IEmptyInterface> _aidl_delegate;
}; // class IEmptyInterfaceDelegator
@@ -273,8 +283,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.fixedsizearray.FixedSizeArrayExample");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.fixedsizearray.FixedSizeArrayExample");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
diff --git a/tests/golden_output/aidl-test-fixedsizearray-java-source/gen/android/aidl/fixedsizearray/FixedSizeArrayExample.java b/tests/golden_output/aidl-test-fixedsizearray-java-source/gen/android/aidl/fixedsizearray/FixedSizeArrayExample.java
index a20ae249..a04eb16a 100644
--- a/tests/golden_output/aidl-test-fixedsizearray-java-source/gen/android/aidl/fixedsizearray/FixedSizeArrayExample.java
+++ b/tests/golden_output/aidl-test-fixedsizearray-java-source/gen/android/aidl/fixedsizearray/FixedSizeArrayExample.java
@@ -565,7 +565,7 @@ public class FixedSizeArrayExample implements android.os.Parcelable
}
@Override public byte[] RepeatBytes(byte[] input, byte[] repeated) throws android.os.RemoteException
{
- android.os.Parcel _data = android.os.Parcel.obtain();
+ android.os.Parcel _data = android.os.Parcel.obtain(asBinder());
android.os.Parcel _reply = android.os.Parcel.obtain();
byte[] _result;
try {
@@ -584,7 +584,7 @@ public class FixedSizeArrayExample implements android.os.Parcelable
}
@Override public int[] RepeatInts(int[] input, int[] repeated) throws android.os.RemoteException
{
- android.os.Parcel _data = android.os.Parcel.obtain();
+ android.os.Parcel _data = android.os.Parcel.obtain(asBinder());
android.os.Parcel _reply = android.os.Parcel.obtain();
int[] _result;
try {
@@ -603,7 +603,7 @@ public class FixedSizeArrayExample implements android.os.Parcelable
}
@Override public android.os.IBinder[] RepeatBinders(android.os.IBinder[] input, android.os.IBinder[] repeated) throws android.os.RemoteException
{
- android.os.Parcel _data = android.os.Parcel.obtain();
+ android.os.Parcel _data = android.os.Parcel.obtain(asBinder());
android.os.Parcel _reply = android.os.Parcel.obtain();
android.os.IBinder[] _result;
try {
@@ -622,7 +622,7 @@ public class FixedSizeArrayExample implements android.os.Parcelable
}
@Override public android.aidl.fixedsizearray.FixedSizeArrayExample.IntParcelable[] RepeatParcelables(android.aidl.fixedsizearray.FixedSizeArrayExample.IntParcelable[] input, android.aidl.fixedsizearray.FixedSizeArrayExample.IntParcelable[] repeated) throws android.os.RemoteException
{
- android.os.Parcel _data = android.os.Parcel.obtain();
+ android.os.Parcel _data = android.os.Parcel.obtain(asBinder());
android.os.Parcel _reply = android.os.Parcel.obtain();
android.aidl.fixedsizearray.FixedSizeArrayExample.IntParcelable[] _result;
try {
@@ -641,7 +641,7 @@ public class FixedSizeArrayExample implements android.os.Parcelable
}
@Override public byte[][] Repeat2dBytes(byte[][] input, byte[][] repeated) throws android.os.RemoteException
{
- android.os.Parcel _data = android.os.Parcel.obtain();
+ android.os.Parcel _data = android.os.Parcel.obtain(asBinder());
android.os.Parcel _reply = android.os.Parcel.obtain();
byte[][] _result;
try {
@@ -660,7 +660,7 @@ public class FixedSizeArrayExample implements android.os.Parcelable
}
@Override public int[][] Repeat2dInts(int[][] input, int[][] repeated) throws android.os.RemoteException
{
- android.os.Parcel _data = android.os.Parcel.obtain();
+ android.os.Parcel _data = android.os.Parcel.obtain(asBinder());
android.os.Parcel _reply = android.os.Parcel.obtain();
int[][] _result;
try {
@@ -679,7 +679,7 @@ public class FixedSizeArrayExample implements android.os.Parcelable
}
@Override public android.os.IBinder[][] Repeat2dBinders(android.os.IBinder[][] input, android.os.IBinder[][] repeated) throws android.os.RemoteException
{
- android.os.Parcel _data = android.os.Parcel.obtain();
+ android.os.Parcel _data = android.os.Parcel.obtain(asBinder());
android.os.Parcel _reply = android.os.Parcel.obtain();
android.os.IBinder[][] _result;
try {
@@ -698,7 +698,7 @@ public class FixedSizeArrayExample implements android.os.Parcelable
}
@Override public android.aidl.fixedsizearray.FixedSizeArrayExample.IntParcelable[][] Repeat2dParcelables(android.aidl.fixedsizearray.FixedSizeArrayExample.IntParcelable[][] input, android.aidl.fixedsizearray.FixedSizeArrayExample.IntParcelable[][] repeated) throws android.os.RemoteException
{
- android.os.Parcel _data = android.os.Parcel.obtain();
+ android.os.Parcel _data = android.os.Parcel.obtain(asBinder());
android.os.Parcel _reply = android.os.Parcel.obtain();
android.aidl.fixedsizearray.FixedSizeArrayExample.IntParcelable[][] _result;
try {
diff --git a/tests/golden_output/aidl-test-fixedsizearray-ndk-source/gen/include/aidl/android/aidl/fixedsizearray/FixedSizeArrayExample.h b/tests/golden_output/aidl-test-fixedsizearray-ndk-source/gen/include/aidl/android/aidl/fixedsizearray/FixedSizeArrayExample.h
index eecf292d..bbafb240 100644
--- a/tests/golden_output/aidl-test-fixedsizearray-ndk-source/gen/include/aidl/android/aidl/fixedsizearray/FixedSizeArrayExample.h
+++ b/tests/golden_output/aidl-test-fixedsizearray-ndk-source/gen/include/aidl/android/aidl/fixedsizearray/FixedSizeArrayExample.h
@@ -63,8 +63,11 @@ public:
return os.str();
}
};
+ class IRepeatFixedSizeArrayDelegator;
+
class IRepeatFixedSizeArray : public ::ndk::ICInterface {
public:
+ typedef IRepeatFixedSizeArrayDelegator DefaultDelegator;
static const char* descriptor;
IRepeatFixedSizeArray();
virtual ~IRepeatFixedSizeArray();
@@ -141,8 +144,11 @@ public:
A = 0L,
};
+ class IEmptyInterfaceDelegator;
+
class IEmptyInterface : public ::ndk::ICInterface {
public:
+ typedef IEmptyInterfaceDelegator DefaultDelegator;
static const char* descriptor;
IEmptyInterface();
virtual ~IEmptyInterface();
diff --git a/tests/golden_output/aidl-test-fixedsizearray-rust-source/gen/android/aidl/fixedsizearray/FixedSizeArrayExample.rs b/tests/golden_output/aidl-test-fixedsizearray-rust-source/gen/android/aidl/fixedsizearray/FixedSizeArrayExample.rs
index 88f2387f..30fe659c 100644
--- a/tests/golden_output/aidl-test-fixedsizearray-rust-source/gen/android/aidl/fixedsizearray/FixedSizeArrayExample.rs
+++ b/tests/golden_output/aidl-test-fixedsizearray-rust-source/gen/android/aidl/fixedsizearray/FixedSizeArrayExample.rs
@@ -1,362 +1,362 @@
#![forbid(unsafe_code)]
#![rustfmt::skip]
#[derive(Debug, PartialEq)]
-pub struct FixedSizeArrayExample {
- pub int2x3: [[i32; 3]; 2],
- pub boolArray: [bool; 2],
- pub byteArray: [u8; 2],
- pub charArray: [u16; 2],
- pub intArray: [i32; 2],
- pub longArray: [i64; 2],
- pub floatArray: [f32; 2],
- pub doubleArray: [f64; 2],
- pub stringArray: [String; 2],
- pub byteEnumArray: [crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_8_ByteEnum; 2],
- pub intEnumArray: [crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_7_IntEnum; 2],
- pub longEnumArray: [crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_8_LongEnum; 2],
- pub parcelableArray: [crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 2],
- pub boolMatrix: [[bool; 2]; 2],
- pub byteMatrix: [[u8; 2]; 2],
- pub charMatrix: [[u16; 2]; 2],
- pub intMatrix: [[i32; 2]; 2],
- pub longMatrix: [[i64; 2]; 2],
- pub floatMatrix: [[f32; 2]; 2],
- pub doubleMatrix: [[f64; 2]; 2],
- pub stringMatrix: [[String; 2]; 2],
- pub byteEnumMatrix: [[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_8_ByteEnum; 2]; 2],
- pub intEnumMatrix: [[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_7_IntEnum; 2]; 2],
- pub longEnumMatrix: [[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_8_LongEnum; 2]; 2],
- pub parcelableMatrix: [[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 2]; 2],
- pub boolNullableArray: Option<[bool; 2]>,
- pub byteNullableArray: Option<[u8; 2]>,
- pub charNullableArray: Option<[u16; 2]>,
- pub intNullableArray: Option<[i32; 2]>,
- pub longNullableArray: Option<[i64; 2]>,
- pub floatNullableArray: Option<[f32; 2]>,
- pub doubleNullableArray: Option<[f64; 2]>,
- pub stringNullableArray: Option<[Option<String>; 2]>,
- pub byteEnumNullableArray: Option<[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_8_ByteEnum; 2]>,
- pub intEnumNullableArray: Option<[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_7_IntEnum; 2]>,
- pub longEnumNullableArray: Option<[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_8_LongEnum; 2]>,
- pub binderNullableArray: Option<[Option<binder::SpIBinder>; 2]>,
- pub pfdNullableArray: Option<[Option<binder::ParcelFileDescriptor>; 2]>,
- pub parcelableNullableArray: Option<[Option<crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable>; 2]>,
- pub interfaceNullableArray: Option<[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_15_IEmptyInterface>>; 2]>,
- pub boolNullableMatrix: Option<[[bool; 2]; 2]>,
- pub byteNullableMatrix: Option<[[u8; 2]; 2]>,
- pub charNullableMatrix: Option<[[u16; 2]; 2]>,
- pub intNullableMatrix: Option<[[i32; 2]; 2]>,
- pub longNullableMatrix: Option<[[i64; 2]; 2]>,
- pub floatNullableMatrix: Option<[[f32; 2]; 2]>,
- pub doubleNullableMatrix: Option<[[f64; 2]; 2]>,
- pub stringNullableMatrix: Option<[[Option<String>; 2]; 2]>,
- pub byteEnumNullableMatrix: Option<[[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_8_ByteEnum; 2]; 2]>,
- pub intEnumNullableMatrix: Option<[[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_7_IntEnum; 2]; 2]>,
- pub longEnumNullableMatrix: Option<[[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_8_LongEnum; 2]; 2]>,
- pub binderNullableMatrix: Option<[[Option<binder::SpIBinder>; 2]; 2]>,
- pub pfdNullableMatrix: Option<[[Option<binder::ParcelFileDescriptor>; 2]; 2]>,
- pub parcelableNullableMatrix: Option<[[Option<crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable>; 2]; 2]>,
- pub interfaceNullableMatrix: Option<[[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_15_IEmptyInterface>>; 2]; 2]>,
+pub struct r#FixedSizeArrayExample {
+ pub r#int2x3: [[i32; 3]; 2],
+ pub r#boolArray: [bool; 2],
+ pub r#byteArray: [u8; 2],
+ pub r#charArray: [u16; 2],
+ pub r#intArray: [i32; 2],
+ pub r#longArray: [i64; 2],
+ pub r#floatArray: [f32; 2],
+ pub r#doubleArray: [f64; 2],
+ pub r#stringArray: [String; 2],
+ pub r#byteEnumArray: [crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_8_ByteEnum; 2],
+ pub r#intEnumArray: [crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_7_IntEnum; 2],
+ pub r#longEnumArray: [crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_8_LongEnum; 2],
+ pub r#parcelableArray: [crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 2],
+ pub r#boolMatrix: [[bool; 2]; 2],
+ pub r#byteMatrix: [[u8; 2]; 2],
+ pub r#charMatrix: [[u16; 2]; 2],
+ pub r#intMatrix: [[i32; 2]; 2],
+ pub r#longMatrix: [[i64; 2]; 2],
+ pub r#floatMatrix: [[f32; 2]; 2],
+ pub r#doubleMatrix: [[f64; 2]; 2],
+ pub r#stringMatrix: [[String; 2]; 2],
+ pub r#byteEnumMatrix: [[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_8_ByteEnum; 2]; 2],
+ pub r#intEnumMatrix: [[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_7_IntEnum; 2]; 2],
+ pub r#longEnumMatrix: [[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_8_LongEnum; 2]; 2],
+ pub r#parcelableMatrix: [[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 2]; 2],
+ pub r#boolNullableArray: Option<[bool; 2]>,
+ pub r#byteNullableArray: Option<[u8; 2]>,
+ pub r#charNullableArray: Option<[u16; 2]>,
+ pub r#intNullableArray: Option<[i32; 2]>,
+ pub r#longNullableArray: Option<[i64; 2]>,
+ pub r#floatNullableArray: Option<[f32; 2]>,
+ pub r#doubleNullableArray: Option<[f64; 2]>,
+ pub r#stringNullableArray: Option<[Option<String>; 2]>,
+ pub r#byteEnumNullableArray: Option<[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_8_ByteEnum; 2]>,
+ pub r#intEnumNullableArray: Option<[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_7_IntEnum; 2]>,
+ pub r#longEnumNullableArray: Option<[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_8_LongEnum; 2]>,
+ pub r#binderNullableArray: Option<[Option<binder::SpIBinder>; 2]>,
+ pub r#pfdNullableArray: Option<[Option<binder::ParcelFileDescriptor>; 2]>,
+ pub r#parcelableNullableArray: Option<[Option<crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable>; 2]>,
+ pub r#interfaceNullableArray: Option<[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_15_IEmptyInterface>>; 2]>,
+ pub r#boolNullableMatrix: Option<[[bool; 2]; 2]>,
+ pub r#byteNullableMatrix: Option<[[u8; 2]; 2]>,
+ pub r#charNullableMatrix: Option<[[u16; 2]; 2]>,
+ pub r#intNullableMatrix: Option<[[i32; 2]; 2]>,
+ pub r#longNullableMatrix: Option<[[i64; 2]; 2]>,
+ pub r#floatNullableMatrix: Option<[[f32; 2]; 2]>,
+ pub r#doubleNullableMatrix: Option<[[f64; 2]; 2]>,
+ pub r#stringNullableMatrix: Option<[[Option<String>; 2]; 2]>,
+ pub r#byteEnumNullableMatrix: Option<[[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_8_ByteEnum; 2]; 2]>,
+ pub r#intEnumNullableMatrix: Option<[[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_7_IntEnum; 2]; 2]>,
+ pub r#longEnumNullableMatrix: Option<[[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_8_LongEnum; 2]; 2]>,
+ pub r#binderNullableMatrix: Option<[[Option<binder::SpIBinder>; 2]; 2]>,
+ pub r#pfdNullableMatrix: Option<[[Option<binder::ParcelFileDescriptor>; 2]; 2]>,
+ pub r#parcelableNullableMatrix: Option<[[Option<crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable>; 2]; 2]>,
+ pub r#interfaceNullableMatrix: Option<[[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_15_IEmptyInterface>>; 2]; 2]>,
}
-impl Default for FixedSizeArrayExample {
+impl Default for r#FixedSizeArrayExample {
fn default() -> Self {
Self {
- int2x3: [[1, 2, 3], [4, 5, 6]],
- boolArray: [Default::default(), Default::default()],
- byteArray: [Default::default(), Default::default()],
- charArray: [Default::default(), Default::default()],
- intArray: [Default::default(), Default::default()],
- longArray: [Default::default(), Default::default()],
- floatArray: [Default::default(), Default::default()],
- doubleArray: [Default::default(), Default::default()],
- stringArray: ["hello".into(), "world".into()],
- byteEnumArray: [Default::default(), Default::default()],
- intEnumArray: [Default::default(), Default::default()],
- longEnumArray: [Default::default(), Default::default()],
- parcelableArray: [Default::default(), Default::default()],
- boolMatrix: [[Default::default(), Default::default()], [Default::default(), Default::default()]],
- byteMatrix: [[Default::default(), Default::default()], [Default::default(), Default::default()]],
- charMatrix: [[Default::default(), Default::default()], [Default::default(), Default::default()]],
- intMatrix: [[Default::default(), Default::default()], [Default::default(), Default::default()]],
- longMatrix: [[Default::default(), Default::default()], [Default::default(), Default::default()]],
- floatMatrix: [[Default::default(), Default::default()], [Default::default(), Default::default()]],
- doubleMatrix: [[Default::default(), Default::default()], [Default::default(), Default::default()]],
- stringMatrix: [["hello".into(), "world".into()], ["Ciao".into(), "mondo".into()]],
- byteEnumMatrix: [[Default::default(), Default::default()], [Default::default(), Default::default()]],
- intEnumMatrix: [[Default::default(), Default::default()], [Default::default(), Default::default()]],
- longEnumMatrix: [[Default::default(), Default::default()], [Default::default(), Default::default()]],
- parcelableMatrix: [[Default::default(), Default::default()], [Default::default(), Default::default()]],
- boolNullableArray: Default::default(),
- byteNullableArray: Default::default(),
- charNullableArray: Default::default(),
- intNullableArray: Default::default(),
- longNullableArray: Default::default(),
- floatNullableArray: Default::default(),
- doubleNullableArray: Default::default(),
- stringNullableArray: Some([Some("hello".into()), Some("world".into())]),
- byteEnumNullableArray: Default::default(),
- intEnumNullableArray: Default::default(),
- longEnumNullableArray: Default::default(),
- binderNullableArray: Default::default(),
- pfdNullableArray: Default::default(),
- parcelableNullableArray: Default::default(),
- interfaceNullableArray: Default::default(),
- boolNullableMatrix: Default::default(),
- byteNullableMatrix: Default::default(),
- charNullableMatrix: Default::default(),
- intNullableMatrix: Default::default(),
- longNullableMatrix: Default::default(),
- floatNullableMatrix: Default::default(),
- doubleNullableMatrix: Default::default(),
- stringNullableMatrix: Some([[Some("hello".into()), Some("world".into())], [Some("Ciao".into()), Some("mondo".into())]]),
- byteEnumNullableMatrix: Default::default(),
- intEnumNullableMatrix: Default::default(),
- longEnumNullableMatrix: Default::default(),
- binderNullableMatrix: Default::default(),
- pfdNullableMatrix: Default::default(),
- parcelableNullableMatrix: Default::default(),
- interfaceNullableMatrix: Default::default(),
+ r#int2x3: [[1, 2, 3], [4, 5, 6]],
+ r#boolArray: [Default::default(), Default::default()],
+ r#byteArray: [Default::default(), Default::default()],
+ r#charArray: [Default::default(), Default::default()],
+ r#intArray: [Default::default(), Default::default()],
+ r#longArray: [Default::default(), Default::default()],
+ r#floatArray: [Default::default(), Default::default()],
+ r#doubleArray: [Default::default(), Default::default()],
+ r#stringArray: ["hello".into(), "world".into()],
+ r#byteEnumArray: [Default::default(), Default::default()],
+ r#intEnumArray: [Default::default(), Default::default()],
+ r#longEnumArray: [Default::default(), Default::default()],
+ r#parcelableArray: [Default::default(), Default::default()],
+ r#boolMatrix: [[Default::default(), Default::default()], [Default::default(), Default::default()]],
+ r#byteMatrix: [[Default::default(), Default::default()], [Default::default(), Default::default()]],
+ r#charMatrix: [[Default::default(), Default::default()], [Default::default(), Default::default()]],
+ r#intMatrix: [[Default::default(), Default::default()], [Default::default(), Default::default()]],
+ r#longMatrix: [[Default::default(), Default::default()], [Default::default(), Default::default()]],
+ r#floatMatrix: [[Default::default(), Default::default()], [Default::default(), Default::default()]],
+ r#doubleMatrix: [[Default::default(), Default::default()], [Default::default(), Default::default()]],
+ r#stringMatrix: [["hello".into(), "world".into()], ["Ciao".into(), "mondo".into()]],
+ r#byteEnumMatrix: [[Default::default(), Default::default()], [Default::default(), Default::default()]],
+ r#intEnumMatrix: [[Default::default(), Default::default()], [Default::default(), Default::default()]],
+ r#longEnumMatrix: [[Default::default(), Default::default()], [Default::default(), Default::default()]],
+ r#parcelableMatrix: [[Default::default(), Default::default()], [Default::default(), Default::default()]],
+ r#boolNullableArray: Default::default(),
+ r#byteNullableArray: Default::default(),
+ r#charNullableArray: Default::default(),
+ r#intNullableArray: Default::default(),
+ r#longNullableArray: Default::default(),
+ r#floatNullableArray: Default::default(),
+ r#doubleNullableArray: Default::default(),
+ r#stringNullableArray: Some([Some("hello".into()), Some("world".into())]),
+ r#byteEnumNullableArray: Default::default(),
+ r#intEnumNullableArray: Default::default(),
+ r#longEnumNullableArray: Default::default(),
+ r#binderNullableArray: Default::default(),
+ r#pfdNullableArray: Default::default(),
+ r#parcelableNullableArray: Default::default(),
+ r#interfaceNullableArray: Default::default(),
+ r#boolNullableMatrix: Default::default(),
+ r#byteNullableMatrix: Default::default(),
+ r#charNullableMatrix: Default::default(),
+ r#intNullableMatrix: Default::default(),
+ r#longNullableMatrix: Default::default(),
+ r#floatNullableMatrix: Default::default(),
+ r#doubleNullableMatrix: Default::default(),
+ r#stringNullableMatrix: Some([[Some("hello".into()), Some("world".into())], [Some("Ciao".into()), Some("mondo".into())]]),
+ r#byteEnumNullableMatrix: Default::default(),
+ r#intEnumNullableMatrix: Default::default(),
+ r#longEnumNullableMatrix: Default::default(),
+ r#binderNullableMatrix: Default::default(),
+ r#pfdNullableMatrix: Default::default(),
+ r#parcelableNullableMatrix: Default::default(),
+ r#interfaceNullableMatrix: Default::default(),
}
}
}
-impl binder::Parcelable for FixedSizeArrayExample {
+impl binder::Parcelable for r#FixedSizeArrayExample {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_write(|subparcel| {
- subparcel.write(&self.int2x3)?;
- subparcel.write(&self.boolArray)?;
- subparcel.write(&self.byteArray)?;
- subparcel.write(&self.charArray)?;
- subparcel.write(&self.intArray)?;
- subparcel.write(&self.longArray)?;
- subparcel.write(&self.floatArray)?;
- subparcel.write(&self.doubleArray)?;
- subparcel.write(&self.stringArray)?;
- subparcel.write(&self.byteEnumArray)?;
- subparcel.write(&self.intEnumArray)?;
- subparcel.write(&self.longEnumArray)?;
- subparcel.write(&self.parcelableArray)?;
- subparcel.write(&self.boolMatrix)?;
- subparcel.write(&self.byteMatrix)?;
- subparcel.write(&self.charMatrix)?;
- subparcel.write(&self.intMatrix)?;
- subparcel.write(&self.longMatrix)?;
- subparcel.write(&self.floatMatrix)?;
- subparcel.write(&self.doubleMatrix)?;
- subparcel.write(&self.stringMatrix)?;
- subparcel.write(&self.byteEnumMatrix)?;
- subparcel.write(&self.intEnumMatrix)?;
- subparcel.write(&self.longEnumMatrix)?;
- subparcel.write(&self.parcelableMatrix)?;
- subparcel.write(&self.boolNullableArray)?;
- subparcel.write(&self.byteNullableArray)?;
- subparcel.write(&self.charNullableArray)?;
- subparcel.write(&self.intNullableArray)?;
- subparcel.write(&self.longNullableArray)?;
- subparcel.write(&self.floatNullableArray)?;
- subparcel.write(&self.doubleNullableArray)?;
- subparcel.write(&self.stringNullableArray)?;
- subparcel.write(&self.byteEnumNullableArray)?;
- subparcel.write(&self.intEnumNullableArray)?;
- subparcel.write(&self.longEnumNullableArray)?;
- subparcel.write(&self.binderNullableArray)?;
- subparcel.write(&self.pfdNullableArray)?;
- subparcel.write(&self.parcelableNullableArray)?;
- subparcel.write(&self.interfaceNullableArray)?;
- subparcel.write(&self.boolNullableMatrix)?;
- subparcel.write(&self.byteNullableMatrix)?;
- subparcel.write(&self.charNullableMatrix)?;
- subparcel.write(&self.intNullableMatrix)?;
- subparcel.write(&self.longNullableMatrix)?;
- subparcel.write(&self.floatNullableMatrix)?;
- subparcel.write(&self.doubleNullableMatrix)?;
- subparcel.write(&self.stringNullableMatrix)?;
- subparcel.write(&self.byteEnumNullableMatrix)?;
- subparcel.write(&self.intEnumNullableMatrix)?;
- subparcel.write(&self.longEnumNullableMatrix)?;
- subparcel.write(&self.binderNullableMatrix)?;
- subparcel.write(&self.pfdNullableMatrix)?;
- subparcel.write(&self.parcelableNullableMatrix)?;
- subparcel.write(&self.interfaceNullableMatrix)?;
+ subparcel.write(&self.r#int2x3)?;
+ subparcel.write(&self.r#boolArray)?;
+ subparcel.write(&self.r#byteArray)?;
+ subparcel.write(&self.r#charArray)?;
+ subparcel.write(&self.r#intArray)?;
+ subparcel.write(&self.r#longArray)?;
+ subparcel.write(&self.r#floatArray)?;
+ subparcel.write(&self.r#doubleArray)?;
+ subparcel.write(&self.r#stringArray)?;
+ subparcel.write(&self.r#byteEnumArray)?;
+ subparcel.write(&self.r#intEnumArray)?;
+ subparcel.write(&self.r#longEnumArray)?;
+ subparcel.write(&self.r#parcelableArray)?;
+ subparcel.write(&self.r#boolMatrix)?;
+ subparcel.write(&self.r#byteMatrix)?;
+ subparcel.write(&self.r#charMatrix)?;
+ subparcel.write(&self.r#intMatrix)?;
+ subparcel.write(&self.r#longMatrix)?;
+ subparcel.write(&self.r#floatMatrix)?;
+ subparcel.write(&self.r#doubleMatrix)?;
+ subparcel.write(&self.r#stringMatrix)?;
+ subparcel.write(&self.r#byteEnumMatrix)?;
+ subparcel.write(&self.r#intEnumMatrix)?;
+ subparcel.write(&self.r#longEnumMatrix)?;
+ subparcel.write(&self.r#parcelableMatrix)?;
+ subparcel.write(&self.r#boolNullableArray)?;
+ subparcel.write(&self.r#byteNullableArray)?;
+ subparcel.write(&self.r#charNullableArray)?;
+ subparcel.write(&self.r#intNullableArray)?;
+ subparcel.write(&self.r#longNullableArray)?;
+ subparcel.write(&self.r#floatNullableArray)?;
+ subparcel.write(&self.r#doubleNullableArray)?;
+ subparcel.write(&self.r#stringNullableArray)?;
+ subparcel.write(&self.r#byteEnumNullableArray)?;
+ subparcel.write(&self.r#intEnumNullableArray)?;
+ subparcel.write(&self.r#longEnumNullableArray)?;
+ subparcel.write(&self.r#binderNullableArray)?;
+ subparcel.write(&self.r#pfdNullableArray)?;
+ subparcel.write(&self.r#parcelableNullableArray)?;
+ subparcel.write(&self.r#interfaceNullableArray)?;
+ subparcel.write(&self.r#boolNullableMatrix)?;
+ subparcel.write(&self.r#byteNullableMatrix)?;
+ subparcel.write(&self.r#charNullableMatrix)?;
+ subparcel.write(&self.r#intNullableMatrix)?;
+ subparcel.write(&self.r#longNullableMatrix)?;
+ subparcel.write(&self.r#floatNullableMatrix)?;
+ subparcel.write(&self.r#doubleNullableMatrix)?;
+ subparcel.write(&self.r#stringNullableMatrix)?;
+ subparcel.write(&self.r#byteEnumNullableMatrix)?;
+ subparcel.write(&self.r#intEnumNullableMatrix)?;
+ subparcel.write(&self.r#longEnumNullableMatrix)?;
+ subparcel.write(&self.r#binderNullableMatrix)?;
+ subparcel.write(&self.r#pfdNullableMatrix)?;
+ subparcel.write(&self.r#parcelableNullableMatrix)?;
+ subparcel.write(&self.r#interfaceNullableMatrix)?;
Ok(())
})
}
fn read_from_parcel(&mut self, parcel: &binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_read(|subparcel| {
if subparcel.has_more_data() {
- self.int2x3 = subparcel.read()?;
+ self.r#int2x3 = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.boolArray = subparcel.read()?;
+ self.r#boolArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.byteArray = subparcel.read()?;
+ self.r#byteArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.charArray = subparcel.read()?;
+ self.r#charArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.intArray = subparcel.read()?;
+ self.r#intArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.longArray = subparcel.read()?;
+ self.r#longArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.floatArray = subparcel.read()?;
+ self.r#floatArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.doubleArray = subparcel.read()?;
+ self.r#doubleArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.stringArray = subparcel.read()?;
+ self.r#stringArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.byteEnumArray = subparcel.read()?;
+ self.r#byteEnumArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.intEnumArray = subparcel.read()?;
+ self.r#intEnumArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.longEnumArray = subparcel.read()?;
+ self.r#longEnumArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.parcelableArray = subparcel.read()?;
+ self.r#parcelableArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.boolMatrix = subparcel.read()?;
+ self.r#boolMatrix = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.byteMatrix = subparcel.read()?;
+ self.r#byteMatrix = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.charMatrix = subparcel.read()?;
+ self.r#charMatrix = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.intMatrix = subparcel.read()?;
+ self.r#intMatrix = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.longMatrix = subparcel.read()?;
+ self.r#longMatrix = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.floatMatrix = subparcel.read()?;
+ self.r#floatMatrix = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.doubleMatrix = subparcel.read()?;
+ self.r#doubleMatrix = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.stringMatrix = subparcel.read()?;
+ self.r#stringMatrix = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.byteEnumMatrix = subparcel.read()?;
+ self.r#byteEnumMatrix = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.intEnumMatrix = subparcel.read()?;
+ self.r#intEnumMatrix = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.longEnumMatrix = subparcel.read()?;
+ self.r#longEnumMatrix = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.parcelableMatrix = subparcel.read()?;
+ self.r#parcelableMatrix = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.boolNullableArray = subparcel.read()?;
+ self.r#boolNullableArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.byteNullableArray = subparcel.read()?;
+ self.r#byteNullableArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.charNullableArray = subparcel.read()?;
+ self.r#charNullableArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.intNullableArray = subparcel.read()?;
+ self.r#intNullableArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.longNullableArray = subparcel.read()?;
+ self.r#longNullableArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.floatNullableArray = subparcel.read()?;
+ self.r#floatNullableArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.doubleNullableArray = subparcel.read()?;
+ self.r#doubleNullableArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.stringNullableArray = subparcel.read()?;
+ self.r#stringNullableArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.byteEnumNullableArray = subparcel.read()?;
+ self.r#byteEnumNullableArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.intEnumNullableArray = subparcel.read()?;
+ self.r#intEnumNullableArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.longEnumNullableArray = subparcel.read()?;
+ self.r#longEnumNullableArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.binderNullableArray = subparcel.read()?;
+ self.r#binderNullableArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.pfdNullableArray = subparcel.read()?;
+ self.r#pfdNullableArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.parcelableNullableArray = subparcel.read()?;
+ self.r#parcelableNullableArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.interfaceNullableArray = subparcel.read()?;
+ self.r#interfaceNullableArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.boolNullableMatrix = subparcel.read()?;
+ self.r#boolNullableMatrix = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.byteNullableMatrix = subparcel.read()?;
+ self.r#byteNullableMatrix = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.charNullableMatrix = subparcel.read()?;
+ self.r#charNullableMatrix = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.intNullableMatrix = subparcel.read()?;
+ self.r#intNullableMatrix = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.longNullableMatrix = subparcel.read()?;
+ self.r#longNullableMatrix = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.floatNullableMatrix = subparcel.read()?;
+ self.r#floatNullableMatrix = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.doubleNullableMatrix = subparcel.read()?;
+ self.r#doubleNullableMatrix = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.stringNullableMatrix = subparcel.read()?;
+ self.r#stringNullableMatrix = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.byteEnumNullableMatrix = subparcel.read()?;
+ self.r#byteEnumNullableMatrix = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.intEnumNullableMatrix = subparcel.read()?;
+ self.r#intEnumNullableMatrix = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.longEnumNullableMatrix = subparcel.read()?;
+ self.r#longEnumNullableMatrix = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.binderNullableMatrix = subparcel.read()?;
+ self.r#binderNullableMatrix = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.pfdNullableMatrix = subparcel.read()?;
+ self.r#pfdNullableMatrix = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.parcelableNullableMatrix = subparcel.read()?;
+ self.r#parcelableNullableMatrix = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.interfaceNullableMatrix = subparcel.read()?;
+ self.r#interfaceNullableMatrix = subparcel.read()?;
}
Ok(())
})
}
}
-binder::impl_serialize_for_parcelable!(FixedSizeArrayExample);
-binder::impl_deserialize_for_parcelable!(FixedSizeArrayExample);
-impl binder::binder_impl::ParcelableMetadata for FixedSizeArrayExample {
+binder::impl_serialize_for_parcelable!(r#FixedSizeArrayExample);
+binder::impl_deserialize_for_parcelable!(r#FixedSizeArrayExample);
+impl binder::binder_impl::ParcelableMetadata for r#FixedSizeArrayExample {
fn get_descriptor() -> &'static str { "android.aidl.fixedsizearray.FixedSizeArrayExample" }
}
-pub mod IRepeatFixedSizeArray {
+pub mod r#IRepeatFixedSizeArray {
#![allow(non_upper_case_globals)]
#![allow(non_snake_case)]
#[allow(unused_imports)] use binder::binder_impl::IBinderInternal;
@@ -371,14 +371,14 @@ pub mod IRepeatFixedSizeArray {
}
pub trait IRepeatFixedSizeArray: binder::Interface + Send {
fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.fixedsizearray.FixedSizeArrayExample.IRepeatFixedSizeArray" }
- fn RepeatBytes(&self, _arg_input: &[u8; 3], _arg_repeated: &mut [u8; 3]) -> binder::Result<[u8; 3]>;
- fn RepeatInts(&self, _arg_input: &[i32; 3], _arg_repeated: &mut [i32; 3]) -> binder::Result<[i32; 3]>;
- fn RepeatBinders(&self, _arg_input: &[binder::SpIBinder; 3], _arg_repeated: &mut [Option<binder::SpIBinder>; 3]) -> binder::Result<[binder::SpIBinder; 3]>;
- fn RepeatParcelables(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3], _arg_repeated: &mut [crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]) -> binder::Result<[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]>;
- fn Repeat2dBytes(&self, _arg_input: &[[u8; 3]; 2], _arg_repeated: &mut [[u8; 3]; 2]) -> binder::Result<[[u8; 3]; 2]>;
- fn Repeat2dInts(&self, _arg_input: &[[i32; 3]; 2], _arg_repeated: &mut [[i32; 3]; 2]) -> binder::Result<[[i32; 3]; 2]>;
- fn Repeat2dBinders(&self, _arg_input: &[[binder::SpIBinder; 3]; 2], _arg_repeated: &mut [[Option<binder::SpIBinder>; 3]; 2]) -> binder::Result<[[binder::SpIBinder; 3]; 2]>;
- fn Repeat2dParcelables(&self, _arg_input: &[[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2], _arg_repeated: &mut [[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2]) -> binder::Result<[[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2]>;
+ fn r#RepeatBytes(&self, _arg_input: &[u8; 3], _arg_repeated: &mut [u8; 3]) -> binder::Result<[u8; 3]>;
+ fn r#RepeatInts(&self, _arg_input: &[i32; 3], _arg_repeated: &mut [i32; 3]) -> binder::Result<[i32; 3]>;
+ fn r#RepeatBinders(&self, _arg_input: &[binder::SpIBinder; 3], _arg_repeated: &mut [Option<binder::SpIBinder>; 3]) -> binder::Result<[binder::SpIBinder; 3]>;
+ fn r#RepeatParcelables(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3], _arg_repeated: &mut [crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]) -> binder::Result<[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]>;
+ fn r#Repeat2dBytes(&self, _arg_input: &[[u8; 3]; 2], _arg_repeated: &mut [[u8; 3]; 2]) -> binder::Result<[[u8; 3]; 2]>;
+ fn r#Repeat2dInts(&self, _arg_input: &[[i32; 3]; 2], _arg_repeated: &mut [[i32; 3]; 2]) -> binder::Result<[[i32; 3]; 2]>;
+ fn r#Repeat2dBinders(&self, _arg_input: &[[binder::SpIBinder; 3]; 2], _arg_repeated: &mut [[Option<binder::SpIBinder>; 3]; 2]) -> binder::Result<[[binder::SpIBinder; 3]; 2]>;
+ fn r#Repeat2dParcelables(&self, _arg_input: &[[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2], _arg_repeated: &mut [[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2]) -> binder::Result<[[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2]>;
fn getDefaultImpl() -> IRepeatFixedSizeArrayDefaultRef where Self: Sized {
DEFAULT_IMPL.lock().unwrap().clone()
}
@@ -388,26 +388,26 @@ pub mod IRepeatFixedSizeArray {
}
pub trait IRepeatFixedSizeArrayAsync<P>: binder::Interface + Send {
fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.fixedsizearray.FixedSizeArrayExample.IRepeatFixedSizeArray" }
- fn RepeatBytes<'a>(&'a self, _arg_input: &'a [u8; 3], _arg_repeated: &'a mut [u8; 3]) -> binder::BoxFuture<'a, binder::Result<[u8; 3]>>;
- fn RepeatInts<'a>(&'a self, _arg_input: &'a [i32; 3], _arg_repeated: &'a mut [i32; 3]) -> binder::BoxFuture<'a, binder::Result<[i32; 3]>>;
- fn RepeatBinders<'a>(&'a self, _arg_input: &'a [binder::SpIBinder; 3], _arg_repeated: &'a mut [Option<binder::SpIBinder>; 3]) -> binder::BoxFuture<'a, binder::Result<[binder::SpIBinder; 3]>>;
- fn RepeatParcelables<'a>(&'a self, _arg_input: &'a [crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3], _arg_repeated: &'a mut [crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]) -> binder::BoxFuture<'a, binder::Result<[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]>>;
- fn Repeat2dBytes<'a>(&'a self, _arg_input: &'a [[u8; 3]; 2], _arg_repeated: &'a mut [[u8; 3]; 2]) -> binder::BoxFuture<'a, binder::Result<[[u8; 3]; 2]>>;
- fn Repeat2dInts<'a>(&'a self, _arg_input: &'a [[i32; 3]; 2], _arg_repeated: &'a mut [[i32; 3]; 2]) -> binder::BoxFuture<'a, binder::Result<[[i32; 3]; 2]>>;
- fn Repeat2dBinders<'a>(&'a self, _arg_input: &'a [[binder::SpIBinder; 3]; 2], _arg_repeated: &'a mut [[Option<binder::SpIBinder>; 3]; 2]) -> binder::BoxFuture<'a, binder::Result<[[binder::SpIBinder; 3]; 2]>>;
- fn Repeat2dParcelables<'a>(&'a self, _arg_input: &'a [[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2], _arg_repeated: &'a mut [[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2]) -> binder::BoxFuture<'a, binder::Result<[[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2]>>;
+ fn r#RepeatBytes<'a>(&'a self, _arg_input: &'a [u8; 3], _arg_repeated: &'a mut [u8; 3]) -> binder::BoxFuture<'a, binder::Result<[u8; 3]>>;
+ fn r#RepeatInts<'a>(&'a self, _arg_input: &'a [i32; 3], _arg_repeated: &'a mut [i32; 3]) -> binder::BoxFuture<'a, binder::Result<[i32; 3]>>;
+ fn r#RepeatBinders<'a>(&'a self, _arg_input: &'a [binder::SpIBinder; 3], _arg_repeated: &'a mut [Option<binder::SpIBinder>; 3]) -> binder::BoxFuture<'a, binder::Result<[binder::SpIBinder; 3]>>;
+ fn r#RepeatParcelables<'a>(&'a self, _arg_input: &'a [crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3], _arg_repeated: &'a mut [crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]) -> binder::BoxFuture<'a, binder::Result<[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]>>;
+ fn r#Repeat2dBytes<'a>(&'a self, _arg_input: &'a [[u8; 3]; 2], _arg_repeated: &'a mut [[u8; 3]; 2]) -> binder::BoxFuture<'a, binder::Result<[[u8; 3]; 2]>>;
+ fn r#Repeat2dInts<'a>(&'a self, _arg_input: &'a [[i32; 3]; 2], _arg_repeated: &'a mut [[i32; 3]; 2]) -> binder::BoxFuture<'a, binder::Result<[[i32; 3]; 2]>>;
+ fn r#Repeat2dBinders<'a>(&'a self, _arg_input: &'a [[binder::SpIBinder; 3]; 2], _arg_repeated: &'a mut [[Option<binder::SpIBinder>; 3]; 2]) -> binder::BoxFuture<'a, binder::Result<[[binder::SpIBinder; 3]; 2]>>;
+ fn r#Repeat2dParcelables<'a>(&'a self, _arg_input: &'a [[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2], _arg_repeated: &'a mut [[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2]) -> binder::BoxFuture<'a, binder::Result<[[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2]>>;
}
#[::async_trait::async_trait]
pub trait IRepeatFixedSizeArrayAsyncServer: binder::Interface + Send {
fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.fixedsizearray.FixedSizeArrayExample.IRepeatFixedSizeArray" }
- async fn RepeatBytes(&self, _arg_input: &[u8; 3], _arg_repeated: &mut [u8; 3]) -> binder::Result<[u8; 3]>;
- async fn RepeatInts(&self, _arg_input: &[i32; 3], _arg_repeated: &mut [i32; 3]) -> binder::Result<[i32; 3]>;
- async fn RepeatBinders(&self, _arg_input: &[binder::SpIBinder; 3], _arg_repeated: &mut [Option<binder::SpIBinder>; 3]) -> binder::Result<[binder::SpIBinder; 3]>;
- async fn RepeatParcelables(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3], _arg_repeated: &mut [crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]) -> binder::Result<[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]>;
- async fn Repeat2dBytes(&self, _arg_input: &[[u8; 3]; 2], _arg_repeated: &mut [[u8; 3]; 2]) -> binder::Result<[[u8; 3]; 2]>;
- async fn Repeat2dInts(&self, _arg_input: &[[i32; 3]; 2], _arg_repeated: &mut [[i32; 3]; 2]) -> binder::Result<[[i32; 3]; 2]>;
- async fn Repeat2dBinders(&self, _arg_input: &[[binder::SpIBinder; 3]; 2], _arg_repeated: &mut [[Option<binder::SpIBinder>; 3]; 2]) -> binder::Result<[[binder::SpIBinder; 3]; 2]>;
- async fn Repeat2dParcelables(&self, _arg_input: &[[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2], _arg_repeated: &mut [[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2]) -> binder::Result<[[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2]>;
+ async fn r#RepeatBytes(&self, _arg_input: &[u8; 3], _arg_repeated: &mut [u8; 3]) -> binder::Result<[u8; 3]>;
+ async fn r#RepeatInts(&self, _arg_input: &[i32; 3], _arg_repeated: &mut [i32; 3]) -> binder::Result<[i32; 3]>;
+ async fn r#RepeatBinders(&self, _arg_input: &[binder::SpIBinder; 3], _arg_repeated: &mut [Option<binder::SpIBinder>; 3]) -> binder::Result<[binder::SpIBinder; 3]>;
+ async fn r#RepeatParcelables(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3], _arg_repeated: &mut [crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]) -> binder::Result<[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]>;
+ async fn r#Repeat2dBytes(&self, _arg_input: &[[u8; 3]; 2], _arg_repeated: &mut [[u8; 3]; 2]) -> binder::Result<[[u8; 3]; 2]>;
+ async fn r#Repeat2dInts(&self, _arg_input: &[[i32; 3]; 2], _arg_repeated: &mut [[i32; 3]; 2]) -> binder::Result<[[i32; 3]; 2]>;
+ async fn r#Repeat2dBinders(&self, _arg_input: &[[binder::SpIBinder; 3]; 2], _arg_repeated: &mut [[Option<binder::SpIBinder>; 3]; 2]) -> binder::Result<[[binder::SpIBinder; 3]; 2]>;
+ async fn r#Repeat2dParcelables(&self, _arg_input: &[[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2], _arg_repeated: &mut [[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2]) -> binder::Result<[[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2]>;
}
impl BnRepeatFixedSizeArray {
/// Create a new async binder service.
@@ -429,29 +429,29 @@ pub mod IRepeatFixedSizeArray {
T: IRepeatFixedSizeArrayAsyncServer + Send + Sync + 'static,
R: binder::binder_impl::BinderAsyncRuntime + Send + Sync + 'static,
{
- fn RepeatBytes(&self, _arg_input: &[u8; 3], _arg_repeated: &mut [u8; 3]) -> binder::Result<[u8; 3]> {
- self._rt.block_on(self._inner.RepeatBytes(_arg_input, _arg_repeated))
+ fn r#RepeatBytes(&self, _arg_input: &[u8; 3], _arg_repeated: &mut [u8; 3]) -> binder::Result<[u8; 3]> {
+ self._rt.block_on(self._inner.r#RepeatBytes(_arg_input, _arg_repeated))
}
- fn RepeatInts(&self, _arg_input: &[i32; 3], _arg_repeated: &mut [i32; 3]) -> binder::Result<[i32; 3]> {
- self._rt.block_on(self._inner.RepeatInts(_arg_input, _arg_repeated))
+ fn r#RepeatInts(&self, _arg_input: &[i32; 3], _arg_repeated: &mut [i32; 3]) -> binder::Result<[i32; 3]> {
+ self._rt.block_on(self._inner.r#RepeatInts(_arg_input, _arg_repeated))
}
- fn RepeatBinders(&self, _arg_input: &[binder::SpIBinder; 3], _arg_repeated: &mut [Option<binder::SpIBinder>; 3]) -> binder::Result<[binder::SpIBinder; 3]> {
- self._rt.block_on(self._inner.RepeatBinders(_arg_input, _arg_repeated))
+ fn r#RepeatBinders(&self, _arg_input: &[binder::SpIBinder; 3], _arg_repeated: &mut [Option<binder::SpIBinder>; 3]) -> binder::Result<[binder::SpIBinder; 3]> {
+ self._rt.block_on(self._inner.r#RepeatBinders(_arg_input, _arg_repeated))
}
- fn RepeatParcelables(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3], _arg_repeated: &mut [crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]) -> binder::Result<[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]> {
- self._rt.block_on(self._inner.RepeatParcelables(_arg_input, _arg_repeated))
+ fn r#RepeatParcelables(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3], _arg_repeated: &mut [crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]) -> binder::Result<[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]> {
+ self._rt.block_on(self._inner.r#RepeatParcelables(_arg_input, _arg_repeated))
}
- fn Repeat2dBytes(&self, _arg_input: &[[u8; 3]; 2], _arg_repeated: &mut [[u8; 3]; 2]) -> binder::Result<[[u8; 3]; 2]> {
- self._rt.block_on(self._inner.Repeat2dBytes(_arg_input, _arg_repeated))
+ fn r#Repeat2dBytes(&self, _arg_input: &[[u8; 3]; 2], _arg_repeated: &mut [[u8; 3]; 2]) -> binder::Result<[[u8; 3]; 2]> {
+ self._rt.block_on(self._inner.r#Repeat2dBytes(_arg_input, _arg_repeated))
}
- fn Repeat2dInts(&self, _arg_input: &[[i32; 3]; 2], _arg_repeated: &mut [[i32; 3]; 2]) -> binder::Result<[[i32; 3]; 2]> {
- self._rt.block_on(self._inner.Repeat2dInts(_arg_input, _arg_repeated))
+ fn r#Repeat2dInts(&self, _arg_input: &[[i32; 3]; 2], _arg_repeated: &mut [[i32; 3]; 2]) -> binder::Result<[[i32; 3]; 2]> {
+ self._rt.block_on(self._inner.r#Repeat2dInts(_arg_input, _arg_repeated))
}
- fn Repeat2dBinders(&self, _arg_input: &[[binder::SpIBinder; 3]; 2], _arg_repeated: &mut [[Option<binder::SpIBinder>; 3]; 2]) -> binder::Result<[[binder::SpIBinder; 3]; 2]> {
- self._rt.block_on(self._inner.Repeat2dBinders(_arg_input, _arg_repeated))
+ fn r#Repeat2dBinders(&self, _arg_input: &[[binder::SpIBinder; 3]; 2], _arg_repeated: &mut [[Option<binder::SpIBinder>; 3]; 2]) -> binder::Result<[[binder::SpIBinder; 3]; 2]> {
+ self._rt.block_on(self._inner.r#Repeat2dBinders(_arg_input, _arg_repeated))
}
- fn Repeat2dParcelables(&self, _arg_input: &[[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2], _arg_repeated: &mut [[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2]) -> binder::Result<[[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2]> {
- self._rt.block_on(self._inner.Repeat2dParcelables(_arg_input, _arg_repeated))
+ fn r#Repeat2dParcelables(&self, _arg_input: &[[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2], _arg_repeated: &mut [[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2]) -> binder::Result<[[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2]> {
+ self._rt.block_on(self._inner.r#Repeat2dParcelables(_arg_input, _arg_repeated))
}
}
let wrapped = Wrapper { _inner: inner, _rt: rt };
@@ -459,40 +459,40 @@ pub mod IRepeatFixedSizeArray {
}
}
pub trait IRepeatFixedSizeArrayDefault: Send + Sync {
- fn RepeatBytes(&self, _arg_input: &[u8; 3], _arg_repeated: &mut [u8; 3]) -> binder::Result<[u8; 3]> {
+ fn r#RepeatBytes(&self, _arg_input: &[u8; 3], _arg_repeated: &mut [u8; 3]) -> binder::Result<[u8; 3]> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn RepeatInts(&self, _arg_input: &[i32; 3], _arg_repeated: &mut [i32; 3]) -> binder::Result<[i32; 3]> {
+ fn r#RepeatInts(&self, _arg_input: &[i32; 3], _arg_repeated: &mut [i32; 3]) -> binder::Result<[i32; 3]> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn RepeatBinders(&self, _arg_input: &[binder::SpIBinder; 3], _arg_repeated: &mut [Option<binder::SpIBinder>; 3]) -> binder::Result<[binder::SpIBinder; 3]> {
+ fn r#RepeatBinders(&self, _arg_input: &[binder::SpIBinder; 3], _arg_repeated: &mut [Option<binder::SpIBinder>; 3]) -> binder::Result<[binder::SpIBinder; 3]> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn RepeatParcelables(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3], _arg_repeated: &mut [crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]) -> binder::Result<[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]> {
+ fn r#RepeatParcelables(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3], _arg_repeated: &mut [crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]) -> binder::Result<[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn Repeat2dBytes(&self, _arg_input: &[[u8; 3]; 2], _arg_repeated: &mut [[u8; 3]; 2]) -> binder::Result<[[u8; 3]; 2]> {
+ fn r#Repeat2dBytes(&self, _arg_input: &[[u8; 3]; 2], _arg_repeated: &mut [[u8; 3]; 2]) -> binder::Result<[[u8; 3]; 2]> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn Repeat2dInts(&self, _arg_input: &[[i32; 3]; 2], _arg_repeated: &mut [[i32; 3]; 2]) -> binder::Result<[[i32; 3]; 2]> {
+ fn r#Repeat2dInts(&self, _arg_input: &[[i32; 3]; 2], _arg_repeated: &mut [[i32; 3]; 2]) -> binder::Result<[[i32; 3]; 2]> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn Repeat2dBinders(&self, _arg_input: &[[binder::SpIBinder; 3]; 2], _arg_repeated: &mut [[Option<binder::SpIBinder>; 3]; 2]) -> binder::Result<[[binder::SpIBinder; 3]; 2]> {
+ fn r#Repeat2dBinders(&self, _arg_input: &[[binder::SpIBinder; 3]; 2], _arg_repeated: &mut [[Option<binder::SpIBinder>; 3]; 2]) -> binder::Result<[[binder::SpIBinder; 3]; 2]> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn Repeat2dParcelables(&self, _arg_input: &[[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2], _arg_repeated: &mut [[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2]) -> binder::Result<[[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2]> {
+ fn r#Repeat2dParcelables(&self, _arg_input: &[[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2], _arg_repeated: &mut [[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2]) -> binder::Result<[[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2]> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
}
pub mod transactions {
- pub const RepeatBytes: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 0;
- pub const RepeatInts: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 1;
- pub const RepeatBinders: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 2;
- pub const RepeatParcelables: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 3;
- pub const Repeat2dBytes: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 4;
- pub const Repeat2dInts: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 5;
- pub const Repeat2dBinders: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 6;
- pub const Repeat2dParcelables: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 7;
+ pub const r#RepeatBytes: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 0;
+ pub const r#RepeatInts: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 1;
+ pub const r#RepeatBinders: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 2;
+ pub const r#RepeatParcelables: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 3;
+ pub const r#Repeat2dBytes: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 4;
+ pub const r#Repeat2dInts: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 5;
+ pub const r#Repeat2dBinders: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 6;
+ pub const r#Repeat2dParcelables: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 7;
}
pub type IRepeatFixedSizeArrayDefaultRef = Option<std::sync::Arc<dyn IRepeatFixedSizeArrayDefault>>;
use lazy_static::lazy_static;
@@ -508,7 +508,7 @@ pub mod IRepeatFixedSizeArray {
fn read_response_RepeatBytes(&self, _arg_input: &[u8; 3], _arg_repeated: &mut [u8; 3], _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<[u8; 3]> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as IRepeatFixedSizeArray>::getDefaultImpl() {
- return _aidl_default_impl.RepeatBytes(_arg_input, _arg_repeated);
+ return _aidl_default_impl.r#RepeatBytes(_arg_input, _arg_repeated);
}
}
let _aidl_reply = _aidl_reply?;
@@ -526,7 +526,7 @@ pub mod IRepeatFixedSizeArray {
fn read_response_RepeatInts(&self, _arg_input: &[i32; 3], _arg_repeated: &mut [i32; 3], _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<[i32; 3]> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as IRepeatFixedSizeArray>::getDefaultImpl() {
- return _aidl_default_impl.RepeatInts(_arg_input, _arg_repeated);
+ return _aidl_default_impl.r#RepeatInts(_arg_input, _arg_repeated);
}
}
let _aidl_reply = _aidl_reply?;
@@ -544,7 +544,7 @@ pub mod IRepeatFixedSizeArray {
fn read_response_RepeatBinders(&self, _arg_input: &[binder::SpIBinder; 3], _arg_repeated: &mut [Option<binder::SpIBinder>; 3], _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<[binder::SpIBinder; 3]> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as IRepeatFixedSizeArray>::getDefaultImpl() {
- return _aidl_default_impl.RepeatBinders(_arg_input, _arg_repeated);
+ return _aidl_default_impl.r#RepeatBinders(_arg_input, _arg_repeated);
}
}
let _aidl_reply = _aidl_reply?;
@@ -562,7 +562,7 @@ pub mod IRepeatFixedSizeArray {
fn read_response_RepeatParcelables(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3], _arg_repeated: &mut [crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3], _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as IRepeatFixedSizeArray>::getDefaultImpl() {
- return _aidl_default_impl.RepeatParcelables(_arg_input, _arg_repeated);
+ return _aidl_default_impl.r#RepeatParcelables(_arg_input, _arg_repeated);
}
}
let _aidl_reply = _aidl_reply?;
@@ -580,7 +580,7 @@ pub mod IRepeatFixedSizeArray {
fn read_response_Repeat2dBytes(&self, _arg_input: &[[u8; 3]; 2], _arg_repeated: &mut [[u8; 3]; 2], _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<[[u8; 3]; 2]> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as IRepeatFixedSizeArray>::getDefaultImpl() {
- return _aidl_default_impl.Repeat2dBytes(_arg_input, _arg_repeated);
+ return _aidl_default_impl.r#Repeat2dBytes(_arg_input, _arg_repeated);
}
}
let _aidl_reply = _aidl_reply?;
@@ -598,7 +598,7 @@ pub mod IRepeatFixedSizeArray {
fn read_response_Repeat2dInts(&self, _arg_input: &[[i32; 3]; 2], _arg_repeated: &mut [[i32; 3]; 2], _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<[[i32; 3]; 2]> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as IRepeatFixedSizeArray>::getDefaultImpl() {
- return _aidl_default_impl.Repeat2dInts(_arg_input, _arg_repeated);
+ return _aidl_default_impl.r#Repeat2dInts(_arg_input, _arg_repeated);
}
}
let _aidl_reply = _aidl_reply?;
@@ -616,7 +616,7 @@ pub mod IRepeatFixedSizeArray {
fn read_response_Repeat2dBinders(&self, _arg_input: &[[binder::SpIBinder; 3]; 2], _arg_repeated: &mut [[Option<binder::SpIBinder>; 3]; 2], _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<[[binder::SpIBinder; 3]; 2]> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as IRepeatFixedSizeArray>::getDefaultImpl() {
- return _aidl_default_impl.Repeat2dBinders(_arg_input, _arg_repeated);
+ return _aidl_default_impl.r#Repeat2dBinders(_arg_input, _arg_repeated);
}
}
let _aidl_reply = _aidl_reply?;
@@ -634,7 +634,7 @@ pub mod IRepeatFixedSizeArray {
fn read_response_Repeat2dParcelables(&self, _arg_input: &[[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2], _arg_repeated: &mut [[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2], _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<[[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2]> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as IRepeatFixedSizeArray>::getDefaultImpl() {
- return _aidl_default_impl.Repeat2dParcelables(_arg_input, _arg_repeated);
+ return _aidl_default_impl.r#Repeat2dParcelables(_arg_input, _arg_repeated);
}
}
let _aidl_reply = _aidl_reply?;
@@ -646,147 +646,147 @@ pub mod IRepeatFixedSizeArray {
}
}
impl IRepeatFixedSizeArray for BpRepeatFixedSizeArray {
- fn RepeatBytes(&self, _arg_input: &[u8; 3], _arg_repeated: &mut [u8; 3]) -> binder::Result<[u8; 3]> {
+ fn r#RepeatBytes(&self, _arg_input: &[u8; 3], _arg_repeated: &mut [u8; 3]) -> binder::Result<[u8; 3]> {
let _aidl_data = self.build_parcel_RepeatBytes(_arg_input, _arg_repeated)?;
- let _aidl_reply = self.binder.submit_transact(transactions::RepeatBytes, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#RepeatBytes, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_RepeatBytes(_arg_input, _arg_repeated, _aidl_reply)
}
- fn RepeatInts(&self, _arg_input: &[i32; 3], _arg_repeated: &mut [i32; 3]) -> binder::Result<[i32; 3]> {
+ fn r#RepeatInts(&self, _arg_input: &[i32; 3], _arg_repeated: &mut [i32; 3]) -> binder::Result<[i32; 3]> {
let _aidl_data = self.build_parcel_RepeatInts(_arg_input, _arg_repeated)?;
- let _aidl_reply = self.binder.submit_transact(transactions::RepeatInts, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#RepeatInts, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_RepeatInts(_arg_input, _arg_repeated, _aidl_reply)
}
- fn RepeatBinders(&self, _arg_input: &[binder::SpIBinder; 3], _arg_repeated: &mut [Option<binder::SpIBinder>; 3]) -> binder::Result<[binder::SpIBinder; 3]> {
+ fn r#RepeatBinders(&self, _arg_input: &[binder::SpIBinder; 3], _arg_repeated: &mut [Option<binder::SpIBinder>; 3]) -> binder::Result<[binder::SpIBinder; 3]> {
let _aidl_data = self.build_parcel_RepeatBinders(_arg_input, _arg_repeated)?;
- let _aidl_reply = self.binder.submit_transact(transactions::RepeatBinders, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#RepeatBinders, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_RepeatBinders(_arg_input, _arg_repeated, _aidl_reply)
}
- fn RepeatParcelables(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3], _arg_repeated: &mut [crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]) -> binder::Result<[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]> {
+ fn r#RepeatParcelables(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3], _arg_repeated: &mut [crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]) -> binder::Result<[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]> {
let _aidl_data = self.build_parcel_RepeatParcelables(_arg_input, _arg_repeated)?;
- let _aidl_reply = self.binder.submit_transact(transactions::RepeatParcelables, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#RepeatParcelables, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_RepeatParcelables(_arg_input, _arg_repeated, _aidl_reply)
}
- fn Repeat2dBytes(&self, _arg_input: &[[u8; 3]; 2], _arg_repeated: &mut [[u8; 3]; 2]) -> binder::Result<[[u8; 3]; 2]> {
+ fn r#Repeat2dBytes(&self, _arg_input: &[[u8; 3]; 2], _arg_repeated: &mut [[u8; 3]; 2]) -> binder::Result<[[u8; 3]; 2]> {
let _aidl_data = self.build_parcel_Repeat2dBytes(_arg_input, _arg_repeated)?;
- let _aidl_reply = self.binder.submit_transact(transactions::Repeat2dBytes, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#Repeat2dBytes, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_Repeat2dBytes(_arg_input, _arg_repeated, _aidl_reply)
}
- fn Repeat2dInts(&self, _arg_input: &[[i32; 3]; 2], _arg_repeated: &mut [[i32; 3]; 2]) -> binder::Result<[[i32; 3]; 2]> {
+ fn r#Repeat2dInts(&self, _arg_input: &[[i32; 3]; 2], _arg_repeated: &mut [[i32; 3]; 2]) -> binder::Result<[[i32; 3]; 2]> {
let _aidl_data = self.build_parcel_Repeat2dInts(_arg_input, _arg_repeated)?;
- let _aidl_reply = self.binder.submit_transact(transactions::Repeat2dInts, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#Repeat2dInts, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_Repeat2dInts(_arg_input, _arg_repeated, _aidl_reply)
}
- fn Repeat2dBinders(&self, _arg_input: &[[binder::SpIBinder; 3]; 2], _arg_repeated: &mut [[Option<binder::SpIBinder>; 3]; 2]) -> binder::Result<[[binder::SpIBinder; 3]; 2]> {
+ fn r#Repeat2dBinders(&self, _arg_input: &[[binder::SpIBinder; 3]; 2], _arg_repeated: &mut [[Option<binder::SpIBinder>; 3]; 2]) -> binder::Result<[[binder::SpIBinder; 3]; 2]> {
let _aidl_data = self.build_parcel_Repeat2dBinders(_arg_input, _arg_repeated)?;
- let _aidl_reply = self.binder.submit_transact(transactions::Repeat2dBinders, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#Repeat2dBinders, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_Repeat2dBinders(_arg_input, _arg_repeated, _aidl_reply)
}
- fn Repeat2dParcelables(&self, _arg_input: &[[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2], _arg_repeated: &mut [[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2]) -> binder::Result<[[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2]> {
+ fn r#Repeat2dParcelables(&self, _arg_input: &[[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2], _arg_repeated: &mut [[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2]) -> binder::Result<[[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2]> {
let _aidl_data = self.build_parcel_Repeat2dParcelables(_arg_input, _arg_repeated)?;
- let _aidl_reply = self.binder.submit_transact(transactions::Repeat2dParcelables, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#Repeat2dParcelables, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_Repeat2dParcelables(_arg_input, _arg_repeated, _aidl_reply)
}
}
impl<P: binder::BinderAsyncPool> IRepeatFixedSizeArrayAsync<P> for BpRepeatFixedSizeArray {
- fn RepeatBytes<'a>(&'a self, _arg_input: &'a [u8; 3], _arg_repeated: &'a mut [u8; 3]) -> binder::BoxFuture<'a, binder::Result<[u8; 3]>> {
+ fn r#RepeatBytes<'a>(&'a self, _arg_input: &'a [u8; 3], _arg_repeated: &'a mut [u8; 3]) -> binder::BoxFuture<'a, binder::Result<[u8; 3]>> {
let _aidl_data = match self.build_parcel_RepeatBytes(_arg_input, _arg_repeated) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::RepeatBytes, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#RepeatBytes, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_RepeatBytes(_arg_input, _arg_repeated, _aidl_reply)
}
)
}
- fn RepeatInts<'a>(&'a self, _arg_input: &'a [i32; 3], _arg_repeated: &'a mut [i32; 3]) -> binder::BoxFuture<'a, binder::Result<[i32; 3]>> {
+ fn r#RepeatInts<'a>(&'a self, _arg_input: &'a [i32; 3], _arg_repeated: &'a mut [i32; 3]) -> binder::BoxFuture<'a, binder::Result<[i32; 3]>> {
let _aidl_data = match self.build_parcel_RepeatInts(_arg_input, _arg_repeated) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::RepeatInts, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#RepeatInts, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_RepeatInts(_arg_input, _arg_repeated, _aidl_reply)
}
)
}
- fn RepeatBinders<'a>(&'a self, _arg_input: &'a [binder::SpIBinder; 3], _arg_repeated: &'a mut [Option<binder::SpIBinder>; 3]) -> binder::BoxFuture<'a, binder::Result<[binder::SpIBinder; 3]>> {
+ fn r#RepeatBinders<'a>(&'a self, _arg_input: &'a [binder::SpIBinder; 3], _arg_repeated: &'a mut [Option<binder::SpIBinder>; 3]) -> binder::BoxFuture<'a, binder::Result<[binder::SpIBinder; 3]>> {
let _aidl_data = match self.build_parcel_RepeatBinders(_arg_input, _arg_repeated) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::RepeatBinders, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#RepeatBinders, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_RepeatBinders(_arg_input, _arg_repeated, _aidl_reply)
}
)
}
- fn RepeatParcelables<'a>(&'a self, _arg_input: &'a [crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3], _arg_repeated: &'a mut [crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]) -> binder::BoxFuture<'a, binder::Result<[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]>> {
+ fn r#RepeatParcelables<'a>(&'a self, _arg_input: &'a [crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3], _arg_repeated: &'a mut [crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]) -> binder::BoxFuture<'a, binder::Result<[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]>> {
let _aidl_data = match self.build_parcel_RepeatParcelables(_arg_input, _arg_repeated) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::RepeatParcelables, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#RepeatParcelables, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_RepeatParcelables(_arg_input, _arg_repeated, _aidl_reply)
}
)
}
- fn Repeat2dBytes<'a>(&'a self, _arg_input: &'a [[u8; 3]; 2], _arg_repeated: &'a mut [[u8; 3]; 2]) -> binder::BoxFuture<'a, binder::Result<[[u8; 3]; 2]>> {
+ fn r#Repeat2dBytes<'a>(&'a self, _arg_input: &'a [[u8; 3]; 2], _arg_repeated: &'a mut [[u8; 3]; 2]) -> binder::BoxFuture<'a, binder::Result<[[u8; 3]; 2]>> {
let _aidl_data = match self.build_parcel_Repeat2dBytes(_arg_input, _arg_repeated) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::Repeat2dBytes, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#Repeat2dBytes, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_Repeat2dBytes(_arg_input, _arg_repeated, _aidl_reply)
}
)
}
- fn Repeat2dInts<'a>(&'a self, _arg_input: &'a [[i32; 3]; 2], _arg_repeated: &'a mut [[i32; 3]; 2]) -> binder::BoxFuture<'a, binder::Result<[[i32; 3]; 2]>> {
+ fn r#Repeat2dInts<'a>(&'a self, _arg_input: &'a [[i32; 3]; 2], _arg_repeated: &'a mut [[i32; 3]; 2]) -> binder::BoxFuture<'a, binder::Result<[[i32; 3]; 2]>> {
let _aidl_data = match self.build_parcel_Repeat2dInts(_arg_input, _arg_repeated) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::Repeat2dInts, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#Repeat2dInts, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_Repeat2dInts(_arg_input, _arg_repeated, _aidl_reply)
}
)
}
- fn Repeat2dBinders<'a>(&'a self, _arg_input: &'a [[binder::SpIBinder; 3]; 2], _arg_repeated: &'a mut [[Option<binder::SpIBinder>; 3]; 2]) -> binder::BoxFuture<'a, binder::Result<[[binder::SpIBinder; 3]; 2]>> {
+ fn r#Repeat2dBinders<'a>(&'a self, _arg_input: &'a [[binder::SpIBinder; 3]; 2], _arg_repeated: &'a mut [[Option<binder::SpIBinder>; 3]; 2]) -> binder::BoxFuture<'a, binder::Result<[[binder::SpIBinder; 3]; 2]>> {
let _aidl_data = match self.build_parcel_Repeat2dBinders(_arg_input, _arg_repeated) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::Repeat2dBinders, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#Repeat2dBinders, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_Repeat2dBinders(_arg_input, _arg_repeated, _aidl_reply)
}
)
}
- fn Repeat2dParcelables<'a>(&'a self, _arg_input: &'a [[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2], _arg_repeated: &'a mut [[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2]) -> binder::BoxFuture<'a, binder::Result<[[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2]>> {
+ fn r#Repeat2dParcelables<'a>(&'a self, _arg_input: &'a [[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2], _arg_repeated: &'a mut [[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2]) -> binder::BoxFuture<'a, binder::Result<[[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2]>> {
let _aidl_data = match self.build_parcel_Repeat2dParcelables(_arg_input, _arg_repeated) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::Repeat2dParcelables, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#Repeat2dParcelables, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_Repeat2dParcelables(_arg_input, _arg_repeated, _aidl_reply)
}
@@ -794,21 +794,21 @@ pub mod IRepeatFixedSizeArray {
}
}
impl IRepeatFixedSizeArray for binder::binder_impl::Binder<BnRepeatFixedSizeArray> {
- fn RepeatBytes(&self, _arg_input: &[u8; 3], _arg_repeated: &mut [u8; 3]) -> binder::Result<[u8; 3]> { self.0.RepeatBytes(_arg_input, _arg_repeated) }
- fn RepeatInts(&self, _arg_input: &[i32; 3], _arg_repeated: &mut [i32; 3]) -> binder::Result<[i32; 3]> { self.0.RepeatInts(_arg_input, _arg_repeated) }
- fn RepeatBinders(&self, _arg_input: &[binder::SpIBinder; 3], _arg_repeated: &mut [Option<binder::SpIBinder>; 3]) -> binder::Result<[binder::SpIBinder; 3]> { self.0.RepeatBinders(_arg_input, _arg_repeated) }
- fn RepeatParcelables(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3], _arg_repeated: &mut [crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]) -> binder::Result<[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]> { self.0.RepeatParcelables(_arg_input, _arg_repeated) }
- fn Repeat2dBytes(&self, _arg_input: &[[u8; 3]; 2], _arg_repeated: &mut [[u8; 3]; 2]) -> binder::Result<[[u8; 3]; 2]> { self.0.Repeat2dBytes(_arg_input, _arg_repeated) }
- fn Repeat2dInts(&self, _arg_input: &[[i32; 3]; 2], _arg_repeated: &mut [[i32; 3]; 2]) -> binder::Result<[[i32; 3]; 2]> { self.0.Repeat2dInts(_arg_input, _arg_repeated) }
- fn Repeat2dBinders(&self, _arg_input: &[[binder::SpIBinder; 3]; 2], _arg_repeated: &mut [[Option<binder::SpIBinder>; 3]; 2]) -> binder::Result<[[binder::SpIBinder; 3]; 2]> { self.0.Repeat2dBinders(_arg_input, _arg_repeated) }
- fn Repeat2dParcelables(&self, _arg_input: &[[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2], _arg_repeated: &mut [[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2]) -> binder::Result<[[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2]> { self.0.Repeat2dParcelables(_arg_input, _arg_repeated) }
+ fn r#RepeatBytes(&self, _arg_input: &[u8; 3], _arg_repeated: &mut [u8; 3]) -> binder::Result<[u8; 3]> { self.0.r#RepeatBytes(_arg_input, _arg_repeated) }
+ fn r#RepeatInts(&self, _arg_input: &[i32; 3], _arg_repeated: &mut [i32; 3]) -> binder::Result<[i32; 3]> { self.0.r#RepeatInts(_arg_input, _arg_repeated) }
+ fn r#RepeatBinders(&self, _arg_input: &[binder::SpIBinder; 3], _arg_repeated: &mut [Option<binder::SpIBinder>; 3]) -> binder::Result<[binder::SpIBinder; 3]> { self.0.r#RepeatBinders(_arg_input, _arg_repeated) }
+ fn r#RepeatParcelables(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3], _arg_repeated: &mut [crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]) -> binder::Result<[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]> { self.0.r#RepeatParcelables(_arg_input, _arg_repeated) }
+ fn r#Repeat2dBytes(&self, _arg_input: &[[u8; 3]; 2], _arg_repeated: &mut [[u8; 3]; 2]) -> binder::Result<[[u8; 3]; 2]> { self.0.r#Repeat2dBytes(_arg_input, _arg_repeated) }
+ fn r#Repeat2dInts(&self, _arg_input: &[[i32; 3]; 2], _arg_repeated: &mut [[i32; 3]; 2]) -> binder::Result<[[i32; 3]; 2]> { self.0.r#Repeat2dInts(_arg_input, _arg_repeated) }
+ fn r#Repeat2dBinders(&self, _arg_input: &[[binder::SpIBinder; 3]; 2], _arg_repeated: &mut [[Option<binder::SpIBinder>; 3]; 2]) -> binder::Result<[[binder::SpIBinder; 3]; 2]> { self.0.r#Repeat2dBinders(_arg_input, _arg_repeated) }
+ fn r#Repeat2dParcelables(&self, _arg_input: &[[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2], _arg_repeated: &mut [[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2]) -> binder::Result<[[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2]> { self.0.r#Repeat2dParcelables(_arg_input, _arg_repeated) }
}
fn on_transact(_aidl_service: &dyn IRepeatFixedSizeArray, _aidl_code: binder::binder_impl::TransactionCode, _aidl_data: &binder::binder_impl::BorrowedParcel<'_>, _aidl_reply: &mut binder::binder_impl::BorrowedParcel<'_>) -> std::result::Result<(), binder::StatusCode> {
match _aidl_code {
- transactions::RepeatBytes => {
+ transactions::r#RepeatBytes => {
let _arg_input: [u8; 3] = _aidl_data.read()?;
let mut _arg_repeated: [u8; 3] = Default::default();
- let _aidl_return = _aidl_service.RepeatBytes(&_arg_input, &mut _arg_repeated);
+ let _aidl_return = _aidl_service.r#RepeatBytes(&_arg_input, &mut _arg_repeated);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -819,10 +819,10 @@ pub mod IRepeatFixedSizeArray {
}
Ok(())
}
- transactions::RepeatInts => {
+ transactions::r#RepeatInts => {
let _arg_input: [i32; 3] = _aidl_data.read()?;
let mut _arg_repeated: [i32; 3] = Default::default();
- let _aidl_return = _aidl_service.RepeatInts(&_arg_input, &mut _arg_repeated);
+ let _aidl_return = _aidl_service.r#RepeatInts(&_arg_input, &mut _arg_repeated);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -833,10 +833,10 @@ pub mod IRepeatFixedSizeArray {
}
Ok(())
}
- transactions::RepeatBinders => {
+ transactions::r#RepeatBinders => {
let _arg_input: [binder::SpIBinder; 3] = _aidl_data.read()?;
let mut _arg_repeated: [Option<binder::SpIBinder>; 3] = Default::default();
- let _aidl_return = _aidl_service.RepeatBinders(&_arg_input, &mut _arg_repeated);
+ let _aidl_return = _aidl_service.r#RepeatBinders(&_arg_input, &mut _arg_repeated);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -847,10 +847,10 @@ pub mod IRepeatFixedSizeArray {
}
Ok(())
}
- transactions::RepeatParcelables => {
+ transactions::r#RepeatParcelables => {
let _arg_input: [crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3] = _aidl_data.read()?;
let mut _arg_repeated: [crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3] = Default::default();
- let _aidl_return = _aidl_service.RepeatParcelables(&_arg_input, &mut _arg_repeated);
+ let _aidl_return = _aidl_service.r#RepeatParcelables(&_arg_input, &mut _arg_repeated);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -861,10 +861,10 @@ pub mod IRepeatFixedSizeArray {
}
Ok(())
}
- transactions::Repeat2dBytes => {
+ transactions::r#Repeat2dBytes => {
let _arg_input: [[u8; 3]; 2] = _aidl_data.read()?;
let mut _arg_repeated: [[u8; 3]; 2] = Default::default();
- let _aidl_return = _aidl_service.Repeat2dBytes(&_arg_input, &mut _arg_repeated);
+ let _aidl_return = _aidl_service.r#Repeat2dBytes(&_arg_input, &mut _arg_repeated);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -875,10 +875,10 @@ pub mod IRepeatFixedSizeArray {
}
Ok(())
}
- transactions::Repeat2dInts => {
+ transactions::r#Repeat2dInts => {
let _arg_input: [[i32; 3]; 2] = _aidl_data.read()?;
let mut _arg_repeated: [[i32; 3]; 2] = Default::default();
- let _aidl_return = _aidl_service.Repeat2dInts(&_arg_input, &mut _arg_repeated);
+ let _aidl_return = _aidl_service.r#Repeat2dInts(&_arg_input, &mut _arg_repeated);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -889,10 +889,10 @@ pub mod IRepeatFixedSizeArray {
}
Ok(())
}
- transactions::Repeat2dBinders => {
+ transactions::r#Repeat2dBinders => {
let _arg_input: [[binder::SpIBinder; 3]; 2] = _aidl_data.read()?;
let mut _arg_repeated: [[Option<binder::SpIBinder>; 3]; 2] = Default::default();
- let _aidl_return = _aidl_service.Repeat2dBinders(&_arg_input, &mut _arg_repeated);
+ let _aidl_return = _aidl_service.r#Repeat2dBinders(&_arg_input, &mut _arg_repeated);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -903,10 +903,10 @@ pub mod IRepeatFixedSizeArray {
}
Ok(())
}
- transactions::Repeat2dParcelables => {
+ transactions::r#Repeat2dParcelables => {
let _arg_input: [[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2] = _aidl_data.read()?;
let mut _arg_repeated: [[crate::mangled::_7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable; 3]; 2] = Default::default();
- let _aidl_return = _aidl_service.Repeat2dParcelables(&_arg_input, &mut _arg_repeated);
+ let _aidl_return = _aidl_service.r#Repeat2dParcelables(&_arg_input, &mut _arg_repeated);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -921,68 +921,68 @@ pub mod IRepeatFixedSizeArray {
}
}
}
-pub mod ByteEnum {
+pub mod r#ByteEnum {
#![allow(non_upper_case_globals)]
use binder::declare_binder_enum;
declare_binder_enum! {
- ByteEnum : [i8; 1] {
- A = 0,
+ r#ByteEnum : [i8; 1] {
+ r#A = 0,
}
}
}
-pub mod IntEnum {
+pub mod r#IntEnum {
#![allow(non_upper_case_globals)]
use binder::declare_binder_enum;
declare_binder_enum! {
- IntEnum : [i32; 1] {
- A = 0,
+ r#IntEnum : [i32; 1] {
+ r#A = 0,
}
}
}
-pub mod LongEnum {
+pub mod r#LongEnum {
#![allow(non_upper_case_globals)]
use binder::declare_binder_enum;
declare_binder_enum! {
- LongEnum : [i64; 1] {
- A = 0,
+ r#LongEnum : [i64; 1] {
+ r#A = 0,
}
}
}
-pub mod IntParcelable {
+pub mod r#IntParcelable {
#[derive(Debug, Clone, Copy, PartialEq)]
- pub struct IntParcelable {
- pub value: i32,
+ pub struct r#IntParcelable {
+ pub r#value: i32,
}
- impl Default for IntParcelable {
+ impl Default for r#IntParcelable {
fn default() -> Self {
Self {
- value: 0,
+ r#value: 0,
}
}
}
- impl binder::Parcelable for IntParcelable {
+ impl binder::Parcelable for r#IntParcelable {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_write(|subparcel| {
- subparcel.write(&self.value)?;
+ subparcel.write(&self.r#value)?;
Ok(())
})
}
fn read_from_parcel(&mut self, parcel: &binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_read(|subparcel| {
if subparcel.has_more_data() {
- self.value = subparcel.read()?;
+ self.r#value = subparcel.read()?;
}
Ok(())
})
}
}
- binder::impl_serialize_for_parcelable!(IntParcelable);
- binder::impl_deserialize_for_parcelable!(IntParcelable);
- impl binder::binder_impl::ParcelableMetadata for IntParcelable {
+ binder::impl_serialize_for_parcelable!(r#IntParcelable);
+ binder::impl_deserialize_for_parcelable!(r#IntParcelable);
+ impl binder::binder_impl::ParcelableMetadata for r#IntParcelable {
fn get_descriptor() -> &'static str { "android.aidl.fixedsizearray.FixedSizeArrayExample.IntParcelable" }
}
}
-pub mod IEmptyInterface {
+pub mod r#IEmptyInterface {
#![allow(non_upper_case_globals)]
#![allow(non_snake_case)]
#[allow(unused_imports)] use binder::binder_impl::IBinderInternal;
@@ -1060,11 +1060,11 @@ pub mod IEmptyInterface {
}
}
pub(crate) mod mangled {
- pub use super::FixedSizeArrayExample as _7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample;
- pub use super::IRepeatFixedSizeArray::IRepeatFixedSizeArray as _7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_21_IRepeatFixedSizeArray;
- pub use super::ByteEnum::ByteEnum as _7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_8_ByteEnum;
- pub use super::IntEnum::IntEnum as _7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_7_IntEnum;
- pub use super::LongEnum::LongEnum as _7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_8_LongEnum;
- pub use super::IntParcelable::IntParcelable as _7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable;
- pub use super::IEmptyInterface::IEmptyInterface as _7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_15_IEmptyInterface;
+ pub use super::r#FixedSizeArrayExample as _7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample;
+ pub use super::r#IRepeatFixedSizeArray::r#IRepeatFixedSizeArray as _7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_21_IRepeatFixedSizeArray;
+ pub use super::r#ByteEnum::r#ByteEnum as _7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_8_ByteEnum;
+ pub use super::r#IntEnum::r#IntEnum as _7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_7_IntEnum;
+ pub use super::r#LongEnum::r#LongEnum as _7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_8_LongEnum;
+ pub use super::r#IntParcelable::r#IntParcelable as _7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_13_IntParcelable;
+ pub use super::r#IEmptyInterface::r#IEmptyInterface as _7_android_4_aidl_14_fixedsizearray_21_FixedSizeArrayExample_15_IEmptyInterface;
}
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ArrayOfInterfaces.cpp b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ArrayOfInterfaces.cpp
new file mode 100644
index 00000000..578d4375
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ArrayOfInterfaces.cpp
@@ -0,0 +1 @@
+// This file is intentionally left blank as placeholder for building an analyzer.
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ArrayOfInterfaces.cpp.d b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ArrayOfInterfaces.cpp.d
new file mode 100644
index 00000000..926b7a93
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ArrayOfInterfaces.cpp.d
@@ -0,0 +1,2 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ArrayOfInterfaces.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/ArrayOfInterfaces.aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/BackendType.cpp b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/BackendType.cpp
new file mode 100644
index 00000000..578d4375
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/BackendType.cpp
@@ -0,0 +1 @@
+// This file is intentionally left blank as placeholder for building an analyzer.
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/BackendType.cpp.d b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/BackendType.cpp.d
new file mode 100644
index 00000000..a8eb8f45
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/BackendType.cpp.d
@@ -0,0 +1,2 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/BackendType.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/BackendType.aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ByteEnum.cpp b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ByteEnum.cpp
new file mode 100644
index 00000000..578d4375
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ByteEnum.cpp
@@ -0,0 +1 @@
+// This file is intentionally left blank as placeholder for building an analyzer.
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ByteEnum.cpp.d b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ByteEnum.cpp.d
new file mode 100644
index 00000000..dc5cd105
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ByteEnum.cpp.d
@@ -0,0 +1,2 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ByteEnum.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/ByteEnum.aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/CircularParcelable.cpp b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/CircularParcelable.cpp
new file mode 100644
index 00000000..578d4375
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/CircularParcelable.cpp
@@ -0,0 +1 @@
+// This file is intentionally left blank as placeholder for building an analyzer.
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/CircularParcelable.cpp.d b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/CircularParcelable.cpp.d
new file mode 100644
index 00000000..ca732bc1
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/CircularParcelable.cpp.d
@@ -0,0 +1,16 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/CircularParcelable.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/CircularParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ITestService.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ByteEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/IntEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/LongEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/INamedCallback.aidl \
+ system/tools/aidl/tests/android/aidl/tests/StructuredParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/extension/ExtendableParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/RecursiveList.aidl \
+ system/tools/aidl/tests/android/aidl/tests/IOldName.aidl \
+ system/tools/aidl/tests/android/aidl/tests/INewName.aidl \
+ system/tools/aidl/tests/android/aidl/tests/Union.aidl \
+ system/tools/aidl/tests/android/aidl/tests/BackendType.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ICircular.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ConstantExpressionEnum.aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ConstantExpressionEnum.cpp b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ConstantExpressionEnum.cpp
new file mode 100644
index 00000000..578d4375
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ConstantExpressionEnum.cpp
@@ -0,0 +1 @@
+// This file is intentionally left blank as placeholder for building an analyzer.
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ConstantExpressionEnum.cpp.d b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ConstantExpressionEnum.cpp.d
new file mode 100644
index 00000000..7c62e125
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ConstantExpressionEnum.cpp.d
@@ -0,0 +1,2 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ConstantExpressionEnum.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/ConstantExpressionEnum.aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/DeprecatedEnum.cpp b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/DeprecatedEnum.cpp
new file mode 100644
index 00000000..578d4375
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/DeprecatedEnum.cpp
@@ -0,0 +1 @@
+// This file is intentionally left blank as placeholder for building an analyzer.
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/DeprecatedEnum.cpp.d b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/DeprecatedEnum.cpp.d
new file mode 100644
index 00000000..13e605a5
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/DeprecatedEnum.cpp.d
@@ -0,0 +1,2 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/DeprecatedEnum.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/DeprecatedEnum.aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/DeprecatedParcelable.cpp b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/DeprecatedParcelable.cpp
new file mode 100644
index 00000000..578d4375
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/DeprecatedParcelable.cpp
@@ -0,0 +1 @@
+// This file is intentionally left blank as placeholder for building an analyzer.
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/DeprecatedParcelable.cpp.d b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/DeprecatedParcelable.cpp.d
new file mode 100644
index 00000000..cb06e1fb
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/DeprecatedParcelable.cpp.d
@@ -0,0 +1,2 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/DeprecatedParcelable.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/DeprecatedParcelable.aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/FixedSize.cpp b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/FixedSize.cpp
new file mode 100644
index 00000000..578d4375
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/FixedSize.cpp
@@ -0,0 +1 @@
+// This file is intentionally left blank as placeholder for building an analyzer.
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/FixedSize.cpp.d b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/FixedSize.cpp.d
new file mode 100644
index 00000000..6f367643
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/FixedSize.cpp.d
@@ -0,0 +1,3 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/FixedSize.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/FixedSize.aidl \
+ system/tools/aidl/tests/android/aidl/tests/LongEnum.aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/GenericStructuredParcelable.cpp b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/GenericStructuredParcelable.cpp
new file mode 100644
index 00000000..578d4375
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/GenericStructuredParcelable.cpp
@@ -0,0 +1 @@
+// This file is intentionally left blank as placeholder for building an analyzer.
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/GenericStructuredParcelable.cpp.d b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/GenericStructuredParcelable.cpp.d
new file mode 100644
index 00000000..bc6d54d6
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/GenericStructuredParcelable.cpp.d
@@ -0,0 +1,2 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/GenericStructuredParcelable.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/GenericStructuredParcelable.aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ICircular.cpp b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ICircular.cpp
new file mode 100644
index 00000000..2035708d
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ICircular.cpp
@@ -0,0 +1,53 @@
+#include <iostream>
+#include <binder/Parcel.h>
+#include <android/binder_to_string.h>
+#include <android/aidl/tests/ICircular.h>
+namespace {
+android::status_t analyzeICircular(uint32_t _aidl_code, const android::Parcel& _aidl_data, const android::Parcel& _aidl_reply) {
+ android::status_t _aidl_ret_status;
+ switch(_aidl_code) {
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 0:
+ {
+ std::cout << "ICircular.GetTestService()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ICircular")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::android::sp<::android::aidl::tests::ITestService> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readNullableStrongBinder(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ } while(false);
+ std::cout << " arguments: " << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ default:
+ {
+ std::cout << " Transaction code " << _aidl_code << " not known." << std::endl;
+ _aidl_ret_status = android::UNKNOWN_TRANSACTION;
+ }
+ }
+ return _aidl_ret_status;
+ // To prevent unused variable warnings
+ (void)_aidl_ret_status; (void)_aidl_data; (void)_aidl_reply;
+}
+
+} // namespace
+
+#include <Analyzer.h>
+using android::aidl::Analyzer;
+__attribute__((constructor)) static void addAnalyzer() {
+ Analyzer::installAnalyzer(std::make_unique<Analyzer>("android.aidl.tests.ICircular", "ICircular", &analyzeICircular));
+}
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ICircular.cpp.d b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ICircular.cpp.d
new file mode 100644
index 00000000..caefda2f
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ICircular.cpp.d
@@ -0,0 +1,16 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ICircular.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/ICircular.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ITestService.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ByteEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/IntEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/LongEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/INamedCallback.aidl \
+ system/tools/aidl/tests/android/aidl/tests/StructuredParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/extension/ExtendableParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/RecursiveList.aidl \
+ system/tools/aidl/tests/android/aidl/tests/IOldName.aidl \
+ system/tools/aidl/tests/android/aidl/tests/INewName.aidl \
+ system/tools/aidl/tests/android/aidl/tests/Union.aidl \
+ system/tools/aidl/tests/android/aidl/tests/BackendType.aidl \
+ system/tools/aidl/tests/android/aidl/tests/CircularParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ConstantExpressionEnum.aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/IDeprecated.cpp b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/IDeprecated.cpp
new file mode 100644
index 00000000..2296605e
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/IDeprecated.cpp
@@ -0,0 +1,26 @@
+#include <iostream>
+#include <binder/Parcel.h>
+#include <android/binder_to_string.h>
+#include <android/aidl/tests/IDeprecated.h>
+namespace {
+android::status_t analyzeIDeprecated(uint32_t _aidl_code, const android::Parcel& _aidl_data, const android::Parcel& _aidl_reply) {
+ android::status_t _aidl_ret_status;
+ switch(_aidl_code) {
+ default:
+ {
+ std::cout << " Transaction code " << _aidl_code << " not known." << std::endl;
+ _aidl_ret_status = android::UNKNOWN_TRANSACTION;
+ }
+ }
+ return _aidl_ret_status;
+ // To prevent unused variable warnings
+ (void)_aidl_ret_status; (void)_aidl_data; (void)_aidl_reply;
+}
+
+} // namespace
+
+#include <Analyzer.h>
+using android::aidl::Analyzer;
+__attribute__((constructor)) static void addAnalyzer() {
+ Analyzer::installAnalyzer(std::make_unique<Analyzer>("android.aidl.tests.IDeprecated", "IDeprecated", &analyzeIDeprecated));
+}
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/IDeprecated.cpp.d b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/IDeprecated.cpp.d
new file mode 100644
index 00000000..afc741e1
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/IDeprecated.cpp.d
@@ -0,0 +1,2 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/IDeprecated.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/IDeprecated.aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/INamedCallback.cpp b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/INamedCallback.cpp
new file mode 100644
index 00000000..b94c2fc8
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/INamedCallback.cpp
@@ -0,0 +1,53 @@
+#include <iostream>
+#include <binder/Parcel.h>
+#include <android/binder_to_string.h>
+#include <android/aidl/tests/INamedCallback.h>
+namespace {
+android::status_t analyzeINamedCallback(uint32_t _aidl_code, const android::Parcel& _aidl_data, const android::Parcel& _aidl_reply) {
+ android::status_t _aidl_ret_status;
+ switch(_aidl_code) {
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 0:
+ {
+ std::cout << "INamedCallback.GetName()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.INamedCallback")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::android::String16 _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readString16(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ } while(false);
+ std::cout << " arguments: " << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ default:
+ {
+ std::cout << " Transaction code " << _aidl_code << " not known." << std::endl;
+ _aidl_ret_status = android::UNKNOWN_TRANSACTION;
+ }
+ }
+ return _aidl_ret_status;
+ // To prevent unused variable warnings
+ (void)_aidl_ret_status; (void)_aidl_data; (void)_aidl_reply;
+}
+
+} // namespace
+
+#include <Analyzer.h>
+using android::aidl::Analyzer;
+__attribute__((constructor)) static void addAnalyzer() {
+ Analyzer::installAnalyzer(std::make_unique<Analyzer>("android.aidl.tests.INamedCallback", "INamedCallback", &analyzeINamedCallback));
+}
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/INamedCallback.cpp.d b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/INamedCallback.cpp.d
new file mode 100644
index 00000000..18e60333
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/INamedCallback.cpp.d
@@ -0,0 +1,2 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/INamedCallback.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/INamedCallback.aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/INewName.cpp b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/INewName.cpp
new file mode 100644
index 00000000..48023fed
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/INewName.cpp
@@ -0,0 +1,53 @@
+#include <iostream>
+#include <binder/Parcel.h>
+#include <android/binder_to_string.h>
+#include <android/aidl/tests/INewName.h>
+namespace {
+android::status_t analyzeINewName(uint32_t _aidl_code, const android::Parcel& _aidl_data, const android::Parcel& _aidl_reply) {
+ android::status_t _aidl_ret_status;
+ switch(_aidl_code) {
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 0:
+ {
+ std::cout << "INewName.RealName()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.IOldName")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::android::String16 _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readString16(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ } while(false);
+ std::cout << " arguments: " << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ default:
+ {
+ std::cout << " Transaction code " << _aidl_code << " not known." << std::endl;
+ _aidl_ret_status = android::UNKNOWN_TRANSACTION;
+ }
+ }
+ return _aidl_ret_status;
+ // To prevent unused variable warnings
+ (void)_aidl_ret_status; (void)_aidl_data; (void)_aidl_reply;
+}
+
+} // namespace
+
+#include <Analyzer.h>
+using android::aidl::Analyzer;
+__attribute__((constructor)) static void addAnalyzer() {
+ Analyzer::installAnalyzer(std::make_unique<Analyzer>("android.aidl.tests.INewName", "INewName", &analyzeINewName));
+}
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/INewName.cpp.d b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/INewName.cpp.d
new file mode 100644
index 00000000..54b0be57
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/INewName.cpp.d
@@ -0,0 +1,2 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/INewName.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/INewName.aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/IOldName.cpp b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/IOldName.cpp
new file mode 100644
index 00000000..12cac6d0
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/IOldName.cpp
@@ -0,0 +1,53 @@
+#include <iostream>
+#include <binder/Parcel.h>
+#include <android/binder_to_string.h>
+#include <android/aidl/tests/IOldName.h>
+namespace {
+android::status_t analyzeIOldName(uint32_t _aidl_code, const android::Parcel& _aidl_data, const android::Parcel& _aidl_reply) {
+ android::status_t _aidl_ret_status;
+ switch(_aidl_code) {
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 0:
+ {
+ std::cout << "IOldName.RealName()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.IOldName")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::android::String16 _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readString16(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ } while(false);
+ std::cout << " arguments: " << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ default:
+ {
+ std::cout << " Transaction code " << _aidl_code << " not known." << std::endl;
+ _aidl_ret_status = android::UNKNOWN_TRANSACTION;
+ }
+ }
+ return _aidl_ret_status;
+ // To prevent unused variable warnings
+ (void)_aidl_ret_status; (void)_aidl_data; (void)_aidl_reply;
+}
+
+} // namespace
+
+#include <Analyzer.h>
+using android::aidl::Analyzer;
+__attribute__((constructor)) static void addAnalyzer() {
+ Analyzer::installAnalyzer(std::make_unique<Analyzer>("android.aidl.tests.IOldName", "IOldName", &analyzeIOldName));
+}
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/IOldName.cpp.d b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/IOldName.cpp.d
new file mode 100644
index 00000000..d09b11f5
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/IOldName.cpp.d
@@ -0,0 +1,2 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/IOldName.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/IOldName.aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ITestService.cpp b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ITestService.cpp
new file mode 100644
index 00000000..4dffe40c
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ITestService.cpp
@@ -0,0 +1,2684 @@
+#include <iostream>
+#include <binder/Parcel.h>
+#include <android/binder_to_string.h>
+#include <android/aidl/tests/ITestService.h>
+namespace {
+android::status_t analyzeITestService(uint32_t _aidl_code, const android::Parcel& _aidl_data, const android::Parcel& _aidl_reply) {
+ android::status_t _aidl_ret_status;
+ switch(_aidl_code) {
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 0:
+ {
+ std::cout << "ITestService.UnimplementedMethod()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ int32_t in_arg;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ int32_t _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readInt32(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readInt32(&in_arg);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument arg from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " arg: " << ::android::internal::ToString(in_arg) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 1:
+ {
+ std::cout << "ITestService.Deprecated()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ do { // Single-pass loop to break if argument reading fails
+ } while(false);
+ std::cout << " arguments: " << std::endl;
+ std::cout << " return: void" << std::endl;
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 2:
+ {
+ std::cout << "ITestService.TestOneway()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ do { // Single-pass loop to break if argument reading fails
+ } while(false);
+ std::cout << " arguments: " << std::endl;
+ std::cout << " return: void" << std::endl;
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 3:
+ {
+ std::cout << "ITestService.RepeatBoolean()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ bool in_token;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ bool _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readBool(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readBool(&in_token);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument token from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " token: " << ::android::internal::ToString(in_token) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 4:
+ {
+ std::cout << "ITestService.RepeatByte()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ int8_t in_token;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ int8_t _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readByte(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readByte(&in_token);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument token from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " token: " << ::android::internal::ToString(in_token) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 5:
+ {
+ std::cout << "ITestService.RepeatChar()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ char16_t in_token;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ char16_t _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readChar(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readChar(&in_token);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument token from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " token: " << ::android::internal::ToString(in_token) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 6:
+ {
+ std::cout << "ITestService.RepeatInt()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ int32_t in_token;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ int32_t _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readInt32(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readInt32(&in_token);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument token from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " token: " << ::android::internal::ToString(in_token) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 7:
+ {
+ std::cout << "ITestService.RepeatLong()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ int64_t in_token;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ int64_t _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readInt64(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readInt64(&in_token);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument token from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " token: " << ::android::internal::ToString(in_token) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 8:
+ {
+ std::cout << "ITestService.RepeatFloat()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ float in_token;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ float _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readFloat(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readFloat(&in_token);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument token from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " token: " << ::android::internal::ToString(in_token) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 9:
+ {
+ std::cout << "ITestService.RepeatDouble()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ double in_token;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ double _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readDouble(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readDouble(&in_token);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument token from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " token: " << ::android::internal::ToString(in_token) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 10:
+ {
+ std::cout << "ITestService.RepeatString()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::android::String16 in_token;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::android::String16 _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readString16(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readString16(&in_token);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument token from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " token: " << ::android::internal::ToString(in_token) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 11:
+ {
+ std::cout << "ITestService.RepeatByteEnum()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::android::aidl::tests::ByteEnum in_token;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::android::aidl::tests::ByteEnum _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readByte(reinterpret_cast<int8_t *>(&_aidl_return));
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readByte(reinterpret_cast<int8_t *>(&in_token));
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument token from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " token: " << ::android::internal::ToString(in_token) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 12:
+ {
+ std::cout << "ITestService.RepeatIntEnum()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::android::aidl::tests::IntEnum in_token;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::android::aidl::tests::IntEnum _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readInt32(reinterpret_cast<int32_t *>(&_aidl_return));
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readInt32(reinterpret_cast<int32_t *>(&in_token));
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument token from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " token: " << ::android::internal::ToString(in_token) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 13:
+ {
+ std::cout << "ITestService.RepeatLongEnum()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::android::aidl::tests::LongEnum in_token;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::android::aidl::tests::LongEnum _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readInt64(reinterpret_cast<int64_t *>(&_aidl_return));
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readInt64(reinterpret_cast<int64_t *>(&in_token));
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument token from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " token: " << ::android::internal::ToString(in_token) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 14:
+ {
+ std::cout << "ITestService.ReverseBoolean()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::vector<bool> in_input;
+ ::std::vector<bool> out_repeated;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::std::vector<bool> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readBoolVector(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readBoolVector(&in_input);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument input from Parcel." << std::endl;
+ break;
+ }
+ _aidl_ret_status = _aidl_data.readBoolVector(&out_repeated);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument repeated from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " input: " << ::android::internal::ToString(in_input) << std::endl;
+ std::cout << " repeated: " << ::android::internal::ToString(out_repeated) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 15:
+ {
+ std::cout << "ITestService.ReverseByte()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::vector<uint8_t> in_input;
+ ::std::vector<uint8_t> out_repeated;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::std::vector<uint8_t> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readByteVector(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readByteVector(&in_input);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument input from Parcel." << std::endl;
+ break;
+ }
+ _aidl_ret_status = _aidl_data.readByteVector(&out_repeated);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument repeated from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " input: " << ::android::internal::ToString(in_input) << std::endl;
+ std::cout << " repeated: " << ::android::internal::ToString(out_repeated) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 16:
+ {
+ std::cout << "ITestService.ReverseChar()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::vector<char16_t> in_input;
+ ::std::vector<char16_t> out_repeated;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::std::vector<char16_t> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readCharVector(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readCharVector(&in_input);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument input from Parcel." << std::endl;
+ break;
+ }
+ _aidl_ret_status = _aidl_data.readCharVector(&out_repeated);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument repeated from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " input: " << ::android::internal::ToString(in_input) << std::endl;
+ std::cout << " repeated: " << ::android::internal::ToString(out_repeated) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 17:
+ {
+ std::cout << "ITestService.ReverseInt()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::vector<int32_t> in_input;
+ ::std::vector<int32_t> out_repeated;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::std::vector<int32_t> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readInt32Vector(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readInt32Vector(&in_input);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument input from Parcel." << std::endl;
+ break;
+ }
+ _aidl_ret_status = _aidl_data.readInt32Vector(&out_repeated);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument repeated from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " input: " << ::android::internal::ToString(in_input) << std::endl;
+ std::cout << " repeated: " << ::android::internal::ToString(out_repeated) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 18:
+ {
+ std::cout << "ITestService.ReverseLong()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::vector<int64_t> in_input;
+ ::std::vector<int64_t> out_repeated;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::std::vector<int64_t> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readInt64Vector(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readInt64Vector(&in_input);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument input from Parcel." << std::endl;
+ break;
+ }
+ _aidl_ret_status = _aidl_data.readInt64Vector(&out_repeated);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument repeated from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " input: " << ::android::internal::ToString(in_input) << std::endl;
+ std::cout << " repeated: " << ::android::internal::ToString(out_repeated) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 19:
+ {
+ std::cout << "ITestService.ReverseFloat()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::vector<float> in_input;
+ ::std::vector<float> out_repeated;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::std::vector<float> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readFloatVector(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readFloatVector(&in_input);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument input from Parcel." << std::endl;
+ break;
+ }
+ _aidl_ret_status = _aidl_data.readFloatVector(&out_repeated);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument repeated from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " input: " << ::android::internal::ToString(in_input) << std::endl;
+ std::cout << " repeated: " << ::android::internal::ToString(out_repeated) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 20:
+ {
+ std::cout << "ITestService.ReverseDouble()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::vector<double> in_input;
+ ::std::vector<double> out_repeated;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::std::vector<double> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readDoubleVector(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readDoubleVector(&in_input);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument input from Parcel." << std::endl;
+ break;
+ }
+ _aidl_ret_status = _aidl_data.readDoubleVector(&out_repeated);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument repeated from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " input: " << ::android::internal::ToString(in_input) << std::endl;
+ std::cout << " repeated: " << ::android::internal::ToString(out_repeated) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 21:
+ {
+ std::cout << "ITestService.ReverseString()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::vector<::android::String16> in_input;
+ ::std::vector<::android::String16> out_repeated;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::std::vector<::android::String16> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readString16Vector(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readString16Vector(&in_input);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument input from Parcel." << std::endl;
+ break;
+ }
+ _aidl_ret_status = _aidl_data.readString16Vector(&out_repeated);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument repeated from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " input: " << ::android::internal::ToString(in_input) << std::endl;
+ std::cout << " repeated: " << ::android::internal::ToString(out_repeated) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 22:
+ {
+ std::cout << "ITestService.ReverseByteEnum()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::vector<::android::aidl::tests::ByteEnum> in_input;
+ ::std::vector<::android::aidl::tests::ByteEnum> out_repeated;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::std::vector<::android::aidl::tests::ByteEnum> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readEnumVector(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readEnumVector(&in_input);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument input from Parcel." << std::endl;
+ break;
+ }
+ _aidl_ret_status = _aidl_data.readEnumVector(&out_repeated);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument repeated from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " input: " << ::android::internal::ToString(in_input) << std::endl;
+ std::cout << " repeated: " << ::android::internal::ToString(out_repeated) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 23:
+ {
+ std::cout << "ITestService.ReverseIntEnum()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::vector<::android::aidl::tests::IntEnum> in_input;
+ ::std::vector<::android::aidl::tests::IntEnum> out_repeated;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::std::vector<::android::aidl::tests::IntEnum> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readEnumVector(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readEnumVector(&in_input);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument input from Parcel." << std::endl;
+ break;
+ }
+ _aidl_ret_status = _aidl_data.readEnumVector(&out_repeated);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument repeated from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " input: " << ::android::internal::ToString(in_input) << std::endl;
+ std::cout << " repeated: " << ::android::internal::ToString(out_repeated) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 24:
+ {
+ std::cout << "ITestService.ReverseLongEnum()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::vector<::android::aidl::tests::LongEnum> in_input;
+ ::std::vector<::android::aidl::tests::LongEnum> out_repeated;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::std::vector<::android::aidl::tests::LongEnum> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readEnumVector(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readEnumVector(&in_input);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument input from Parcel." << std::endl;
+ break;
+ }
+ _aidl_ret_status = _aidl_data.readEnumVector(&out_repeated);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument repeated from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " input: " << ::android::internal::ToString(in_input) << std::endl;
+ std::cout << " repeated: " << ::android::internal::ToString(out_repeated) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 25:
+ {
+ std::cout << "ITestService.GetOtherTestService()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::android::String16 in_name;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::android::sp<::android::aidl::tests::INamedCallback> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readStrongBinder(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readString16(&in_name);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument name from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " name: " << ::android::internal::ToString(in_name) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 26:
+ {
+ std::cout << "ITestService.SetOtherTestService()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::android::String16 in_name;
+ ::android::sp<::android::aidl::tests::INamedCallback> in_service;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ bool _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readBool(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readString16(&in_name);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument name from Parcel." << std::endl;
+ break;
+ }
+ _aidl_ret_status = _aidl_data.readStrongBinder(&in_service);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument service from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " name: " << ::android::internal::ToString(in_name) << std::endl;
+ std::cout << " service: " << ::android::internal::ToString(in_service) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 27:
+ {
+ std::cout << "ITestService.VerifyName()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::android::sp<::android::aidl::tests::INamedCallback> in_service;
+ ::android::String16 in_name;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ bool _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readBool(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readStrongBinder(&in_service);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument service from Parcel." << std::endl;
+ break;
+ }
+ _aidl_ret_status = _aidl_data.readString16(&in_name);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument name from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " service: " << ::android::internal::ToString(in_service) << std::endl;
+ std::cout << " name: " << ::android::internal::ToString(in_name) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 28:
+ {
+ std::cout << "ITestService.GetInterfaceArray()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::vector<::android::String16> in_names;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::std::vector<::android::sp<::android::aidl::tests::INamedCallback>> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readStrongBinderVector(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readString16Vector(&in_names);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument names from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " names: " << ::android::internal::ToString(in_names) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 29:
+ {
+ std::cout << "ITestService.VerifyNamesWithInterfaceArray()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::vector<::android::sp<::android::aidl::tests::INamedCallback>> in_services;
+ ::std::vector<::android::String16> in_names;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ bool _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readBool(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readStrongBinderVector(&in_services);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument services from Parcel." << std::endl;
+ break;
+ }
+ _aidl_ret_status = _aidl_data.readString16Vector(&in_names);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument names from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " services: " << ::android::internal::ToString(in_services) << std::endl;
+ std::cout << " names: " << ::android::internal::ToString(in_names) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 30:
+ {
+ std::cout << "ITestService.GetNullableInterfaceArray()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::optional<::std::vector<::std::optional<::android::String16>>> in_names;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::std::optional<::std::vector<::android::sp<::android::aidl::tests::INamedCallback>>> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readStrongBinderVector(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readString16Vector(&in_names);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument names from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " names: " << ::android::internal::ToString(in_names) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 31:
+ {
+ std::cout << "ITestService.VerifyNamesWithNullableInterfaceArray()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::optional<::std::vector<::android::sp<::android::aidl::tests::INamedCallback>>> in_services;
+ ::std::optional<::std::vector<::std::optional<::android::String16>>> in_names;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ bool _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readBool(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readStrongBinderVector(&in_services);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument services from Parcel." << std::endl;
+ break;
+ }
+ _aidl_ret_status = _aidl_data.readString16Vector(&in_names);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument names from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " services: " << ::android::internal::ToString(in_services) << std::endl;
+ std::cout << " names: " << ::android::internal::ToString(in_names) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 32:
+ {
+ std::cout << "ITestService.GetInterfaceList()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::optional<::std::vector<::std::optional<::android::String16>>> in_names;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::std::optional<::std::vector<::android::sp<::android::aidl::tests::INamedCallback>>> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readStrongBinderVector(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readString16Vector(&in_names);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument names from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " names: " << ::android::internal::ToString(in_names) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 33:
+ {
+ std::cout << "ITestService.VerifyNamesWithInterfaceList()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::optional<::std::vector<::android::sp<::android::aidl::tests::INamedCallback>>> in_services;
+ ::std::optional<::std::vector<::std::optional<::android::String16>>> in_names;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ bool _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readBool(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readStrongBinderVector(&in_services);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument services from Parcel." << std::endl;
+ break;
+ }
+ _aidl_ret_status = _aidl_data.readString16Vector(&in_names);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument names from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " services: " << ::android::internal::ToString(in_services) << std::endl;
+ std::cout << " names: " << ::android::internal::ToString(in_names) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 34:
+ {
+ std::cout << "ITestService.ReverseStringList()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::vector<::android::String16> in_input;
+ ::std::vector<::android::String16> out_repeated;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::std::vector<::android::String16> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readString16Vector(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readString16Vector(&in_input);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument input from Parcel." << std::endl;
+ break;
+ }
+ _aidl_ret_status = _aidl_data.readString16Vector(&out_repeated);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument repeated from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " input: " << ::android::internal::ToString(in_input) << std::endl;
+ std::cout << " repeated: " << ::android::internal::ToString(out_repeated) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 35:
+ {
+ std::cout << "ITestService.RepeatParcelFileDescriptor()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::android::os::ParcelFileDescriptor in_read;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::android::os::ParcelFileDescriptor _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readParcelable(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readParcelable(&in_read);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument read from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " read: " << ::android::internal::ToString(in_read) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 36:
+ {
+ std::cout << "ITestService.ReverseParcelFileDescriptorArray()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::vector<::android::os::ParcelFileDescriptor> in_input;
+ ::std::vector<::android::os::ParcelFileDescriptor> out_repeated;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::std::vector<::android::os::ParcelFileDescriptor> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readParcelableVector(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readParcelableVector(&in_input);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument input from Parcel." << std::endl;
+ break;
+ }
+ _aidl_ret_status = _aidl_data.readParcelableVector(&out_repeated);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument repeated from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " input: " << ::android::internal::ToString(in_input) << std::endl;
+ std::cout << " repeated: " << ::android::internal::ToString(out_repeated) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 37:
+ {
+ std::cout << "ITestService.ThrowServiceException()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ int32_t in_code;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readInt32(&in_code);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument code from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " code: " << ::android::internal::ToString(in_code) << std::endl;
+ std::cout << " return: void" << std::endl;
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 38:
+ {
+ std::cout << "ITestService.RepeatNullableIntArray()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::optional<::std::vector<int32_t>> in_input;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::std::optional<::std::vector<int32_t>> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readInt32Vector(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readInt32Vector(&in_input);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument input from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " input: " << ::android::internal::ToString(in_input) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 39:
+ {
+ std::cout << "ITestService.RepeatNullableByteEnumArray()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::optional<::std::vector<::android::aidl::tests::ByteEnum>> in_input;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::std::optional<::std::vector<::android::aidl::tests::ByteEnum>> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readEnumVector(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readEnumVector(&in_input);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument input from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " input: " << ::android::internal::ToString(in_input) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 40:
+ {
+ std::cout << "ITestService.RepeatNullableIntEnumArray()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::optional<::std::vector<::android::aidl::tests::IntEnum>> in_input;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::std::optional<::std::vector<::android::aidl::tests::IntEnum>> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readEnumVector(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readEnumVector(&in_input);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument input from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " input: " << ::android::internal::ToString(in_input) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 41:
+ {
+ std::cout << "ITestService.RepeatNullableLongEnumArray()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::optional<::std::vector<::android::aidl::tests::LongEnum>> in_input;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::std::optional<::std::vector<::android::aidl::tests::LongEnum>> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readEnumVector(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readEnumVector(&in_input);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument input from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " input: " << ::android::internal::ToString(in_input) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 42:
+ {
+ std::cout << "ITestService.RepeatNullableString()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::optional<::android::String16> in_input;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::std::optional<::android::String16> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readString16(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readString16(&in_input);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument input from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " input: " << ::android::internal::ToString(in_input) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 43:
+ {
+ std::cout << "ITestService.RepeatNullableStringList()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::optional<::std::vector<::std::optional<::android::String16>>> in_input;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::std::optional<::std::vector<::std::optional<::android::String16>>> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readString16Vector(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readString16Vector(&in_input);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument input from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " input: " << ::android::internal::ToString(in_input) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 44:
+ {
+ std::cout << "ITestService.RepeatNullableParcelable()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::optional<::android::aidl::tests::ITestService::Empty> in_input;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::std::optional<::android::aidl::tests::ITestService::Empty> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readParcelable(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readParcelable(&in_input);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument input from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " input: " << ::android::internal::ToString(in_input) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 45:
+ {
+ std::cout << "ITestService.RepeatNullableParcelableArray()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::optional<::std::vector<::std::optional<::android::aidl::tests::ITestService::Empty>>> in_input;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::std::optional<::std::vector<::std::optional<::android::aidl::tests::ITestService::Empty>>> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readParcelableVector(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readParcelableVector(&in_input);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument input from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " input: " << ::android::internal::ToString(in_input) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 46:
+ {
+ std::cout << "ITestService.RepeatNullableParcelableList()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::optional<::std::vector<::std::optional<::android::aidl::tests::ITestService::Empty>>> in_input;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::std::optional<::std::vector<::std::optional<::android::aidl::tests::ITestService::Empty>>> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readParcelableVector(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readParcelableVector(&in_input);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument input from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " input: " << ::android::internal::ToString(in_input) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 47:
+ {
+ std::cout << "ITestService.TakesAnIBinder()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::android::sp<::android::IBinder> in_input;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readStrongBinder(&in_input);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument input from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " input: " << ::android::internal::ToString(in_input) << std::endl;
+ std::cout << " return: void" << std::endl;
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 48:
+ {
+ std::cout << "ITestService.TakesANullableIBinder()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::android::sp<::android::IBinder> in_input;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readNullableStrongBinder(&in_input);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument input from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " input: " << ::android::internal::ToString(in_input) << std::endl;
+ std::cout << " return: void" << std::endl;
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 49:
+ {
+ std::cout << "ITestService.TakesAnIBinderList()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::vector<::android::sp<::android::IBinder>> in_input;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readStrongBinderVector(&in_input);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument input from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " input: " << ::android::internal::ToString(in_input) << std::endl;
+ std::cout << " return: void" << std::endl;
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 50:
+ {
+ std::cout << "ITestService.TakesANullableIBinderList()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::optional<::std::vector<::android::sp<::android::IBinder>>> in_input;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readStrongBinderVector(&in_input);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument input from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " input: " << ::android::internal::ToString(in_input) << std::endl;
+ std::cout << " return: void" << std::endl;
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 51:
+ {
+ std::cout << "ITestService.RepeatUtf8CppString()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::string in_token;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::std::string _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readUtf8FromUtf16(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readUtf8FromUtf16(&in_token);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument token from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " token: " << ::android::internal::ToString(in_token) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 52:
+ {
+ std::cout << "ITestService.RepeatNullableUtf8CppString()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::optional<::std::string> in_token;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::std::optional<::std::string> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readUtf8FromUtf16(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readUtf8FromUtf16(&in_token);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument token from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " token: " << ::android::internal::ToString(in_token) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 53:
+ {
+ std::cout << "ITestService.ReverseUtf8CppString()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::vector<::std::string> in_input;
+ ::std::vector<::std::string> out_repeated;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::std::vector<::std::string> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readUtf8VectorFromUtf16Vector(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readUtf8VectorFromUtf16Vector(&in_input);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument input from Parcel." << std::endl;
+ break;
+ }
+ _aidl_ret_status = _aidl_data.readUtf8VectorFromUtf16Vector(&out_repeated);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument repeated from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " input: " << ::android::internal::ToString(in_input) << std::endl;
+ std::cout << " repeated: " << ::android::internal::ToString(out_repeated) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 54:
+ {
+ std::cout << "ITestService.ReverseNullableUtf8CppString()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::optional<::std::vector<::std::optional<::std::string>>> in_input;
+ ::std::optional<::std::vector<::std::optional<::std::string>>> out_repeated;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::std::optional<::std::vector<::std::optional<::std::string>>> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readUtf8VectorFromUtf16Vector(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readUtf8VectorFromUtf16Vector(&in_input);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument input from Parcel." << std::endl;
+ break;
+ }
+ _aidl_ret_status = _aidl_data.readUtf8VectorFromUtf16Vector(&out_repeated);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument repeated from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " input: " << ::android::internal::ToString(in_input) << std::endl;
+ std::cout << " repeated: " << ::android::internal::ToString(out_repeated) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 55:
+ {
+ std::cout << "ITestService.ReverseUtf8CppStringList()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::optional<::std::vector<::std::optional<::std::string>>> in_input;
+ ::std::optional<::std::vector<::std::optional<::std::string>>> out_repeated;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::std::optional<::std::vector<::std::optional<::std::string>>> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readUtf8VectorFromUtf16Vector(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readUtf8VectorFromUtf16Vector(&in_input);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument input from Parcel." << std::endl;
+ break;
+ }
+ _aidl_ret_status = _aidl_data.readUtf8VectorFromUtf16Vector(&out_repeated);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument repeated from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " input: " << ::android::internal::ToString(in_input) << std::endl;
+ std::cout << " repeated: " << ::android::internal::ToString(out_repeated) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 56:
+ {
+ std::cout << "ITestService.GetCallback()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ bool in_return_null;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::android::sp<::android::aidl::tests::INamedCallback> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readNullableStrongBinder(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readBool(&in_return_null);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument return_null from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " return_null: " << ::android::internal::ToString(in_return_null) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 57:
+ {
+ std::cout << "ITestService.FillOutStructuredParcelable()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::android::aidl::tests::StructuredParcelable in_parcel;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readParcelable(&in_parcel);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument parcel from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " parcel: " << ::android::internal::ToString(in_parcel) << std::endl;
+ std::cout << " return: void" << std::endl;
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 58:
+ {
+ std::cout << "ITestService.RepeatExtendableParcelable()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::android::aidl::tests::extension::ExtendableParcelable in_ep;
+ ::android::aidl::tests::extension::ExtendableParcelable out_ep2;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readParcelable(&in_ep);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument ep from Parcel." << std::endl;
+ break;
+ }
+ _aidl_ret_status = _aidl_data.readParcelable(&out_ep2);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument ep2 from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " ep: " << ::android::internal::ToString(in_ep) << std::endl;
+ std::cout << " ep2: " << ::android::internal::ToString(out_ep2) << std::endl;
+ std::cout << " return: void" << std::endl;
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 59:
+ {
+ std::cout << "ITestService.ReverseList()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::android::aidl::tests::RecursiveList in_list;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::android::aidl::tests::RecursiveList _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readParcelable(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readParcelable(&in_list);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument list from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " list: " << ::android::internal::ToString(in_list) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 60:
+ {
+ std::cout << "ITestService.ReverseIBinderArray()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::vector<::android::sp<::android::IBinder>> in_input;
+ ::std::vector<::android::sp<::android::IBinder>> out_repeated;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::std::vector<::android::sp<::android::IBinder>> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readStrongBinderVector(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readStrongBinderVector(&in_input);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument input from Parcel." << std::endl;
+ break;
+ }
+ _aidl_ret_status = _aidl_data.readStrongBinderVector(&out_repeated);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument repeated from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " input: " << ::android::internal::ToString(in_input) << std::endl;
+ std::cout << " repeated: " << ::android::internal::ToString(out_repeated) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 61:
+ {
+ std::cout << "ITestService.ReverseNullableIBinderArray()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::optional<::std::vector<::android::sp<::android::IBinder>>> in_input;
+ ::std::optional<::std::vector<::android::sp<::android::IBinder>>> out_repeated;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::std::optional<::std::vector<::android::sp<::android::IBinder>>> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readStrongBinderVector(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readStrongBinderVector(&in_input);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument input from Parcel." << std::endl;
+ break;
+ }
+ _aidl_ret_status = _aidl_data.readStrongBinderVector(&out_repeated);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument repeated from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " input: " << ::android::internal::ToString(in_input) << std::endl;
+ std::cout << " repeated: " << ::android::internal::ToString(out_repeated) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 62:
+ {
+ std::cout << "ITestService.GetOldNameInterface()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::android::sp<::android::aidl::tests::IOldName> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readStrongBinder(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ } while(false);
+ std::cout << " arguments: " << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 63:
+ {
+ std::cout << "ITestService.GetNewNameInterface()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::android::sp<::android::aidl::tests::INewName> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readStrongBinder(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ } while(false);
+ std::cout << " arguments: " << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 64:
+ {
+ std::cout << "ITestService.GetUnionTags()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::std::vector<::android::aidl::tests::Union> in_input;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::std::vector<::android::aidl::tests::Union::Tag> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readEnumVector(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readParcelableVector(&in_input);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument input from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " input: " << ::android::internal::ToString(in_input) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 65:
+ {
+ std::cout << "ITestService.GetCppJavaTests()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::android::sp<::android::IBinder> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readNullableStrongBinder(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ } while(false);
+ std::cout << " arguments: " << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 66:
+ {
+ std::cout << "ITestService.getBackendType()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::android::aidl::tests::BackendType _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readByte(reinterpret_cast<int8_t *>(&_aidl_return));
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ } while(false);
+ std::cout << " arguments: " << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 67:
+ {
+ std::cout << "ITestService.GetCircular()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.ITestService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::android::aidl::tests::CircularParcelable out_cp;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::android::sp<::android::aidl::tests::ICircular> _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readStrongBinder(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readParcelable(&out_cp);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument cp from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " cp: " << ::android::internal::ToString(out_cp) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ default:
+ {
+ std::cout << " Transaction code " << _aidl_code << " not known." << std::endl;
+ _aidl_ret_status = android::UNKNOWN_TRANSACTION;
+ }
+ }
+ return _aidl_ret_status;
+ // To prevent unused variable warnings
+ (void)_aidl_ret_status; (void)_aidl_data; (void)_aidl_reply;
+}
+
+} // namespace
+
+#include <Analyzer.h>
+using android::aidl::Analyzer;
+__attribute__((constructor)) static void addAnalyzer() {
+ Analyzer::installAnalyzer(std::make_unique<Analyzer>("android.aidl.tests.ITestService", "ITestService", &analyzeITestService));
+}
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ITestService.cpp.d b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ITestService.cpp.d
new file mode 100644
index 00000000..58840776
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ITestService.cpp.d
@@ -0,0 +1,16 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ITestService.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/ITestService.aidl \
+ system/tools/aidl/tests/android/aidl/tests/BackendType.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ByteEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/CircularParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ICircular.aidl \
+ system/tools/aidl/tests/android/aidl/tests/INamedCallback.aidl \
+ system/tools/aidl/tests/android/aidl/tests/INewName.aidl \
+ system/tools/aidl/tests/android/aidl/tests/IOldName.aidl \
+ system/tools/aidl/tests/android/aidl/tests/IntEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/LongEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/RecursiveList.aidl \
+ system/tools/aidl/tests/android/aidl/tests/StructuredParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/Union.aidl \
+ system/tools/aidl/tests/android/aidl/tests/extension/ExtendableParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ConstantExpressionEnum.aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/IntEnum.cpp b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/IntEnum.cpp
new file mode 100644
index 00000000..578d4375
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/IntEnum.cpp
@@ -0,0 +1 @@
+// This file is intentionally left blank as placeholder for building an analyzer.
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/IntEnum.cpp.d b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/IntEnum.cpp.d
new file mode 100644
index 00000000..cd096108
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/IntEnum.cpp.d
@@ -0,0 +1,2 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/IntEnum.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/IntEnum.aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ListOfInterfaces.cpp b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ListOfInterfaces.cpp
new file mode 100644
index 00000000..578d4375
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ListOfInterfaces.cpp
@@ -0,0 +1 @@
+// This file is intentionally left blank as placeholder for building an analyzer.
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ListOfInterfaces.cpp.d b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ListOfInterfaces.cpp.d
new file mode 100644
index 00000000..09abd960
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ListOfInterfaces.cpp.d
@@ -0,0 +1,2 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ListOfInterfaces.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/ListOfInterfaces.aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/LongEnum.cpp b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/LongEnum.cpp
new file mode 100644
index 00000000..578d4375
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/LongEnum.cpp
@@ -0,0 +1 @@
+// This file is intentionally left blank as placeholder for building an analyzer.
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/LongEnum.cpp.d b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/LongEnum.cpp.d
new file mode 100644
index 00000000..d83d7032
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/LongEnum.cpp.d
@@ -0,0 +1,2 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/LongEnum.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/LongEnum.aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/OtherParcelableForToString.cpp b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/OtherParcelableForToString.cpp
new file mode 100644
index 00000000..578d4375
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/OtherParcelableForToString.cpp
@@ -0,0 +1 @@
+// This file is intentionally left blank as placeholder for building an analyzer.
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/OtherParcelableForToString.cpp.d b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/OtherParcelableForToString.cpp.d
new file mode 100644
index 00000000..19077451
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/OtherParcelableForToString.cpp.d
@@ -0,0 +1,2 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/OtherParcelableForToString.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/OtherParcelableForToString.aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ParcelableForToString.cpp b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ParcelableForToString.cpp
new file mode 100644
index 00000000..578d4375
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ParcelableForToString.cpp
@@ -0,0 +1 @@
+// This file is intentionally left blank as placeholder for building an analyzer.
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ParcelableForToString.cpp.d b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ParcelableForToString.cpp.d
new file mode 100644
index 00000000..b89b897a
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ParcelableForToString.cpp.d
@@ -0,0 +1,10 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/ParcelableForToString.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/ParcelableForToString.aidl \
+ system/tools/aidl/tests/android/aidl/tests/GenericStructuredParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/IntEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/OtherParcelableForToString.aidl \
+ system/tools/aidl/tests/android/aidl/tests/StructuredParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/Union.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ByteEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/LongEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ConstantExpressionEnum.aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/RecursiveList.cpp b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/RecursiveList.cpp
new file mode 100644
index 00000000..578d4375
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/RecursiveList.cpp
@@ -0,0 +1 @@
+// This file is intentionally left blank as placeholder for building an analyzer.
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/RecursiveList.cpp.d b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/RecursiveList.cpp.d
new file mode 100644
index 00000000..d4e29f04
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/RecursiveList.cpp.d
@@ -0,0 +1,2 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/RecursiveList.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/RecursiveList.aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/StructuredParcelable.cpp b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/StructuredParcelable.cpp
new file mode 100644
index 00000000..578d4375
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/StructuredParcelable.cpp
@@ -0,0 +1 @@
+// This file is intentionally left blank as placeholder for building an analyzer.
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/StructuredParcelable.cpp.d b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/StructuredParcelable.cpp.d
new file mode 100644
index 00000000..dc83d1ae
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/StructuredParcelable.cpp.d
@@ -0,0 +1,7 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/StructuredParcelable.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/StructuredParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ByteEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ConstantExpressionEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/IntEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/LongEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/Union.aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/Union.cpp b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/Union.cpp
new file mode 100644
index 00000000..578d4375
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/Union.cpp
@@ -0,0 +1 @@
+// This file is intentionally left blank as placeholder for building an analyzer.
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/Union.cpp.d b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/Union.cpp.d
new file mode 100644
index 00000000..8a4c0789
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/Union.cpp.d
@@ -0,0 +1,3 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/Union.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/Union.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ByteEnum.aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/UnionWithFd.cpp b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/UnionWithFd.cpp
new file mode 100644
index 00000000..578d4375
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/UnionWithFd.cpp
@@ -0,0 +1 @@
+// This file is intentionally left blank as placeholder for building an analyzer.
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/UnionWithFd.cpp.d b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/UnionWithFd.cpp.d
new file mode 100644
index 00000000..db9f1133
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/UnionWithFd.cpp.d
@@ -0,0 +1,2 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/UnionWithFd.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/UnionWithFd.aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/extension/ExtendableParcelable.cpp b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/extension/ExtendableParcelable.cpp
new file mode 100644
index 00000000..578d4375
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/extension/ExtendableParcelable.cpp
@@ -0,0 +1 @@
+// This file is intentionally left blank as placeholder for building an analyzer.
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/extension/ExtendableParcelable.cpp.d b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/extension/ExtendableParcelable.cpp.d
new file mode 100644
index 00000000..05a7b8bf
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/extension/ExtendableParcelable.cpp.d
@@ -0,0 +1,2 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/extension/ExtendableParcelable.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/extension/ExtendableParcelable.aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/extension/MyExt.cpp b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/extension/MyExt.cpp
new file mode 100644
index 00000000..578d4375
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/extension/MyExt.cpp
@@ -0,0 +1 @@
+// This file is intentionally left blank as placeholder for building an analyzer.
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/extension/MyExt.cpp.d b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/extension/MyExt.cpp.d
new file mode 100644
index 00000000..b408cd50
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/extension/MyExt.cpp.d
@@ -0,0 +1,2 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/extension/MyExt.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/extension/MyExt.aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/extension/MyExt2.cpp b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/extension/MyExt2.cpp
new file mode 100644
index 00000000..578d4375
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/extension/MyExt2.cpp
@@ -0,0 +1 @@
+// This file is intentionally left blank as placeholder for building an analyzer.
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/extension/MyExt2.cpp.d b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/extension/MyExt2.cpp.d
new file mode 100644
index 00000000..922747c1
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/extension/MyExt2.cpp.d
@@ -0,0 +1,3 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/extension/MyExt2.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/extension/MyExt2.aidl \
+ system/tools/aidl/tests/android/aidl/tests/extension/MyExt.aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/extension/MyExtLike.cpp b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/extension/MyExtLike.cpp
new file mode 100644
index 00000000..578d4375
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/extension/MyExtLike.cpp
@@ -0,0 +1 @@
+// This file is intentionally left blank as placeholder for building an analyzer.
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/extension/MyExtLike.cpp.d b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/extension/MyExtLike.cpp.d
new file mode 100644
index 00000000..86841d0c
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/extension/MyExtLike.cpp.d
@@ -0,0 +1,2 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/extension/MyExtLike.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/extension/MyExtLike.aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/nested/DeeplyNested.cpp b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/nested/DeeplyNested.cpp
new file mode 100644
index 00000000..578d4375
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/nested/DeeplyNested.cpp
@@ -0,0 +1 @@
+// This file is intentionally left blank as placeholder for building an analyzer.
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/nested/DeeplyNested.cpp.d b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/nested/DeeplyNested.cpp.d
new file mode 100644
index 00000000..60c48296
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/nested/DeeplyNested.cpp.d
@@ -0,0 +1,2 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/nested/DeeplyNested.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/nested/DeeplyNested.aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/nested/INestedService.cpp b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/nested/INestedService.cpp
new file mode 100644
index 00000000..1b39506f
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/nested/INestedService.cpp
@@ -0,0 +1,101 @@
+#include <iostream>
+#include <binder/Parcel.h>
+#include <android/binder_to_string.h>
+#include <android/aidl/tests/nested/INestedService.h>
+namespace {
+android::status_t analyzeINestedService(uint32_t _aidl_code, const android::Parcel& _aidl_data, const android::Parcel& _aidl_reply) {
+ android::status_t _aidl_ret_status;
+ switch(_aidl_code) {
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 0:
+ {
+ std::cout << "INestedService.flipStatus()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.nested.INestedService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::android::aidl::tests::nested::ParcelableWithNested in_p;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ ::android::aidl::tests::nested::INestedService::Result _aidl_return;
+ bool returnError = false;
+ _aidl_ret_status = _aidl_reply.readParcelable(&_aidl_return);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading return value from Parcel." << std::endl;
+ returnError = true;
+ }
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readParcelable(&in_p);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument p from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " p: " << ::android::internal::ToString(in_p) << std::endl;
+ if (returnError) {
+ std::cout << " return: <error>" << std::endl;
+ } else {std::cout << " return: " << ::android::internal::ToString(_aidl_return) << std::endl;
+ }
+ }
+ break;
+ case ::android::IBinder::FIRST_CALL_TRANSACTION + 1:
+ {
+ std::cout << "INestedService.flipStatusWithCallback()" << std::endl;
+ _aidl_ret_status = ::android::OK;
+ if (!(_aidl_data.enforceInterface(android::String16("android.aidl.tests.nested.INestedService")))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ std::cout << " Failure: Parcel interface does not match." << std::endl;
+ break;
+ }
+ ::android::aidl::tests::nested::ParcelableWithNested::Status in_status;
+ ::android::sp<::android::aidl::tests::nested::INestedService::ICallback> in_cb;
+ ::android::binder::Status binderStatus;
+ binderStatus.readFromParcel(_aidl_reply);
+ do { // Single-pass loop to break if argument reading fails
+ _aidl_ret_status = _aidl_data.readByte(reinterpret_cast<int8_t *>(&in_status));
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument status from Parcel." << std::endl;
+ break;
+ }
+ _aidl_ret_status = _aidl_data.readStrongBinder(&in_cb);
+ if (((_aidl_ret_status) != (android::NO_ERROR))) {
+ std::cerr << "Failure: error in reading argument cb from Parcel." << std::endl;
+ break;
+ }
+ } while(false);
+ if (!_aidl_data.enforceNoDataAvail().isOk()) {
+ _aidl_ret_status = android::BAD_VALUE;
+ std::cout << " Failure: Parcel has too much data." << std::endl;
+ break;
+ }
+ std::cout << " arguments: " << std::endl;
+ std::cout << " status: " << ::android::internal::ToString(in_status) << std::endl;
+ std::cout << " cb: " << ::android::internal::ToString(in_cb) << std::endl;
+ std::cout << " return: void" << std::endl;
+ }
+ break;
+ default:
+ {
+ std::cout << " Transaction code " << _aidl_code << " not known." << std::endl;
+ _aidl_ret_status = android::UNKNOWN_TRANSACTION;
+ }
+ }
+ return _aidl_ret_status;
+ // To prevent unused variable warnings
+ (void)_aidl_ret_status; (void)_aidl_data; (void)_aidl_reply;
+}
+
+} // namespace
+
+#include <Analyzer.h>
+using android::aidl::Analyzer;
+__attribute__((constructor)) static void addAnalyzer() {
+ Analyzer::installAnalyzer(std::make_unique<Analyzer>("android.aidl.tests.nested.INestedService", "INestedService", &analyzeINestedService));
+}
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/nested/INestedService.cpp.d b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/nested/INestedService.cpp.d
new file mode 100644
index 00000000..117662cd
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/nested/INestedService.cpp.d
@@ -0,0 +1,3 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/nested/INestedService.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/nested/INestedService.aidl \
+ system/tools/aidl/tests/android/aidl/tests/nested/ParcelableWithNested.aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/nested/ParcelableWithNested.cpp b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/nested/ParcelableWithNested.cpp
new file mode 100644
index 00000000..578d4375
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/nested/ParcelableWithNested.cpp
@@ -0,0 +1 @@
+// This file is intentionally left blank as placeholder for building an analyzer.
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/nested/ParcelableWithNested.cpp.d b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/nested/ParcelableWithNested.cpp.d
new file mode 100644
index 00000000..6e2e015d
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/nested/ParcelableWithNested.cpp.d
@@ -0,0 +1,2 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/nested/ParcelableWithNested.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/nested/ParcelableWithNested.aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/unions/EnumUnion.cpp b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/unions/EnumUnion.cpp
new file mode 100644
index 00000000..578d4375
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/unions/EnumUnion.cpp
@@ -0,0 +1 @@
+// This file is intentionally left blank as placeholder for building an analyzer.
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/unions/EnumUnion.cpp.d b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/unions/EnumUnion.cpp.d
new file mode 100644
index 00000000..dcebde5a
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/unions/EnumUnion.cpp.d
@@ -0,0 +1,4 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/unions/EnumUnion.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/unions/EnumUnion.aidl \
+ system/tools/aidl/tests/android/aidl/tests/IntEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/LongEnum.aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/unions/UnionInUnion.cpp b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/unions/UnionInUnion.cpp
new file mode 100644
index 00000000..578d4375
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/unions/UnionInUnion.cpp
@@ -0,0 +1 @@
+// This file is intentionally left blank as placeholder for building an analyzer.
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/unions/UnionInUnion.cpp.d b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/unions/UnionInUnion.cpp.d
new file mode 100644
index 00000000..dd9c00eb
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/unions/UnionInUnion.cpp.d
@@ -0,0 +1,5 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-cpp-analyzer-source/gen/android/aidl/tests/unions/UnionInUnion.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/unions/UnionInUnion.aidl \
+ system/tools/aidl/tests/android/aidl/tests/unions/EnumUnion.aidl \
+ system/tools/aidl/tests/android/aidl/tests/IntEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/LongEnum.aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/timestamp b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/timestamp
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-analyzer-source/gen/timestamp
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/ArrayOfInterfaces.cpp b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/ArrayOfInterfaces.cpp
index c3df2a07..357e7d8e 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/ArrayOfInterfaces.cpp
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/ArrayOfInterfaces.cpp
@@ -13,7 +13,7 @@ namespace tests {
}
if (_aidl_parcelable_raw_size < 4) return ::android::BAD_VALUE;
size_t _aidl_parcelable_size = static_cast<size_t>(_aidl_parcelable_raw_size);
- if (_aidl_start_pos > SIZE_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
+ if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
_aidl_parcel->setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
return _aidl_ret_status;
}
@@ -114,6 +114,7 @@ ArrayOfInterfaces::BpMyInterface::BpMyInterface(const ::android::sp<::android::I
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::IMyInterface::methodWithInterfaces::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -223,6 +224,7 @@ ArrayOfInterfaces::BnMyInterface::BnMyInterface()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::IMyInterface::methodWithInterfaces::cppServer");
_aidl_ret_status = _aidl_data.readStrongBinder(&in_iface);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -319,7 +321,7 @@ namespace tests {
}
if (_aidl_parcelable_raw_size < 4) return ::android::BAD_VALUE;
size_t _aidl_parcelable_size = static_cast<size_t>(_aidl_parcelable_raw_size);
- if (_aidl_start_pos > SIZE_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
+ if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
if (_aidl_parcel->dataPosition() - _aidl_start_pos >= _aidl_parcelable_size) {
_aidl_parcel->setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
return _aidl_ret_status;
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/CircularParcelable.cpp b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/CircularParcelable.cpp
new file mode 100644
index 00000000..26b8f446
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/CircularParcelable.cpp
@@ -0,0 +1,44 @@
+#include <android/aidl/tests/CircularParcelable.h>
+
+namespace android {
+namespace aidl {
+namespace tests {
+::android::status_t CircularParcelable::readFromParcel(const ::android::Parcel* _aidl_parcel) {
+ ::android::status_t _aidl_ret_status = ::android::OK;
+ size_t _aidl_start_pos = _aidl_parcel->dataPosition();
+ int32_t _aidl_parcelable_raw_size = 0;
+ _aidl_ret_status = _aidl_parcel->readInt32(&_aidl_parcelable_raw_size);
+ if (((_aidl_ret_status) != (::android::OK))) {
+ return _aidl_ret_status;
+ }
+ if (_aidl_parcelable_raw_size < 4) return ::android::BAD_VALUE;
+ size_t _aidl_parcelable_size = static_cast<size_t>(_aidl_parcelable_raw_size);
+ if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
+ if (_aidl_parcel->dataPosition() - _aidl_start_pos >= _aidl_parcelable_size) {
+ _aidl_parcel->setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
+ return _aidl_ret_status;
+ }
+ _aidl_ret_status = _aidl_parcel->readNullableStrongBinder(&testService);
+ if (((_aidl_ret_status) != (::android::OK))) {
+ return _aidl_ret_status;
+ }
+ _aidl_parcel->setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
+ return _aidl_ret_status;
+}
+::android::status_t CircularParcelable::writeToParcel(::android::Parcel* _aidl_parcel) const {
+ ::android::status_t _aidl_ret_status = ::android::OK;
+ auto _aidl_start_pos = _aidl_parcel->dataPosition();
+ _aidl_parcel->writeInt32(0);
+ _aidl_ret_status = _aidl_parcel->writeStrongBinder(testService);
+ if (((_aidl_ret_status) != (::android::OK))) {
+ return _aidl_ret_status;
+ }
+ auto _aidl_end_pos = _aidl_parcel->dataPosition();
+ _aidl_parcel->setDataPosition(_aidl_start_pos);
+ _aidl_parcel->writeInt32(_aidl_end_pos - _aidl_start_pos);
+ _aidl_parcel->setDataPosition(_aidl_end_pos);
+ return _aidl_ret_status;
+}
+} // namespace tests
+} // namespace aidl
+} // namespace android
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/CircularParcelable.cpp.d b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/CircularParcelable.cpp.d
new file mode 100644
index 00000000..1606b925
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/CircularParcelable.cpp.d
@@ -0,0 +1,16 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-cpp-source/gen/android/aidl/tests/CircularParcelable.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/CircularParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ITestService.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ByteEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/IntEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/LongEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/INamedCallback.aidl \
+ system/tools/aidl/tests/android/aidl/tests/StructuredParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/extension/ExtendableParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/RecursiveList.aidl \
+ system/tools/aidl/tests/android/aidl/tests/IOldName.aidl \
+ system/tools/aidl/tests/android/aidl/tests/INewName.aidl \
+ system/tools/aidl/tests/android/aidl/tests/Union.aidl \
+ system/tools/aidl/tests/android/aidl/tests/BackendType.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ICircular.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ConstantExpressionEnum.aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/DeprecatedParcelable.cpp b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/DeprecatedParcelable.cpp
index 67142b90..4fb42698 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/DeprecatedParcelable.cpp
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/DeprecatedParcelable.cpp
@@ -13,7 +13,7 @@ namespace tests {
}
if (_aidl_parcelable_raw_size < 4) return ::android::BAD_VALUE;
size_t _aidl_parcelable_size = static_cast<size_t>(_aidl_parcelable_raw_size);
- if (_aidl_start_pos > SIZE_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
+ if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
_aidl_parcel->setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
return _aidl_ret_status;
}
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/FixedSize.cpp b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/FixedSize.cpp
index 320fe275..f655d25a 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/FixedSize.cpp
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/FixedSize.cpp
@@ -13,7 +13,7 @@ namespace tests {
}
if (_aidl_parcelable_raw_size < 4) return ::android::BAD_VALUE;
size_t _aidl_parcelable_size = static_cast<size_t>(_aidl_parcelable_raw_size);
- if (_aidl_start_pos > SIZE_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
+ if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
_aidl_parcel->setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
return _aidl_ret_status;
}
@@ -45,7 +45,7 @@ namespace tests {
}
if (_aidl_parcelable_raw_size < 4) return ::android::BAD_VALUE;
size_t _aidl_parcelable_size = static_cast<size_t>(_aidl_parcelable_raw_size);
- if (_aidl_start_pos > SIZE_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
+ if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
if (_aidl_parcel->dataPosition() - _aidl_start_pos >= _aidl_parcelable_size) {
_aidl_parcel->setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
return _aidl_ret_status;
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/ICircular.cpp b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/ICircular.cpp
new file mode 100644
index 00000000..ea7e5740
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/ICircular.cpp
@@ -0,0 +1,112 @@
+#include <android/aidl/tests/ICircular.h>
+#include <android/aidl/tests/BpCircular.h>
+namespace android {
+namespace aidl {
+namespace tests {
+DO_NOT_DIRECTLY_USE_ME_IMPLEMENT_META_INTERFACE(Circular, "android.aidl.tests.ICircular")
+} // namespace tests
+} // namespace aidl
+} // namespace android
+#include <android/aidl/tests/BpCircular.h>
+#include <android/aidl/tests/BnCircular.h>
+#include <binder/Parcel.h>
+#include <android-base/macros.h>
+
+namespace android {
+namespace aidl {
+namespace tests {
+
+BpCircular::BpCircular(const ::android::sp<::android::IBinder>& _aidl_impl)
+ : BpInterface<ICircular>(_aidl_impl){
+}
+
+::android::binder::Status BpCircular::GetTestService(::android::sp<::android::aidl::tests::ITestService>* _aidl_return) {
+ ::android::Parcel _aidl_data;
+ _aidl_data.markForBinder(remoteStrong());
+ ::android::Parcel _aidl_reply;
+ ::android::status_t _aidl_ret_status = ::android::OK;
+ ::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ICircular::GetTestService::cppClient");
+ _aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
+ if (((_aidl_ret_status) != (::android::OK))) {
+ goto _aidl_error;
+ }
+ _aidl_ret_status = remote()->transact(BnCircular::TRANSACTION_GetTestService, _aidl_data, &_aidl_reply, 0);
+ if (UNLIKELY(_aidl_ret_status == ::android::UNKNOWN_TRANSACTION && ICircular::getDefaultImpl())) {
+ return ICircular::getDefaultImpl()->GetTestService(_aidl_return);
+ }
+ if (((_aidl_ret_status) != (::android::OK))) {
+ goto _aidl_error;
+ }
+ _aidl_ret_status = _aidl_status.readFromParcel(_aidl_reply);
+ if (((_aidl_ret_status) != (::android::OK))) {
+ goto _aidl_error;
+ }
+ if (!_aidl_status.isOk()) {
+ return _aidl_status;
+ }
+ _aidl_ret_status = _aidl_reply.readNullableStrongBinder(_aidl_return);
+ if (((_aidl_ret_status) != (::android::OK))) {
+ goto _aidl_error;
+ }
+ _aidl_error:
+ _aidl_status.setFromStatusT(_aidl_ret_status);
+ return _aidl_status;
+}
+
+} // namespace tests
+} // namespace aidl
+} // namespace android
+#include <android/aidl/tests/BnCircular.h>
+#include <binder/Parcel.h>
+#include <binder/Stability.h>
+
+namespace android {
+namespace aidl {
+namespace tests {
+
+BnCircular::BnCircular()
+{
+ ::android::internal::Stability::markCompilationUnit(this);
+}
+
+::android::status_t BnCircular::onTransact(uint32_t _aidl_code, const ::android::Parcel& _aidl_data, ::android::Parcel* _aidl_reply, uint32_t _aidl_flags) {
+ ::android::status_t _aidl_ret_status = ::android::OK;
+ switch (_aidl_code) {
+ case BnCircular::TRANSACTION_GetTestService:
+ {
+ ::android::sp<::android::aidl::tests::ITestService> _aidl_return;
+ if (!(_aidl_data.checkInterface(this))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ break;
+ }
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ICircular::GetTestService::cppServer");
+ ::android::binder::Status _aidl_status(GetTestService(&_aidl_return));
+ _aidl_ret_status = _aidl_status.writeToParcel(_aidl_reply);
+ if (((_aidl_ret_status) != (::android::OK))) {
+ break;
+ }
+ if (!_aidl_status.isOk()) {
+ break;
+ }
+ _aidl_ret_status = _aidl_reply->writeStrongBinder(_aidl_return);
+ if (((_aidl_ret_status) != (::android::OK))) {
+ break;
+ }
+ }
+ break;
+ default:
+ {
+ _aidl_ret_status = ::android::BBinder::onTransact(_aidl_code, _aidl_data, _aidl_reply, _aidl_flags);
+ }
+ break;
+ }
+ if (_aidl_ret_status == ::android::UNEXPECTED_NULL) {
+ _aidl_ret_status = ::android::binder::Status::fromExceptionCode(::android::binder::Status::EX_NULL_POINTER).writeOverParcel(_aidl_reply);
+ }
+ return _aidl_ret_status;
+}
+
+} // namespace tests
+} // namespace aidl
+} // namespace android
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/ICircular.cpp.d b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/ICircular.cpp.d
new file mode 100644
index 00000000..eb56011d
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/ICircular.cpp.d
@@ -0,0 +1,16 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-cpp-source/gen/android/aidl/tests/ICircular.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/ICircular.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ITestService.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ByteEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/IntEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/LongEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/INamedCallback.aidl \
+ system/tools/aidl/tests/android/aidl/tests/StructuredParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/extension/ExtendableParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/RecursiveList.aidl \
+ system/tools/aidl/tests/android/aidl/tests/IOldName.aidl \
+ system/tools/aidl/tests/android/aidl/tests/INewName.aidl \
+ system/tools/aidl/tests/android/aidl/tests/Union.aidl \
+ system/tools/aidl/tests/android/aidl/tests/BackendType.aidl \
+ system/tools/aidl/tests/android/aidl/tests/CircularParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ConstantExpressionEnum.aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/INamedCallback.cpp b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/INamedCallback.cpp
index 1bc05ddf..c212d54e 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/INamedCallback.cpp
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/INamedCallback.cpp
@@ -26,6 +26,7 @@ BpNamedCallback::BpNamedCallback(const ::android::sp<::android::IBinder>& _aidl_
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::INamedCallback::GetName::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -79,6 +80,7 @@ BnNamedCallback::BnNamedCallback()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::INamedCallback::GetName::cppServer");
::android::binder::Status _aidl_status(GetName(&_aidl_return));
_aidl_ret_status = _aidl_status.writeToParcel(_aidl_reply);
if (((_aidl_ret_status) != (::android::OK))) {
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/INewName.cpp b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/INewName.cpp
index b308856c..955d36fb 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/INewName.cpp
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/INewName.cpp
@@ -26,6 +26,7 @@ BpNewName::BpNewName(const ::android::sp<::android::IBinder>& _aidl_impl)
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::INewName::RealName::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -79,6 +80,7 @@ BnNewName::BnNewName()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::INewName::RealName::cppServer");
::android::binder::Status _aidl_status(RealName(&_aidl_return));
_aidl_ret_status = _aidl_status.writeToParcel(_aidl_reply);
if (((_aidl_ret_status) != (::android::OK))) {
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/IOldName.cpp b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/IOldName.cpp
index ee04a4e3..0e99b42f 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/IOldName.cpp
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/IOldName.cpp
@@ -26,6 +26,7 @@ BpOldName::BpOldName(const ::android::sp<::android::IBinder>& _aidl_impl)
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::IOldName::RealName::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -79,6 +80,7 @@ BnOldName::BnOldName()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::IOldName::RealName::cppServer");
::android::binder::Status _aidl_status(RealName(&_aidl_return));
_aidl_ret_status = _aidl_status.writeToParcel(_aidl_reply);
if (((_aidl_ret_status) != (::android::OK))) {
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/ITestService.cpp b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/ITestService.cpp
index b7e11aed..4ca3e090 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/ITestService.cpp
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/ITestService.cpp
@@ -39,6 +39,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::UnimplementedMethod::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -77,6 +78,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::Deprecated::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -107,6 +109,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::TestOneway::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -130,6 +133,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatBoolean::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -168,6 +172,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatByte::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -206,6 +211,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatChar::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -244,6 +250,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatInt::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -282,6 +289,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatLong::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -320,6 +328,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatFloat::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -358,6 +367,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatDouble::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -396,6 +406,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatString::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -434,6 +445,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatByteEnum::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -472,6 +484,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatIntEnum::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -510,6 +523,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatLongEnum::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -548,6 +562,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseBoolean::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -594,6 +609,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseByte::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -640,6 +656,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseChar::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -686,6 +703,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseInt::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -732,6 +750,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseLong::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -778,6 +797,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseFloat::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -824,6 +844,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseDouble::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -870,6 +891,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseString::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -916,6 +938,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseByteEnum::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -962,6 +985,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseIntEnum::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -1008,6 +1032,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseLongEnum::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -1054,6 +1079,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::GetOtherTestService::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -1085,6 +1111,49 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
return _aidl_status;
}
+::android::binder::Status BpTestService::SetOtherTestService(const ::android::String16& name, const ::android::sp<::android::aidl::tests::INamedCallback>& service, bool* _aidl_return) {
+ ::android::Parcel _aidl_data;
+ _aidl_data.markSensitive();
+ _aidl_data.markForBinder(remoteStrong());
+ ::android::Parcel _aidl_reply;
+ ::android::status_t _aidl_ret_status = ::android::OK;
+ ::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::SetOtherTestService::cppClient");
+ _aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
+ if (((_aidl_ret_status) != (::android::OK))) {
+ goto _aidl_error;
+ }
+ _aidl_ret_status = _aidl_data.writeString16(name);
+ if (((_aidl_ret_status) != (::android::OK))) {
+ goto _aidl_error;
+ }
+ _aidl_ret_status = _aidl_data.writeStrongBinder(service);
+ if (((_aidl_ret_status) != (::android::OK))) {
+ goto _aidl_error;
+ }
+ _aidl_ret_status = remote()->transact(BnTestService::TRANSACTION_SetOtherTestService, _aidl_data, &_aidl_reply, ::android::IBinder::FLAG_CLEAR_BUF);
+ if (UNLIKELY(_aidl_ret_status == ::android::UNKNOWN_TRANSACTION && ITestService::getDefaultImpl())) {
+ return ITestService::getDefaultImpl()->SetOtherTestService(name, service, _aidl_return);
+ }
+ if (((_aidl_ret_status) != (::android::OK))) {
+ goto _aidl_error;
+ }
+ _aidl_ret_status = _aidl_status.readFromParcel(_aidl_reply);
+ if (((_aidl_ret_status) != (::android::OK))) {
+ goto _aidl_error;
+ }
+ if (!_aidl_status.isOk()) {
+ return _aidl_status;
+ }
+ _aidl_ret_status = _aidl_reply.readBool(_aidl_return);
+ if (((_aidl_ret_status) != (::android::OK))) {
+ goto _aidl_error;
+ }
+ _aidl_error:
+ _aidl_status.setFromStatusT(_aidl_ret_status);
+ return _aidl_status;
+}
+
::android::binder::Status BpTestService::VerifyName(const ::android::sp<::android::aidl::tests::INamedCallback>& service, const ::android::String16& name, bool* _aidl_return) {
::android::Parcel _aidl_data;
_aidl_data.markSensitive();
@@ -1092,6 +1161,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::VerifyName::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -1134,6 +1204,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::GetInterfaceArray::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -1172,6 +1243,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::VerifyNamesWithInterfaceArray::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -1214,6 +1286,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::GetNullableInterfaceArray::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -1252,6 +1325,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::VerifyNamesWithNullableInterfaceArray::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -1294,6 +1368,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::GetInterfaceList::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -1332,6 +1407,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::VerifyNamesWithInterfaceList::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -1374,6 +1450,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseStringList::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -1416,6 +1493,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatParcelFileDescriptor::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -1454,6 +1532,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseParcelFileDescriptorArray::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -1500,6 +1579,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ThrowServiceException::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -1534,6 +1614,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatNullableIntArray::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -1572,6 +1653,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatNullableByteEnumArray::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -1610,6 +1692,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatNullableIntEnumArray::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -1648,6 +1731,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatNullableLongEnumArray::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -1686,6 +1770,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatNullableString::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -1724,6 +1809,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatNullableStringList::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -1762,6 +1848,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatNullableParcelable::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -1800,6 +1887,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatNullableParcelableArray::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -1838,6 +1926,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatNullableParcelableList::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -1876,6 +1965,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::TakesAnIBinder::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -1910,6 +2000,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::TakesANullableIBinder::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -1944,6 +2035,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::TakesAnIBinderList::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -1978,6 +2070,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::TakesANullableIBinderList::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -2012,6 +2105,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatUtf8CppString::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -2050,6 +2144,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatNullableUtf8CppString::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -2088,6 +2183,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseUtf8CppString::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -2134,6 +2230,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseNullableUtf8CppString::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -2180,6 +2277,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseUtf8CppStringList::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -2222,6 +2320,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::GetCallback::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -2260,6 +2359,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::FillOutStructuredParcelable::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -2298,6 +2398,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatExtendableParcelable::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -2336,6 +2437,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseList::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -2374,6 +2476,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseIBinderArray::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -2420,6 +2523,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseNullableIBinderArray::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -2466,6 +2570,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::GetOldNameInterface::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -2500,6 +2605,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::GetNewNameInterface::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -2534,6 +2640,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::GetUnionTags::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -2572,6 +2679,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::GetCppJavaTests::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -2606,6 +2714,7 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::getBackendType::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -2633,6 +2742,45 @@ BpTestService::BpTestService(const ::android::sp<::android::IBinder>& _aidl_impl
return _aidl_status;
}
+::android::binder::Status BpTestService::GetCircular(::android::aidl::tests::CircularParcelable* cp, ::android::sp<::android::aidl::tests::ICircular>* _aidl_return) {
+ ::android::Parcel _aidl_data;
+ _aidl_data.markSensitive();
+ _aidl_data.markForBinder(remoteStrong());
+ ::android::Parcel _aidl_reply;
+ ::android::status_t _aidl_ret_status = ::android::OK;
+ ::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::GetCircular::cppClient");
+ _aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
+ if (((_aidl_ret_status) != (::android::OK))) {
+ goto _aidl_error;
+ }
+ _aidl_ret_status = remote()->transact(BnTestService::TRANSACTION_GetCircular, _aidl_data, &_aidl_reply, ::android::IBinder::FLAG_CLEAR_BUF);
+ if (UNLIKELY(_aidl_ret_status == ::android::UNKNOWN_TRANSACTION && ITestService::getDefaultImpl())) {
+ return ITestService::getDefaultImpl()->GetCircular(cp, _aidl_return);
+ }
+ if (((_aidl_ret_status) != (::android::OK))) {
+ goto _aidl_error;
+ }
+ _aidl_ret_status = _aidl_status.readFromParcel(_aidl_reply);
+ if (((_aidl_ret_status) != (::android::OK))) {
+ goto _aidl_error;
+ }
+ if (!_aidl_status.isOk()) {
+ return _aidl_status;
+ }
+ _aidl_ret_status = _aidl_reply.readStrongBinder(_aidl_return);
+ if (((_aidl_ret_status) != (::android::OK))) {
+ goto _aidl_error;
+ }
+ _aidl_ret_status = _aidl_reply.readParcelable(cp);
+ if (((_aidl_ret_status) != (::android::OK))) {
+ goto _aidl_error;
+ }
+ _aidl_error:
+ _aidl_status.setFromStatusT(_aidl_ret_status);
+ return _aidl_status;
+}
+
} // namespace tests
} // namespace aidl
} // namespace android
@@ -2663,6 +2811,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::UnimplementedMethod::cppServer");
_aidl_ret_status = _aidl_data.readInt32(&in_arg);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -2691,6 +2840,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::Deprecated::cppServer");
::android::binder::Status _aidl_status(Deprecated());
_aidl_ret_status = _aidl_status.writeToParcel(_aidl_reply);
if (((_aidl_ret_status) != (::android::OK))) {
@@ -2707,6 +2857,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::TestOneway::cppServer");
::android::binder::Status _aidl_status(TestOneway());
}
break;
@@ -2718,6 +2869,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatBoolean::cppServer");
_aidl_ret_status = _aidl_data.readBool(&in_token);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -2748,6 +2900,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatByte::cppServer");
_aidl_ret_status = _aidl_data.readByte(&in_token);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -2778,6 +2931,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatChar::cppServer");
_aidl_ret_status = _aidl_data.readChar(&in_token);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -2808,6 +2962,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatInt::cppServer");
_aidl_ret_status = _aidl_data.readInt32(&in_token);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -2838,6 +2993,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatLong::cppServer");
_aidl_ret_status = _aidl_data.readInt64(&in_token);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -2868,6 +3024,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatFloat::cppServer");
_aidl_ret_status = _aidl_data.readFloat(&in_token);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -2898,6 +3055,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatDouble::cppServer");
_aidl_ret_status = _aidl_data.readDouble(&in_token);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -2928,6 +3086,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatString::cppServer");
_aidl_ret_status = _aidl_data.readString16(&in_token);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -2958,6 +3117,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatByteEnum::cppServer");
_aidl_ret_status = _aidl_data.readByte(reinterpret_cast<int8_t *>(&in_token));
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -2988,6 +3148,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatIntEnum::cppServer");
_aidl_ret_status = _aidl_data.readInt32(reinterpret_cast<int32_t *>(&in_token));
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -3018,6 +3179,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatLongEnum::cppServer");
_aidl_ret_status = _aidl_data.readInt64(reinterpret_cast<int64_t *>(&in_token));
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -3049,6 +3211,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseBoolean::cppServer");
_aidl_ret_status = _aidl_data.readBoolVector(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -3088,6 +3251,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseByte::cppServer");
_aidl_ret_status = _aidl_data.readByteVector(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -3127,6 +3291,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseChar::cppServer");
_aidl_ret_status = _aidl_data.readCharVector(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -3166,6 +3331,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseInt::cppServer");
_aidl_ret_status = _aidl_data.readInt32Vector(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -3205,6 +3371,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseLong::cppServer");
_aidl_ret_status = _aidl_data.readInt64Vector(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -3244,6 +3411,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseFloat::cppServer");
_aidl_ret_status = _aidl_data.readFloatVector(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -3283,6 +3451,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseDouble::cppServer");
_aidl_ret_status = _aidl_data.readDoubleVector(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -3322,6 +3491,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseString::cppServer");
_aidl_ret_status = _aidl_data.readString16Vector(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -3361,6 +3531,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseByteEnum::cppServer");
_aidl_ret_status = _aidl_data.readEnumVector(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -3400,6 +3571,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseIntEnum::cppServer");
_aidl_ret_status = _aidl_data.readEnumVector(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -3439,6 +3611,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseLongEnum::cppServer");
_aidl_ret_status = _aidl_data.readEnumVector(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -3477,6 +3650,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::GetOtherTestService::cppServer");
_aidl_ret_status = _aidl_data.readString16(&in_name);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -3499,6 +3673,42 @@ BnTestService::BnTestService()
}
}
break;
+ case BnTestService::TRANSACTION_SetOtherTestService:
+ {
+ ::android::String16 in_name;
+ ::android::sp<::android::aidl::tests::INamedCallback> in_service;
+ bool _aidl_return;
+ if (!(_aidl_data.checkInterface(this))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ break;
+ }
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::SetOtherTestService::cppServer");
+ _aidl_ret_status = _aidl_data.readString16(&in_name);
+ if (((_aidl_ret_status) != (::android::OK))) {
+ break;
+ }
+ _aidl_ret_status = _aidl_data.readStrongBinder(&in_service);
+ if (((_aidl_ret_status) != (::android::OK))) {
+ break;
+ }
+ if (auto st = _aidl_data.enforceNoDataAvail(); !st.isOk()) {
+ _aidl_ret_status = st.writeToParcel(_aidl_reply);
+ break;
+ }
+ ::android::binder::Status _aidl_status(SetOtherTestService(in_name, in_service, &_aidl_return));
+ _aidl_ret_status = _aidl_status.writeToParcel(_aidl_reply);
+ if (((_aidl_ret_status) != (::android::OK))) {
+ break;
+ }
+ if (!_aidl_status.isOk()) {
+ break;
+ }
+ _aidl_ret_status = _aidl_reply->writeBool(_aidl_return);
+ if (((_aidl_ret_status) != (::android::OK))) {
+ break;
+ }
+ }
+ break;
case BnTestService::TRANSACTION_VerifyName:
{
::android::sp<::android::aidl::tests::INamedCallback> in_service;
@@ -3508,6 +3718,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::VerifyName::cppServer");
_aidl_ret_status = _aidl_data.readStrongBinder(&in_service);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -3542,6 +3753,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::GetInterfaceArray::cppServer");
_aidl_ret_status = _aidl_data.readString16Vector(&in_names);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -3573,6 +3785,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::VerifyNamesWithInterfaceArray::cppServer");
_aidl_ret_status = _aidl_data.readStrongBinderVector(&in_services);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -3607,6 +3820,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::GetNullableInterfaceArray::cppServer");
_aidl_ret_status = _aidl_data.readString16Vector(&in_names);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -3638,6 +3852,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::VerifyNamesWithNullableInterfaceArray::cppServer");
_aidl_ret_status = _aidl_data.readStrongBinderVector(&in_services);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -3672,6 +3887,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::GetInterfaceList::cppServer");
_aidl_ret_status = _aidl_data.readString16Vector(&in_names);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -3703,6 +3919,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::VerifyNamesWithInterfaceList::cppServer");
_aidl_ret_status = _aidl_data.readStrongBinderVector(&in_services);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -3738,6 +3955,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseStringList::cppServer");
_aidl_ret_status = _aidl_data.readString16Vector(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -3772,6 +3990,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatParcelFileDescriptor::cppServer");
_aidl_ret_status = _aidl_data.readParcelable(&in_read);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -3803,6 +4022,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseParcelFileDescriptorArray::cppServer");
_aidl_ret_status = _aidl_data.readParcelableVector(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -3840,6 +4060,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ThrowServiceException::cppServer");
_aidl_ret_status = _aidl_data.readInt32(&in_code);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -3866,6 +4087,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatNullableIntArray::cppServer");
_aidl_ret_status = _aidl_data.readInt32Vector(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -3896,6 +4118,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatNullableByteEnumArray::cppServer");
_aidl_ret_status = _aidl_data.readEnumVector(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -3926,6 +4149,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatNullableIntEnumArray::cppServer");
_aidl_ret_status = _aidl_data.readEnumVector(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -3956,6 +4180,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatNullableLongEnumArray::cppServer");
_aidl_ret_status = _aidl_data.readEnumVector(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -3986,6 +4211,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatNullableString::cppServer");
_aidl_ret_status = _aidl_data.readString16(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -4016,6 +4242,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatNullableStringList::cppServer");
_aidl_ret_status = _aidl_data.readString16Vector(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -4046,6 +4273,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatNullableParcelable::cppServer");
_aidl_ret_status = _aidl_data.readParcelable(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -4076,6 +4304,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatNullableParcelableArray::cppServer");
_aidl_ret_status = _aidl_data.readParcelableVector(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -4106,6 +4335,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatNullableParcelableList::cppServer");
_aidl_ret_status = _aidl_data.readParcelableVector(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -4135,6 +4365,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::TakesAnIBinder::cppServer");
_aidl_ret_status = _aidl_data.readStrongBinder(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -4160,6 +4391,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::TakesANullableIBinder::cppServer");
_aidl_ret_status = _aidl_data.readNullableStrongBinder(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -4185,6 +4417,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::TakesAnIBinderList::cppServer");
_aidl_ret_status = _aidl_data.readStrongBinderVector(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -4210,6 +4443,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::TakesANullableIBinderList::cppServer");
_aidl_ret_status = _aidl_data.readStrongBinderVector(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -4236,6 +4470,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatUtf8CppString::cppServer");
_aidl_ret_status = _aidl_data.readUtf8FromUtf16(&in_token);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -4266,6 +4501,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatNullableUtf8CppString::cppServer");
_aidl_ret_status = _aidl_data.readUtf8FromUtf16(&in_token);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -4297,6 +4533,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseUtf8CppString::cppServer");
_aidl_ret_status = _aidl_data.readUtf8VectorFromUtf16Vector(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -4336,6 +4573,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseNullableUtf8CppString::cppServer");
_aidl_ret_status = _aidl_data.readUtf8VectorFromUtf16Vector(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -4375,6 +4613,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseUtf8CppStringList::cppServer");
_aidl_ret_status = _aidl_data.readUtf8VectorFromUtf16Vector(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -4409,6 +4648,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::GetCallback::cppServer");
_aidl_ret_status = _aidl_data.readBool(&in_return_null);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -4438,6 +4678,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::FillOutStructuredParcelable::cppServer");
_aidl_ret_status = _aidl_data.readParcelable(&in_parcel);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -4468,6 +4709,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::RepeatExtendableParcelable::cppServer");
_aidl_ret_status = _aidl_data.readParcelable(&in_ep);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -4498,6 +4740,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseList::cppServer");
_aidl_ret_status = _aidl_data.readParcelable(&in_list);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -4529,6 +4772,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseIBinderArray::cppServer");
_aidl_ret_status = _aidl_data.readStrongBinderVector(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -4568,6 +4812,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::ReverseNullableIBinderArray::cppServer");
_aidl_ret_status = _aidl_data.readStrongBinderVector(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -4605,6 +4850,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::GetOldNameInterface::cppServer");
::android::binder::Status _aidl_status(GetOldNameInterface(&_aidl_return));
_aidl_ret_status = _aidl_status.writeToParcel(_aidl_reply);
if (((_aidl_ret_status) != (::android::OK))) {
@@ -4626,6 +4872,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::GetNewNameInterface::cppServer");
::android::binder::Status _aidl_status(GetNewNameInterface(&_aidl_return));
_aidl_ret_status = _aidl_status.writeToParcel(_aidl_reply);
if (((_aidl_ret_status) != (::android::OK))) {
@@ -4648,6 +4895,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::GetUnionTags::cppServer");
_aidl_ret_status = _aidl_data.readParcelableVector(&in_input);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -4677,6 +4925,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::GetCppJavaTests::cppServer");
::android::binder::Status _aidl_status(GetCppJavaTests(&_aidl_return));
_aidl_ret_status = _aidl_status.writeToParcel(_aidl_reply);
if (((_aidl_ret_status) != (::android::OK))) {
@@ -4698,6 +4947,7 @@ BnTestService::BnTestService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::getBackendType::cppServer");
::android::binder::Status _aidl_status(getBackendType(&_aidl_return));
_aidl_ret_status = _aidl_status.writeToParcel(_aidl_reply);
if (((_aidl_ret_status) != (::android::OK))) {
@@ -4712,6 +4962,37 @@ BnTestService::BnTestService()
}
}
break;
+ case BnTestService::TRANSACTION_GetCircular:
+ {
+ ::android::aidl::tests::CircularParcelable out_cp;
+ ::android::sp<::android::aidl::tests::ICircular> _aidl_return;
+ if (!(_aidl_data.checkInterface(this))) {
+ _aidl_ret_status = ::android::BAD_TYPE;
+ break;
+ }
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ITestService::GetCircular::cppServer");
+ if (auto st = _aidl_data.enforceNoDataAvail(); !st.isOk()) {
+ _aidl_ret_status = st.writeToParcel(_aidl_reply);
+ break;
+ }
+ ::android::binder::Status _aidl_status(GetCircular(&out_cp, &_aidl_return));
+ _aidl_ret_status = _aidl_status.writeToParcel(_aidl_reply);
+ if (((_aidl_ret_status) != (::android::OK))) {
+ break;
+ }
+ if (!_aidl_status.isOk()) {
+ break;
+ }
+ _aidl_ret_status = _aidl_reply->writeStrongBinder(_aidl_return);
+ if (((_aidl_ret_status) != (::android::OK))) {
+ break;
+ }
+ _aidl_ret_status = _aidl_reply->writeParcelable(out_cp);
+ if (((_aidl_ret_status) != (::android::OK))) {
+ break;
+ }
+ }
+ break;
default:
{
_aidl_ret_status = ::android::BBinder::onTransact(_aidl_code, _aidl_data, _aidl_reply, _aidl_flags);
@@ -4744,7 +5025,7 @@ namespace tests {
}
if (_aidl_parcelable_raw_size < 4) return ::android::BAD_VALUE;
size_t _aidl_parcelable_size = static_cast<size_t>(_aidl_parcelable_raw_size);
- if (_aidl_start_pos > SIZE_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
+ if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
_aidl_parcel->setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
return _aidl_ret_status;
}
@@ -4776,7 +5057,7 @@ namespace tests {
}
if (_aidl_parcelable_raw_size < 4) return ::android::BAD_VALUE;
size_t _aidl_parcelable_size = static_cast<size_t>(_aidl_parcelable_raw_size);
- if (_aidl_start_pos > SIZE_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
+ if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
if (_aidl_parcel->dataPosition() - _aidl_start_pos >= _aidl_parcelable_size) {
_aidl_parcel->setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
return _aidl_ret_status;
@@ -5009,3 +5290,151 @@ namespace tests {
} // namespace tests
} // namespace aidl
} // namespace android
+#include <android/aidl/tests/ITestService.h>
+#include <android/aidl/tests/ITestService.h>
+namespace android {
+namespace aidl {
+namespace tests {
+DO_NOT_DIRECTLY_USE_ME_IMPLEMENT_META_NESTED_INTERFACE(ITestService::CompilerChecks, Foo, "android.aidl.tests.ITestService.CompilerChecks.Foo")
+} // namespace tests
+} // namespace aidl
+} // namespace android
+#include <android/aidl/tests/ITestService.h>
+#include <android/aidl/tests/ITestService.h>
+#include <binder/Parcel.h>
+#include <android-base/macros.h>
+
+namespace android {
+namespace aidl {
+namespace tests {
+
+ITestService::CompilerChecks::BpFoo::BpFoo(const ::android::sp<::android::IBinder>& _aidl_impl)
+ : BpInterface<IFoo>(_aidl_impl){
+}
+
+} // namespace tests
+} // namespace aidl
+} // namespace android
+#include <android/aidl/tests/ITestService.h>
+#include <binder/Parcel.h>
+#include <binder/Stability.h>
+
+namespace android {
+namespace aidl {
+namespace tests {
+
+ITestService::CompilerChecks::BnFoo::BnFoo()
+{
+ ::android::internal::Stability::markCompilationUnit(this);
+}
+
+::android::status_t ITestService::CompilerChecks::BnFoo::onTransact(uint32_t _aidl_code, const ::android::Parcel& _aidl_data, ::android::Parcel* _aidl_reply, uint32_t _aidl_flags) {
+ ::android::status_t _aidl_ret_status = ::android::OK;
+ switch (_aidl_code) {
+ default:
+ {
+ _aidl_ret_status = ::android::BBinder::onTransact(_aidl_code, _aidl_data, _aidl_reply, _aidl_flags);
+ }
+ break;
+ }
+ if (_aidl_ret_status == ::android::UNEXPECTED_NULL) {
+ _aidl_ret_status = ::android::binder::Status::fromExceptionCode(::android::binder::Status::EX_NULL_POINTER).writeOverParcel(_aidl_reply);
+ }
+ return _aidl_ret_status;
+}
+
+} // namespace tests
+} // namespace aidl
+} // namespace android
+#include <android/aidl/tests/ITestService.h>
+
+namespace android {
+namespace aidl {
+namespace tests {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+::android::status_t ITestService::CompilerChecks::HasDeprecated::readFromParcel(const ::android::Parcel* _aidl_parcel) {
+ ::android::status_t _aidl_ret_status = ::android::OK;
+ size_t _aidl_start_pos = _aidl_parcel->dataPosition();
+ int32_t _aidl_parcelable_raw_size = 0;
+ _aidl_ret_status = _aidl_parcel->readInt32(&_aidl_parcelable_raw_size);
+ if (((_aidl_ret_status) != (::android::OK))) {
+ return _aidl_ret_status;
+ }
+ if (_aidl_parcelable_raw_size < 4) return ::android::BAD_VALUE;
+ size_t _aidl_parcelable_size = static_cast<size_t>(_aidl_parcelable_raw_size);
+ if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
+ if (_aidl_parcel->dataPosition() - _aidl_start_pos >= _aidl_parcelable_size) {
+ _aidl_parcel->setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
+ return _aidl_ret_status;
+ }
+ _aidl_ret_status = _aidl_parcel->readInt32(&deprecated);
+ if (((_aidl_ret_status) != (::android::OK))) {
+ return _aidl_ret_status;
+ }
+ _aidl_parcel->setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
+ return _aidl_ret_status;
+}
+::android::status_t ITestService::CompilerChecks::HasDeprecated::writeToParcel(::android::Parcel* _aidl_parcel) const {
+ ::android::status_t _aidl_ret_status = ::android::OK;
+ auto _aidl_start_pos = _aidl_parcel->dataPosition();
+ _aidl_parcel->writeInt32(0);
+ _aidl_ret_status = _aidl_parcel->writeInt32(deprecated);
+ if (((_aidl_ret_status) != (::android::OK))) {
+ return _aidl_ret_status;
+ }
+ auto _aidl_end_pos = _aidl_parcel->dataPosition();
+ _aidl_parcel->setDataPosition(_aidl_start_pos);
+ _aidl_parcel->writeInt32(_aidl_end_pos - _aidl_start_pos);
+ _aidl_parcel->setDataPosition(_aidl_end_pos);
+ return _aidl_ret_status;
+}
+#pragma clang diagnostic pop
+} // namespace tests
+} // namespace aidl
+} // namespace android
+#include <android/aidl/tests/ITestService.h>
+
+namespace android {
+namespace aidl {
+namespace tests {
+::android::status_t ITestService::CompilerChecks::UsingHasDeprecated::readFromParcel(const ::android::Parcel* _aidl_parcel) {
+ ::android::status_t _aidl_ret_status;
+ int32_t _aidl_tag;
+ if ((_aidl_ret_status = _aidl_parcel->readInt32(&_aidl_tag)) != ::android::OK) return _aidl_ret_status;
+ switch (static_cast<Tag>(_aidl_tag)) {
+ case n: {
+ int32_t _aidl_value;
+ if ((_aidl_ret_status = _aidl_parcel->readInt32(&_aidl_value)) != ::android::OK) return _aidl_ret_status;
+ if constexpr (std::is_trivially_copyable_v<int32_t>) {
+ set<n>(_aidl_value);
+ } else {
+ // NOLINTNEXTLINE(performance-move-const-arg)
+ set<n>(std::move(_aidl_value));
+ }
+ return ::android::OK; }
+ case m: {
+ ::android::aidl::tests::ITestService::CompilerChecks::HasDeprecated _aidl_value;
+ if ((_aidl_ret_status = _aidl_parcel->readParcelable(&_aidl_value)) != ::android::OK) return _aidl_ret_status;
+ if constexpr (std::is_trivially_copyable_v<::android::aidl::tests::ITestService::CompilerChecks::HasDeprecated>) {
+ set<m>(_aidl_value);
+ } else {
+ // NOLINTNEXTLINE(performance-move-const-arg)
+ set<m>(std::move(_aidl_value));
+ }
+ return ::android::OK; }
+ }
+ return ::android::BAD_VALUE;
+}
+::android::status_t ITestService::CompilerChecks::UsingHasDeprecated::writeToParcel(::android::Parcel* _aidl_parcel) const {
+ ::android::status_t _aidl_ret_status = _aidl_parcel->writeInt32(static_cast<int32_t>(getTag()));
+ if (_aidl_ret_status != ::android::OK) return _aidl_ret_status;
+ switch (getTag()) {
+ case n: return _aidl_parcel->writeInt32(get<n>());
+ case m: return _aidl_parcel->writeParcelable(get<m>());
+ }
+ __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, "can't reach here");
+}
+} // namespace tests
+} // namespace aidl
+} // namespace android
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/ITestService.cpp.d b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/ITestService.cpp.d
index de66202b..89d3a1da 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/ITestService.cpp.d
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/ITestService.cpp.d
@@ -2,6 +2,8 @@ out/soong/.intermediates/system/tools/aidl/aidl-test-interface-cpp-source/gen/an
system/tools/aidl/tests/android/aidl/tests/ITestService.aidl \
system/tools/aidl/tests/android/aidl/tests/BackendType.aidl \
system/tools/aidl/tests/android/aidl/tests/ByteEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/CircularParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ICircular.aidl \
system/tools/aidl/tests/android/aidl/tests/INamedCallback.aidl \
system/tools/aidl/tests/android/aidl/tests/INewName.aidl \
system/tools/aidl/tests/android/aidl/tests/IOldName.aidl \
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/ListOfInterfaces.cpp b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/ListOfInterfaces.cpp
index dfca641e..949f0f7a 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/ListOfInterfaces.cpp
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/ListOfInterfaces.cpp
@@ -13,7 +13,7 @@ namespace tests {
}
if (_aidl_parcelable_raw_size < 4) return ::android::BAD_VALUE;
size_t _aidl_parcelable_size = static_cast<size_t>(_aidl_parcelable_raw_size);
- if (_aidl_start_pos > SIZE_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
+ if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
_aidl_parcel->setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
return _aidl_ret_status;
}
@@ -114,6 +114,7 @@ ListOfInterfaces::BpMyInterface::BpMyInterface(const ::android::sp<::android::IB
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::IMyInterface::methodWithInterfaces::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -215,6 +216,7 @@ ListOfInterfaces::BnMyInterface::BnMyInterface()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::IMyInterface::methodWithInterfaces::cppServer");
_aidl_ret_status = _aidl_data.readStrongBinder(&in_iface);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -303,7 +305,7 @@ namespace tests {
}
if (_aidl_parcelable_raw_size < 4) return ::android::BAD_VALUE;
size_t _aidl_parcelable_size = static_cast<size_t>(_aidl_parcelable_raw_size);
- if (_aidl_start_pos > SIZE_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
+ if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
if (_aidl_parcel->dataPosition() - _aidl_start_pos >= _aidl_parcelable_size) {
_aidl_parcel->setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
return _aidl_ret_status;
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/OtherParcelableForToString.cpp b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/OtherParcelableForToString.cpp
index a47a1b6b..534d6ce5 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/OtherParcelableForToString.cpp
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/OtherParcelableForToString.cpp
@@ -13,7 +13,7 @@ namespace tests {
}
if (_aidl_parcelable_raw_size < 4) return ::android::BAD_VALUE;
size_t _aidl_parcelable_size = static_cast<size_t>(_aidl_parcelable_raw_size);
- if (_aidl_start_pos > SIZE_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
+ if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
if (_aidl_parcel->dataPosition() - _aidl_start_pos >= _aidl_parcelable_size) {
_aidl_parcel->setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
return _aidl_ret_status;
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/ParcelableForToString.cpp b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/ParcelableForToString.cpp
index bd3bdc26..f500149d 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/ParcelableForToString.cpp
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/ParcelableForToString.cpp
@@ -13,7 +13,7 @@ namespace tests {
}
if (_aidl_parcelable_raw_size < 4) return ::android::BAD_VALUE;
size_t _aidl_parcelable_size = static_cast<size_t>(_aidl_parcelable_raw_size);
- if (_aidl_start_pos > SIZE_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
+ if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
if (_aidl_parcel->dataPosition() - _aidl_start_pos >= _aidl_parcelable_size) {
_aidl_parcel->setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
return _aidl_ret_status;
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/RecursiveList.cpp b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/RecursiveList.cpp
index e740ce33..a3f7b059 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/RecursiveList.cpp
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/RecursiveList.cpp
@@ -13,7 +13,7 @@ namespace tests {
}
if (_aidl_parcelable_raw_size < 4) return ::android::BAD_VALUE;
size_t _aidl_parcelable_size = static_cast<size_t>(_aidl_parcelable_raw_size);
- if (_aidl_start_pos > SIZE_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
+ if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
if (_aidl_parcel->dataPosition() - _aidl_start_pos >= _aidl_parcelable_size) {
_aidl_parcel->setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
return _aidl_ret_status;
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/StructuredParcelable.cpp b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/StructuredParcelable.cpp
index 73d8eff2..c53aa224 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/StructuredParcelable.cpp
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/StructuredParcelable.cpp
@@ -13,7 +13,7 @@ namespace tests {
}
if (_aidl_parcelable_raw_size < 4) return ::android::BAD_VALUE;
size_t _aidl_parcelable_size = static_cast<size_t>(_aidl_parcelable_raw_size);
- if (_aidl_start_pos > SIZE_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
+ if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
if (_aidl_parcel->dataPosition() - _aidl_start_pos >= _aidl_parcelable_size) {
_aidl_parcel->setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
return _aidl_ret_status;
@@ -705,7 +705,7 @@ namespace tests {
}
if (_aidl_parcelable_raw_size < 4) return ::android::BAD_VALUE;
size_t _aidl_parcelable_size = static_cast<size_t>(_aidl_parcelable_raw_size);
- if (_aidl_start_pos > SIZE_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
+ if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
_aidl_parcel->setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
return _aidl_ret_status;
}
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/extension/ExtendableParcelable.cpp b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/extension/ExtendableParcelable.cpp
index 7935b08d..4e6a0dd1 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/extension/ExtendableParcelable.cpp
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/extension/ExtendableParcelable.cpp
@@ -14,7 +14,7 @@ namespace extension {
}
if (_aidl_parcelable_raw_size < 4) return ::android::BAD_VALUE;
size_t _aidl_parcelable_size = static_cast<size_t>(_aidl_parcelable_raw_size);
- if (_aidl_start_pos > SIZE_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
+ if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
if (_aidl_parcel->dataPosition() - _aidl_start_pos >= _aidl_parcelable_size) {
_aidl_parcel->setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
return _aidl_ret_status;
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/extension/MyExt.cpp b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/extension/MyExt.cpp
index b14a6eaa..d91b17a0 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/extension/MyExt.cpp
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/extension/MyExt.cpp
@@ -14,7 +14,7 @@ namespace extension {
}
if (_aidl_parcelable_raw_size < 4) return ::android::BAD_VALUE;
size_t _aidl_parcelable_size = static_cast<size_t>(_aidl_parcelable_raw_size);
- if (_aidl_start_pos > SIZE_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
+ if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
if (_aidl_parcel->dataPosition() - _aidl_start_pos >= _aidl_parcelable_size) {
_aidl_parcel->setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
return _aidl_ret_status;
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/extension/MyExt2.cpp b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/extension/MyExt2.cpp
index ec5c5928..bc9306e7 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/extension/MyExt2.cpp
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/extension/MyExt2.cpp
@@ -14,7 +14,7 @@ namespace extension {
}
if (_aidl_parcelable_raw_size < 4) return ::android::BAD_VALUE;
size_t _aidl_parcelable_size = static_cast<size_t>(_aidl_parcelable_raw_size);
- if (_aidl_start_pos > SIZE_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
+ if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
if (_aidl_parcel->dataPosition() - _aidl_start_pos >= _aidl_parcelable_size) {
_aidl_parcel->setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
return _aidl_ret_status;
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/extension/MyExtLike.cpp b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/extension/MyExtLike.cpp
index 373bb6d9..33e1f440 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/extension/MyExtLike.cpp
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/extension/MyExtLike.cpp
@@ -14,7 +14,7 @@ namespace extension {
}
if (_aidl_parcelable_raw_size < 4) return ::android::BAD_VALUE;
size_t _aidl_parcelable_size = static_cast<size_t>(_aidl_parcelable_raw_size);
- if (_aidl_start_pos > SIZE_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
+ if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
if (_aidl_parcel->dataPosition() - _aidl_start_pos >= _aidl_parcelable_size) {
_aidl_parcel->setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
return _aidl_ret_status;
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/nested/DeeplyNested.cpp b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/nested/DeeplyNested.cpp
index a44388d3..074314b1 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/nested/DeeplyNested.cpp
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/nested/DeeplyNested.cpp
@@ -14,7 +14,7 @@ namespace nested {
}
if (_aidl_parcelable_raw_size < 4) return ::android::BAD_VALUE;
size_t _aidl_parcelable_size = static_cast<size_t>(_aidl_parcelable_raw_size);
- if (_aidl_start_pos > SIZE_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
+ if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
_aidl_parcel->setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
return _aidl_ret_status;
}
@@ -48,7 +48,7 @@ namespace nested {
}
if (_aidl_parcelable_raw_size < 4) return ::android::BAD_VALUE;
size_t _aidl_parcelable_size = static_cast<size_t>(_aidl_parcelable_raw_size);
- if (_aidl_start_pos > SIZE_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
+ if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
if (_aidl_parcel->dataPosition() - _aidl_start_pos >= _aidl_parcelable_size) {
_aidl_parcel->setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
return _aidl_ret_status;
@@ -94,7 +94,7 @@ namespace nested {
}
if (_aidl_parcelable_raw_size < 4) return ::android::BAD_VALUE;
size_t _aidl_parcelable_size = static_cast<size_t>(_aidl_parcelable_raw_size);
- if (_aidl_start_pos > SIZE_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
+ if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
_aidl_parcel->setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
return _aidl_ret_status;
}
@@ -128,7 +128,7 @@ namespace nested {
}
if (_aidl_parcelable_raw_size < 4) return ::android::BAD_VALUE;
size_t _aidl_parcelable_size = static_cast<size_t>(_aidl_parcelable_raw_size);
- if (_aidl_start_pos > SIZE_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
+ if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
_aidl_parcel->setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
return _aidl_ret_status;
}
@@ -162,7 +162,7 @@ namespace nested {
}
if (_aidl_parcelable_raw_size < 4) return ::android::BAD_VALUE;
size_t _aidl_parcelable_size = static_cast<size_t>(_aidl_parcelable_raw_size);
- if (_aidl_start_pos > SIZE_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
+ if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
_aidl_parcel->setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
return _aidl_ret_status;
}
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/nested/INestedService.cpp b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/nested/INestedService.cpp
index b775900b..7b35c590 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/nested/INestedService.cpp
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/nested/INestedService.cpp
@@ -29,6 +29,7 @@ BpNestedService::BpNestedService(const ::android::sp<::android::IBinder>& _aidl_
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::INestedService::flipStatus::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -66,6 +67,7 @@ BpNestedService::BpNestedService(const ::android::sp<::android::IBinder>& _aidl_
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::INestedService::flipStatusWithCallback::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -126,6 +128,7 @@ BnNestedService::BnNestedService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::INestedService::flipStatus::cppServer");
_aidl_ret_status = _aidl_data.readParcelable(&in_p);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -156,6 +159,7 @@ BnNestedService::BnNestedService()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::INestedService::flipStatusWithCallback::cppServer");
_aidl_ret_status = _aidl_data.readByte(reinterpret_cast<int8_t *>(&in_status));
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -210,7 +214,7 @@ namespace nested {
}
if (_aidl_parcelable_raw_size < 4) return ::android::BAD_VALUE;
size_t _aidl_parcelable_size = static_cast<size_t>(_aidl_parcelable_raw_size);
- if (_aidl_start_pos > SIZE_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
+ if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
if (_aidl_parcel->dataPosition() - _aidl_start_pos >= _aidl_parcelable_size) {
_aidl_parcel->setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
return _aidl_ret_status;
@@ -271,6 +275,7 @@ INestedService::BpCallback::BpCallback(const ::android::sp<::android::IBinder>&
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ICallback::done::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -326,6 +331,7 @@ INestedService::BnCallback::BnCallback()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ICallback::done::cppServer");
_aidl_ret_status = _aidl_data.readByte(reinterpret_cast<int8_t *>(&in_status));
if (((_aidl_ret_status) != (::android::OK))) {
break;
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/nested/ParcelableWithNested.cpp b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/nested/ParcelableWithNested.cpp
index 94a515fd..60032628 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/nested/ParcelableWithNested.cpp
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/nested/ParcelableWithNested.cpp
@@ -14,7 +14,7 @@ namespace nested {
}
if (_aidl_parcelable_raw_size < 4) return ::android::BAD_VALUE;
size_t _aidl_parcelable_size = static_cast<size_t>(_aidl_parcelable_raw_size);
- if (_aidl_start_pos > SIZE_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
+ if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
if (_aidl_parcel->dataPosition() - _aidl_start_pos >= _aidl_parcelable_size) {
_aidl_parcel->setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
return _aidl_ret_status;
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/unions/EnumUnion.cpp b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/unions/EnumUnion.cpp
index 0261f25f..058fa93f 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/unions/EnumUnion.cpp
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/android/aidl/tests/unions/EnumUnion.cpp
@@ -4,6 +4,8 @@ namespace android {
namespace aidl {
namespace tests {
namespace unions {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
::android::status_t EnumUnion::readFromParcel(const ::android::Parcel* _aidl_parcel) {
::android::status_t _aidl_ret_status;
int32_t _aidl_tag;
@@ -29,8 +31,6 @@ namespace unions {
set<longEnum>(std::move(_aidl_value));
}
return ::android::OK; }
- #pragma clang diagnostic push
- #pragma clang diagnostic ignored "-Wdeprecated-declarations"
case deprecatedField: {
int32_t _aidl_value;
if ((_aidl_ret_status = _aidl_parcel->readInt32(&_aidl_value)) != ::android::OK) return _aidl_ret_status;
@@ -41,7 +41,6 @@ namespace unions {
set<deprecatedField>(std::move(_aidl_value));
}
return ::android::OK; }
- #pragma clang diagnostic pop
}
return ::android::BAD_VALUE;
}
@@ -58,6 +57,7 @@ namespace unions {
}
__assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, "can't reach here");
}
+#pragma clang diagnostic pop
} // namespace unions
} // namespace tests
} // namespace aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/ArrayOfInterfaces.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/ArrayOfInterfaces.h
index b5c0a6ce..342469e8 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/ArrayOfInterfaces.h
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/ArrayOfInterfaces.h
@@ -3,11 +3,13 @@
#include <android/aidl/tests/ArrayOfInterfaces.h>
#include <android/binder_to_string.h>
#include <array>
+#include <binder/Delegate.h>
#include <binder/Enums.h>
#include <binder/IBinder.h>
#include <binder/IInterface.h>
#include <binder/Parcel.h>
#include <binder/Status.h>
+#include <binder/Trace.h>
#include <cassert>
#include <cstdint>
#include <optional>
@@ -29,8 +31,11 @@ namespace aidl {
namespace tests {
class ArrayOfInterfaces : public ::android::Parcelable {
public:
+ class IEmptyInterfaceDelegator;
+
class IEmptyInterface : public ::android::IInterface {
public:
+ typedef IEmptyInterfaceDelegator DefaultDelegator;
DECLARE_META_INTERFACE(EmptyInterface)
}; // class IEmptyInterface
@@ -53,13 +58,17 @@ public:
class IEmptyInterfaceDelegator : public BnEmptyInterface {
public:
- explicit IEmptyInterfaceDelegator(::android::sp<IEmptyInterface> &impl) : _aidl_delegate(impl) {}
+ explicit IEmptyInterfaceDelegator(const ::android::sp<IEmptyInterface> &impl) : _aidl_delegate(impl) {}
+ ::android::sp<IEmptyInterface> getImpl() { return _aidl_delegate; }
private:
::android::sp<IEmptyInterface> _aidl_delegate;
}; // class IEmptyInterfaceDelegator
+ class IMyInterfaceDelegator;
+
class IMyInterface : public ::android::IInterface {
public:
+ typedef IMyInterfaceDelegator DefaultDelegator;
DECLARE_META_INTERFACE(MyInterface)
virtual ::android::binder::Status methodWithInterfaces(const ::android::sp<::android::aidl::tests::ArrayOfInterfaces::IEmptyInterface>& iface, const ::android::sp<::android::aidl::tests::ArrayOfInterfaces::IEmptyInterface>& nullable_iface, const ::std::vector<::android::sp<::android::aidl::tests::ArrayOfInterfaces::IEmptyInterface>>& iface_array_in, ::std::vector<::android::sp<::android::aidl::tests::ArrayOfInterfaces::IEmptyInterface>>* iface_array_out, ::std::vector<::android::sp<::android::aidl::tests::ArrayOfInterfaces::IEmptyInterface>>* iface_array_inout, const ::std::optional<::std::vector<::android::sp<::android::aidl::tests::ArrayOfInterfaces::IEmptyInterface>>>& nullable_iface_array_in, ::std::optional<::std::vector<::android::sp<::android::aidl::tests::ArrayOfInterfaces::IEmptyInterface>>>* nullable_iface_array_out, ::std::optional<::std::vector<::android::sp<::android::aidl::tests::ArrayOfInterfaces::IEmptyInterface>>>* nullable_iface_array_inout, ::std::optional<::std::vector<::android::sp<::android::aidl::tests::ArrayOfInterfaces::IEmptyInterface>>>* _aidl_return) = 0;
}; // class IMyInterface
@@ -88,10 +97,19 @@ public:
class IMyInterfaceDelegator : public BnMyInterface {
public:
- explicit IMyInterfaceDelegator(::android::sp<IMyInterface> &impl) : _aidl_delegate(impl) {}
+ explicit IMyInterfaceDelegator(const ::android::sp<IMyInterface> &impl) : _aidl_delegate(impl) {}
+ ::android::sp<IMyInterface> getImpl() { return _aidl_delegate; }
::android::binder::Status methodWithInterfaces(const ::android::sp<::android::aidl::tests::ArrayOfInterfaces::IEmptyInterface>& iface, const ::android::sp<::android::aidl::tests::ArrayOfInterfaces::IEmptyInterface>& nullable_iface, const ::std::vector<::android::sp<::android::aidl::tests::ArrayOfInterfaces::IEmptyInterface>>& iface_array_in, ::std::vector<::android::sp<::android::aidl::tests::ArrayOfInterfaces::IEmptyInterface>>* iface_array_out, ::std::vector<::android::sp<::android::aidl::tests::ArrayOfInterfaces::IEmptyInterface>>* iface_array_inout, const ::std::optional<::std::vector<::android::sp<::android::aidl::tests::ArrayOfInterfaces::IEmptyInterface>>>& nullable_iface_array_in, ::std::optional<::std::vector<::android::sp<::android::aidl::tests::ArrayOfInterfaces::IEmptyInterface>>>* nullable_iface_array_out, ::std::optional<::std::vector<::android::sp<::android::aidl::tests::ArrayOfInterfaces::IEmptyInterface>>>* nullable_iface_array_inout, ::std::optional<::std::vector<::android::sp<::android::aidl::tests::ArrayOfInterfaces::IEmptyInterface>>>* _aidl_return) override {
- return _aidl_delegate->methodWithInterfaces(iface, nullable_iface, iface_array_in, iface_array_out, iface_array_inout, nullable_iface_array_in, nullable_iface_array_out, nullable_iface_array_inout, _aidl_return);
+ ::android::sp<::android::aidl::tests::ArrayOfInterfaces::IEmptyInterfaceDelegator> _iface;
+ if (iface) {
+ _iface = ::android::sp<::android::aidl::tests::ArrayOfInterfaces::IEmptyInterfaceDelegator>::cast(delegate(iface));
+ }
+ ::android::sp<::android::aidl::tests::ArrayOfInterfaces::IEmptyInterfaceDelegator> _nullable_iface;
+ if (nullable_iface) {
+ _nullable_iface = ::android::sp<::android::aidl::tests::ArrayOfInterfaces::IEmptyInterfaceDelegator>::cast(delegate(nullable_iface));
+ }
+ return _aidl_delegate->methodWithInterfaces(_iface, _nullable_iface, iface_array_in, iface_array_out, iface_array_inout, nullable_iface_array_in, nullable_iface_array_out, nullable_iface_array_inout, _aidl_return);
}
private:
::android::sp<IMyInterface> _aidl_delegate;
@@ -124,8 +142,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.tests.ArrayOfInterfaces.MyParcelable");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.tests.ArrayOfInterfaces.MyParcelable");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
@@ -219,8 +237,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.tests.ArrayOfInterfaces.MyUnion");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.tests.ArrayOfInterfaces.MyUnion");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
@@ -259,8 +277,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.tests.ArrayOfInterfaces");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.tests.ArrayOfInterfaces");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BnCircular.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BnCircular.h
new file mode 100644
index 00000000..c5c2f6ee
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BnCircular.h
@@ -0,0 +1,37 @@
+#pragma once
+
+#include <binder/IInterface.h>
+#include <android/aidl/tests/ICircular.h>
+#include <android/aidl/tests/BnCircular.h>
+#include <android/aidl/tests/BnTestService.h>
+#include <binder/Delegate.h>
+
+
+namespace android {
+namespace aidl {
+namespace tests {
+class BnCircular : public ::android::BnInterface<ICircular> {
+public:
+ static constexpr uint32_t TRANSACTION_GetTestService = ::android::IBinder::FIRST_CALL_TRANSACTION + 0;
+ explicit BnCircular();
+ ::android::status_t onTransact(uint32_t _aidl_code, const ::android::Parcel& _aidl_data, ::android::Parcel* _aidl_reply, uint32_t _aidl_flags) override;
+}; // class BnCircular
+
+class ICircularDelegator : public BnCircular {
+public:
+ explicit ICircularDelegator(const ::android::sp<ICircular> &impl) : _aidl_delegate(impl) {}
+
+ ::android::sp<ICircular> getImpl() { return _aidl_delegate; }
+ ::android::binder::Status GetTestService(::android::sp<::android::aidl::tests::ITestService>* _aidl_return) override {
+ auto _status = _aidl_delegate->GetTestService(_aidl_return);
+ if (*_aidl_return) {
+ *_aidl_return = ::android::sp<::android::aidl::tests::ITestServiceDelegator>::cast(delegate(*_aidl_return));
+ }
+ return _status;
+ }
+private:
+ ::android::sp<ICircular> _aidl_delegate;
+}; // class ICircularDelegator
+} // namespace tests
+} // namespace aidl
+} // namespace android
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BnCircularParcelable.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BnCircularParcelable.h
new file mode 100644
index 00000000..ce72aa31
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BnCircularParcelable.h
@@ -0,0 +1 @@
+#error TODO(b/111362593) parcelables do not have bn classes \ No newline at end of file
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BnDeprecated.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BnDeprecated.h
index 36f42ef3..def983b1 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BnDeprecated.h
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BnDeprecated.h
@@ -2,6 +2,9 @@
#include <binder/IInterface.h>
#include <android/aidl/tests/IDeprecated.h>
+#include <android/aidl/tests/BnDeprecated.h>
+#include <binder/Delegate.h>
+
namespace android {
namespace aidl {
@@ -14,8 +17,9 @@ public:
class __attribute__((deprecated("test"))) IDeprecatedDelegator : public BnDeprecated {
public:
- explicit IDeprecatedDelegator(::android::sp<IDeprecated> &impl) : _aidl_delegate(impl) {}
+ explicit IDeprecatedDelegator(const ::android::sp<IDeprecated> &impl) : _aidl_delegate(impl) {}
+ ::android::sp<IDeprecated> getImpl() { return _aidl_delegate; }
private:
::android::sp<IDeprecated> _aidl_delegate;
}; // class IDeprecatedDelegator
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BnNamedCallback.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BnNamedCallback.h
index 4044de8b..34cf6704 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BnNamedCallback.h
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BnNamedCallback.h
@@ -2,6 +2,9 @@
#include <binder/IInterface.h>
#include <android/aidl/tests/INamedCallback.h>
+#include <android/aidl/tests/BnNamedCallback.h>
+#include <binder/Delegate.h>
+
namespace android {
namespace aidl {
@@ -15,8 +18,9 @@ public:
class INamedCallbackDelegator : public BnNamedCallback {
public:
- explicit INamedCallbackDelegator(::android::sp<INamedCallback> &impl) : _aidl_delegate(impl) {}
+ explicit INamedCallbackDelegator(const ::android::sp<INamedCallback> &impl) : _aidl_delegate(impl) {}
+ ::android::sp<INamedCallback> getImpl() { return _aidl_delegate; }
::android::binder::Status GetName(::android::String16* _aidl_return) override {
return _aidl_delegate->GetName(_aidl_return);
}
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BnNewName.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BnNewName.h
index 0db65245..0ce67e2b 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BnNewName.h
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BnNewName.h
@@ -2,6 +2,9 @@
#include <binder/IInterface.h>
#include <android/aidl/tests/INewName.h>
+#include <android/aidl/tests/BnNewName.h>
+#include <binder/Delegate.h>
+
namespace android {
namespace aidl {
@@ -15,8 +18,9 @@ public:
class INewNameDelegator : public BnNewName {
public:
- explicit INewNameDelegator(::android::sp<INewName> &impl) : _aidl_delegate(impl) {}
+ explicit INewNameDelegator(const ::android::sp<INewName> &impl) : _aidl_delegate(impl) {}
+ ::android::sp<INewName> getImpl() { return _aidl_delegate; }
::android::binder::Status RealName(::android::String16* _aidl_return) override {
return _aidl_delegate->RealName(_aidl_return);
}
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BnOldName.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BnOldName.h
index aa9e3b00..17dd3446 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BnOldName.h
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BnOldName.h
@@ -2,6 +2,9 @@
#include <binder/IInterface.h>
#include <android/aidl/tests/IOldName.h>
+#include <android/aidl/tests/BnOldName.h>
+#include <binder/Delegate.h>
+
namespace android {
namespace aidl {
@@ -15,8 +18,9 @@ public:
class IOldNameDelegator : public BnOldName {
public:
- explicit IOldNameDelegator(::android::sp<IOldName> &impl) : _aidl_delegate(impl) {}
+ explicit IOldNameDelegator(const ::android::sp<IOldName> &impl) : _aidl_delegate(impl) {}
+ ::android::sp<IOldName> getImpl() { return _aidl_delegate; }
::android::binder::Status RealName(::android::String16* _aidl_return) override {
return _aidl_delegate->RealName(_aidl_return);
}
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BnTestService.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BnTestService.h
index 3cb8ad0d..e1c8e131 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BnTestService.h
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BnTestService.h
@@ -2,6 +2,14 @@
#include <binder/IInterface.h>
#include <android/aidl/tests/ITestService.h>
+#include <android/aidl/tests/BnCircular.h>
+#include <android/aidl/tests/BnNamedCallback.h>
+#include <android/aidl/tests/BnNewName.h>
+#include <android/aidl/tests/BnOldName.h>
+#include <android/aidl/tests/BnTestService.h>
+#include <android/aidl/tests/ITestService.h>
+#include <binder/Delegate.h>
+
namespace android {
namespace aidl {
@@ -34,54 +42,57 @@ public:
static constexpr uint32_t TRANSACTION_ReverseIntEnum = ::android::IBinder::FIRST_CALL_TRANSACTION + 23;
static constexpr uint32_t TRANSACTION_ReverseLongEnum = ::android::IBinder::FIRST_CALL_TRANSACTION + 24;
static constexpr uint32_t TRANSACTION_GetOtherTestService = ::android::IBinder::FIRST_CALL_TRANSACTION + 25;
- static constexpr uint32_t TRANSACTION_VerifyName = ::android::IBinder::FIRST_CALL_TRANSACTION + 26;
- static constexpr uint32_t TRANSACTION_GetInterfaceArray = ::android::IBinder::FIRST_CALL_TRANSACTION + 27;
- static constexpr uint32_t TRANSACTION_VerifyNamesWithInterfaceArray = ::android::IBinder::FIRST_CALL_TRANSACTION + 28;
- static constexpr uint32_t TRANSACTION_GetNullableInterfaceArray = ::android::IBinder::FIRST_CALL_TRANSACTION + 29;
- static constexpr uint32_t TRANSACTION_VerifyNamesWithNullableInterfaceArray = ::android::IBinder::FIRST_CALL_TRANSACTION + 30;
- static constexpr uint32_t TRANSACTION_GetInterfaceList = ::android::IBinder::FIRST_CALL_TRANSACTION + 31;
- static constexpr uint32_t TRANSACTION_VerifyNamesWithInterfaceList = ::android::IBinder::FIRST_CALL_TRANSACTION + 32;
- static constexpr uint32_t TRANSACTION_ReverseStringList = ::android::IBinder::FIRST_CALL_TRANSACTION + 33;
- static constexpr uint32_t TRANSACTION_RepeatParcelFileDescriptor = ::android::IBinder::FIRST_CALL_TRANSACTION + 34;
- static constexpr uint32_t TRANSACTION_ReverseParcelFileDescriptorArray = ::android::IBinder::FIRST_CALL_TRANSACTION + 35;
- static constexpr uint32_t TRANSACTION_ThrowServiceException = ::android::IBinder::FIRST_CALL_TRANSACTION + 36;
- static constexpr uint32_t TRANSACTION_RepeatNullableIntArray = ::android::IBinder::FIRST_CALL_TRANSACTION + 37;
- static constexpr uint32_t TRANSACTION_RepeatNullableByteEnumArray = ::android::IBinder::FIRST_CALL_TRANSACTION + 38;
- static constexpr uint32_t TRANSACTION_RepeatNullableIntEnumArray = ::android::IBinder::FIRST_CALL_TRANSACTION + 39;
- static constexpr uint32_t TRANSACTION_RepeatNullableLongEnumArray = ::android::IBinder::FIRST_CALL_TRANSACTION + 40;
- static constexpr uint32_t TRANSACTION_RepeatNullableString = ::android::IBinder::FIRST_CALL_TRANSACTION + 41;
- static constexpr uint32_t TRANSACTION_RepeatNullableStringList = ::android::IBinder::FIRST_CALL_TRANSACTION + 42;
- static constexpr uint32_t TRANSACTION_RepeatNullableParcelable = ::android::IBinder::FIRST_CALL_TRANSACTION + 43;
- static constexpr uint32_t TRANSACTION_RepeatNullableParcelableArray = ::android::IBinder::FIRST_CALL_TRANSACTION + 44;
- static constexpr uint32_t TRANSACTION_RepeatNullableParcelableList = ::android::IBinder::FIRST_CALL_TRANSACTION + 45;
- static constexpr uint32_t TRANSACTION_TakesAnIBinder = ::android::IBinder::FIRST_CALL_TRANSACTION + 46;
- static constexpr uint32_t TRANSACTION_TakesANullableIBinder = ::android::IBinder::FIRST_CALL_TRANSACTION + 47;
- static constexpr uint32_t TRANSACTION_TakesAnIBinderList = ::android::IBinder::FIRST_CALL_TRANSACTION + 48;
- static constexpr uint32_t TRANSACTION_TakesANullableIBinderList = ::android::IBinder::FIRST_CALL_TRANSACTION + 49;
- static constexpr uint32_t TRANSACTION_RepeatUtf8CppString = ::android::IBinder::FIRST_CALL_TRANSACTION + 50;
- static constexpr uint32_t TRANSACTION_RepeatNullableUtf8CppString = ::android::IBinder::FIRST_CALL_TRANSACTION + 51;
- static constexpr uint32_t TRANSACTION_ReverseUtf8CppString = ::android::IBinder::FIRST_CALL_TRANSACTION + 52;
- static constexpr uint32_t TRANSACTION_ReverseNullableUtf8CppString = ::android::IBinder::FIRST_CALL_TRANSACTION + 53;
- static constexpr uint32_t TRANSACTION_ReverseUtf8CppStringList = ::android::IBinder::FIRST_CALL_TRANSACTION + 54;
- static constexpr uint32_t TRANSACTION_GetCallback = ::android::IBinder::FIRST_CALL_TRANSACTION + 55;
- static constexpr uint32_t TRANSACTION_FillOutStructuredParcelable = ::android::IBinder::FIRST_CALL_TRANSACTION + 56;
- static constexpr uint32_t TRANSACTION_RepeatExtendableParcelable = ::android::IBinder::FIRST_CALL_TRANSACTION + 57;
- static constexpr uint32_t TRANSACTION_ReverseList = ::android::IBinder::FIRST_CALL_TRANSACTION + 58;
- static constexpr uint32_t TRANSACTION_ReverseIBinderArray = ::android::IBinder::FIRST_CALL_TRANSACTION + 59;
- static constexpr uint32_t TRANSACTION_ReverseNullableIBinderArray = ::android::IBinder::FIRST_CALL_TRANSACTION + 60;
- static constexpr uint32_t TRANSACTION_GetOldNameInterface = ::android::IBinder::FIRST_CALL_TRANSACTION + 61;
- static constexpr uint32_t TRANSACTION_GetNewNameInterface = ::android::IBinder::FIRST_CALL_TRANSACTION + 62;
- static constexpr uint32_t TRANSACTION_GetUnionTags = ::android::IBinder::FIRST_CALL_TRANSACTION + 63;
- static constexpr uint32_t TRANSACTION_GetCppJavaTests = ::android::IBinder::FIRST_CALL_TRANSACTION + 64;
- static constexpr uint32_t TRANSACTION_getBackendType = ::android::IBinder::FIRST_CALL_TRANSACTION + 65;
+ static constexpr uint32_t TRANSACTION_SetOtherTestService = ::android::IBinder::FIRST_CALL_TRANSACTION + 26;
+ static constexpr uint32_t TRANSACTION_VerifyName = ::android::IBinder::FIRST_CALL_TRANSACTION + 27;
+ static constexpr uint32_t TRANSACTION_GetInterfaceArray = ::android::IBinder::FIRST_CALL_TRANSACTION + 28;
+ static constexpr uint32_t TRANSACTION_VerifyNamesWithInterfaceArray = ::android::IBinder::FIRST_CALL_TRANSACTION + 29;
+ static constexpr uint32_t TRANSACTION_GetNullableInterfaceArray = ::android::IBinder::FIRST_CALL_TRANSACTION + 30;
+ static constexpr uint32_t TRANSACTION_VerifyNamesWithNullableInterfaceArray = ::android::IBinder::FIRST_CALL_TRANSACTION + 31;
+ static constexpr uint32_t TRANSACTION_GetInterfaceList = ::android::IBinder::FIRST_CALL_TRANSACTION + 32;
+ static constexpr uint32_t TRANSACTION_VerifyNamesWithInterfaceList = ::android::IBinder::FIRST_CALL_TRANSACTION + 33;
+ static constexpr uint32_t TRANSACTION_ReverseStringList = ::android::IBinder::FIRST_CALL_TRANSACTION + 34;
+ static constexpr uint32_t TRANSACTION_RepeatParcelFileDescriptor = ::android::IBinder::FIRST_CALL_TRANSACTION + 35;
+ static constexpr uint32_t TRANSACTION_ReverseParcelFileDescriptorArray = ::android::IBinder::FIRST_CALL_TRANSACTION + 36;
+ static constexpr uint32_t TRANSACTION_ThrowServiceException = ::android::IBinder::FIRST_CALL_TRANSACTION + 37;
+ static constexpr uint32_t TRANSACTION_RepeatNullableIntArray = ::android::IBinder::FIRST_CALL_TRANSACTION + 38;
+ static constexpr uint32_t TRANSACTION_RepeatNullableByteEnumArray = ::android::IBinder::FIRST_CALL_TRANSACTION + 39;
+ static constexpr uint32_t TRANSACTION_RepeatNullableIntEnumArray = ::android::IBinder::FIRST_CALL_TRANSACTION + 40;
+ static constexpr uint32_t TRANSACTION_RepeatNullableLongEnumArray = ::android::IBinder::FIRST_CALL_TRANSACTION + 41;
+ static constexpr uint32_t TRANSACTION_RepeatNullableString = ::android::IBinder::FIRST_CALL_TRANSACTION + 42;
+ static constexpr uint32_t TRANSACTION_RepeatNullableStringList = ::android::IBinder::FIRST_CALL_TRANSACTION + 43;
+ static constexpr uint32_t TRANSACTION_RepeatNullableParcelable = ::android::IBinder::FIRST_CALL_TRANSACTION + 44;
+ static constexpr uint32_t TRANSACTION_RepeatNullableParcelableArray = ::android::IBinder::FIRST_CALL_TRANSACTION + 45;
+ static constexpr uint32_t TRANSACTION_RepeatNullableParcelableList = ::android::IBinder::FIRST_CALL_TRANSACTION + 46;
+ static constexpr uint32_t TRANSACTION_TakesAnIBinder = ::android::IBinder::FIRST_CALL_TRANSACTION + 47;
+ static constexpr uint32_t TRANSACTION_TakesANullableIBinder = ::android::IBinder::FIRST_CALL_TRANSACTION + 48;
+ static constexpr uint32_t TRANSACTION_TakesAnIBinderList = ::android::IBinder::FIRST_CALL_TRANSACTION + 49;
+ static constexpr uint32_t TRANSACTION_TakesANullableIBinderList = ::android::IBinder::FIRST_CALL_TRANSACTION + 50;
+ static constexpr uint32_t TRANSACTION_RepeatUtf8CppString = ::android::IBinder::FIRST_CALL_TRANSACTION + 51;
+ static constexpr uint32_t TRANSACTION_RepeatNullableUtf8CppString = ::android::IBinder::FIRST_CALL_TRANSACTION + 52;
+ static constexpr uint32_t TRANSACTION_ReverseUtf8CppString = ::android::IBinder::FIRST_CALL_TRANSACTION + 53;
+ static constexpr uint32_t TRANSACTION_ReverseNullableUtf8CppString = ::android::IBinder::FIRST_CALL_TRANSACTION + 54;
+ static constexpr uint32_t TRANSACTION_ReverseUtf8CppStringList = ::android::IBinder::FIRST_CALL_TRANSACTION + 55;
+ static constexpr uint32_t TRANSACTION_GetCallback = ::android::IBinder::FIRST_CALL_TRANSACTION + 56;
+ static constexpr uint32_t TRANSACTION_FillOutStructuredParcelable = ::android::IBinder::FIRST_CALL_TRANSACTION + 57;
+ static constexpr uint32_t TRANSACTION_RepeatExtendableParcelable = ::android::IBinder::FIRST_CALL_TRANSACTION + 58;
+ static constexpr uint32_t TRANSACTION_ReverseList = ::android::IBinder::FIRST_CALL_TRANSACTION + 59;
+ static constexpr uint32_t TRANSACTION_ReverseIBinderArray = ::android::IBinder::FIRST_CALL_TRANSACTION + 60;
+ static constexpr uint32_t TRANSACTION_ReverseNullableIBinderArray = ::android::IBinder::FIRST_CALL_TRANSACTION + 61;
+ static constexpr uint32_t TRANSACTION_GetOldNameInterface = ::android::IBinder::FIRST_CALL_TRANSACTION + 62;
+ static constexpr uint32_t TRANSACTION_GetNewNameInterface = ::android::IBinder::FIRST_CALL_TRANSACTION + 63;
+ static constexpr uint32_t TRANSACTION_GetUnionTags = ::android::IBinder::FIRST_CALL_TRANSACTION + 64;
+ static constexpr uint32_t TRANSACTION_GetCppJavaTests = ::android::IBinder::FIRST_CALL_TRANSACTION + 65;
+ static constexpr uint32_t TRANSACTION_getBackendType = ::android::IBinder::FIRST_CALL_TRANSACTION + 66;
+ static constexpr uint32_t TRANSACTION_GetCircular = ::android::IBinder::FIRST_CALL_TRANSACTION + 67;
explicit BnTestService();
::android::status_t onTransact(uint32_t _aidl_code, const ::android::Parcel& _aidl_data, ::android::Parcel* _aidl_reply, uint32_t _aidl_flags) override;
}; // class BnTestService
class ITestServiceDelegator : public BnTestService {
public:
- explicit ITestServiceDelegator(::android::sp<ITestService> &impl) : _aidl_delegate(impl) {}
+ explicit ITestServiceDelegator(const ::android::sp<ITestService> &impl) : _aidl_delegate(impl) {}
+ ::android::sp<ITestService> getImpl() { return _aidl_delegate; }
::android::binder::Status UnimplementedMethod(int32_t arg, int32_t* _aidl_return) override {
return _aidl_delegate->UnimplementedMethod(arg, _aidl_return);
}
@@ -158,10 +169,25 @@ public:
return _aidl_delegate->ReverseLongEnum(input, repeated, _aidl_return);
}
::android::binder::Status GetOtherTestService(const ::android::String16& name, ::android::sp<::android::aidl::tests::INamedCallback>* _aidl_return) override {
- return _aidl_delegate->GetOtherTestService(name, _aidl_return);
+ auto _status = _aidl_delegate->GetOtherTestService(name, _aidl_return);
+ if (*_aidl_return) {
+ *_aidl_return = ::android::sp<::android::aidl::tests::INamedCallbackDelegator>::cast(delegate(*_aidl_return));
+ }
+ return _status;
+ }
+ ::android::binder::Status SetOtherTestService(const ::android::String16& name, const ::android::sp<::android::aidl::tests::INamedCallback>& service, bool* _aidl_return) override {
+ ::android::sp<::android::aidl::tests::INamedCallbackDelegator> _service;
+ if (service) {
+ _service = ::android::sp<::android::aidl::tests::INamedCallbackDelegator>::cast(delegate(service));
+ }
+ return _aidl_delegate->SetOtherTestService(name, _service, _aidl_return);
}
::android::binder::Status VerifyName(const ::android::sp<::android::aidl::tests::INamedCallback>& service, const ::android::String16& name, bool* _aidl_return) override {
- return _aidl_delegate->VerifyName(service, name, _aidl_return);
+ ::android::sp<::android::aidl::tests::INamedCallbackDelegator> _service;
+ if (service) {
+ _service = ::android::sp<::android::aidl::tests::INamedCallbackDelegator>::cast(delegate(service));
+ }
+ return _aidl_delegate->VerifyName(_service, name, _aidl_return);
}
::android::binder::Status GetInterfaceArray(const ::std::vector<::android::String16>& names, ::std::vector<::android::sp<::android::aidl::tests::INamedCallback>>* _aidl_return) override {
return _aidl_delegate->GetInterfaceArray(names, _aidl_return);
@@ -248,7 +274,11 @@ public:
return _aidl_delegate->ReverseUtf8CppStringList(input, repeated, _aidl_return);
}
::android::binder::Status GetCallback(bool return_null, ::android::sp<::android::aidl::tests::INamedCallback>* _aidl_return) override {
- return _aidl_delegate->GetCallback(return_null, _aidl_return);
+ auto _status = _aidl_delegate->GetCallback(return_null, _aidl_return);
+ if (*_aidl_return) {
+ *_aidl_return = ::android::sp<::android::aidl::tests::INamedCallbackDelegator>::cast(delegate(*_aidl_return));
+ }
+ return _status;
}
::android::binder::Status FillOutStructuredParcelable(::android::aidl::tests::StructuredParcelable* parcel) override {
return _aidl_delegate->FillOutStructuredParcelable(parcel);
@@ -266,10 +296,18 @@ public:
return _aidl_delegate->ReverseNullableIBinderArray(input, repeated, _aidl_return);
}
::android::binder::Status GetOldNameInterface(::android::sp<::android::aidl::tests::IOldName>* _aidl_return) override {
- return _aidl_delegate->GetOldNameInterface(_aidl_return);
+ auto _status = _aidl_delegate->GetOldNameInterface(_aidl_return);
+ if (*_aidl_return) {
+ *_aidl_return = ::android::sp<::android::aidl::tests::IOldNameDelegator>::cast(delegate(*_aidl_return));
+ }
+ return _status;
}
::android::binder::Status GetNewNameInterface(::android::sp<::android::aidl::tests::INewName>* _aidl_return) override {
- return _aidl_delegate->GetNewNameInterface(_aidl_return);
+ auto _status = _aidl_delegate->GetNewNameInterface(_aidl_return);
+ if (*_aidl_return) {
+ *_aidl_return = ::android::sp<::android::aidl::tests::INewNameDelegator>::cast(delegate(*_aidl_return));
+ }
+ return _status;
}
::android::binder::Status GetUnionTags(const ::std::vector<::android::aidl::tests::Union>& input, ::std::vector<::android::aidl::tests::Union::Tag>* _aidl_return) override {
return _aidl_delegate->GetUnionTags(input, _aidl_return);
@@ -280,6 +318,13 @@ public:
::android::binder::Status getBackendType(::android::aidl::tests::BackendType* _aidl_return) override {
return _aidl_delegate->getBackendType(_aidl_return);
}
+ ::android::binder::Status GetCircular(::android::aidl::tests::CircularParcelable* cp, ::android::sp<::android::aidl::tests::ICircular>* _aidl_return) override {
+ auto _status = _aidl_delegate->GetCircular(cp, _aidl_return);
+ if (*_aidl_return) {
+ *_aidl_return = ::android::sp<::android::aidl::tests::ICircularDelegator>::cast(delegate(*_aidl_return));
+ }
+ return _status;
+ }
private:
::android::sp<ITestService> _aidl_delegate;
}; // class ITestServiceDelegator
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BpCircular.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BpCircular.h
new file mode 100644
index 00000000..a9f10c82
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BpCircular.h
@@ -0,0 +1,19 @@
+#pragma once
+
+#include <binder/IBinder.h>
+#include <binder/IInterface.h>
+#include <utils/Errors.h>
+#include <android/aidl/tests/ICircular.h>
+
+namespace android {
+namespace aidl {
+namespace tests {
+class BpCircular : public ::android::BpInterface<ICircular> {
+public:
+ explicit BpCircular(const ::android::sp<::android::IBinder>& _aidl_impl);
+ virtual ~BpCircular() = default;
+ ::android::binder::Status GetTestService(::android::sp<::android::aidl::tests::ITestService>* _aidl_return) override;
+}; // class BpCircular
+} // namespace tests
+} // namespace aidl
+} // namespace android
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BpCircularParcelable.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BpCircularParcelable.h
new file mode 100644
index 00000000..27af6b1c
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BpCircularParcelable.h
@@ -0,0 +1 @@
+#error TODO(b/111362593) parcelables do not have bp classes \ No newline at end of file
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BpTestService.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BpTestService.h
index 3829d9b9..9bd58d62 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BpTestService.h
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/BpTestService.h
@@ -38,6 +38,7 @@ public:
::android::binder::Status ReverseIntEnum(const ::std::vector<::android::aidl::tests::IntEnum>& input, ::std::vector<::android::aidl::tests::IntEnum>* repeated, ::std::vector<::android::aidl::tests::IntEnum>* _aidl_return) override;
::android::binder::Status ReverseLongEnum(const ::std::vector<::android::aidl::tests::LongEnum>& input, ::std::vector<::android::aidl::tests::LongEnum>* repeated, ::std::vector<::android::aidl::tests::LongEnum>* _aidl_return) override;
::android::binder::Status GetOtherTestService(const ::android::String16& name, ::android::sp<::android::aidl::tests::INamedCallback>* _aidl_return) override;
+ ::android::binder::Status SetOtherTestService(const ::android::String16& name, const ::android::sp<::android::aidl::tests::INamedCallback>& service, bool* _aidl_return) override;
::android::binder::Status VerifyName(const ::android::sp<::android::aidl::tests::INamedCallback>& service, const ::android::String16& name, bool* _aidl_return) override;
::android::binder::Status GetInterfaceArray(const ::std::vector<::android::String16>& names, ::std::vector<::android::sp<::android::aidl::tests::INamedCallback>>* _aidl_return) override;
::android::binder::Status VerifyNamesWithInterfaceArray(const ::std::vector<::android::sp<::android::aidl::tests::INamedCallback>>& services, const ::std::vector<::android::String16>& names, bool* _aidl_return) override;
@@ -78,6 +79,7 @@ public:
::android::binder::Status GetUnionTags(const ::std::vector<::android::aidl::tests::Union>& input, ::std::vector<::android::aidl::tests::Union::Tag>* _aidl_return) override;
::android::binder::Status GetCppJavaTests(::android::sp<::android::IBinder>* _aidl_return) override;
::android::binder::Status getBackendType(::android::aidl::tests::BackendType* _aidl_return) override;
+ ::android::binder::Status GetCircular(::android::aidl::tests::CircularParcelable* cp, ::android::sp<::android::aidl::tests::ICircular>* _aidl_return) override;
}; // class BpTestService
} // namespace tests
} // namespace aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/CircularParcelable.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/CircularParcelable.h
new file mode 100644
index 00000000..c2d8a027
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/CircularParcelable.h
@@ -0,0 +1,55 @@
+#pragma once
+
+#include <android/aidl/tests/ITestService.h>
+#include <android/binder_to_string.h>
+#include <binder/Parcel.h>
+#include <binder/Status.h>
+#include <optional>
+#include <tuple>
+#include <utils/String16.h>
+
+namespace android::aidl::tests {
+class ITestService;
+} // namespace android::aidl::tests
+namespace android {
+namespace aidl {
+namespace tests {
+class CircularParcelable : public ::android::Parcelable {
+public:
+ ::android::sp<::android::aidl::tests::ITestService> testService;
+ inline bool operator!=(const CircularParcelable& rhs) const {
+ return std::tie(testService) != std::tie(rhs.testService);
+ }
+ inline bool operator<(const CircularParcelable& rhs) const {
+ return std::tie(testService) < std::tie(rhs.testService);
+ }
+ inline bool operator<=(const CircularParcelable& rhs) const {
+ return std::tie(testService) <= std::tie(rhs.testService);
+ }
+ inline bool operator==(const CircularParcelable& rhs) const {
+ return std::tie(testService) == std::tie(rhs.testService);
+ }
+ inline bool operator>(const CircularParcelable& rhs) const {
+ return std::tie(testService) > std::tie(rhs.testService);
+ }
+ inline bool operator>=(const CircularParcelable& rhs) const {
+ return std::tie(testService) >= std::tie(rhs.testService);
+ }
+
+ ::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
+ ::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
+ static const ::android::String16& getParcelableDescriptor() {
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.tests.CircularParcelable");
+ return DESCRIPTOR;
+ }
+ inline std::string toString() const {
+ std::ostringstream os;
+ os << "CircularParcelable{";
+ os << "testService: " << ::android::internal::ToString(testService);
+ os << "}";
+ return os.str();
+ }
+}; // class CircularParcelable
+} // namespace tests
+} // namespace aidl
+} // namespace android
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/DeprecatedParcelable.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/DeprecatedParcelable.h
index aab50891..5d6079b6 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/DeprecatedParcelable.h
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/DeprecatedParcelable.h
@@ -33,8 +33,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.tests.DeprecatedParcelable");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.tests.DeprecatedParcelable");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/FixedSize.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/FixedSize.h
index 65f67117..49304944 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/FixedSize.h
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/FixedSize.h
@@ -111,8 +111,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.tests.FixedSize.FixedUnion");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.tests.FixedSize.FixedUnion");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
@@ -178,8 +178,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.tests.FixedSize.FixedParcelable");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.tests.FixedSize.FixedParcelable");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
@@ -219,8 +219,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.tests.FixedSize");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.tests.FixedSize");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/GenericStructuredParcelable.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/GenericStructuredParcelable.h
index 7a86f81c..cacf198e 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/GenericStructuredParcelable.h
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/GenericStructuredParcelable.h
@@ -37,8 +37,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.tests.GenericStructuredParcelable");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.tests.GenericStructuredParcelable");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
@@ -68,7 +68,7 @@ template <typename T, typename U, typename B>
}
if (_aidl_parcelable_raw_size < 4) return ::android::BAD_VALUE;
size_t _aidl_parcelable_size = static_cast<size_t>(_aidl_parcelable_raw_size);
- if (_aidl_start_pos > SIZE_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
+ if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
if (_aidl_parcel->dataPosition() - _aidl_start_pos >= _aidl_parcelable_size) {
_aidl_parcel->setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
return _aidl_ret_status;
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/ICircular.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/ICircular.h
new file mode 100644
index 00000000..c000a06d
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/ICircular.h
@@ -0,0 +1,37 @@
+#pragma once
+
+#include <android/aidl/tests/ITestService.h>
+#include <binder/IBinder.h>
+#include <binder/IInterface.h>
+#include <binder/Status.h>
+#include <binder/Trace.h>
+#include <optional>
+#include <utils/StrongPointer.h>
+
+namespace android::aidl::tests {
+class ITestService;
+} // namespace android::aidl::tests
+namespace android {
+namespace aidl {
+namespace tests {
+class ICircularDelegator;
+
+class ICircular : public ::android::IInterface {
+public:
+ typedef ICircularDelegator DefaultDelegator;
+ DECLARE_META_INTERFACE(Circular)
+ virtual ::android::binder::Status GetTestService(::android::sp<::android::aidl::tests::ITestService>* _aidl_return) = 0;
+}; // class ICircular
+
+class ICircularDefault : public ICircular {
+public:
+ ::android::IBinder* onAsBinder() override {
+ return nullptr;
+ }
+ ::android::binder::Status GetTestService(::android::sp<::android::aidl::tests::ITestService>* /*_aidl_return*/) override {
+ return ::android::binder::Status::fromStatusT(::android::UNKNOWN_TRANSACTION);
+ }
+}; // class ICircularDefault
+} // namespace tests
+} // namespace aidl
+} // namespace android
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/IDeprecated.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/IDeprecated.h
index 195b47c1..7d829d30 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/IDeprecated.h
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/IDeprecated.h
@@ -3,13 +3,17 @@
#include <binder/IBinder.h>
#include <binder/IInterface.h>
#include <binder/Status.h>
+#include <binder/Trace.h>
#include <utils/StrongPointer.h>
namespace android {
namespace aidl {
namespace tests {
+class IDeprecatedDelegator;
+
class __attribute__((deprecated("test"))) IDeprecated : public ::android::IInterface {
public:
+ typedef IDeprecatedDelegator DefaultDelegator;
DECLARE_META_INTERFACE(Deprecated)
}; // class IDeprecated
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/INamedCallback.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/INamedCallback.h
index 2b277747..2ceca2d0 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/INamedCallback.h
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/INamedCallback.h
@@ -3,14 +3,18 @@
#include <binder/IBinder.h>
#include <binder/IInterface.h>
#include <binder/Status.h>
+#include <binder/Trace.h>
#include <utils/String16.h>
#include <utils/StrongPointer.h>
namespace android {
namespace aidl {
namespace tests {
+class INamedCallbackDelegator;
+
class INamedCallback : public ::android::IInterface {
public:
+ typedef INamedCallbackDelegator DefaultDelegator;
DECLARE_META_INTERFACE(NamedCallback)
virtual ::android::binder::Status GetName(::android::String16* _aidl_return) = 0;
}; // class INamedCallback
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/INewName.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/INewName.h
index 693f88ba..b2615cc8 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/INewName.h
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/INewName.h
@@ -3,14 +3,18 @@
#include <binder/IBinder.h>
#include <binder/IInterface.h>
#include <binder/Status.h>
+#include <binder/Trace.h>
#include <utils/String16.h>
#include <utils/StrongPointer.h>
namespace android {
namespace aidl {
namespace tests {
+class INewNameDelegator;
+
class INewName : public ::android::IInterface {
public:
+ typedef INewNameDelegator DefaultDelegator;
DECLARE_META_INTERFACE(NewName)
virtual ::android::binder::Status RealName(::android::String16* _aidl_return) = 0;
}; // class INewName
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/IOldName.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/IOldName.h
index 2142d886..86494fa6 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/IOldName.h
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/IOldName.h
@@ -3,14 +3,18 @@
#include <binder/IBinder.h>
#include <binder/IInterface.h>
#include <binder/Status.h>
+#include <binder/Trace.h>
#include <utils/String16.h>
#include <utils/StrongPointer.h>
namespace android {
namespace aidl {
namespace tests {
+class IOldNameDelegator;
+
class IOldName : public ::android::IInterface {
public:
+ typedef IOldNameDelegator DefaultDelegator;
DECLARE_META_INTERFACE(OldName)
virtual ::android::binder::Status RealName(::android::String16* _aidl_return) = 0;
}; // class IOldName
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/ITestService.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/ITestService.h
index 9246a87e..cbf30fcc 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/ITestService.h
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/ITestService.h
@@ -2,6 +2,8 @@
#include <android/aidl/tests/BackendType.h>
#include <android/aidl/tests/ByteEnum.h>
+#include <android/aidl/tests/CircularParcelable.h>
+#include <android/aidl/tests/ICircular.h>
#include <android/aidl/tests/INamedCallback.h>
#include <android/aidl/tests/INewName.h>
#include <android/aidl/tests/IOldName.h>
@@ -13,24 +15,51 @@
#include <android/aidl/tests/Union.h>
#include <android/aidl/tests/extension/ExtendableParcelable.h>
#include <android/binder_to_string.h>
+#include <array>
+#include <binder/Delegate.h>
+#include <binder/Enums.h>
#include <binder/IBinder.h>
#include <binder/IInterface.h>
#include <binder/Parcel.h>
#include <binder/ParcelFileDescriptor.h>
#include <binder/Status.h>
+#include <binder/Trace.h>
+#include <cassert>
#include <cstdint>
#include <optional>
#include <string>
#include <tuple>
+#include <type_traits>
+#include <utility>
#include <utils/String16.h>
#include <utils/StrongPointer.h>
+#include <variant>
#include <vector>
+#ifndef __BIONIC__
+#define __assert2(a,b,c,d) ((void)0)
+#endif
+
+namespace android::aidl::tests {
+class CircularParcelable;
+class ICircular;
+class INamedCallback;
+class INewName;
+class IOldName;
+class RecursiveList;
+class StructuredParcelable;
+} // namespace android::aidl::tests
+namespace android::aidl::tests::extension {
+class ExtendableParcelable;
+} // namespace android::aidl::tests::extension
namespace android {
namespace aidl {
namespace tests {
+class ITestServiceDelegator;
+
class ITestService : public ::android::IInterface {
public:
+ typedef ITestServiceDelegator DefaultDelegator;
DECLARE_META_INTERFACE(TestService)
class Empty : public ::android::Parcelable {
public:
@@ -56,8 +85,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.tests.ITestService.Empty");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.tests.ITestService.Empty");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
@@ -68,6 +97,171 @@ public:
}; // class Empty
class CompilerChecks : public ::android::Parcelable {
public:
+ class IFooDelegator;
+
+ class IFoo : public ::android::IInterface {
+ public:
+ typedef IFooDelegator DefaultDelegator;
+ DECLARE_META_INTERFACE(Foo)
+ }; // class IFoo
+
+ class IFooDefault : public IFoo {
+ public:
+ ::android::IBinder* onAsBinder() override {
+ return nullptr;
+ }
+ }; // class IFooDefault
+ class BpFoo : public ::android::BpInterface<IFoo> {
+ public:
+ explicit BpFoo(const ::android::sp<::android::IBinder>& _aidl_impl);
+ virtual ~BpFoo() = default;
+ }; // class BpFoo
+ class BnFoo : public ::android::BnInterface<IFoo> {
+ public:
+ explicit BnFoo();
+ ::android::status_t onTransact(uint32_t _aidl_code, const ::android::Parcel& _aidl_data, ::android::Parcel* _aidl_reply, uint32_t _aidl_flags) override;
+ }; // class BnFoo
+
+ class IFooDelegator : public BnFoo {
+ public:
+ explicit IFooDelegator(const ::android::sp<IFoo> &impl) : _aidl_delegate(impl) {}
+
+ ::android::sp<IFoo> getImpl() { return _aidl_delegate; }
+ private:
+ ::android::sp<IFoo> _aidl_delegate;
+ }; // class IFooDelegator
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ class HasDeprecated : public ::android::Parcelable {
+ public:
+ int32_t __attribute__((deprecated("field"))) deprecated = 0;
+ inline bool operator!=(const HasDeprecated& rhs) const {
+ return std::tie(deprecated) != std::tie(rhs.deprecated);
+ }
+ inline bool operator<(const HasDeprecated& rhs) const {
+ return std::tie(deprecated) < std::tie(rhs.deprecated);
+ }
+ inline bool operator<=(const HasDeprecated& rhs) const {
+ return std::tie(deprecated) <= std::tie(rhs.deprecated);
+ }
+ inline bool operator==(const HasDeprecated& rhs) const {
+ return std::tie(deprecated) == std::tie(rhs.deprecated);
+ }
+ inline bool operator>(const HasDeprecated& rhs) const {
+ return std::tie(deprecated) > std::tie(rhs.deprecated);
+ }
+ inline bool operator>=(const HasDeprecated& rhs) const {
+ return std::tie(deprecated) >= std::tie(rhs.deprecated);
+ }
+
+ ::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
+ ::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
+ static const ::android::String16& getParcelableDescriptor() {
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.tests.ITestService.CompilerChecks.HasDeprecated");
+ return DESCRIPTOR;
+ }
+ inline std::string toString() const {
+ std::ostringstream os;
+ os << "HasDeprecated{";
+ os << "deprecated: " << ::android::internal::ToString(deprecated);
+ os << "}";
+ return os.str();
+ }
+ }; // class HasDeprecated
+ #pragma clang diagnostic pop
+ class UsingHasDeprecated : public ::android::Parcelable {
+ public:
+ enum class Tag : int32_t {
+ n = 0,
+ m = 1,
+ };
+ // Expose tag symbols for legacy code
+ static const inline Tag n = Tag::n;
+ static const inline Tag m = Tag::m;
+
+ template<typename _Tp>
+ static constexpr bool _not_self = !std::is_same_v<std::remove_cv_t<std::remove_reference_t<_Tp>>, UsingHasDeprecated>;
+
+ UsingHasDeprecated() : _value(std::in_place_index<static_cast<size_t>(n)>, int32_t(0)) { }
+
+ template <typename _Tp, typename = std::enable_if_t<_not_self<_Tp>>>
+ // NOLINTNEXTLINE(google-explicit-constructor)
+ constexpr UsingHasDeprecated(_Tp&& _arg)
+ : _value(std::forward<_Tp>(_arg)) {}
+
+ template <size_t _Np, typename... _Tp>
+ constexpr explicit UsingHasDeprecated(std::in_place_index_t<_Np>, _Tp&&... _args)
+ : _value(std::in_place_index<_Np>, std::forward<_Tp>(_args)...) {}
+
+ template <Tag _tag, typename... _Tp>
+ static UsingHasDeprecated make(_Tp&&... _args) {
+ return UsingHasDeprecated(std::in_place_index<static_cast<size_t>(_tag)>, std::forward<_Tp>(_args)...);
+ }
+
+ template <Tag _tag, typename _Tp, typename... _Up>
+ static UsingHasDeprecated make(std::initializer_list<_Tp> _il, _Up&&... _args) {
+ return UsingHasDeprecated(std::in_place_index<static_cast<size_t>(_tag)>, std::move(_il), std::forward<_Up>(_args)...);
+ }
+
+ Tag getTag() const {
+ return static_cast<Tag>(_value.index());
+ }
+
+ template <Tag _tag>
+ const auto& get() const {
+ if (getTag() != _tag) { __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, "bad access: a wrong tag"); }
+ return std::get<static_cast<size_t>(_tag)>(_value);
+ }
+
+ template <Tag _tag>
+ auto& get() {
+ if (getTag() != _tag) { __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, "bad access: a wrong tag"); }
+ return std::get<static_cast<size_t>(_tag)>(_value);
+ }
+
+ template <Tag _tag, typename... _Tp>
+ void set(_Tp&&... _args) {
+ _value.emplace<static_cast<size_t>(_tag)>(std::forward<_Tp>(_args)...);
+ }
+
+ inline bool operator!=(const UsingHasDeprecated& rhs) const {
+ return _value != rhs._value;
+ }
+ inline bool operator<(const UsingHasDeprecated& rhs) const {
+ return _value < rhs._value;
+ }
+ inline bool operator<=(const UsingHasDeprecated& rhs) const {
+ return _value <= rhs._value;
+ }
+ inline bool operator==(const UsingHasDeprecated& rhs) const {
+ return _value == rhs._value;
+ }
+ inline bool operator>(const UsingHasDeprecated& rhs) const {
+ return _value > rhs._value;
+ }
+ inline bool operator>=(const UsingHasDeprecated& rhs) const {
+ return _value >= rhs._value;
+ }
+
+ ::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
+ ::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
+ static const ::android::String16& getParcelableDescriptor() {
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.tests.ITestService.CompilerChecks.UsingHasDeprecated");
+ return DESCRIPTOR;
+ }
+ inline std::string toString() const {
+ std::ostringstream os;
+ os << "UsingHasDeprecated{";
+ switch (getTag()) {
+ case n: os << "n: " << ::android::internal::ToString(get<n>()); break;
+ case m: os << "m: " << ::android::internal::ToString(get<m>()); break;
+ }
+ os << "}";
+ return os.str();
+ }
+ private:
+ std::variant<int32_t, ::android::aidl::tests::ITestService::CompilerChecks::HasDeprecated> _value;
+ }; // class UsingHasDeprecated
::android::sp<::android::IBinder> binder;
::android::sp<::android::IBinder> nullable_binder;
::std::vector<::android::sp<::android::IBinder>> binder_array;
@@ -108,8 +302,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.tests.ITestService.CompilerChecks");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.tests.ITestService.CompilerChecks");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
@@ -152,6 +346,22 @@ public:
enum : int64_t { LONG_TEST_CONSTANT = 1099511627776L };
static const ::android::String16& STRING_TEST_CONSTANT();
static const ::android::String16& STRING_TEST_CONSTANT2();
+ static constexpr float FLOAT_TEST_CONSTANT = 1.000000f;
+ static constexpr float FLOAT_TEST_CONSTANT2 = -1.000000f;
+ static constexpr float FLOAT_TEST_CONSTANT3 = 1.000000f;
+ static constexpr float FLOAT_TEST_CONSTANT4 = 2.200000f;
+ static constexpr float FLOAT_TEST_CONSTANT5 = -2.200000f;
+ static constexpr float FLOAT_TEST_CONSTANT6 = -0.000000f;
+ static constexpr float FLOAT_TEST_CONSTANT7 = 0.000000f;
+ static constexpr double DOUBLE_TEST_CONSTANT = 1.000000;
+ static constexpr double DOUBLE_TEST_CONSTANT2 = -1.000000;
+ static constexpr double DOUBLE_TEST_CONSTANT3 = 1.000000;
+ static constexpr double DOUBLE_TEST_CONSTANT4 = 2.200000;
+ static constexpr double DOUBLE_TEST_CONSTANT5 = -2.200000;
+ static constexpr double DOUBLE_TEST_CONSTANT6 = -0.000000;
+ static constexpr double DOUBLE_TEST_CONSTANT7 = 0.000000;
+ static constexpr double DOUBLE_TEST_CONSTANT8 = 1.100000;
+ static constexpr double DOUBLE_TEST_CONSTANT9 = -1.100000;
static const ::std::string& STRING_TEST_CONSTANT_UTF8();
enum : int32_t { A1 = 1 };
enum : int32_t { A2 = 1 };
@@ -236,6 +446,7 @@ public:
virtual ::android::binder::Status ReverseIntEnum(const ::std::vector<::android::aidl::tests::IntEnum>& input, ::std::vector<::android::aidl::tests::IntEnum>* repeated, ::std::vector<::android::aidl::tests::IntEnum>* _aidl_return) = 0;
virtual ::android::binder::Status ReverseLongEnum(const ::std::vector<::android::aidl::tests::LongEnum>& input, ::std::vector<::android::aidl::tests::LongEnum>* repeated, ::std::vector<::android::aidl::tests::LongEnum>* _aidl_return) = 0;
virtual ::android::binder::Status GetOtherTestService(const ::android::String16& name, ::android::sp<::android::aidl::tests::INamedCallback>* _aidl_return) = 0;
+ virtual ::android::binder::Status SetOtherTestService(const ::android::String16& name, const ::android::sp<::android::aidl::tests::INamedCallback>& service, bool* _aidl_return) = 0;
virtual ::android::binder::Status VerifyName(const ::android::sp<::android::aidl::tests::INamedCallback>& service, const ::android::String16& name, bool* _aidl_return) = 0;
virtual ::android::binder::Status GetInterfaceArray(const ::std::vector<::android::String16>& names, ::std::vector<::android::sp<::android::aidl::tests::INamedCallback>>* _aidl_return) = 0;
virtual ::android::binder::Status VerifyNamesWithInterfaceArray(const ::std::vector<::android::sp<::android::aidl::tests::INamedCallback>>& services, const ::std::vector<::android::String16>& names, bool* _aidl_return) = 0;
@@ -276,6 +487,7 @@ public:
virtual ::android::binder::Status GetUnionTags(const ::std::vector<::android::aidl::tests::Union>& input, ::std::vector<::android::aidl::tests::Union::Tag>* _aidl_return) = 0;
virtual ::android::binder::Status GetCppJavaTests(::android::sp<::android::IBinder>* _aidl_return) = 0;
virtual ::android::binder::Status getBackendType(::android::aidl::tests::BackendType* _aidl_return) = 0;
+ virtual ::android::binder::Status GetCircular(::android::aidl::tests::CircularParcelable* cp, ::android::sp<::android::aidl::tests::ICircular>* _aidl_return) = 0;
}; // class ITestService
class ITestServiceDefault : public ITestService {
@@ -361,6 +573,9 @@ public:
::android::binder::Status GetOtherTestService(const ::android::String16& /*name*/, ::android::sp<::android::aidl::tests::INamedCallback>* /*_aidl_return*/) override {
return ::android::binder::Status::fromStatusT(::android::UNKNOWN_TRANSACTION);
}
+ ::android::binder::Status SetOtherTestService(const ::android::String16& /*name*/, const ::android::sp<::android::aidl::tests::INamedCallback>& /*service*/, bool* /*_aidl_return*/) override {
+ return ::android::binder::Status::fromStatusT(::android::UNKNOWN_TRANSACTION);
+ }
::android::binder::Status VerifyName(const ::android::sp<::android::aidl::tests::INamedCallback>& /*service*/, const ::android::String16& /*name*/, bool* /*_aidl_return*/) override {
return ::android::binder::Status::fromStatusT(::android::UNKNOWN_TRANSACTION);
}
@@ -481,7 +696,38 @@ public:
::android::binder::Status getBackendType(::android::aidl::tests::BackendType* /*_aidl_return*/) override {
return ::android::binder::Status::fromStatusT(::android::UNKNOWN_TRANSACTION);
}
+ ::android::binder::Status GetCircular(::android::aidl::tests::CircularParcelable* /*cp*/, ::android::sp<::android::aidl::tests::ICircular>* /*_aidl_return*/) override {
+ return ::android::binder::Status::fromStatusT(::android::UNKNOWN_TRANSACTION);
+ }
}; // class ITestServiceDefault
} // namespace tests
} // namespace aidl
} // namespace android
+namespace android {
+namespace aidl {
+namespace tests {
+[[nodiscard]] static inline std::string toString(ITestService::CompilerChecks::UsingHasDeprecated::Tag val) {
+ switch(val) {
+ case ITestService::CompilerChecks::UsingHasDeprecated::Tag::n:
+ return "n";
+ case ITestService::CompilerChecks::UsingHasDeprecated::Tag::m:
+ return "m";
+ default:
+ return std::to_string(static_cast<int32_t>(val));
+ }
+}
+} // namespace tests
+} // namespace aidl
+} // namespace android
+namespace android {
+namespace internal {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wc++17-extensions"
+template <>
+constexpr inline std::array<::android::aidl::tests::ITestService::CompilerChecks::UsingHasDeprecated::Tag, 2> enum_values<::android::aidl::tests::ITestService::CompilerChecks::UsingHasDeprecated::Tag> = {
+ ::android::aidl::tests::ITestService::CompilerChecks::UsingHasDeprecated::Tag::n,
+ ::android::aidl::tests::ITestService::CompilerChecks::UsingHasDeprecated::Tag::m,
+};
+#pragma clang diagnostic pop
+} // namespace internal
+} // namespace android
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/ListOfInterfaces.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/ListOfInterfaces.h
index 455bf4b6..e391f579 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/ListOfInterfaces.h
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/ListOfInterfaces.h
@@ -3,11 +3,13 @@
#include <android/aidl/tests/ListOfInterfaces.h>
#include <android/binder_to_string.h>
#include <array>
+#include <binder/Delegate.h>
#include <binder/Enums.h>
#include <binder/IBinder.h>
#include <binder/IInterface.h>
#include <binder/Parcel.h>
#include <binder/Status.h>
+#include <binder/Trace.h>
#include <cassert>
#include <cstdint>
#include <optional>
@@ -29,8 +31,11 @@ namespace aidl {
namespace tests {
class ListOfInterfaces : public ::android::Parcelable {
public:
+ class IEmptyInterfaceDelegator;
+
class IEmptyInterface : public ::android::IInterface {
public:
+ typedef IEmptyInterfaceDelegator DefaultDelegator;
DECLARE_META_INTERFACE(EmptyInterface)
}; // class IEmptyInterface
@@ -53,13 +58,17 @@ public:
class IEmptyInterfaceDelegator : public BnEmptyInterface {
public:
- explicit IEmptyInterfaceDelegator(::android::sp<IEmptyInterface> &impl) : _aidl_delegate(impl) {}
+ explicit IEmptyInterfaceDelegator(const ::android::sp<IEmptyInterface> &impl) : _aidl_delegate(impl) {}
+ ::android::sp<IEmptyInterface> getImpl() { return _aidl_delegate; }
private:
::android::sp<IEmptyInterface> _aidl_delegate;
}; // class IEmptyInterfaceDelegator
+ class IMyInterfaceDelegator;
+
class IMyInterface : public ::android::IInterface {
public:
+ typedef IMyInterfaceDelegator DefaultDelegator;
DECLARE_META_INTERFACE(MyInterface)
virtual ::android::binder::Status methodWithInterfaces(const ::android::sp<::android::aidl::tests::ListOfInterfaces::IEmptyInterface>& iface, const ::android::sp<::android::aidl::tests::ListOfInterfaces::IEmptyInterface>& nullable_iface, const ::std::vector<::android::sp<::android::aidl::tests::ListOfInterfaces::IEmptyInterface>>& iface_list_in, ::std::vector<::android::sp<::android::aidl::tests::ListOfInterfaces::IEmptyInterface>>* iface_list_out, ::std::vector<::android::sp<::android::aidl::tests::ListOfInterfaces::IEmptyInterface>>* iface_list_inout, const ::std::optional<::std::vector<::android::sp<::android::aidl::tests::ListOfInterfaces::IEmptyInterface>>>& nullable_iface_list_in, ::std::optional<::std::vector<::android::sp<::android::aidl::tests::ListOfInterfaces::IEmptyInterface>>>* nullable_iface_list_out, ::std::optional<::std::vector<::android::sp<::android::aidl::tests::ListOfInterfaces::IEmptyInterface>>>* nullable_iface_list_inout, ::std::optional<::std::vector<::android::sp<::android::aidl::tests::ListOfInterfaces::IEmptyInterface>>>* _aidl_return) = 0;
}; // class IMyInterface
@@ -88,10 +97,19 @@ public:
class IMyInterfaceDelegator : public BnMyInterface {
public:
- explicit IMyInterfaceDelegator(::android::sp<IMyInterface> &impl) : _aidl_delegate(impl) {}
+ explicit IMyInterfaceDelegator(const ::android::sp<IMyInterface> &impl) : _aidl_delegate(impl) {}
+ ::android::sp<IMyInterface> getImpl() { return _aidl_delegate; }
::android::binder::Status methodWithInterfaces(const ::android::sp<::android::aidl::tests::ListOfInterfaces::IEmptyInterface>& iface, const ::android::sp<::android::aidl::tests::ListOfInterfaces::IEmptyInterface>& nullable_iface, const ::std::vector<::android::sp<::android::aidl::tests::ListOfInterfaces::IEmptyInterface>>& iface_list_in, ::std::vector<::android::sp<::android::aidl::tests::ListOfInterfaces::IEmptyInterface>>* iface_list_out, ::std::vector<::android::sp<::android::aidl::tests::ListOfInterfaces::IEmptyInterface>>* iface_list_inout, const ::std::optional<::std::vector<::android::sp<::android::aidl::tests::ListOfInterfaces::IEmptyInterface>>>& nullable_iface_list_in, ::std::optional<::std::vector<::android::sp<::android::aidl::tests::ListOfInterfaces::IEmptyInterface>>>* nullable_iface_list_out, ::std::optional<::std::vector<::android::sp<::android::aidl::tests::ListOfInterfaces::IEmptyInterface>>>* nullable_iface_list_inout, ::std::optional<::std::vector<::android::sp<::android::aidl::tests::ListOfInterfaces::IEmptyInterface>>>* _aidl_return) override {
- return _aidl_delegate->methodWithInterfaces(iface, nullable_iface, iface_list_in, iface_list_out, iface_list_inout, nullable_iface_list_in, nullable_iface_list_out, nullable_iface_list_inout, _aidl_return);
+ ::android::sp<::android::aidl::tests::ListOfInterfaces::IEmptyInterfaceDelegator> _iface;
+ if (iface) {
+ _iface = ::android::sp<::android::aidl::tests::ListOfInterfaces::IEmptyInterfaceDelegator>::cast(delegate(iface));
+ }
+ ::android::sp<::android::aidl::tests::ListOfInterfaces::IEmptyInterfaceDelegator> _nullable_iface;
+ if (nullable_iface) {
+ _nullable_iface = ::android::sp<::android::aidl::tests::ListOfInterfaces::IEmptyInterfaceDelegator>::cast(delegate(nullable_iface));
+ }
+ return _aidl_delegate->methodWithInterfaces(_iface, _nullable_iface, iface_list_in, iface_list_out, iface_list_inout, nullable_iface_list_in, nullable_iface_list_out, nullable_iface_list_inout, _aidl_return);
}
private:
::android::sp<IMyInterface> _aidl_delegate;
@@ -124,8 +142,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.tests.ListOfInterfaces.MyParcelable");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.tests.ListOfInterfaces.MyParcelable");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
@@ -219,8 +237,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.tests.ListOfInterfaces.MyUnion");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.tests.ListOfInterfaces.MyUnion");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
@@ -259,8 +277,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.tests.ListOfInterfaces");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.tests.ListOfInterfaces");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/OtherParcelableForToString.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/OtherParcelableForToString.h
index fa05b156..6f32726c 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/OtherParcelableForToString.h
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/OtherParcelableForToString.h
@@ -34,8 +34,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.tests.OtherParcelableForToString");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.tests.OtherParcelableForToString");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/ParcelableForToString.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/ParcelableForToString.h
index 7f3adf7a..e57c7f73 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/ParcelableForToString.h
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/ParcelableForToString.h
@@ -13,6 +13,12 @@
#include <utils/String16.h>
#include <vector>
+namespace android::aidl::tests {
+template <typename T, typename U, typename B>
+class GenericStructuredParcelable;
+class OtherParcelableForToString;
+class StructuredParcelable;
+} // namespace android::aidl::tests
namespace android {
namespace aidl {
namespace tests {
@@ -63,8 +69,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.tests.ParcelableForToString");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.tests.ParcelableForToString");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/RecursiveList.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/RecursiveList.h
index d874d9f9..c835bb89 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/RecursiveList.h
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/RecursiveList.h
@@ -9,6 +9,9 @@
#include <tuple>
#include <utils/String16.h>
+namespace android::aidl::tests {
+class RecursiveList;
+} // namespace android::aidl::tests
namespace android {
namespace aidl {
namespace tests {
@@ -38,8 +41,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.tests.RecursiveList");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.tests.RecursiveList");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/StructuredParcelable.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/StructuredParcelable.h
index 339c5160..ee17d484 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/StructuredParcelable.h
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/StructuredParcelable.h
@@ -46,8 +46,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.tests.StructuredParcelable.Empty");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.tests.StructuredParcelable.Empty");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
@@ -136,8 +136,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.tests.StructuredParcelable");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.tests.StructuredParcelable");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/Union.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/Union.h
index a82300f7..b3493e90 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/Union.h
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/Union.h
@@ -111,8 +111,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.tests.Union");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.tests.Union");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/UnionWithFd.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/UnionWithFd.h
index c97edf1f..fae77458 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/UnionWithFd.h
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/UnionWithFd.h
@@ -98,8 +98,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.tests.UnionWithFd");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.tests.UnionWithFd");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/extension/ExtendableParcelable.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/extension/ExtendableParcelable.h
index cf709f17..18dfb061 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/extension/ExtendableParcelable.h
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/extension/ExtendableParcelable.h
@@ -42,8 +42,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.tests.extension.ExtendableParcelable");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.tests.extension.ExtendableParcelable");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/extension/MyExt.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/extension/MyExt.h
index f89954a8..ae311acc 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/extension/MyExt.h
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/extension/MyExt.h
@@ -38,8 +38,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.tests.extension.MyExt");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.tests.extension.MyExt");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/extension/MyExt2.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/extension/MyExt2.h
index 93fcd017..cfd04c63 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/extension/MyExt2.h
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/extension/MyExt2.h
@@ -9,6 +9,9 @@
#include <tuple>
#include <utils/String16.h>
+namespace android::aidl::tests::extension {
+class MyExt;
+} // namespace android::aidl::tests::extension
namespace android {
namespace aidl {
namespace tests {
@@ -40,8 +43,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.tests.extension.MyExt2");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.tests.extension.MyExt2");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/extension/MyExtLike.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/extension/MyExtLike.h
index 0ac2bf7a..97a740cf 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/extension/MyExtLike.h
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/extension/MyExtLike.h
@@ -37,8 +37,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.tests.extension.MyExtLike");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.tests.extension.MyExtLike");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/nested/BnNestedService.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/nested/BnNestedService.h
index 1878af02..3072ca3d 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/nested/BnNestedService.h
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/nested/BnNestedService.h
@@ -2,6 +2,10 @@
#include <binder/IInterface.h>
#include <android/aidl/tests/nested/INestedService.h>
+#include <android/aidl/tests/nested/BnNestedService.h>
+#include <android/aidl/tests/nested/INestedService.h>
+#include <binder/Delegate.h>
+
namespace android {
namespace aidl {
@@ -17,13 +21,18 @@ public:
class INestedServiceDelegator : public BnNestedService {
public:
- explicit INestedServiceDelegator(::android::sp<INestedService> &impl) : _aidl_delegate(impl) {}
+ explicit INestedServiceDelegator(const ::android::sp<INestedService> &impl) : _aidl_delegate(impl) {}
+ ::android::sp<INestedService> getImpl() { return _aidl_delegate; }
::android::binder::Status flipStatus(const ::android::aidl::tests::nested::ParcelableWithNested& p, ::android::aidl::tests::nested::INestedService::Result* _aidl_return) override {
return _aidl_delegate->flipStatus(p, _aidl_return);
}
::android::binder::Status flipStatusWithCallback(::android::aidl::tests::nested::ParcelableWithNested::Status status, const ::android::sp<::android::aidl::tests::nested::INestedService::ICallback>& cb) override {
- return _aidl_delegate->flipStatusWithCallback(status, cb);
+ ::android::sp<::android::aidl::tests::nested::INestedService::ICallbackDelegator> _cb;
+ if (cb) {
+ _cb = ::android::sp<::android::aidl::tests::nested::INestedService::ICallbackDelegator>::cast(delegate(cb));
+ }
+ return _aidl_delegate->flipStatusWithCallback(status, _cb);
}
private:
::android::sp<INestedService> _aidl_delegate;
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/nested/DeeplyNested.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/nested/DeeplyNested.h
index 6e280b46..d26c1c19 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/nested/DeeplyNested.h
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/nested/DeeplyNested.h
@@ -48,8 +48,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.tests.nested.DeeplyNested.B.C.D");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.tests.nested.DeeplyNested.B.C.D");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
@@ -80,8 +80,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.tests.nested.DeeplyNested.B.C");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.tests.nested.DeeplyNested.B.C");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
@@ -112,8 +112,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.tests.nested.DeeplyNested.B");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.tests.nested.DeeplyNested.B");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
@@ -147,8 +147,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.tests.nested.DeeplyNested.A");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.tests.nested.DeeplyNested.A");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
@@ -180,8 +180,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.tests.nested.DeeplyNested");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.tests.nested.DeeplyNested");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/nested/INestedService.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/nested/INestedService.h
index eab7264f..ae0bbef1 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/nested/INestedService.h
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/nested/INestedService.h
@@ -3,20 +3,28 @@
#include <android/aidl/tests/nested/INestedService.h>
#include <android/aidl/tests/nested/ParcelableWithNested.h>
#include <android/binder_to_string.h>
+#include <binder/Delegate.h>
#include <binder/IBinder.h>
#include <binder/IInterface.h>
#include <binder/Parcel.h>
#include <binder/Status.h>
+#include <binder/Trace.h>
#include <tuple>
#include <utils/String16.h>
#include <utils/StrongPointer.h>
+namespace android::aidl::tests::nested {
+class ParcelableWithNested;
+} // namespace android::aidl::tests::nested
namespace android {
namespace aidl {
namespace tests {
namespace nested {
+class INestedServiceDelegator;
+
class INestedService : public ::android::IInterface {
public:
+ typedef INestedServiceDelegator DefaultDelegator;
DECLARE_META_INTERFACE(NestedService)
class Result : public ::android::Parcelable {
public:
@@ -43,8 +51,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.tests.nested.INestedService.Result");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.tests.nested.INestedService.Result");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
@@ -54,8 +62,11 @@ public:
return os.str();
}
}; // class Result
+ class ICallbackDelegator;
+
class ICallback : public ::android::IInterface {
public:
+ typedef ICallbackDelegator DefaultDelegator;
DECLARE_META_INTERFACE(Callback)
virtual ::android::binder::Status done(::android::aidl::tests::nested::ParcelableWithNested::Status status) = 0;
}; // class ICallback
@@ -84,8 +95,9 @@ public:
class ICallbackDelegator : public BnCallback {
public:
- explicit ICallbackDelegator(::android::sp<ICallback> &impl) : _aidl_delegate(impl) {}
+ explicit ICallbackDelegator(const ::android::sp<ICallback> &impl) : _aidl_delegate(impl) {}
+ ::android::sp<ICallback> getImpl() { return _aidl_delegate; }
::android::binder::Status done(::android::aidl::tests::nested::ParcelableWithNested::Status status) override {
return _aidl_delegate->done(status);
}
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/nested/ParcelableWithNested.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/nested/ParcelableWithNested.h
index 56a3c4d8..b46af40b 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/nested/ParcelableWithNested.h
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/nested/ParcelableWithNested.h
@@ -44,8 +44,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.tests.nested.ParcelableWithNested");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.tests.nested.ParcelableWithNested");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/unions/EnumUnion.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/unions/EnumUnion.h
index 7a41b20f..81d93b63 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/unions/EnumUnion.h
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/unions/EnumUnion.h
@@ -23,6 +23,8 @@ namespace android {
namespace aidl {
namespace tests {
namespace unions {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
class EnumUnion : public ::android::Parcelable {
public:
enum class Tag : int32_t {
@@ -102,8 +104,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.tests.unions.EnumUnion");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.tests.unions.EnumUnion");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
@@ -111,10 +113,7 @@ public:
switch (getTag()) {
case intEnum: os << "intEnum: " << ::android::internal::ToString(get<intEnum>()); break;
case longEnum: os << "longEnum: " << ::android::internal::ToString(get<longEnum>()); break;
- #pragma clang diagnostic push
- #pragma clang diagnostic ignored "-Wdeprecated-declarations"
case deprecatedField: os << "deprecatedField: " << ::android::internal::ToString(get<deprecatedField>()); break;
- #pragma clang diagnostic pop
}
os << "}";
return os.str();
@@ -122,6 +121,7 @@ public:
private:
std::variant<::android::aidl::tests::IntEnum, ::android::aidl::tests::LongEnum, int32_t> _value;
}; // class EnumUnion
+#pragma clang diagnostic pop
} // namespace unions
} // namespace tests
} // namespace aidl
diff --git a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/unions/UnionInUnion.h b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/unions/UnionInUnion.h
index 9badc3af..50f19cc0 100644
--- a/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/unions/UnionInUnion.h
+++ b/tests/golden_output/aidl-test-interface-cpp-source/gen/include/android/aidl/tests/unions/UnionInUnion.h
@@ -99,8 +99,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.tests.unions.UnionInUnion");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.tests.unions.UnionInUnion");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
diff --git a/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/ArrayOfInterfaces.java b/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/ArrayOfInterfaces.java
index ea45e087..a4f89ab0 100644
--- a/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/ArrayOfInterfaces.java
+++ b/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/ArrayOfInterfaces.java
@@ -80,6 +80,22 @@ public class ArrayOfInterfaces implements android.os.Parcelable
{
return this;
}
+ /** @hide */
+ public static java.lang.String getDefaultTransactionName(int transactionCode)
+ {
+ switch (transactionCode)
+ {
+ default:
+ {
+ return null;
+ }
+ }
+ }
+ /** @hide */
+ public java.lang.String getTransactionName(int transactionCode)
+ {
+ return this.getDefaultTransactionName(transactionCode);
+ }
@Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException
{
java.lang.String descriptor = DESCRIPTOR;
@@ -115,6 +131,11 @@ public class ArrayOfInterfaces implements android.os.Parcelable
return DESCRIPTOR;
}
}
+ /** @hide */
+ public int getMaxTransactionId()
+ {
+ return 0;
+ }
}
public static final java.lang.String DESCRIPTOR = "android$aidl$tests$ArrayOfInterfaces$IEmptyInterface".replace('$', '.');
}
@@ -159,6 +180,26 @@ public class ArrayOfInterfaces implements android.os.Parcelable
{
return this;
}
+ /** @hide */
+ public static java.lang.String getDefaultTransactionName(int transactionCode)
+ {
+ switch (transactionCode)
+ {
+ case TRANSACTION_methodWithInterfaces:
+ {
+ return "methodWithInterfaces";
+ }
+ default:
+ {
+ return null;
+ }
+ }
+ }
+ /** @hide */
+ public java.lang.String getTransactionName(int transactionCode)
+ {
+ return this.getDefaultTransactionName(transactionCode);
+ }
@Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException
{
java.lang.String descriptor = DESCRIPTOR;
@@ -245,20 +286,10 @@ public class ArrayOfInterfaces implements android.os.Parcelable
_data.writeStrongInterface(iface);
_data.writeStrongInterface(nullable_iface);
_data.writeInterfaceArray(iface_array_in);
- if ((iface_array_out==null)) {
- _data.writeInt(-1);
- }
- else {
- _data.writeInt(iface_array_out.length);
- }
+ _data.writeInt(iface_array_out.length);
_data.writeInterfaceArray(iface_array_inout);
_data.writeInterfaceArray(nullable_iface_array_in);
- if ((nullable_iface_array_out==null)) {
- _data.writeInt(-1);
- }
- else {
- _data.writeInt(nullable_iface_array_out.length);
- }
+ _data.writeInt(nullable_iface_array_out.length);
_data.writeInterfaceArray(nullable_iface_array_inout);
boolean _status = mRemote.transact(Stub.TRANSACTION_methodWithInterfaces, _data, _reply, 0);
_reply.readException();
@@ -276,6 +307,11 @@ public class ArrayOfInterfaces implements android.os.Parcelable
}
}
static final int TRANSACTION_methodWithInterfaces = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0);
+ /** @hide */
+ public int getMaxTransactionId()
+ {
+ return 0;
+ }
}
public static final java.lang.String DESCRIPTOR = "android$aidl$tests$ArrayOfInterfaces$IMyInterface".replace('$', '.');
public android.aidl.tests.ArrayOfInterfaces.IEmptyInterface[] methodWithInterfaces(android.aidl.tests.ArrayOfInterfaces.IEmptyInterface iface, android.aidl.tests.ArrayOfInterfaces.IEmptyInterface nullable_iface, android.aidl.tests.ArrayOfInterfaces.IEmptyInterface[] iface_array_in, android.aidl.tests.ArrayOfInterfaces.IEmptyInterface[] iface_array_out, android.aidl.tests.ArrayOfInterfaces.IEmptyInterface[] iface_array_inout, android.aidl.tests.ArrayOfInterfaces.IEmptyInterface[] nullable_iface_array_in, android.aidl.tests.ArrayOfInterfaces.IEmptyInterface[] nullable_iface_array_out, android.aidl.tests.ArrayOfInterfaces.IEmptyInterface[] nullable_iface_array_inout) throws android.os.RemoteException;
diff --git a/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/CircularParcelable.java b/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/CircularParcelable.java
new file mode 100644
index 00000000..37c20362
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/CircularParcelable.java
@@ -0,0 +1,50 @@
+/*
+ * This file is auto-generated. DO NOT MODIFY.
+ */
+package android.aidl.tests;
+public class CircularParcelable implements android.os.Parcelable
+{
+ public android.aidl.tests.ITestService testService;
+ public static final android.os.Parcelable.Creator<CircularParcelable> CREATOR = new android.os.Parcelable.Creator<CircularParcelable>() {
+ @Override
+ public CircularParcelable createFromParcel(android.os.Parcel _aidl_source) {
+ CircularParcelable _aidl_out = new CircularParcelable();
+ _aidl_out.readFromParcel(_aidl_source);
+ return _aidl_out;
+ }
+ @Override
+ public CircularParcelable[] newArray(int _aidl_size) {
+ return new CircularParcelable[_aidl_size];
+ }
+ };
+ @Override public final void writeToParcel(android.os.Parcel _aidl_parcel, int _aidl_flag)
+ {
+ int _aidl_start_pos = _aidl_parcel.dataPosition();
+ _aidl_parcel.writeInt(0);
+ _aidl_parcel.writeStrongInterface(testService);
+ int _aidl_end_pos = _aidl_parcel.dataPosition();
+ _aidl_parcel.setDataPosition(_aidl_start_pos);
+ _aidl_parcel.writeInt(_aidl_end_pos - _aidl_start_pos);
+ _aidl_parcel.setDataPosition(_aidl_end_pos);
+ }
+ public final void readFromParcel(android.os.Parcel _aidl_parcel)
+ {
+ int _aidl_start_pos = _aidl_parcel.dataPosition();
+ int _aidl_parcelable_size = _aidl_parcel.readInt();
+ try {
+ if (_aidl_parcelable_size < 4) throw new android.os.BadParcelableException("Parcelable too small");;
+ if (_aidl_parcel.dataPosition() - _aidl_start_pos >= _aidl_parcelable_size) return;
+ testService = android.aidl.tests.ITestService.Stub.asInterface(_aidl_parcel.readStrongBinder());
+ } finally {
+ if (_aidl_start_pos > (Integer.MAX_VALUE - _aidl_parcelable_size)) {
+ throw new android.os.BadParcelableException("Overflow in the size of parcelable");
+ }
+ _aidl_parcel.setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
+ }
+ }
+ @Override
+ public int describeContents() {
+ int _mask = 0;
+ return _mask;
+ }
+}
diff --git a/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/CircularParcelable.java.d b/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/CircularParcelable.java.d
new file mode 100644
index 00000000..bf6f8ca7
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/CircularParcelable.java.d
@@ -0,0 +1,16 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-java-source/gen/android/aidl/tests/CircularParcelable.java : \
+ system/tools/aidl/tests/android/aidl/tests/CircularParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ITestService.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ByteEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/IntEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/LongEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/INamedCallback.aidl \
+ system/tools/aidl/tests/android/aidl/tests/StructuredParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/extension/ExtendableParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/RecursiveList.aidl \
+ system/tools/aidl/tests/android/aidl/tests/IOldName.aidl \
+ system/tools/aidl/tests/android/aidl/tests/INewName.aidl \
+ system/tools/aidl/tests/android/aidl/tests/Union.aidl \
+ system/tools/aidl/tests/android/aidl/tests/BackendType.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ICircular.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ConstantExpressionEnum.aidl
diff --git a/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/ICircular.java b/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/ICircular.java
new file mode 100644
index 00000000..e24b2b4b
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/ICircular.java
@@ -0,0 +1,138 @@
+/*
+ * This file is auto-generated. DO NOT MODIFY.
+ */
+package android.aidl.tests;
+public interface ICircular extends android.os.IInterface
+{
+ /** Default implementation for ICircular. */
+ public static class Default implements android.aidl.tests.ICircular
+ {
+ @Override public android.aidl.tests.ITestService GetTestService() throws android.os.RemoteException
+ {
+ return null;
+ }
+ @Override
+ public android.os.IBinder asBinder() {
+ return null;
+ }
+ }
+ /** Local-side IPC implementation stub class. */
+ public static abstract class Stub extends android.os.Binder implements android.aidl.tests.ICircular
+ {
+ /** Construct the stub at attach it to the interface. */
+ public Stub()
+ {
+ this.attachInterface(this, DESCRIPTOR);
+ }
+ /**
+ * Cast an IBinder object into an android.aidl.tests.ICircular interface,
+ * generating a proxy if needed.
+ */
+ public static android.aidl.tests.ICircular asInterface(android.os.IBinder obj)
+ {
+ if ((obj==null)) {
+ return null;
+ }
+ android.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);
+ if (((iin!=null)&&(iin instanceof android.aidl.tests.ICircular))) {
+ return ((android.aidl.tests.ICircular)iin);
+ }
+ return new android.aidl.tests.ICircular.Stub.Proxy(obj);
+ }
+ @Override public android.os.IBinder asBinder()
+ {
+ return this;
+ }
+ /** @hide */
+ public static java.lang.String getDefaultTransactionName(int transactionCode)
+ {
+ switch (transactionCode)
+ {
+ case TRANSACTION_GetTestService:
+ {
+ return "GetTestService";
+ }
+ default:
+ {
+ return null;
+ }
+ }
+ }
+ /** @hide */
+ public java.lang.String getTransactionName(int transactionCode)
+ {
+ return this.getDefaultTransactionName(transactionCode);
+ }
+ @Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException
+ {
+ java.lang.String descriptor = DESCRIPTOR;
+ if (code >= android.os.IBinder.FIRST_CALL_TRANSACTION && code <= android.os.IBinder.LAST_CALL_TRANSACTION) {
+ data.enforceInterface(descriptor);
+ }
+ switch (code)
+ {
+ case INTERFACE_TRANSACTION:
+ {
+ reply.writeString(descriptor);
+ return true;
+ }
+ }
+ switch (code)
+ {
+ case TRANSACTION_GetTestService:
+ {
+ android.aidl.tests.ITestService _result = this.GetTestService();
+ reply.writeNoException();
+ reply.writeStrongInterface(_result);
+ break;
+ }
+ default:
+ {
+ return super.onTransact(code, data, reply, flags);
+ }
+ }
+ return true;
+ }
+ private static class Proxy implements android.aidl.tests.ICircular
+ {
+ private android.os.IBinder mRemote;
+ Proxy(android.os.IBinder remote)
+ {
+ mRemote = remote;
+ }
+ @Override public android.os.IBinder asBinder()
+ {
+ return mRemote;
+ }
+ public java.lang.String getInterfaceDescriptor()
+ {
+ return DESCRIPTOR;
+ }
+ @Override public android.aidl.tests.ITestService GetTestService() throws android.os.RemoteException
+ {
+ android.os.Parcel _data = android.os.Parcel.obtain(asBinder());
+ android.os.Parcel _reply = android.os.Parcel.obtain();
+ android.aidl.tests.ITestService _result;
+ try {
+ _data.writeInterfaceToken(DESCRIPTOR);
+ boolean _status = mRemote.transact(Stub.TRANSACTION_GetTestService, _data, _reply, 0);
+ _reply.readException();
+ _result = android.aidl.tests.ITestService.Stub.asInterface(_reply.readStrongBinder());
+ }
+ finally {
+ _reply.recycle();
+ _data.recycle();
+ }
+ return _result;
+ }
+ }
+ static final int TRANSACTION_GetTestService = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0);
+ /** @hide */
+ public int getMaxTransactionId()
+ {
+ return 0;
+ }
+ }
+ public static final java.lang.String DESCRIPTOR = "android$aidl$tests$ICircular".replace('$', '.');
+ public android.aidl.tests.ITestService GetTestService() throws android.os.RemoteException;
+}
diff --git a/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/ICircular.java.d b/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/ICircular.java.d
new file mode 100644
index 00000000..1add0dd8
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/ICircular.java.d
@@ -0,0 +1,16 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-java-source/gen/android/aidl/tests/ICircular.java : \
+ system/tools/aidl/tests/android/aidl/tests/ICircular.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ITestService.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ByteEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/IntEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/LongEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/INamedCallback.aidl \
+ system/tools/aidl/tests/android/aidl/tests/StructuredParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/extension/ExtendableParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/RecursiveList.aidl \
+ system/tools/aidl/tests/android/aidl/tests/IOldName.aidl \
+ system/tools/aidl/tests/android/aidl/tests/INewName.aidl \
+ system/tools/aidl/tests/android/aidl/tests/Union.aidl \
+ system/tools/aidl/tests/android/aidl/tests/BackendType.aidl \
+ system/tools/aidl/tests/android/aidl/tests/CircularParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ConstantExpressionEnum.aidl
diff --git a/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/IDeprecated.java b/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/IDeprecated.java
index 09578f59..d9c1d4bf 100644
--- a/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/IDeprecated.java
+++ b/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/IDeprecated.java
@@ -41,6 +41,22 @@ public interface IDeprecated extends android.os.IInterface
{
return this;
}
+ /** @hide */
+ public static java.lang.String getDefaultTransactionName(int transactionCode)
+ {
+ switch (transactionCode)
+ {
+ default:
+ {
+ return null;
+ }
+ }
+ }
+ /** @hide */
+ public java.lang.String getTransactionName(int transactionCode)
+ {
+ return this.getDefaultTransactionName(transactionCode);
+ }
@Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException
{
java.lang.String descriptor = DESCRIPTOR;
@@ -76,6 +92,11 @@ public interface IDeprecated extends android.os.IInterface
return DESCRIPTOR;
}
}
+ /** @hide */
+ public int getMaxTransactionId()
+ {
+ return 0;
+ }
}
public static final java.lang.String DESCRIPTOR = "android$aidl$tests$IDeprecated".replace('$', '.');
}
diff --git a/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/INamedCallback.java b/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/INamedCallback.java
index 3500271e..95c35267 100644
--- a/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/INamedCallback.java
+++ b/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/INamedCallback.java
@@ -43,6 +43,26 @@ public interface INamedCallback extends android.os.IInterface
{
return this;
}
+ /** @hide */
+ public static java.lang.String getDefaultTransactionName(int transactionCode)
+ {
+ switch (transactionCode)
+ {
+ case TRANSACTION_GetName:
+ {
+ return "GetName";
+ }
+ default:
+ {
+ return null;
+ }
+ }
+ }
+ /** @hide */
+ public java.lang.String getTransactionName(int transactionCode)
+ {
+ return this.getDefaultTransactionName(transactionCode);
+ }
@Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException
{
java.lang.String descriptor = DESCRIPTOR;
@@ -107,6 +127,11 @@ public interface INamedCallback extends android.os.IInterface
}
}
static final int TRANSACTION_GetName = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0);
+ /** @hide */
+ public int getMaxTransactionId()
+ {
+ return 0;
+ }
}
public static final java.lang.String DESCRIPTOR = "android$aidl$tests$INamedCallback".replace('$', '.');
public java.lang.String GetName() throws android.os.RemoteException;
diff --git a/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/INewName.java b/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/INewName.java
index 265f8ef1..1fdf1208 100644
--- a/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/INewName.java
+++ b/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/INewName.java
@@ -43,6 +43,26 @@ public interface INewName extends android.os.IInterface
{
return this;
}
+ /** @hide */
+ public static java.lang.String getDefaultTransactionName(int transactionCode)
+ {
+ switch (transactionCode)
+ {
+ case TRANSACTION_RealName:
+ {
+ return "RealName";
+ }
+ default:
+ {
+ return null;
+ }
+ }
+ }
+ /** @hide */
+ public java.lang.String getTransactionName(int transactionCode)
+ {
+ return this.getDefaultTransactionName(transactionCode);
+ }
@Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException
{
java.lang.String descriptor = DESCRIPTOR;
@@ -107,6 +127,11 @@ public interface INewName extends android.os.IInterface
}
}
static final int TRANSACTION_RealName = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0);
+ /** @hide */
+ public int getMaxTransactionId()
+ {
+ return 0;
+ }
}
public static final java.lang.String DESCRIPTOR = "android$aidl$tests$IOldName".replace('$', '.');
public java.lang.String RealName() throws android.os.RemoteException;
diff --git a/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/IOldName.java b/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/IOldName.java
index 7013fcea..325fd8f8 100644
--- a/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/IOldName.java
+++ b/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/IOldName.java
@@ -43,6 +43,26 @@ public interface IOldName extends android.os.IInterface
{
return this;
}
+ /** @hide */
+ public static java.lang.String getDefaultTransactionName(int transactionCode)
+ {
+ switch (transactionCode)
+ {
+ case TRANSACTION_RealName:
+ {
+ return "RealName";
+ }
+ default:
+ {
+ return null;
+ }
+ }
+ }
+ /** @hide */
+ public java.lang.String getTransactionName(int transactionCode)
+ {
+ return this.getDefaultTransactionName(transactionCode);
+ }
@Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException
{
java.lang.String descriptor = DESCRIPTOR;
@@ -107,6 +127,11 @@ public interface IOldName extends android.os.IInterface
}
}
static final int TRANSACTION_RealName = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0);
+ /** @hide */
+ public int getMaxTransactionId()
+ {
+ return 0;
+ }
}
public static final java.lang.String DESCRIPTOR = "android$aidl$tests$IOldName".replace('$', '.');
public java.lang.String RealName() throws android.os.RemoteException;
diff --git a/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/ITestService.java b/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/ITestService.java
index c2635761..650d907e 100644
--- a/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/ITestService.java
+++ b/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/ITestService.java
@@ -128,6 +128,11 @@ public interface ITestService extends android.os.IInterface
{
return null;
}
+ // returns true if the same service is already registered with the same name
+ @Override public boolean SetOtherTestService(java.lang.String name, android.aidl.tests.INamedCallback service) throws android.os.RemoteException
+ {
+ return false;
+ }
@Override public boolean VerifyName(android.aidl.tests.INamedCallback service, java.lang.String name) throws android.os.RemoteException
{
return false;
@@ -289,6 +294,10 @@ public interface ITestService extends android.os.IInterface
{
return 0;
}
+ @Override public android.aidl.tests.ICircular GetCircular(android.aidl.tests.CircularParcelable cp) throws android.os.RemoteException
+ {
+ return null;
+ }
@Override
public android.os.IBinder asBinder() {
return null;
@@ -422,6 +431,11 @@ public interface ITestService extends android.os.IInterface
{
return mImpl.GetOtherTestService(name);
}
+ // returns true if the same service is already registered with the same name
+ @Override public boolean SetOtherTestService(java.lang.String name, android.aidl.tests.INamedCallback service) throws android.os.RemoteException
+ {
+ return mImpl.SetOtherTestService(name,service);
+ }
@Override public boolean VerifyName(android.aidl.tests.INamedCallback service, java.lang.String name) throws android.os.RemoteException
{
return mImpl.VerifyName(service,name);
@@ -590,6 +604,10 @@ public interface ITestService extends android.os.IInterface
{
return mImpl.getBackendType();
}
+ @Override public android.aidl.tests.ICircular GetCircular(android.aidl.tests.CircularParcelable cp) throws android.os.RemoteException
+ {
+ return mImpl.GetCircular(cp);
+ }
android.aidl.tests.ITestService mImpl;
}
/** Local-side IPC implementation stub class. */
@@ -619,6 +637,294 @@ public interface ITestService extends android.os.IInterface
{
return this;
}
+ /** @hide */
+ public static java.lang.String getDefaultTransactionName(int transactionCode)
+ {
+ switch (transactionCode)
+ {
+ case TRANSACTION_UnimplementedMethod:
+ {
+ return "UnimplementedMethod";
+ }
+ case TRANSACTION_Deprecated:
+ {
+ return "Deprecated";
+ }
+ case TRANSACTION_TestOneway:
+ {
+ return "TestOneway";
+ }
+ case TRANSACTION_RepeatBoolean:
+ {
+ return "RepeatBoolean";
+ }
+ case TRANSACTION_RepeatByte:
+ {
+ return "RepeatByte";
+ }
+ case TRANSACTION_RepeatChar:
+ {
+ return "RepeatChar";
+ }
+ case TRANSACTION_RepeatInt:
+ {
+ return "RepeatInt";
+ }
+ case TRANSACTION_RepeatLong:
+ {
+ return "RepeatLong";
+ }
+ case TRANSACTION_RepeatFloat:
+ {
+ return "RepeatFloat";
+ }
+ case TRANSACTION_RepeatDouble:
+ {
+ return "RepeatDouble";
+ }
+ case TRANSACTION_RepeatString:
+ {
+ return "RepeatString";
+ }
+ case TRANSACTION_RepeatByteEnum:
+ {
+ return "RepeatByteEnum";
+ }
+ case TRANSACTION_RepeatIntEnum:
+ {
+ return "RepeatIntEnum";
+ }
+ case TRANSACTION_RepeatLongEnum:
+ {
+ return "RepeatLongEnum";
+ }
+ case TRANSACTION_ReverseBoolean:
+ {
+ return "ReverseBoolean";
+ }
+ case TRANSACTION_ReverseByte:
+ {
+ return "ReverseByte";
+ }
+ case TRANSACTION_ReverseChar:
+ {
+ return "ReverseChar";
+ }
+ case TRANSACTION_ReverseInt:
+ {
+ return "ReverseInt";
+ }
+ case TRANSACTION_ReverseLong:
+ {
+ return "ReverseLong";
+ }
+ case TRANSACTION_ReverseFloat:
+ {
+ return "ReverseFloat";
+ }
+ case TRANSACTION_ReverseDouble:
+ {
+ return "ReverseDouble";
+ }
+ case TRANSACTION_ReverseString:
+ {
+ return "ReverseString";
+ }
+ case TRANSACTION_ReverseByteEnum:
+ {
+ return "ReverseByteEnum";
+ }
+ case TRANSACTION_ReverseIntEnum:
+ {
+ return "ReverseIntEnum";
+ }
+ case TRANSACTION_ReverseLongEnum:
+ {
+ return "ReverseLongEnum";
+ }
+ case TRANSACTION_GetOtherTestService:
+ {
+ return "GetOtherTestService";
+ }
+ case TRANSACTION_SetOtherTestService:
+ {
+ return "SetOtherTestService";
+ }
+ case TRANSACTION_VerifyName:
+ {
+ return "VerifyName";
+ }
+ case TRANSACTION_GetInterfaceArray:
+ {
+ return "GetInterfaceArray";
+ }
+ case TRANSACTION_VerifyNamesWithInterfaceArray:
+ {
+ return "VerifyNamesWithInterfaceArray";
+ }
+ case TRANSACTION_GetNullableInterfaceArray:
+ {
+ return "GetNullableInterfaceArray";
+ }
+ case TRANSACTION_VerifyNamesWithNullableInterfaceArray:
+ {
+ return "VerifyNamesWithNullableInterfaceArray";
+ }
+ case TRANSACTION_GetInterfaceList:
+ {
+ return "GetInterfaceList";
+ }
+ case TRANSACTION_VerifyNamesWithInterfaceList:
+ {
+ return "VerifyNamesWithInterfaceList";
+ }
+ case TRANSACTION_ReverseStringList:
+ {
+ return "ReverseStringList";
+ }
+ case TRANSACTION_RepeatParcelFileDescriptor:
+ {
+ return "RepeatParcelFileDescriptor";
+ }
+ case TRANSACTION_ReverseParcelFileDescriptorArray:
+ {
+ return "ReverseParcelFileDescriptorArray";
+ }
+ case TRANSACTION_ThrowServiceException:
+ {
+ return "ThrowServiceException";
+ }
+ case TRANSACTION_RepeatNullableIntArray:
+ {
+ return "RepeatNullableIntArray";
+ }
+ case TRANSACTION_RepeatNullableByteEnumArray:
+ {
+ return "RepeatNullableByteEnumArray";
+ }
+ case TRANSACTION_RepeatNullableIntEnumArray:
+ {
+ return "RepeatNullableIntEnumArray";
+ }
+ case TRANSACTION_RepeatNullableLongEnumArray:
+ {
+ return "RepeatNullableLongEnumArray";
+ }
+ case TRANSACTION_RepeatNullableString:
+ {
+ return "RepeatNullableString";
+ }
+ case TRANSACTION_RepeatNullableStringList:
+ {
+ return "RepeatNullableStringList";
+ }
+ case TRANSACTION_RepeatNullableParcelable:
+ {
+ return "RepeatNullableParcelable";
+ }
+ case TRANSACTION_RepeatNullableParcelableArray:
+ {
+ return "RepeatNullableParcelableArray";
+ }
+ case TRANSACTION_RepeatNullableParcelableList:
+ {
+ return "RepeatNullableParcelableList";
+ }
+ case TRANSACTION_TakesAnIBinder:
+ {
+ return "TakesAnIBinder";
+ }
+ case TRANSACTION_TakesANullableIBinder:
+ {
+ return "TakesANullableIBinder";
+ }
+ case TRANSACTION_TakesAnIBinderList:
+ {
+ return "TakesAnIBinderList";
+ }
+ case TRANSACTION_TakesANullableIBinderList:
+ {
+ return "TakesANullableIBinderList";
+ }
+ case TRANSACTION_RepeatUtf8CppString:
+ {
+ return "RepeatUtf8CppString";
+ }
+ case TRANSACTION_RepeatNullableUtf8CppString:
+ {
+ return "RepeatNullableUtf8CppString";
+ }
+ case TRANSACTION_ReverseUtf8CppString:
+ {
+ return "ReverseUtf8CppString";
+ }
+ case TRANSACTION_ReverseNullableUtf8CppString:
+ {
+ return "ReverseNullableUtf8CppString";
+ }
+ case TRANSACTION_ReverseUtf8CppStringList:
+ {
+ return "ReverseUtf8CppStringList";
+ }
+ case TRANSACTION_GetCallback:
+ {
+ return "GetCallback";
+ }
+ case TRANSACTION_FillOutStructuredParcelable:
+ {
+ return "FillOutStructuredParcelable";
+ }
+ case TRANSACTION_RepeatExtendableParcelable:
+ {
+ return "RepeatExtendableParcelable";
+ }
+ case TRANSACTION_ReverseList:
+ {
+ return "ReverseList";
+ }
+ case TRANSACTION_ReverseIBinderArray:
+ {
+ return "ReverseIBinderArray";
+ }
+ case TRANSACTION_ReverseNullableIBinderArray:
+ {
+ return "ReverseNullableIBinderArray";
+ }
+ case TRANSACTION_GetOldNameInterface:
+ {
+ return "GetOldNameInterface";
+ }
+ case TRANSACTION_GetNewNameInterface:
+ {
+ return "GetNewNameInterface";
+ }
+ case TRANSACTION_GetUnionTags:
+ {
+ return "GetUnionTags";
+ }
+ case TRANSACTION_GetCppJavaTests:
+ {
+ return "GetCppJavaTests";
+ }
+ case TRANSACTION_getBackendType:
+ {
+ return "getBackendType";
+ }
+ case TRANSACTION_GetCircular:
+ {
+ return "GetCircular";
+ }
+ default:
+ {
+ return null;
+ }
+ }
+ }
+ /** @hide */
+ public java.lang.String getTransactionName(int transactionCode)
+ {
+ return this.getDefaultTransactionName(transactionCode);
+ }
@Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException
{
java.lang.String descriptor = DESCRIPTOR;
@@ -974,6 +1280,18 @@ public interface ITestService extends android.os.IInterface
reply.writeStrongInterface(_result);
break;
}
+ case TRANSACTION_SetOtherTestService:
+ {
+ java.lang.String _arg0;
+ _arg0 = data.readString();
+ android.aidl.tests.INamedCallback _arg1;
+ _arg1 = android.aidl.tests.INamedCallback.Stub.asInterface(data.readStrongBinder());
+ data.enforceNoDataAvail();
+ boolean _result = this.SetOtherTestService(_arg0, _arg1);
+ reply.writeNoException();
+ reply.writeBoolean(_result);
+ break;
+ }
case TRANSACTION_VerifyName:
{
android.aidl.tests.INamedCallback _arg0;
@@ -1189,7 +1507,7 @@ public interface ITestService extends android.os.IInterface
data.enforceNoDataAvail();
java.util.List<android.aidl.tests.ITestService.Empty> _result = this.RepeatNullableParcelableList(_arg0);
reply.writeNoException();
- reply.writeTypedList(_result);
+ reply.writeTypedList(_result, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
break;
}
case TRANSACTION_TakesAnIBinder:
@@ -1413,6 +1731,17 @@ public interface ITestService extends android.os.IInterface
reply.writeByte(_result);
break;
}
+ case TRANSACTION_GetCircular:
+ {
+ android.aidl.tests.CircularParcelable _arg0;
+ _arg0 = new android.aidl.tests.CircularParcelable();
+ data.enforceNoDataAvail();
+ android.aidl.tests.ICircular _result = this.GetCircular(_arg0);
+ reply.writeNoException();
+ reply.writeStrongInterface(_result);
+ reply.writeTypedObject(_arg0, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
+ break;
+ }
default:
{
return super.onTransact(code, data, reply, flags);
@@ -1788,12 +2117,7 @@ public interface ITestService extends android.os.IInterface
try {
_data.writeInterfaceToken(DESCRIPTOR);
_data.writeBooleanArray(input);
- if ((repeated==null)) {
- _data.writeInt(-1);
- }
- else {
- _data.writeInt(repeated.length);
- }
+ _data.writeInt(repeated.length);
boolean _status = mRemote.transact(Stub.TRANSACTION_ReverseBoolean, _data, _reply, android.os.IBinder.FLAG_CLEAR_BUF);
if (!_status) {
if (getDefaultImpl() != null) {
@@ -1819,12 +2143,7 @@ public interface ITestService extends android.os.IInterface
try {
_data.writeInterfaceToken(DESCRIPTOR);
_data.writeByteArray(input);
- if ((repeated==null)) {
- _data.writeInt(-1);
- }
- else {
- _data.writeInt(repeated.length);
- }
+ _data.writeInt(repeated.length);
boolean _status = mRemote.transact(Stub.TRANSACTION_ReverseByte, _data, _reply, android.os.IBinder.FLAG_CLEAR_BUF);
if (!_status) {
if (getDefaultImpl() != null) {
@@ -1850,12 +2169,7 @@ public interface ITestService extends android.os.IInterface
try {
_data.writeInterfaceToken(DESCRIPTOR);
_data.writeCharArray(input);
- if ((repeated==null)) {
- _data.writeInt(-1);
- }
- else {
- _data.writeInt(repeated.length);
- }
+ _data.writeInt(repeated.length);
boolean _status = mRemote.transact(Stub.TRANSACTION_ReverseChar, _data, _reply, android.os.IBinder.FLAG_CLEAR_BUF);
if (!_status) {
if (getDefaultImpl() != null) {
@@ -1881,12 +2195,7 @@ public interface ITestService extends android.os.IInterface
try {
_data.writeInterfaceToken(DESCRIPTOR);
_data.writeIntArray(input);
- if ((repeated==null)) {
- _data.writeInt(-1);
- }
- else {
- _data.writeInt(repeated.length);
- }
+ _data.writeInt(repeated.length);
boolean _status = mRemote.transact(Stub.TRANSACTION_ReverseInt, _data, _reply, android.os.IBinder.FLAG_CLEAR_BUF);
if (!_status) {
if (getDefaultImpl() != null) {
@@ -1912,12 +2221,7 @@ public interface ITestService extends android.os.IInterface
try {
_data.writeInterfaceToken(DESCRIPTOR);
_data.writeLongArray(input);
- if ((repeated==null)) {
- _data.writeInt(-1);
- }
- else {
- _data.writeInt(repeated.length);
- }
+ _data.writeInt(repeated.length);
boolean _status = mRemote.transact(Stub.TRANSACTION_ReverseLong, _data, _reply, android.os.IBinder.FLAG_CLEAR_BUF);
if (!_status) {
if (getDefaultImpl() != null) {
@@ -1943,12 +2247,7 @@ public interface ITestService extends android.os.IInterface
try {
_data.writeInterfaceToken(DESCRIPTOR);
_data.writeFloatArray(input);
- if ((repeated==null)) {
- _data.writeInt(-1);
- }
- else {
- _data.writeInt(repeated.length);
- }
+ _data.writeInt(repeated.length);
boolean _status = mRemote.transact(Stub.TRANSACTION_ReverseFloat, _data, _reply, android.os.IBinder.FLAG_CLEAR_BUF);
if (!_status) {
if (getDefaultImpl() != null) {
@@ -1974,12 +2273,7 @@ public interface ITestService extends android.os.IInterface
try {
_data.writeInterfaceToken(DESCRIPTOR);
_data.writeDoubleArray(input);
- if ((repeated==null)) {
- _data.writeInt(-1);
- }
- else {
- _data.writeInt(repeated.length);
- }
+ _data.writeInt(repeated.length);
boolean _status = mRemote.transact(Stub.TRANSACTION_ReverseDouble, _data, _reply, android.os.IBinder.FLAG_CLEAR_BUF);
if (!_status) {
if (getDefaultImpl() != null) {
@@ -2005,12 +2299,7 @@ public interface ITestService extends android.os.IInterface
try {
_data.writeInterfaceToken(DESCRIPTOR);
_data.writeStringArray(input);
- if ((repeated==null)) {
- _data.writeInt(-1);
- }
- else {
- _data.writeInt(repeated.length);
- }
+ _data.writeInt(repeated.length);
boolean _status = mRemote.transact(Stub.TRANSACTION_ReverseString, _data, _reply, android.os.IBinder.FLAG_CLEAR_BUF);
if (!_status) {
if (getDefaultImpl() != null) {
@@ -2036,12 +2325,7 @@ public interface ITestService extends android.os.IInterface
try {
_data.writeInterfaceToken(DESCRIPTOR);
_data.writeByteArray(input);
- if ((repeated==null)) {
- _data.writeInt(-1);
- }
- else {
- _data.writeInt(repeated.length);
- }
+ _data.writeInt(repeated.length);
boolean _status = mRemote.transact(Stub.TRANSACTION_ReverseByteEnum, _data, _reply, android.os.IBinder.FLAG_CLEAR_BUF);
if (!_status) {
if (getDefaultImpl() != null) {
@@ -2067,12 +2351,7 @@ public interface ITestService extends android.os.IInterface
try {
_data.writeInterfaceToken(DESCRIPTOR);
_data.writeIntArray(input);
- if ((repeated==null)) {
- _data.writeInt(-1);
- }
- else {
- _data.writeInt(repeated.length);
- }
+ _data.writeInt(repeated.length);
boolean _status = mRemote.transact(Stub.TRANSACTION_ReverseIntEnum, _data, _reply, android.os.IBinder.FLAG_CLEAR_BUF);
if (!_status) {
if (getDefaultImpl() != null) {
@@ -2098,12 +2377,7 @@ public interface ITestService extends android.os.IInterface
try {
_data.writeInterfaceToken(DESCRIPTOR);
_data.writeLongArray(input);
- if ((repeated==null)) {
- _data.writeInt(-1);
- }
- else {
- _data.writeInt(repeated.length);
- }
+ _data.writeInt(repeated.length);
boolean _status = mRemote.transact(Stub.TRANSACTION_ReverseLongEnum, _data, _reply, android.os.IBinder.FLAG_CLEAR_BUF);
if (!_status) {
if (getDefaultImpl() != null) {
@@ -2146,6 +2420,32 @@ public interface ITestService extends android.os.IInterface
}
return _result;
}
+ // returns true if the same service is already registered with the same name
+ @Override public boolean SetOtherTestService(java.lang.String name, android.aidl.tests.INamedCallback service) throws android.os.RemoteException
+ {
+ android.os.Parcel _data = android.os.Parcel.obtain(asBinder());
+ _data.markSensitive();
+ android.os.Parcel _reply = android.os.Parcel.obtain();
+ boolean _result;
+ try {
+ _data.writeInterfaceToken(DESCRIPTOR);
+ _data.writeString(name);
+ _data.writeStrongInterface(service);
+ boolean _status = mRemote.transact(Stub.TRANSACTION_SetOtherTestService, _data, _reply, android.os.IBinder.FLAG_CLEAR_BUF);
+ if (!_status) {
+ if (getDefaultImpl() != null) {
+ return getDefaultImpl().SetOtherTestService(name, service);
+ }
+ }
+ _reply.readException();
+ _result = _reply.readBoolean();
+ }
+ finally {
+ _reply.recycle();
+ _data.recycle();
+ }
+ return _result;
+ }
@Override public boolean VerifyName(android.aidl.tests.INamedCallback service, java.lang.String name) throws android.os.RemoteException
{
android.os.Parcel _data = android.os.Parcel.obtain(asBinder());
@@ -2377,12 +2677,7 @@ public interface ITestService extends android.os.IInterface
try {
_data.writeInterfaceToken(DESCRIPTOR);
_data.writeTypedArray(input, 0);
- if ((repeated==null)) {
- _data.writeInt(-1);
- }
- else {
- _data.writeInt(repeated.length);
- }
+ _data.writeInt(repeated.length);
boolean _status = mRemote.transact(Stub.TRANSACTION_ReverseParcelFileDescriptorArray, _data, _reply, android.os.IBinder.FLAG_CLEAR_BUF);
if (!_status) {
if (getDefaultImpl() != null) {
@@ -2623,7 +2918,7 @@ public interface ITestService extends android.os.IInterface
java.util.List<android.aidl.tests.ITestService.Empty> _result;
try {
_data.writeInterfaceToken(DESCRIPTOR);
- _data.writeTypedList(input);
+ _data.writeTypedList(input, 0);
boolean _status = mRemote.transact(Stub.TRANSACTION_RepeatNullableParcelableList, _data, _reply, android.os.IBinder.FLAG_CLEAR_BUF);
if (!_status) {
if (getDefaultImpl() != null) {
@@ -2785,12 +3080,7 @@ public interface ITestService extends android.os.IInterface
try {
_data.writeInterfaceToken(DESCRIPTOR);
_data.writeStringArray(input);
- if ((repeated==null)) {
- _data.writeInt(-1);
- }
- else {
- _data.writeInt(repeated.length);
- }
+ _data.writeInt(repeated.length);
boolean _status = mRemote.transact(Stub.TRANSACTION_ReverseUtf8CppString, _data, _reply, android.os.IBinder.FLAG_CLEAR_BUF);
if (!_status) {
if (getDefaultImpl() != null) {
@@ -2816,12 +3106,7 @@ public interface ITestService extends android.os.IInterface
try {
_data.writeInterfaceToken(DESCRIPTOR);
_data.writeStringArray(input);
- if ((repeated==null)) {
- _data.writeInt(-1);
- }
- else {
- _data.writeInt(repeated.length);
- }
+ _data.writeInt(repeated.length);
boolean _status = mRemote.transact(Stub.TRANSACTION_ReverseNullableUtf8CppString, _data, _reply, android.os.IBinder.FLAG_CLEAR_BUF);
if (!_status) {
if (getDefaultImpl() != null) {
@@ -2973,12 +3258,7 @@ public interface ITestService extends android.os.IInterface
try {
_data.writeInterfaceToken(DESCRIPTOR);
_data.writeBinderArray(input);
- if ((repeated==null)) {
- _data.writeInt(-1);
- }
- else {
- _data.writeInt(repeated.length);
- }
+ _data.writeInt(repeated.length);
boolean _status = mRemote.transact(Stub.TRANSACTION_ReverseIBinderArray, _data, _reply, android.os.IBinder.FLAG_CLEAR_BUF);
if (!_status) {
if (getDefaultImpl() != null) {
@@ -3004,12 +3284,7 @@ public interface ITestService extends android.os.IInterface
try {
_data.writeInterfaceToken(DESCRIPTOR);
_data.writeBinderArray(input);
- if ((repeated==null)) {
- _data.writeInt(-1);
- }
- else {
- _data.writeInt(repeated.length);
- }
+ _data.writeInt(repeated.length);
boolean _status = mRemote.transact(Stub.TRANSACTION_ReverseNullableIBinderArray, _data, _reply, android.os.IBinder.FLAG_CLEAR_BUF);
if (!_status) {
if (getDefaultImpl() != null) {
@@ -3143,6 +3418,32 @@ public interface ITestService extends android.os.IInterface
}
return _result;
}
+ @Override public android.aidl.tests.ICircular GetCircular(android.aidl.tests.CircularParcelable cp) throws android.os.RemoteException
+ {
+ android.os.Parcel _data = android.os.Parcel.obtain(asBinder());
+ _data.markSensitive();
+ android.os.Parcel _reply = android.os.Parcel.obtain();
+ android.aidl.tests.ICircular _result;
+ try {
+ _data.writeInterfaceToken(DESCRIPTOR);
+ boolean _status = mRemote.transact(Stub.TRANSACTION_GetCircular, _data, _reply, android.os.IBinder.FLAG_CLEAR_BUF);
+ if (!_status) {
+ if (getDefaultImpl() != null) {
+ return getDefaultImpl().GetCircular(cp);
+ }
+ }
+ _reply.readException();
+ _result = android.aidl.tests.ICircular.Stub.asInterface(_reply.readStrongBinder());
+ if ((0!=_reply.readInt())) {
+ cp.readFromParcel(_reply);
+ }
+ }
+ finally {
+ _reply.recycle();
+ _data.recycle();
+ }
+ return _result;
+ }
public static android.aidl.tests.ITestService sDefaultImpl;
}
static final int TRANSACTION_UnimplementedMethod = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0);
@@ -3171,46 +3472,53 @@ public interface ITestService extends android.os.IInterface
static final int TRANSACTION_ReverseIntEnum = (android.os.IBinder.FIRST_CALL_TRANSACTION + 23);
static final int TRANSACTION_ReverseLongEnum = (android.os.IBinder.FIRST_CALL_TRANSACTION + 24);
static final int TRANSACTION_GetOtherTestService = (android.os.IBinder.FIRST_CALL_TRANSACTION + 25);
- static final int TRANSACTION_VerifyName = (android.os.IBinder.FIRST_CALL_TRANSACTION + 26);
- static final int TRANSACTION_GetInterfaceArray = (android.os.IBinder.FIRST_CALL_TRANSACTION + 27);
- static final int TRANSACTION_VerifyNamesWithInterfaceArray = (android.os.IBinder.FIRST_CALL_TRANSACTION + 28);
- static final int TRANSACTION_GetNullableInterfaceArray = (android.os.IBinder.FIRST_CALL_TRANSACTION + 29);
- static final int TRANSACTION_VerifyNamesWithNullableInterfaceArray = (android.os.IBinder.FIRST_CALL_TRANSACTION + 30);
- static final int TRANSACTION_GetInterfaceList = (android.os.IBinder.FIRST_CALL_TRANSACTION + 31);
- static final int TRANSACTION_VerifyNamesWithInterfaceList = (android.os.IBinder.FIRST_CALL_TRANSACTION + 32);
- static final int TRANSACTION_ReverseStringList = (android.os.IBinder.FIRST_CALL_TRANSACTION + 33);
- static final int TRANSACTION_RepeatParcelFileDescriptor = (android.os.IBinder.FIRST_CALL_TRANSACTION + 34);
- static final int TRANSACTION_ReverseParcelFileDescriptorArray = (android.os.IBinder.FIRST_CALL_TRANSACTION + 35);
- static final int TRANSACTION_ThrowServiceException = (android.os.IBinder.FIRST_CALL_TRANSACTION + 36);
- static final int TRANSACTION_RepeatNullableIntArray = (android.os.IBinder.FIRST_CALL_TRANSACTION + 37);
- static final int TRANSACTION_RepeatNullableByteEnumArray = (android.os.IBinder.FIRST_CALL_TRANSACTION + 38);
- static final int TRANSACTION_RepeatNullableIntEnumArray = (android.os.IBinder.FIRST_CALL_TRANSACTION + 39);
- static final int TRANSACTION_RepeatNullableLongEnumArray = (android.os.IBinder.FIRST_CALL_TRANSACTION + 40);
- static final int TRANSACTION_RepeatNullableString = (android.os.IBinder.FIRST_CALL_TRANSACTION + 41);
- static final int TRANSACTION_RepeatNullableStringList = (android.os.IBinder.FIRST_CALL_TRANSACTION + 42);
- static final int TRANSACTION_RepeatNullableParcelable = (android.os.IBinder.FIRST_CALL_TRANSACTION + 43);
- static final int TRANSACTION_RepeatNullableParcelableArray = (android.os.IBinder.FIRST_CALL_TRANSACTION + 44);
- static final int TRANSACTION_RepeatNullableParcelableList = (android.os.IBinder.FIRST_CALL_TRANSACTION + 45);
- static final int TRANSACTION_TakesAnIBinder = (android.os.IBinder.FIRST_CALL_TRANSACTION + 46);
- static final int TRANSACTION_TakesANullableIBinder = (android.os.IBinder.FIRST_CALL_TRANSACTION + 47);
- static final int TRANSACTION_TakesAnIBinderList = (android.os.IBinder.FIRST_CALL_TRANSACTION + 48);
- static final int TRANSACTION_TakesANullableIBinderList = (android.os.IBinder.FIRST_CALL_TRANSACTION + 49);
- static final int TRANSACTION_RepeatUtf8CppString = (android.os.IBinder.FIRST_CALL_TRANSACTION + 50);
- static final int TRANSACTION_RepeatNullableUtf8CppString = (android.os.IBinder.FIRST_CALL_TRANSACTION + 51);
- static final int TRANSACTION_ReverseUtf8CppString = (android.os.IBinder.FIRST_CALL_TRANSACTION + 52);
- static final int TRANSACTION_ReverseNullableUtf8CppString = (android.os.IBinder.FIRST_CALL_TRANSACTION + 53);
- static final int TRANSACTION_ReverseUtf8CppStringList = (android.os.IBinder.FIRST_CALL_TRANSACTION + 54);
- static final int TRANSACTION_GetCallback = (android.os.IBinder.FIRST_CALL_TRANSACTION + 55);
- static final int TRANSACTION_FillOutStructuredParcelable = (android.os.IBinder.FIRST_CALL_TRANSACTION + 56);
- static final int TRANSACTION_RepeatExtendableParcelable = (android.os.IBinder.FIRST_CALL_TRANSACTION + 57);
- static final int TRANSACTION_ReverseList = (android.os.IBinder.FIRST_CALL_TRANSACTION + 58);
- static final int TRANSACTION_ReverseIBinderArray = (android.os.IBinder.FIRST_CALL_TRANSACTION + 59);
- static final int TRANSACTION_ReverseNullableIBinderArray = (android.os.IBinder.FIRST_CALL_TRANSACTION + 60);
- static final int TRANSACTION_GetOldNameInterface = (android.os.IBinder.FIRST_CALL_TRANSACTION + 61);
- static final int TRANSACTION_GetNewNameInterface = (android.os.IBinder.FIRST_CALL_TRANSACTION + 62);
- static final int TRANSACTION_GetUnionTags = (android.os.IBinder.FIRST_CALL_TRANSACTION + 63);
- static final int TRANSACTION_GetCppJavaTests = (android.os.IBinder.FIRST_CALL_TRANSACTION + 64);
- static final int TRANSACTION_getBackendType = (android.os.IBinder.FIRST_CALL_TRANSACTION + 65);
+ static final int TRANSACTION_SetOtherTestService = (android.os.IBinder.FIRST_CALL_TRANSACTION + 26);
+ static final int TRANSACTION_VerifyName = (android.os.IBinder.FIRST_CALL_TRANSACTION + 27);
+ static final int TRANSACTION_GetInterfaceArray = (android.os.IBinder.FIRST_CALL_TRANSACTION + 28);
+ static final int TRANSACTION_VerifyNamesWithInterfaceArray = (android.os.IBinder.FIRST_CALL_TRANSACTION + 29);
+ static final int TRANSACTION_GetNullableInterfaceArray = (android.os.IBinder.FIRST_CALL_TRANSACTION + 30);
+ static final int TRANSACTION_VerifyNamesWithNullableInterfaceArray = (android.os.IBinder.FIRST_CALL_TRANSACTION + 31);
+ static final int TRANSACTION_GetInterfaceList = (android.os.IBinder.FIRST_CALL_TRANSACTION + 32);
+ static final int TRANSACTION_VerifyNamesWithInterfaceList = (android.os.IBinder.FIRST_CALL_TRANSACTION + 33);
+ static final int TRANSACTION_ReverseStringList = (android.os.IBinder.FIRST_CALL_TRANSACTION + 34);
+ static final int TRANSACTION_RepeatParcelFileDescriptor = (android.os.IBinder.FIRST_CALL_TRANSACTION + 35);
+ static final int TRANSACTION_ReverseParcelFileDescriptorArray = (android.os.IBinder.FIRST_CALL_TRANSACTION + 36);
+ static final int TRANSACTION_ThrowServiceException = (android.os.IBinder.FIRST_CALL_TRANSACTION + 37);
+ static final int TRANSACTION_RepeatNullableIntArray = (android.os.IBinder.FIRST_CALL_TRANSACTION + 38);
+ static final int TRANSACTION_RepeatNullableByteEnumArray = (android.os.IBinder.FIRST_CALL_TRANSACTION + 39);
+ static final int TRANSACTION_RepeatNullableIntEnumArray = (android.os.IBinder.FIRST_CALL_TRANSACTION + 40);
+ static final int TRANSACTION_RepeatNullableLongEnumArray = (android.os.IBinder.FIRST_CALL_TRANSACTION + 41);
+ static final int TRANSACTION_RepeatNullableString = (android.os.IBinder.FIRST_CALL_TRANSACTION + 42);
+ static final int TRANSACTION_RepeatNullableStringList = (android.os.IBinder.FIRST_CALL_TRANSACTION + 43);
+ static final int TRANSACTION_RepeatNullableParcelable = (android.os.IBinder.FIRST_CALL_TRANSACTION + 44);
+ static final int TRANSACTION_RepeatNullableParcelableArray = (android.os.IBinder.FIRST_CALL_TRANSACTION + 45);
+ static final int TRANSACTION_RepeatNullableParcelableList = (android.os.IBinder.FIRST_CALL_TRANSACTION + 46);
+ static final int TRANSACTION_TakesAnIBinder = (android.os.IBinder.FIRST_CALL_TRANSACTION + 47);
+ static final int TRANSACTION_TakesANullableIBinder = (android.os.IBinder.FIRST_CALL_TRANSACTION + 48);
+ static final int TRANSACTION_TakesAnIBinderList = (android.os.IBinder.FIRST_CALL_TRANSACTION + 49);
+ static final int TRANSACTION_TakesANullableIBinderList = (android.os.IBinder.FIRST_CALL_TRANSACTION + 50);
+ static final int TRANSACTION_RepeatUtf8CppString = (android.os.IBinder.FIRST_CALL_TRANSACTION + 51);
+ static final int TRANSACTION_RepeatNullableUtf8CppString = (android.os.IBinder.FIRST_CALL_TRANSACTION + 52);
+ static final int TRANSACTION_ReverseUtf8CppString = (android.os.IBinder.FIRST_CALL_TRANSACTION + 53);
+ static final int TRANSACTION_ReverseNullableUtf8CppString = (android.os.IBinder.FIRST_CALL_TRANSACTION + 54);
+ static final int TRANSACTION_ReverseUtf8CppStringList = (android.os.IBinder.FIRST_CALL_TRANSACTION + 55);
+ static final int TRANSACTION_GetCallback = (android.os.IBinder.FIRST_CALL_TRANSACTION + 56);
+ static final int TRANSACTION_FillOutStructuredParcelable = (android.os.IBinder.FIRST_CALL_TRANSACTION + 57);
+ static final int TRANSACTION_RepeatExtendableParcelable = (android.os.IBinder.FIRST_CALL_TRANSACTION + 58);
+ static final int TRANSACTION_ReverseList = (android.os.IBinder.FIRST_CALL_TRANSACTION + 59);
+ static final int TRANSACTION_ReverseIBinderArray = (android.os.IBinder.FIRST_CALL_TRANSACTION + 60);
+ static final int TRANSACTION_ReverseNullableIBinderArray = (android.os.IBinder.FIRST_CALL_TRANSACTION + 61);
+ static final int TRANSACTION_GetOldNameInterface = (android.os.IBinder.FIRST_CALL_TRANSACTION + 62);
+ static final int TRANSACTION_GetNewNameInterface = (android.os.IBinder.FIRST_CALL_TRANSACTION + 63);
+ static final int TRANSACTION_GetUnionTags = (android.os.IBinder.FIRST_CALL_TRANSACTION + 64);
+ static final int TRANSACTION_GetCppJavaTests = (android.os.IBinder.FIRST_CALL_TRANSACTION + 65);
+ static final int TRANSACTION_getBackendType = (android.os.IBinder.FIRST_CALL_TRANSACTION + 66);
+ static final int TRANSACTION_GetCircular = (android.os.IBinder.FIRST_CALL_TRANSACTION + 67);
+ /** @hide */
+ public int getMaxTransactionId()
+ {
+ return 67;
+ }
public static boolean setDefaultImpl(android.aidl.tests.ITestService impl) {
// Only one user of this interface can use this function
// at a time. This is a heuristic to detect if two different
@@ -3250,6 +3558,22 @@ public interface ITestService extends android.os.IInterface
public static final long LONG_TEST_CONSTANT = 1099511627776L;
public static final String STRING_TEST_CONSTANT = "foo";
public static final String STRING_TEST_CONSTANT2 = "bar";
+ public static final float FLOAT_TEST_CONSTANT = 1.000000f;
+ public static final float FLOAT_TEST_CONSTANT2 = -1.000000f;
+ public static final float FLOAT_TEST_CONSTANT3 = 1.000000f;
+ public static final float FLOAT_TEST_CONSTANT4 = 2.200000f;
+ public static final float FLOAT_TEST_CONSTANT5 = -2.200000f;
+ public static final float FLOAT_TEST_CONSTANT6 = -0.000000f;
+ public static final float FLOAT_TEST_CONSTANT7 = 0.000000f;
+ public static final double DOUBLE_TEST_CONSTANT = 1.000000;
+ public static final double DOUBLE_TEST_CONSTANT2 = -1.000000;
+ public static final double DOUBLE_TEST_CONSTANT3 = 1.000000;
+ public static final double DOUBLE_TEST_CONSTANT4 = 2.200000;
+ public static final double DOUBLE_TEST_CONSTANT5 = -2.200000;
+ public static final double DOUBLE_TEST_CONSTANT6 = -0.000000;
+ public static final double DOUBLE_TEST_CONSTANT7 = 0.000000;
+ public static final double DOUBLE_TEST_CONSTANT8 = 1.100000;
+ public static final double DOUBLE_TEST_CONSTANT9 = -1.100000;
public static final String STRING_TEST_CONSTANT_UTF8 = "baz";
// All these constant expressions should be equal to 1
public static final int A1 = 1;
@@ -3356,6 +3680,8 @@ public interface ITestService extends android.os.IInterface
public long[] ReverseLongEnum(long[] input, long[] repeated) throws android.os.RemoteException;
// Test that clients can send and receive Binders.
public android.aidl.tests.INamedCallback GetOtherTestService(java.lang.String name) throws android.os.RemoteException;
+ // returns true if the same service is already registered with the same name
+ public boolean SetOtherTestService(java.lang.String name, android.aidl.tests.INamedCallback service) throws android.os.RemoteException;
public boolean VerifyName(android.aidl.tests.INamedCallback service, java.lang.String name) throws android.os.RemoteException;
public android.aidl.tests.INamedCallback[] GetInterfaceArray(java.lang.String[] names) throws android.os.RemoteException;
public boolean VerifyNamesWithInterfaceArray(android.aidl.tests.INamedCallback[] services, java.lang.String[] names) throws android.os.RemoteException;
@@ -3404,6 +3730,7 @@ public interface ITestService extends android.os.IInterface
// Retrieve the ICppJavaTests if the server supports it
public android.os.IBinder GetCppJavaTests() throws android.os.RemoteException;
public byte getBackendType() throws android.os.RemoteException;
+ public android.aidl.tests.ICircular GetCircular(android.aidl.tests.CircularParcelable cp) throws android.os.RemoteException;
// Small empty parcelable for nullability check
public static class Empty implements android.os.Parcelable
{
@@ -3509,14 +3836,14 @@ public interface ITestService extends android.os.IInterface
_aidl_parcel.writeTypedObject(nullable_pfd, _aidl_flag);
_aidl_parcel.writeTypedArray(pfd_array, _aidl_flag);
_aidl_parcel.writeTypedArray(nullable_pfd_array, _aidl_flag);
- _aidl_parcel.writeTypedList(pfd_list);
- _aidl_parcel.writeTypedList(nullable_pfd_list);
+ _aidl_parcel.writeTypedList(pfd_list, _aidl_flag);
+ _aidl_parcel.writeTypedList(nullable_pfd_list, _aidl_flag);
_aidl_parcel.writeTypedObject(parcel, _aidl_flag);
_aidl_parcel.writeTypedObject(nullable_parcel, _aidl_flag);
_aidl_parcel.writeTypedArray(parcel_array, _aidl_flag);
_aidl_parcel.writeTypedArray(nullable_parcel_array, _aidl_flag);
- _aidl_parcel.writeTypedList(parcel_list);
- _aidl_parcel.writeTypedList(nullable_parcel_list);
+ _aidl_parcel.writeTypedList(parcel_list, _aidl_flag);
+ _aidl_parcel.writeTypedList(nullable_parcel_list, _aidl_flag);
int _aidl_end_pos = _aidl_parcel.dataPosition();
_aidl_parcel.setDataPosition(_aidl_start_pos);
_aidl_parcel.writeInt(_aidl_end_pos - _aidl_start_pos);
@@ -3609,5 +3936,290 @@ public interface ITestService extends android.os.IInterface
}
return 0;
}
+ // interface without I-
+ public interface Foo extends android.os.IInterface
+ {
+ /** Default implementation for Foo. */
+ public static class Default implements android.aidl.tests.ITestService.CompilerChecks.Foo
+ {
+ @Override
+ public android.os.IBinder asBinder() {
+ return null;
+ }
+ }
+ /** Local-side IPC implementation stub class. */
+ public static abstract class Stub extends android.os.Binder implements android.aidl.tests.ITestService.CompilerChecks.Foo
+ {
+ /** Construct the stub at attach it to the interface. */
+ public Stub()
+ {
+ this.attachInterface(this, DESCRIPTOR);
+ }
+ /**
+ * Cast an IBinder object into an android.aidl.tests.ITestService.CompilerChecks.Foo interface,
+ * generating a proxy if needed.
+ */
+ public static android.aidl.tests.ITestService.CompilerChecks.Foo asInterface(android.os.IBinder obj)
+ {
+ if ((obj==null)) {
+ return null;
+ }
+ android.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);
+ if (((iin!=null)&&(iin instanceof android.aidl.tests.ITestService.CompilerChecks.Foo))) {
+ return ((android.aidl.tests.ITestService.CompilerChecks.Foo)iin);
+ }
+ return new android.aidl.tests.ITestService.CompilerChecks.Foo.Stub.Proxy(obj);
+ }
+ @Override public android.os.IBinder asBinder()
+ {
+ return this;
+ }
+ /** @hide */
+ public static java.lang.String getDefaultTransactionName(int transactionCode)
+ {
+ switch (transactionCode)
+ {
+ default:
+ {
+ return null;
+ }
+ }
+ }
+ /** @hide */
+ public java.lang.String getTransactionName(int transactionCode)
+ {
+ return this.getDefaultTransactionName(transactionCode);
+ }
+ @Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException
+ {
+ java.lang.String descriptor = DESCRIPTOR;
+ switch (code)
+ {
+ case INTERFACE_TRANSACTION:
+ {
+ reply.writeString(descriptor);
+ return true;
+ }
+ }
+ switch (code)
+ {
+ default:
+ {
+ return super.onTransact(code, data, reply, flags);
+ }
+ }
+ }
+ private static class Proxy implements android.aidl.tests.ITestService.CompilerChecks.Foo
+ {
+ private android.os.IBinder mRemote;
+ Proxy(android.os.IBinder remote)
+ {
+ mRemote = remote;
+ }
+ @Override public android.os.IBinder asBinder()
+ {
+ return mRemote;
+ }
+ public java.lang.String getInterfaceDescriptor()
+ {
+ return DESCRIPTOR;
+ }
+ }
+ /** @hide */
+ public int getMaxTransactionId()
+ {
+ return 0;
+ }
+ }
+ public static final java.lang.String DESCRIPTOR = "android$aidl$tests$ITestService$CompilerChecks$Foo".replace('$', '.');
+ }
+ public static class HasDeprecated implements android.os.Parcelable
+ {
+ /** @deprecated field */
+ @Deprecated
+ public int deprecated = 0;
+ public static final android.os.Parcelable.Creator<HasDeprecated> CREATOR = new android.os.Parcelable.Creator<HasDeprecated>() {
+ @Override
+ public HasDeprecated createFromParcel(android.os.Parcel _aidl_source) {
+ HasDeprecated _aidl_out = new HasDeprecated();
+ _aidl_out.readFromParcel(_aidl_source);
+ return _aidl_out;
+ }
+ @Override
+ public HasDeprecated[] newArray(int _aidl_size) {
+ return new HasDeprecated[_aidl_size];
+ }
+ };
+ @Override public final void writeToParcel(android.os.Parcel _aidl_parcel, int _aidl_flag)
+ {
+ int _aidl_start_pos = _aidl_parcel.dataPosition();
+ _aidl_parcel.writeInt(0);
+ _aidl_parcel.writeInt(deprecated);
+ int _aidl_end_pos = _aidl_parcel.dataPosition();
+ _aidl_parcel.setDataPosition(_aidl_start_pos);
+ _aidl_parcel.writeInt(_aidl_end_pos - _aidl_start_pos);
+ _aidl_parcel.setDataPosition(_aidl_end_pos);
+ }
+ public final void readFromParcel(android.os.Parcel _aidl_parcel)
+ {
+ int _aidl_start_pos = _aidl_parcel.dataPosition();
+ int _aidl_parcelable_size = _aidl_parcel.readInt();
+ try {
+ if (_aidl_parcelable_size < 4) throw new android.os.BadParcelableException("Parcelable too small");;
+ if (_aidl_parcel.dataPosition() - _aidl_start_pos >= _aidl_parcelable_size) return;
+ deprecated = _aidl_parcel.readInt();
+ } finally {
+ if (_aidl_start_pos > (Integer.MAX_VALUE - _aidl_parcelable_size)) {
+ throw new android.os.BadParcelableException("Overflow in the size of parcelable");
+ }
+ _aidl_parcel.setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
+ }
+ }
+ @Override
+ public int describeContents() {
+ int _mask = 0;
+ return _mask;
+ }
+ }
+ public static final class UsingHasDeprecated implements android.os.Parcelable {
+ // tags for union fields
+ public final static int n = 0; // int n;
+ public final static int m = 1; // android.aidl.tests.ITestService.CompilerChecks.HasDeprecated m;
+
+ private int _tag;
+ private Object _value;
+
+ public UsingHasDeprecated() {
+ int _value = 0;
+ this._tag = n;
+ this._value = _value;
+ }
+
+ private UsingHasDeprecated(android.os.Parcel _aidl_parcel) {
+ readFromParcel(_aidl_parcel);
+ }
+
+ private UsingHasDeprecated(int _tag, Object _value) {
+ this._tag = _tag;
+ this._value = _value;
+ }
+
+ public int getTag() {
+ return _tag;
+ }
+
+ // int n;
+
+ public static UsingHasDeprecated n(int _value) {
+ return new UsingHasDeprecated(n, _value);
+ }
+
+ public int getN() {
+ _assertTag(n);
+ return (int) _value;
+ }
+
+ public void setN(int _value) {
+ _set(n, _value);
+ }
+
+ // android.aidl.tests.ITestService.CompilerChecks.HasDeprecated m;
+
+ public static UsingHasDeprecated m(android.aidl.tests.ITestService.CompilerChecks.HasDeprecated _value) {
+ return new UsingHasDeprecated(m, _value);
+ }
+
+ public android.aidl.tests.ITestService.CompilerChecks.HasDeprecated getM() {
+ _assertTag(m);
+ return (android.aidl.tests.ITestService.CompilerChecks.HasDeprecated) _value;
+ }
+
+ public void setM(android.aidl.tests.ITestService.CompilerChecks.HasDeprecated _value) {
+ _set(m, _value);
+ }
+
+ public static final android.os.Parcelable.Creator<UsingHasDeprecated> CREATOR = new android.os.Parcelable.Creator<UsingHasDeprecated>() {
+ @Override
+ public UsingHasDeprecated createFromParcel(android.os.Parcel _aidl_source) {
+ return new UsingHasDeprecated(_aidl_source);
+ }
+ @Override
+ public UsingHasDeprecated[] newArray(int _aidl_size) {
+ return new UsingHasDeprecated[_aidl_size];
+ }
+ };
+
+ @Override
+ public final void writeToParcel(android.os.Parcel _aidl_parcel, int _aidl_flag) {
+ _aidl_parcel.writeInt(_tag);
+ switch (_tag) {
+ case n:
+ _aidl_parcel.writeInt(getN());
+ break;
+ case m:
+ _aidl_parcel.writeTypedObject(getM(), _aidl_flag);
+ break;
+ }
+ }
+
+ public void readFromParcel(android.os.Parcel _aidl_parcel) {
+ int _aidl_tag;
+ _aidl_tag = _aidl_parcel.readInt();
+ switch (_aidl_tag) {
+ case n: {
+ int _aidl_value;
+ _aidl_value = _aidl_parcel.readInt();
+ _set(_aidl_tag, _aidl_value);
+ return; }
+ case m: {
+ android.aidl.tests.ITestService.CompilerChecks.HasDeprecated _aidl_value;
+ _aidl_value = _aidl_parcel.readTypedObject(android.aidl.tests.ITestService.CompilerChecks.HasDeprecated.CREATOR);
+ _set(_aidl_tag, _aidl_value);
+ return; }
+ }
+ throw new IllegalArgumentException("union: unknown tag: " + _aidl_tag);
+ }
+
+ @Override
+ public int describeContents() {
+ int _mask = 0;
+ switch (getTag()) {
+ case m:
+ _mask |= describeContents(getM());
+ break;
+ }
+ return _mask;
+ }
+ private int describeContents(Object _v) {
+ if (_v == null) return 0;
+ if (_v instanceof android.os.Parcelable) {
+ return ((android.os.Parcelable) _v).describeContents();
+ }
+ return 0;
+ }
+
+ private void _assertTag(int tag) {
+ if (getTag() != tag) {
+ throw new IllegalStateException("bad access: " + _tagString(tag) + ", " + _tagString(getTag()) + " is available.");
+ }
+ }
+
+ private String _tagString(int _tag) {
+ switch (_tag) {
+ case n: return "n";
+ case m: return "m";
+ }
+ throw new IllegalStateException("unknown field: " + _tag);
+ }
+
+ private void _set(int _tag, Object _value) {
+ this._tag = _tag;
+ this._value = _value;
+ }
+ public static @interface Tag {
+ public static final int n = 0;
+ public static final int m = 1;
+ }
+ }
}
}
diff --git a/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/ITestService.java.d b/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/ITestService.java.d
index 561c5083..34f4255b 100644
--- a/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/ITestService.java.d
+++ b/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/ITestService.java.d
@@ -2,6 +2,8 @@ out/soong/.intermediates/system/tools/aidl/aidl-test-interface-java-source/gen/a
system/tools/aidl/tests/android/aidl/tests/ITestService.aidl \
system/tools/aidl/tests/android/aidl/tests/BackendType.aidl \
system/tools/aidl/tests/android/aidl/tests/ByteEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/CircularParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ICircular.aidl \
system/tools/aidl/tests/android/aidl/tests/INamedCallback.aidl \
system/tools/aidl/tests/android/aidl/tests/INewName.aidl \
system/tools/aidl/tests/android/aidl/tests/IOldName.aidl \
diff --git a/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/ListOfInterfaces.java b/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/ListOfInterfaces.java
index 6a2564dd..cb240f40 100644
--- a/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/ListOfInterfaces.java
+++ b/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/ListOfInterfaces.java
@@ -80,6 +80,22 @@ public class ListOfInterfaces implements android.os.Parcelable
{
return this;
}
+ /** @hide */
+ public static java.lang.String getDefaultTransactionName(int transactionCode)
+ {
+ switch (transactionCode)
+ {
+ default:
+ {
+ return null;
+ }
+ }
+ }
+ /** @hide */
+ public java.lang.String getTransactionName(int transactionCode)
+ {
+ return this.getDefaultTransactionName(transactionCode);
+ }
@Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException
{
java.lang.String descriptor = DESCRIPTOR;
@@ -115,6 +131,11 @@ public class ListOfInterfaces implements android.os.Parcelable
return DESCRIPTOR;
}
}
+ /** @hide */
+ public int getMaxTransactionId()
+ {
+ return 0;
+ }
}
public static final java.lang.String DESCRIPTOR = "android$aidl$tests$ListOfInterfaces$IEmptyInterface".replace('$', '.');
}
@@ -159,6 +180,26 @@ public class ListOfInterfaces implements android.os.Parcelable
{
return this;
}
+ /** @hide */
+ public static java.lang.String getDefaultTransactionName(int transactionCode)
+ {
+ switch (transactionCode)
+ {
+ case TRANSACTION_methodWithInterfaces:
+ {
+ return "methodWithInterfaces";
+ }
+ default:
+ {
+ return null;
+ }
+ }
+ }
+ /** @hide */
+ public java.lang.String getTransactionName(int transactionCode)
+ {
+ return this.getDefaultTransactionName(transactionCode);
+ }
@Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException
{
java.lang.String descriptor = DESCRIPTOR;
@@ -254,6 +295,11 @@ public class ListOfInterfaces implements android.os.Parcelable
}
}
static final int TRANSACTION_methodWithInterfaces = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0);
+ /** @hide */
+ public int getMaxTransactionId()
+ {
+ return 0;
+ }
}
public static final java.lang.String DESCRIPTOR = "android$aidl$tests$ListOfInterfaces$IMyInterface".replace('$', '.');
public java.util.List<android.aidl.tests.ListOfInterfaces.IEmptyInterface> methodWithInterfaces(android.aidl.tests.ListOfInterfaces.IEmptyInterface iface, android.aidl.tests.ListOfInterfaces.IEmptyInterface nullable_iface, java.util.List<android.aidl.tests.ListOfInterfaces.IEmptyInterface> iface_list_in, java.util.List<android.aidl.tests.ListOfInterfaces.IEmptyInterface> iface_list_out, java.util.List<android.aidl.tests.ListOfInterfaces.IEmptyInterface> iface_list_inout, java.util.List<android.aidl.tests.ListOfInterfaces.IEmptyInterface> nullable_iface_list_in, java.util.List<android.aidl.tests.ListOfInterfaces.IEmptyInterface> nullable_iface_list_out, java.util.List<android.aidl.tests.ListOfInterfaces.IEmptyInterface> nullable_iface_list_inout) throws android.os.RemoteException;
diff --git a/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/nested/INestedService.java b/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/nested/INestedService.java
index 7fdce359..004f0e39 100644
--- a/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/nested/INestedService.java
+++ b/tests/golden_output/aidl-test-interface-java-source/gen/android/aidl/tests/nested/INestedService.java
@@ -46,6 +46,30 @@ public interface INestedService extends android.os.IInterface
{
return this;
}
+ /** @hide */
+ public static java.lang.String getDefaultTransactionName(int transactionCode)
+ {
+ switch (transactionCode)
+ {
+ case TRANSACTION_flipStatus:
+ {
+ return "flipStatus";
+ }
+ case TRANSACTION_flipStatusWithCallback:
+ {
+ return "flipStatusWithCallback";
+ }
+ default:
+ {
+ return null;
+ }
+ }
+ }
+ /** @hide */
+ public java.lang.String getTransactionName(int transactionCode)
+ {
+ return this.getDefaultTransactionName(transactionCode);
+ }
@Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException
{
java.lang.String descriptor = DESCRIPTOR;
@@ -142,6 +166,11 @@ public interface INestedService extends android.os.IInterface
}
static final int TRANSACTION_flipStatus = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0);
static final int TRANSACTION_flipStatusWithCallback = (android.os.IBinder.FIRST_CALL_TRANSACTION + 1);
+ /** @hide */
+ public int getMaxTransactionId()
+ {
+ return 1;
+ }
}
public static final java.lang.String DESCRIPTOR = "android$aidl$tests$nested$INestedService".replace('$', '.');
public android.aidl.tests.nested.INestedService.Result flipStatus(android.aidl.tests.nested.ParcelableWithNested p) throws android.os.RemoteException;
@@ -232,6 +261,26 @@ public interface INestedService extends android.os.IInterface
{
return this;
}
+ /** @hide */
+ public static java.lang.String getDefaultTransactionName(int transactionCode)
+ {
+ switch (transactionCode)
+ {
+ case TRANSACTION_done:
+ {
+ return "done";
+ }
+ default:
+ {
+ return null;
+ }
+ }
+ }
+ /** @hide */
+ public java.lang.String getTransactionName(int transactionCode)
+ {
+ return this.getDefaultTransactionName(transactionCode);
+ }
@Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException
{
java.lang.String descriptor = DESCRIPTOR;
@@ -296,6 +345,11 @@ public interface INestedService extends android.os.IInterface
}
}
static final int TRANSACTION_done = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0);
+ /** @hide */
+ public int getMaxTransactionId()
+ {
+ return 0;
+ }
}
public static final java.lang.String DESCRIPTOR = "android$aidl$tests$nested$INestedService$ICallback".replace('$', '.');
public void done(byte status) throws android.os.RemoteException;
diff --git a/tests/golden_output/aidl-test-interface-ndk-source/gen/android/aidl/tests/CircularParcelable.cpp b/tests/golden_output/aidl-test-interface-ndk-source/gen/android/aidl/tests/CircularParcelable.cpp
new file mode 100644
index 00000000..77acb17f
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-ndk-source/gen/android/aidl/tests/CircularParcelable.cpp
@@ -0,0 +1,64 @@
+#include "aidl/android/aidl/tests/CircularParcelable.h"
+
+#include <android/binder_parcel_utils.h>
+#include <aidl/android/aidl/tests/BnCircular.h>
+#include <aidl/android/aidl/tests/BnNamedCallback.h>
+#include <aidl/android/aidl/tests/BnNewName.h>
+#include <aidl/android/aidl/tests/BnOldName.h>
+#include <aidl/android/aidl/tests/BnTestService.h>
+#include <aidl/android/aidl/tests/BpCircular.h>
+#include <aidl/android/aidl/tests/BpNamedCallback.h>
+#include <aidl/android/aidl/tests/BpNewName.h>
+#include <aidl/android/aidl/tests/BpOldName.h>
+#include <aidl/android/aidl/tests/BpTestService.h>
+#include <aidl/android/aidl/tests/ICircular.h>
+#include <aidl/android/aidl/tests/INamedCallback.h>
+#include <aidl/android/aidl/tests/INewName.h>
+#include <aidl/android/aidl/tests/IOldName.h>
+#include <aidl/android/aidl/tests/ITestService.h>
+
+namespace aidl {
+namespace android {
+namespace aidl {
+namespace tests {
+const char* CircularParcelable::descriptor = "android.aidl.tests.CircularParcelable";
+
+binder_status_t CircularParcelable::readFromParcel(const AParcel* _aidl_parcel) {
+ binder_status_t _aidl_ret_status = STATUS_OK;
+ int32_t _aidl_start_pos = AParcel_getDataPosition(_aidl_parcel);
+ int32_t _aidl_parcelable_size = 0;
+ _aidl_ret_status = AParcel_readInt32(_aidl_parcel, &_aidl_parcelable_size);
+ if (_aidl_ret_status != STATUS_OK) return _aidl_ret_status;
+
+ if (_aidl_parcelable_size < 4) return STATUS_BAD_VALUE;
+ if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return STATUS_BAD_VALUE;
+ if (AParcel_getDataPosition(_aidl_parcel) - _aidl_start_pos >= _aidl_parcelable_size) {
+ AParcel_setDataPosition(_aidl_parcel, _aidl_start_pos + _aidl_parcelable_size);
+ return _aidl_ret_status;
+ }
+ _aidl_ret_status = ::ndk::AParcel_readNullableData(_aidl_parcel, &testService);
+ if (_aidl_ret_status != STATUS_OK) return _aidl_ret_status;
+
+ AParcel_setDataPosition(_aidl_parcel, _aidl_start_pos + _aidl_parcelable_size);
+ return _aidl_ret_status;
+}
+binder_status_t CircularParcelable::writeToParcel(AParcel* _aidl_parcel) const {
+ binder_status_t _aidl_ret_status;
+ size_t _aidl_start_pos = AParcel_getDataPosition(_aidl_parcel);
+ _aidl_ret_status = AParcel_writeInt32(_aidl_parcel, 0);
+ if (_aidl_ret_status != STATUS_OK) return _aidl_ret_status;
+
+ _aidl_ret_status = ::ndk::AParcel_writeNullableData(_aidl_parcel, testService);
+ if (_aidl_ret_status != STATUS_OK) return _aidl_ret_status;
+
+ size_t _aidl_end_pos = AParcel_getDataPosition(_aidl_parcel);
+ AParcel_setDataPosition(_aidl_parcel, _aidl_start_pos);
+ AParcel_writeInt32(_aidl_parcel, _aidl_end_pos - _aidl_start_pos);
+ AParcel_setDataPosition(_aidl_parcel, _aidl_end_pos);
+ return _aidl_ret_status;
+}
+
+} // namespace tests
+} // namespace aidl
+} // namespace android
+} // namespace aidl
diff --git a/tests/golden_output/aidl-test-interface-ndk-source/gen/android/aidl/tests/CircularParcelable.cpp.d b/tests/golden_output/aidl-test-interface-ndk-source/gen/android/aidl/tests/CircularParcelable.cpp.d
new file mode 100644
index 00000000..a455283f
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-ndk-source/gen/android/aidl/tests/CircularParcelable.cpp.d
@@ -0,0 +1,16 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-ndk-source/gen/android/aidl/tests/CircularParcelable.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/CircularParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ITestService.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ByteEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/IntEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/LongEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/INamedCallback.aidl \
+ system/tools/aidl/tests/android/aidl/tests/StructuredParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/extension/ExtendableParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/RecursiveList.aidl \
+ system/tools/aidl/tests/android/aidl/tests/IOldName.aidl \
+ system/tools/aidl/tests/android/aidl/tests/INewName.aidl \
+ system/tools/aidl/tests/android/aidl/tests/Union.aidl \
+ system/tools/aidl/tests/android/aidl/tests/BackendType.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ICircular.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ConstantExpressionEnum.aidl
diff --git a/tests/golden_output/aidl-test-interface-ndk-source/gen/android/aidl/tests/ICircular.cpp b/tests/golden_output/aidl-test-interface-ndk-source/gen/android/aidl/tests/ICircular.cpp
new file mode 100644
index 00000000..6a626999
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-ndk-source/gen/android/aidl/tests/ICircular.cpp
@@ -0,0 +1,153 @@
+#include "aidl/android/aidl/tests/ICircular.h"
+
+#include <android/binder_parcel_utils.h>
+#include <aidl/android/aidl/tests/BnCircular.h>
+#include <aidl/android/aidl/tests/BnNamedCallback.h>
+#include <aidl/android/aidl/tests/BnNewName.h>
+#include <aidl/android/aidl/tests/BnOldName.h>
+#include <aidl/android/aidl/tests/BnTestService.h>
+#include <aidl/android/aidl/tests/BpCircular.h>
+#include <aidl/android/aidl/tests/BpNamedCallback.h>
+#include <aidl/android/aidl/tests/BpNewName.h>
+#include <aidl/android/aidl/tests/BpOldName.h>
+#include <aidl/android/aidl/tests/BpTestService.h>
+#include <aidl/android/aidl/tests/INamedCallback.h>
+#include <aidl/android/aidl/tests/INewName.h>
+#include <aidl/android/aidl/tests/IOldName.h>
+#include <aidl/android/aidl/tests/ITestService.h>
+
+namespace aidl {
+namespace android {
+namespace aidl {
+namespace tests {
+static binder_status_t _aidl_android_aidl_tests_ICircular_onTransact(AIBinder* _aidl_binder, transaction_code_t _aidl_code, const AParcel* _aidl_in, AParcel* _aidl_out) {
+ (void)_aidl_in;
+ (void)_aidl_out;
+ binder_status_t _aidl_ret_status = STATUS_UNKNOWN_TRANSACTION;
+ std::shared_ptr<BnCircular> _aidl_impl = std::static_pointer_cast<BnCircular>(::ndk::ICInterface::asInterface(_aidl_binder));
+ switch (_aidl_code) {
+ case (FIRST_CALL_TRANSACTION + 0 /*GetTestService*/): {
+ std::shared_ptr<::aidl::android::aidl::tests::ITestService> _aidl_return;
+
+ ::ndk::ScopedAStatus _aidl_status = _aidl_impl->GetTestService(&_aidl_return);
+ _aidl_ret_status = AParcel_writeStatusHeader(_aidl_out, _aidl_status.get());
+ if (_aidl_ret_status != STATUS_OK) break;
+
+ if (!AStatus_isOk(_aidl_status.get())) break;
+
+ _aidl_ret_status = ::ndk::AParcel_writeNullableData(_aidl_out, _aidl_return);
+ if (_aidl_ret_status != STATUS_OK) break;
+
+ break;
+ }
+ }
+ return _aidl_ret_status;
+}
+
+static AIBinder_Class* _g_aidl_android_aidl_tests_ICircular_clazz = ::ndk::ICInterface::defineClass(ICircular::descriptor, _aidl_android_aidl_tests_ICircular_onTransact);
+
+BpCircular::BpCircular(const ::ndk::SpAIBinder& binder) : BpCInterface(binder) {}
+BpCircular::~BpCircular() {}
+
+::ndk::ScopedAStatus BpCircular::GetTestService(std::shared_ptr<::aidl::android::aidl::tests::ITestService>* _aidl_return) {
+ binder_status_t _aidl_ret_status = STATUS_OK;
+ ::ndk::ScopedAStatus _aidl_status;
+ ::ndk::ScopedAParcel _aidl_in;
+ ::ndk::ScopedAParcel _aidl_out;
+
+ _aidl_ret_status = AIBinder_prepareTransaction(asBinder().get(), _aidl_in.getR());
+ if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
+
+ _aidl_ret_status = AIBinder_transact(
+ asBinder().get(),
+ (FIRST_CALL_TRANSACTION + 0 /*GetTestService*/),
+ _aidl_in.getR(),
+ _aidl_out.getR(),
+ 0
+ #ifdef BINDER_STABILITY_SUPPORT
+ | FLAG_PRIVATE_LOCAL
+ #endif // BINDER_STABILITY_SUPPORT
+ );
+ if (_aidl_ret_status == STATUS_UNKNOWN_TRANSACTION && ICircular::getDefaultImpl()) {
+ _aidl_status = ICircular::getDefaultImpl()->GetTestService(_aidl_return);
+ goto _aidl_status_return;
+ }
+ if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
+
+ _aidl_ret_status = AParcel_readStatusHeader(_aidl_out.get(), _aidl_status.getR());
+ if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
+
+ if (!AStatus_isOk(_aidl_status.get())) goto _aidl_status_return;
+ _aidl_ret_status = ::ndk::AParcel_readNullableData(_aidl_out.get(), _aidl_return);
+ if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
+
+ _aidl_error:
+ _aidl_status.set(AStatus_fromStatus(_aidl_ret_status));
+ _aidl_status_return:
+ return _aidl_status;
+}
+// Source for BnCircular
+BnCircular::BnCircular() {}
+BnCircular::~BnCircular() {}
+::ndk::SpAIBinder BnCircular::createBinder() {
+ AIBinder* binder = AIBinder_new(_g_aidl_android_aidl_tests_ICircular_clazz, static_cast<void*>(this));
+ #ifdef BINDER_STABILITY_SUPPORT
+ AIBinder_markCompilationUnitStability(binder);
+ #endif // BINDER_STABILITY_SUPPORT
+ return ::ndk::SpAIBinder(binder);
+}
+// Source for ICircular
+const char* ICircular::descriptor = "android.aidl.tests.ICircular";
+ICircular::ICircular() {}
+ICircular::~ICircular() {}
+
+
+std::shared_ptr<ICircular> ICircular::fromBinder(const ::ndk::SpAIBinder& binder) {
+ if (!AIBinder_associateClass(binder.get(), _g_aidl_android_aidl_tests_ICircular_clazz)) { return nullptr; }
+ std::shared_ptr<::ndk::ICInterface> interface = ::ndk::ICInterface::asInterface(binder.get());
+ if (interface) {
+ return std::static_pointer_cast<ICircular>(interface);
+ }
+ return ::ndk::SharedRefBase::make<BpCircular>(binder);
+}
+
+binder_status_t ICircular::writeToParcel(AParcel* parcel, const std::shared_ptr<ICircular>& instance) {
+ return AParcel_writeStrongBinder(parcel, instance ? instance->asBinder().get() : nullptr);
+}
+binder_status_t ICircular::readFromParcel(const AParcel* parcel, std::shared_ptr<ICircular>* instance) {
+ ::ndk::SpAIBinder binder;
+ binder_status_t status = AParcel_readStrongBinder(parcel, binder.getR());
+ if (status != STATUS_OK) return status;
+ *instance = ICircular::fromBinder(binder);
+ return STATUS_OK;
+}
+bool ICircular::setDefaultImpl(const std::shared_ptr<ICircular>& impl) {
+ // Only one user of this interface can use this function
+ // at a time. This is a heuristic to detect if two different
+ // users in the same process use this function.
+ assert(!ICircular::default_impl);
+ if (impl) {
+ ICircular::default_impl = impl;
+ return true;
+ }
+ return false;
+}
+const std::shared_ptr<ICircular>& ICircular::getDefaultImpl() {
+ return ICircular::default_impl;
+}
+std::shared_ptr<ICircular> ICircular::default_impl = nullptr;
+::ndk::ScopedAStatus ICircularDefault::GetTestService(std::shared_ptr<::aidl::android::aidl::tests::ITestService>* /*_aidl_return*/) {
+ ::ndk::ScopedAStatus _aidl_status;
+ _aidl_status.set(AStatus_fromStatus(STATUS_UNKNOWN_TRANSACTION));
+ return _aidl_status;
+}
+::ndk::SpAIBinder ICircularDefault::asBinder() {
+ return ::ndk::SpAIBinder();
+}
+bool ICircularDefault::isRemote() {
+ return false;
+}
+} // namespace tests
+} // namespace aidl
+} // namespace android
+} // namespace aidl
diff --git a/tests/golden_output/aidl-test-interface-ndk-source/gen/android/aidl/tests/ICircular.cpp.d b/tests/golden_output/aidl-test-interface-ndk-source/gen/android/aidl/tests/ICircular.cpp.d
new file mode 100644
index 00000000..3c20e3a8
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-ndk-source/gen/android/aidl/tests/ICircular.cpp.d
@@ -0,0 +1,16 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-ndk-source/gen/android/aidl/tests/ICircular.cpp : \
+ system/tools/aidl/tests/android/aidl/tests/ICircular.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ITestService.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ByteEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/IntEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/LongEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/INamedCallback.aidl \
+ system/tools/aidl/tests/android/aidl/tests/StructuredParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/extension/ExtendableParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/RecursiveList.aidl \
+ system/tools/aidl/tests/android/aidl/tests/IOldName.aidl \
+ system/tools/aidl/tests/android/aidl/tests/INewName.aidl \
+ system/tools/aidl/tests/android/aidl/tests/Union.aidl \
+ system/tools/aidl/tests/android/aidl/tests/BackendType.aidl \
+ system/tools/aidl/tests/android/aidl/tests/CircularParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ConstantExpressionEnum.aidl
diff --git a/tests/golden_output/aidl-test-interface-ndk-source/gen/android/aidl/tests/ITestService.cpp b/tests/golden_output/aidl-test-interface-ndk-source/gen/android/aidl/tests/ITestService.cpp
index 8c9ff0af..bc343775 100644
--- a/tests/golden_output/aidl-test-interface-ndk-source/gen/android/aidl/tests/ITestService.cpp
+++ b/tests/golden_output/aidl-test-interface-ndk-source/gen/android/aidl/tests/ITestService.cpp
@@ -1,14 +1,17 @@
#include "aidl/android/aidl/tests/ITestService.h"
#include <android/binder_parcel_utils.h>
+#include <aidl/android/aidl/tests/BnCircular.h>
#include <aidl/android/aidl/tests/BnNamedCallback.h>
#include <aidl/android/aidl/tests/BnNewName.h>
#include <aidl/android/aidl/tests/BnOldName.h>
#include <aidl/android/aidl/tests/BnTestService.h>
+#include <aidl/android/aidl/tests/BpCircular.h>
#include <aidl/android/aidl/tests/BpNamedCallback.h>
#include <aidl/android/aidl/tests/BpNewName.h>
#include <aidl/android/aidl/tests/BpOldName.h>
#include <aidl/android/aidl/tests/BpTestService.h>
+#include <aidl/android/aidl/tests/ICircular.h>
#include <aidl/android/aidl/tests/INamedCallback.h>
#include <aidl/android/aidl/tests/INewName.h>
#include <aidl/android/aidl/tests/IOldName.h>
@@ -550,7 +553,29 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 26 /*VerifyName*/): {
+ case (FIRST_CALL_TRANSACTION + 26 /*SetOtherTestService*/): {
+ std::string in_name;
+ std::shared_ptr<::aidl::android::aidl::tests::INamedCallback> in_service;
+ bool _aidl_return;
+
+ _aidl_ret_status = ::ndk::AParcel_readData(_aidl_in, &in_name);
+ if (_aidl_ret_status != STATUS_OK) break;
+
+ _aidl_ret_status = ::ndk::AParcel_readData(_aidl_in, &in_service);
+ if (_aidl_ret_status != STATUS_OK) break;
+
+ ::ndk::ScopedAStatus _aidl_status = _aidl_impl->SetOtherTestService(in_name, in_service, &_aidl_return);
+ _aidl_ret_status = AParcel_writeStatusHeader(_aidl_out, _aidl_status.get());
+ if (_aidl_ret_status != STATUS_OK) break;
+
+ if (!AStatus_isOk(_aidl_status.get())) break;
+
+ _aidl_ret_status = ::ndk::AParcel_writeData(_aidl_out, _aidl_return);
+ if (_aidl_ret_status != STATUS_OK) break;
+
+ break;
+ }
+ case (FIRST_CALL_TRANSACTION + 27 /*VerifyName*/): {
std::shared_ptr<::aidl::android::aidl::tests::INamedCallback> in_service;
std::string in_name;
bool _aidl_return;
@@ -572,7 +597,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 27 /*GetInterfaceArray*/): {
+ case (FIRST_CALL_TRANSACTION + 28 /*GetInterfaceArray*/): {
std::vector<std::string> in_names;
std::vector<std::shared_ptr<::aidl::android::aidl::tests::INamedCallback>> _aidl_return;
@@ -590,7 +615,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 28 /*VerifyNamesWithInterfaceArray*/): {
+ case (FIRST_CALL_TRANSACTION + 29 /*VerifyNamesWithInterfaceArray*/): {
std::vector<std::shared_ptr<::aidl::android::aidl::tests::INamedCallback>> in_services;
std::vector<std::string> in_names;
bool _aidl_return;
@@ -612,7 +637,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 29 /*GetNullableInterfaceArray*/): {
+ case (FIRST_CALL_TRANSACTION + 30 /*GetNullableInterfaceArray*/): {
std::optional<std::vector<std::optional<std::string>>> in_names;
std::optional<std::vector<std::shared_ptr<::aidl::android::aidl::tests::INamedCallback>>> _aidl_return;
@@ -630,7 +655,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 30 /*VerifyNamesWithNullableInterfaceArray*/): {
+ case (FIRST_CALL_TRANSACTION + 31 /*VerifyNamesWithNullableInterfaceArray*/): {
std::optional<std::vector<std::shared_ptr<::aidl::android::aidl::tests::INamedCallback>>> in_services;
std::optional<std::vector<std::optional<std::string>>> in_names;
bool _aidl_return;
@@ -652,7 +677,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 31 /*GetInterfaceList*/): {
+ case (FIRST_CALL_TRANSACTION + 32 /*GetInterfaceList*/): {
std::optional<std::vector<std::optional<std::string>>> in_names;
std::optional<std::vector<std::shared_ptr<::aidl::android::aidl::tests::INamedCallback>>> _aidl_return;
@@ -670,7 +695,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 32 /*VerifyNamesWithInterfaceList*/): {
+ case (FIRST_CALL_TRANSACTION + 33 /*VerifyNamesWithInterfaceList*/): {
std::optional<std::vector<std::shared_ptr<::aidl::android::aidl::tests::INamedCallback>>> in_services;
std::optional<std::vector<std::optional<std::string>>> in_names;
bool _aidl_return;
@@ -692,7 +717,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 33 /*ReverseStringList*/): {
+ case (FIRST_CALL_TRANSACTION + 34 /*ReverseStringList*/): {
std::vector<std::string> in_input;
std::vector<std::string> out_repeated;
std::vector<std::string> _aidl_return;
@@ -714,7 +739,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 34 /*RepeatParcelFileDescriptor*/): {
+ case (FIRST_CALL_TRANSACTION + 35 /*RepeatParcelFileDescriptor*/): {
::ndk::ScopedFileDescriptor in_read;
::ndk::ScopedFileDescriptor _aidl_return;
@@ -732,7 +757,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 35 /*ReverseParcelFileDescriptorArray*/): {
+ case (FIRST_CALL_TRANSACTION + 36 /*ReverseParcelFileDescriptorArray*/): {
std::vector<::ndk::ScopedFileDescriptor> in_input;
std::vector<::ndk::ScopedFileDescriptor> out_repeated;
std::vector<::ndk::ScopedFileDescriptor> _aidl_return;
@@ -757,7 +782,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 36 /*ThrowServiceException*/): {
+ case (FIRST_CALL_TRANSACTION + 37 /*ThrowServiceException*/): {
int32_t in_code;
_aidl_ret_status = ::ndk::AParcel_readData(_aidl_in, &in_code);
@@ -771,7 +796,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 37 /*RepeatNullableIntArray*/): {
+ case (FIRST_CALL_TRANSACTION + 38 /*RepeatNullableIntArray*/): {
std::optional<std::vector<int32_t>> in_input;
std::optional<std::vector<int32_t>> _aidl_return;
@@ -789,7 +814,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 38 /*RepeatNullableByteEnumArray*/): {
+ case (FIRST_CALL_TRANSACTION + 39 /*RepeatNullableByteEnumArray*/): {
std::optional<std::vector<::aidl::android::aidl::tests::ByteEnum>> in_input;
std::optional<std::vector<::aidl::android::aidl::tests::ByteEnum>> _aidl_return;
@@ -807,7 +832,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 39 /*RepeatNullableIntEnumArray*/): {
+ case (FIRST_CALL_TRANSACTION + 40 /*RepeatNullableIntEnumArray*/): {
std::optional<std::vector<::aidl::android::aidl::tests::IntEnum>> in_input;
std::optional<std::vector<::aidl::android::aidl::tests::IntEnum>> _aidl_return;
@@ -825,7 +850,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 40 /*RepeatNullableLongEnumArray*/): {
+ case (FIRST_CALL_TRANSACTION + 41 /*RepeatNullableLongEnumArray*/): {
std::optional<std::vector<::aidl::android::aidl::tests::LongEnum>> in_input;
std::optional<std::vector<::aidl::android::aidl::tests::LongEnum>> _aidl_return;
@@ -843,7 +868,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 41 /*RepeatNullableString*/): {
+ case (FIRST_CALL_TRANSACTION + 42 /*RepeatNullableString*/): {
std::optional<std::string> in_input;
std::optional<std::string> _aidl_return;
@@ -861,7 +886,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 42 /*RepeatNullableStringList*/): {
+ case (FIRST_CALL_TRANSACTION + 43 /*RepeatNullableStringList*/): {
std::optional<std::vector<std::optional<std::string>>> in_input;
std::optional<std::vector<std::optional<std::string>>> _aidl_return;
@@ -879,7 +904,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 43 /*RepeatNullableParcelable*/): {
+ case (FIRST_CALL_TRANSACTION + 44 /*RepeatNullableParcelable*/): {
std::optional<::aidl::android::aidl::tests::ITestService::Empty> in_input;
std::optional<::aidl::android::aidl::tests::ITestService::Empty> _aidl_return;
@@ -897,7 +922,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 44 /*RepeatNullableParcelableArray*/): {
+ case (FIRST_CALL_TRANSACTION + 45 /*RepeatNullableParcelableArray*/): {
std::optional<std::vector<std::optional<::aidl::android::aidl::tests::ITestService::Empty>>> in_input;
std::optional<std::vector<std::optional<::aidl::android::aidl::tests::ITestService::Empty>>> _aidl_return;
@@ -915,7 +940,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 45 /*RepeatNullableParcelableList*/): {
+ case (FIRST_CALL_TRANSACTION + 46 /*RepeatNullableParcelableList*/): {
std::optional<std::vector<std::optional<::aidl::android::aidl::tests::ITestService::Empty>>> in_input;
std::optional<std::vector<std::optional<::aidl::android::aidl::tests::ITestService::Empty>>> _aidl_return;
@@ -933,7 +958,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 46 /*TakesAnIBinder*/): {
+ case (FIRST_CALL_TRANSACTION + 47 /*TakesAnIBinder*/): {
::ndk::SpAIBinder in_input;
_aidl_ret_status = ::ndk::AParcel_readData(_aidl_in, &in_input);
@@ -947,7 +972,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 47 /*TakesANullableIBinder*/): {
+ case (FIRST_CALL_TRANSACTION + 48 /*TakesANullableIBinder*/): {
::ndk::SpAIBinder in_input;
_aidl_ret_status = ::ndk::AParcel_readNullableData(_aidl_in, &in_input);
@@ -961,7 +986,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 48 /*TakesAnIBinderList*/): {
+ case (FIRST_CALL_TRANSACTION + 49 /*TakesAnIBinderList*/): {
std::vector<::ndk::SpAIBinder> in_input;
_aidl_ret_status = ::ndk::AParcel_readData(_aidl_in, &in_input);
@@ -975,7 +1000,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 49 /*TakesANullableIBinderList*/): {
+ case (FIRST_CALL_TRANSACTION + 50 /*TakesANullableIBinderList*/): {
std::optional<std::vector<::ndk::SpAIBinder>> in_input;
_aidl_ret_status = ::ndk::AParcel_readNullableData(_aidl_in, &in_input);
@@ -989,7 +1014,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 50 /*RepeatUtf8CppString*/): {
+ case (FIRST_CALL_TRANSACTION + 51 /*RepeatUtf8CppString*/): {
std::string in_token;
std::string _aidl_return;
@@ -1007,7 +1032,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 51 /*RepeatNullableUtf8CppString*/): {
+ case (FIRST_CALL_TRANSACTION + 52 /*RepeatNullableUtf8CppString*/): {
std::optional<std::string> in_token;
std::optional<std::string> _aidl_return;
@@ -1025,7 +1050,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 52 /*ReverseUtf8CppString*/): {
+ case (FIRST_CALL_TRANSACTION + 53 /*ReverseUtf8CppString*/): {
std::vector<std::string> in_input;
std::vector<std::string> out_repeated;
std::vector<std::string> _aidl_return;
@@ -1050,7 +1075,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 53 /*ReverseNullableUtf8CppString*/): {
+ case (FIRST_CALL_TRANSACTION + 54 /*ReverseNullableUtf8CppString*/): {
std::optional<std::vector<std::optional<std::string>>> in_input;
std::optional<std::vector<std::optional<std::string>>> out_repeated;
std::optional<std::vector<std::optional<std::string>>> _aidl_return;
@@ -1075,7 +1100,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 54 /*ReverseUtf8CppStringList*/): {
+ case (FIRST_CALL_TRANSACTION + 55 /*ReverseUtf8CppStringList*/): {
std::optional<std::vector<std::optional<std::string>>> in_input;
std::optional<std::vector<std::optional<std::string>>> out_repeated;
std::optional<std::vector<std::optional<std::string>>> _aidl_return;
@@ -1097,7 +1122,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 55 /*GetCallback*/): {
+ case (FIRST_CALL_TRANSACTION + 56 /*GetCallback*/): {
bool in_return_null;
std::shared_ptr<::aidl::android::aidl::tests::INamedCallback> _aidl_return;
@@ -1115,7 +1140,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 56 /*FillOutStructuredParcelable*/): {
+ case (FIRST_CALL_TRANSACTION + 57 /*FillOutStructuredParcelable*/): {
::aidl::android::aidl::tests::StructuredParcelable in_parcel;
_aidl_ret_status = ::ndk::AParcel_readData(_aidl_in, &in_parcel);
@@ -1132,7 +1157,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 57 /*RepeatExtendableParcelable*/): {
+ case (FIRST_CALL_TRANSACTION + 58 /*RepeatExtendableParcelable*/): {
::aidl::android::aidl::tests::extension::ExtendableParcelable in_ep;
::aidl::android::aidl::tests::extension::ExtendableParcelable out_ep2;
@@ -1150,7 +1175,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 58 /*ReverseList*/): {
+ case (FIRST_CALL_TRANSACTION + 59 /*ReverseList*/): {
::aidl::android::aidl::tests::RecursiveList in_list;
::aidl::android::aidl::tests::RecursiveList _aidl_return;
@@ -1168,7 +1193,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 59 /*ReverseIBinderArray*/): {
+ case (FIRST_CALL_TRANSACTION + 60 /*ReverseIBinderArray*/): {
std::vector<::ndk::SpAIBinder> in_input;
std::vector<::ndk::SpAIBinder> out_repeated;
std::vector<::ndk::SpAIBinder> _aidl_return;
@@ -1193,7 +1218,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 60 /*ReverseNullableIBinderArray*/): {
+ case (FIRST_CALL_TRANSACTION + 61 /*ReverseNullableIBinderArray*/): {
std::optional<std::vector<::ndk::SpAIBinder>> in_input;
std::optional<std::vector<::ndk::SpAIBinder>> out_repeated;
std::optional<std::vector<::ndk::SpAIBinder>> _aidl_return;
@@ -1218,7 +1243,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 61 /*GetOldNameInterface*/): {
+ case (FIRST_CALL_TRANSACTION + 62 /*GetOldNameInterface*/): {
std::shared_ptr<::aidl::android::aidl::tests::IOldName> _aidl_return;
::ndk::ScopedAStatus _aidl_status = _aidl_impl->GetOldNameInterface(&_aidl_return);
@@ -1232,7 +1257,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 62 /*GetNewNameInterface*/): {
+ case (FIRST_CALL_TRANSACTION + 63 /*GetNewNameInterface*/): {
std::shared_ptr<::aidl::android::aidl::tests::INewName> _aidl_return;
::ndk::ScopedAStatus _aidl_status = _aidl_impl->GetNewNameInterface(&_aidl_return);
@@ -1246,7 +1271,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 63 /*GetUnionTags*/): {
+ case (FIRST_CALL_TRANSACTION + 64 /*GetUnionTags*/): {
std::vector<::aidl::android::aidl::tests::Union> in_input;
std::vector<::aidl::android::aidl::tests::Union::Tag> _aidl_return;
@@ -1264,7 +1289,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 64 /*GetCppJavaTests*/): {
+ case (FIRST_CALL_TRANSACTION + 65 /*GetCppJavaTests*/): {
::ndk::SpAIBinder _aidl_return;
::ndk::ScopedAStatus _aidl_status = _aidl_impl->GetCppJavaTests(&_aidl_return);
@@ -1278,7 +1303,7 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
- case (FIRST_CALL_TRANSACTION + 65 /*getBackendType*/): {
+ case (FIRST_CALL_TRANSACTION + 66 /*getBackendType*/): {
::aidl::android::aidl::tests::BackendType _aidl_return;
::ndk::ScopedAStatus _aidl_status = _aidl_impl->getBackendType(&_aidl_return);
@@ -1292,6 +1317,24 @@ static binder_status_t _aidl_android_aidl_tests_ITestService_onTransact(AIBinder
break;
}
+ case (FIRST_CALL_TRANSACTION + 67 /*GetCircular*/): {
+ ::aidl::android::aidl::tests::CircularParcelable out_cp;
+ std::shared_ptr<::aidl::android::aidl::tests::ICircular> _aidl_return;
+
+ ::ndk::ScopedAStatus _aidl_status = _aidl_impl->GetCircular(&out_cp, &_aidl_return);
+ _aidl_ret_status = AParcel_writeStatusHeader(_aidl_out, _aidl_status.get());
+ if (_aidl_ret_status != STATUS_OK) break;
+
+ if (!AStatus_isOk(_aidl_status.get())) break;
+
+ _aidl_ret_status = ::ndk::AParcel_writeData(_aidl_out, _aidl_return);
+ if (_aidl_ret_status != STATUS_OK) break;
+
+ _aidl_ret_status = ::ndk::AParcel_writeData(_aidl_out, out_cp);
+ if (_aidl_ret_status != STATUS_OK) break;
+
+ break;
+ }
}
return _aidl_ret_status;
}
@@ -2418,6 +2461,50 @@ BpTestService::~BpTestService() {}
_aidl_status_return:
return _aidl_status;
}
+::ndk::ScopedAStatus BpTestService::SetOtherTestService(const std::string& in_name, const std::shared_ptr<::aidl::android::aidl::tests::INamedCallback>& in_service, bool* _aidl_return) {
+ binder_status_t _aidl_ret_status = STATUS_OK;
+ ::ndk::ScopedAStatus _aidl_status;
+ ::ndk::ScopedAParcel _aidl_in;
+ ::ndk::ScopedAParcel _aidl_out;
+
+ _aidl_ret_status = AIBinder_prepareTransaction(asBinder().get(), _aidl_in.getR());
+ AParcel_markSensitive(_aidl_in.get());
+ if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
+
+ _aidl_ret_status = ::ndk::AParcel_writeData(_aidl_in.get(), in_name);
+ if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
+
+ _aidl_ret_status = ::ndk::AParcel_writeData(_aidl_in.get(), in_service);
+ if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
+
+ _aidl_ret_status = AIBinder_transact(
+ asBinder().get(),
+ (FIRST_CALL_TRANSACTION + 26 /*SetOtherTestService*/),
+ _aidl_in.getR(),
+ _aidl_out.getR(),
+ FLAG_CLEAR_BUF
+ #ifdef BINDER_STABILITY_SUPPORT
+ | FLAG_PRIVATE_LOCAL
+ #endif // BINDER_STABILITY_SUPPORT
+ );
+ if (_aidl_ret_status == STATUS_UNKNOWN_TRANSACTION && ITestService::getDefaultImpl()) {
+ _aidl_status = ITestService::getDefaultImpl()->SetOtherTestService(in_name, in_service, _aidl_return);
+ goto _aidl_status_return;
+ }
+ if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
+
+ _aidl_ret_status = AParcel_readStatusHeader(_aidl_out.get(), _aidl_status.getR());
+ if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
+
+ if (!AStatus_isOk(_aidl_status.get())) goto _aidl_status_return;
+ _aidl_ret_status = ::ndk::AParcel_readData(_aidl_out.get(), _aidl_return);
+ if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
+
+ _aidl_error:
+ _aidl_status.set(AStatus_fromStatus(_aidl_ret_status));
+ _aidl_status_return:
+ return _aidl_status;
+}
::ndk::ScopedAStatus BpTestService::VerifyName(const std::shared_ptr<::aidl::android::aidl::tests::INamedCallback>& in_service, const std::string& in_name, bool* _aidl_return) {
binder_status_t _aidl_ret_status = STATUS_OK;
::ndk::ScopedAStatus _aidl_status;
@@ -2436,7 +2523,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 26 /*VerifyName*/),
+ (FIRST_CALL_TRANSACTION + 27 /*VerifyName*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -2477,7 +2564,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 27 /*GetInterfaceArray*/),
+ (FIRST_CALL_TRANSACTION + 28 /*GetInterfaceArray*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -2521,7 +2608,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 28 /*VerifyNamesWithInterfaceArray*/),
+ (FIRST_CALL_TRANSACTION + 29 /*VerifyNamesWithInterfaceArray*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -2562,7 +2649,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 29 /*GetNullableInterfaceArray*/),
+ (FIRST_CALL_TRANSACTION + 30 /*GetNullableInterfaceArray*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -2606,7 +2693,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 30 /*VerifyNamesWithNullableInterfaceArray*/),
+ (FIRST_CALL_TRANSACTION + 31 /*VerifyNamesWithNullableInterfaceArray*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -2647,7 +2734,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 31 /*GetInterfaceList*/),
+ (FIRST_CALL_TRANSACTION + 32 /*GetInterfaceList*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -2691,7 +2778,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 32 /*VerifyNamesWithInterfaceList*/),
+ (FIRST_CALL_TRANSACTION + 33 /*VerifyNamesWithInterfaceList*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -2732,7 +2819,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 33 /*ReverseStringList*/),
+ (FIRST_CALL_TRANSACTION + 34 /*ReverseStringList*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -2776,7 +2863,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 34 /*RepeatParcelFileDescriptor*/),
+ (FIRST_CALL_TRANSACTION + 35 /*RepeatParcelFileDescriptor*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -2820,7 +2907,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 35 /*ReverseParcelFileDescriptorArray*/),
+ (FIRST_CALL_TRANSACTION + 36 /*ReverseParcelFileDescriptorArray*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -2864,7 +2951,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 36 /*ThrowServiceException*/),
+ (FIRST_CALL_TRANSACTION + 37 /*ThrowServiceException*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -2902,7 +2989,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 37 /*RepeatNullableIntArray*/),
+ (FIRST_CALL_TRANSACTION + 38 /*RepeatNullableIntArray*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -2943,7 +3030,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 38 /*RepeatNullableByteEnumArray*/),
+ (FIRST_CALL_TRANSACTION + 39 /*RepeatNullableByteEnumArray*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -2984,7 +3071,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 39 /*RepeatNullableIntEnumArray*/),
+ (FIRST_CALL_TRANSACTION + 40 /*RepeatNullableIntEnumArray*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -3025,7 +3112,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 40 /*RepeatNullableLongEnumArray*/),
+ (FIRST_CALL_TRANSACTION + 41 /*RepeatNullableLongEnumArray*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -3066,7 +3153,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 41 /*RepeatNullableString*/),
+ (FIRST_CALL_TRANSACTION + 42 /*RepeatNullableString*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -3107,7 +3194,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 42 /*RepeatNullableStringList*/),
+ (FIRST_CALL_TRANSACTION + 43 /*RepeatNullableStringList*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -3148,7 +3235,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 43 /*RepeatNullableParcelable*/),
+ (FIRST_CALL_TRANSACTION + 44 /*RepeatNullableParcelable*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -3189,7 +3276,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 44 /*RepeatNullableParcelableArray*/),
+ (FIRST_CALL_TRANSACTION + 45 /*RepeatNullableParcelableArray*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -3230,7 +3317,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 45 /*RepeatNullableParcelableList*/),
+ (FIRST_CALL_TRANSACTION + 46 /*RepeatNullableParcelableList*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -3271,7 +3358,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 46 /*TakesAnIBinder*/),
+ (FIRST_CALL_TRANSACTION + 47 /*TakesAnIBinder*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -3309,7 +3396,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 47 /*TakesANullableIBinder*/),
+ (FIRST_CALL_TRANSACTION + 48 /*TakesANullableIBinder*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -3347,7 +3434,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 48 /*TakesAnIBinderList*/),
+ (FIRST_CALL_TRANSACTION + 49 /*TakesAnIBinderList*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -3385,7 +3472,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 49 /*TakesANullableIBinderList*/),
+ (FIRST_CALL_TRANSACTION + 50 /*TakesANullableIBinderList*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -3423,7 +3510,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 50 /*RepeatUtf8CppString*/),
+ (FIRST_CALL_TRANSACTION + 51 /*RepeatUtf8CppString*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -3464,7 +3551,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 51 /*RepeatNullableUtf8CppString*/),
+ (FIRST_CALL_TRANSACTION + 52 /*RepeatNullableUtf8CppString*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -3508,7 +3595,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 52 /*ReverseUtf8CppString*/),
+ (FIRST_CALL_TRANSACTION + 53 /*ReverseUtf8CppString*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -3555,7 +3642,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 53 /*ReverseNullableUtf8CppString*/),
+ (FIRST_CALL_TRANSACTION + 54 /*ReverseNullableUtf8CppString*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -3599,7 +3686,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 54 /*ReverseUtf8CppStringList*/),
+ (FIRST_CALL_TRANSACTION + 55 /*ReverseUtf8CppStringList*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -3643,7 +3730,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 55 /*GetCallback*/),
+ (FIRST_CALL_TRANSACTION + 56 /*GetCallback*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -3684,7 +3771,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 56 /*FillOutStructuredParcelable*/),
+ (FIRST_CALL_TRANSACTION + 57 /*FillOutStructuredParcelable*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -3725,7 +3812,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 57 /*RepeatExtendableParcelable*/),
+ (FIRST_CALL_TRANSACTION + 58 /*RepeatExtendableParcelable*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -3766,7 +3853,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 58 /*ReverseList*/),
+ (FIRST_CALL_TRANSACTION + 59 /*ReverseList*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -3810,7 +3897,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 59 /*ReverseIBinderArray*/),
+ (FIRST_CALL_TRANSACTION + 60 /*ReverseIBinderArray*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -3857,7 +3944,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 60 /*ReverseNullableIBinderArray*/),
+ (FIRST_CALL_TRANSACTION + 61 /*ReverseNullableIBinderArray*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -3898,7 +3985,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 61 /*GetOldNameInterface*/),
+ (FIRST_CALL_TRANSACTION + 62 /*GetOldNameInterface*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -3936,7 +4023,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 62 /*GetNewNameInterface*/),
+ (FIRST_CALL_TRANSACTION + 63 /*GetNewNameInterface*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -3977,7 +4064,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 63 /*GetUnionTags*/),
+ (FIRST_CALL_TRANSACTION + 64 /*GetUnionTags*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -4015,7 +4102,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 64 /*GetCppJavaTests*/),
+ (FIRST_CALL_TRANSACTION + 65 /*GetCppJavaTests*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -4053,7 +4140,7 @@ BpTestService::~BpTestService() {}
_aidl_ret_status = AIBinder_transact(
asBinder().get(),
- (FIRST_CALL_TRANSACTION + 65 /*getBackendType*/),
+ (FIRST_CALL_TRANSACTION + 66 /*getBackendType*/),
_aidl_in.getR(),
_aidl_out.getR(),
FLAG_CLEAR_BUF
@@ -4079,6 +4166,47 @@ BpTestService::~BpTestService() {}
_aidl_status_return:
return _aidl_status;
}
+::ndk::ScopedAStatus BpTestService::GetCircular(::aidl::android::aidl::tests::CircularParcelable* out_cp, std::shared_ptr<::aidl::android::aidl::tests::ICircular>* _aidl_return) {
+ binder_status_t _aidl_ret_status = STATUS_OK;
+ ::ndk::ScopedAStatus _aidl_status;
+ ::ndk::ScopedAParcel _aidl_in;
+ ::ndk::ScopedAParcel _aidl_out;
+
+ _aidl_ret_status = AIBinder_prepareTransaction(asBinder().get(), _aidl_in.getR());
+ AParcel_markSensitive(_aidl_in.get());
+ if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
+
+ _aidl_ret_status = AIBinder_transact(
+ asBinder().get(),
+ (FIRST_CALL_TRANSACTION + 67 /*GetCircular*/),
+ _aidl_in.getR(),
+ _aidl_out.getR(),
+ FLAG_CLEAR_BUF
+ #ifdef BINDER_STABILITY_SUPPORT
+ | FLAG_PRIVATE_LOCAL
+ #endif // BINDER_STABILITY_SUPPORT
+ );
+ if (_aidl_ret_status == STATUS_UNKNOWN_TRANSACTION && ITestService::getDefaultImpl()) {
+ _aidl_status = ITestService::getDefaultImpl()->GetCircular(out_cp, _aidl_return);
+ goto _aidl_status_return;
+ }
+ if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
+
+ _aidl_ret_status = AParcel_readStatusHeader(_aidl_out.get(), _aidl_status.getR());
+ if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
+
+ if (!AStatus_isOk(_aidl_status.get())) goto _aidl_status_return;
+ _aidl_ret_status = ::ndk::AParcel_readData(_aidl_out.get(), _aidl_return);
+ if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
+
+ _aidl_ret_status = ::ndk::AParcel_readData(_aidl_out.get(), out_cp);
+ if (_aidl_ret_status != STATUS_OK) goto _aidl_error;
+
+ _aidl_error:
+ _aidl_status.set(AStatus_fromStatus(_aidl_ret_status));
+ _aidl_status_return:
+ return _aidl_status;
+}
// Source for BnTestService
BnTestService::BnTestService() {}
BnTestService::~BnTestService() {}
@@ -4262,6 +4390,11 @@ std::shared_ptr<ITestService> ITestService::default_impl = nullptr;
_aidl_status.set(AStatus_fromStatus(STATUS_UNKNOWN_TRANSACTION));
return _aidl_status;
}
+::ndk::ScopedAStatus ITestServiceDefault::SetOtherTestService(const std::string& /*in_name*/, const std::shared_ptr<::aidl::android::aidl::tests::INamedCallback>& /*in_service*/, bool* /*_aidl_return*/) {
+ ::ndk::ScopedAStatus _aidl_status;
+ _aidl_status.set(AStatus_fromStatus(STATUS_UNKNOWN_TRANSACTION));
+ return _aidl_status;
+}
::ndk::ScopedAStatus ITestServiceDefault::VerifyName(const std::shared_ptr<::aidl::android::aidl::tests::INamedCallback>& /*in_service*/, const std::string& /*in_name*/, bool* /*_aidl_return*/) {
::ndk::ScopedAStatus _aidl_status;
_aidl_status.set(AStatus_fromStatus(STATUS_UNKNOWN_TRANSACTION));
@@ -4462,6 +4595,11 @@ std::shared_ptr<ITestService> ITestService::default_impl = nullptr;
_aidl_status.set(AStatus_fromStatus(STATUS_UNKNOWN_TRANSACTION));
return _aidl_status;
}
+::ndk::ScopedAStatus ITestServiceDefault::GetCircular(::aidl::android::aidl::tests::CircularParcelable* /*out_cp*/, std::shared_ptr<::aidl::android::aidl::tests::ICircular>* /*_aidl_return*/) {
+ ::ndk::ScopedAStatus _aidl_status;
+ _aidl_status.set(AStatus_fromStatus(STATUS_UNKNOWN_TRANSACTION));
+ return _aidl_status;
+}
::ndk::SpAIBinder ITestServiceDefault::asBinder() {
return ::ndk::SpAIBinder();
}
@@ -4722,3 +4860,177 @@ binder_status_t ITestService::CompilerChecks::writeToParcel(AParcel* _aidl_parce
} // namespace aidl
} // namespace android
} // namespace aidl
+namespace aidl {
+namespace android {
+namespace aidl {
+namespace tests {
+static binder_status_t _aidl_android_aidl_tests_ITestService_CompilerChecks_Foo_onTransact(AIBinder* _aidl_binder, transaction_code_t _aidl_code, const AParcel* _aidl_in, AParcel* _aidl_out) {
+ (void)_aidl_in;
+ (void)_aidl_out;
+ binder_status_t _aidl_ret_status = STATUS_UNKNOWN_TRANSACTION;
+ (void)_aidl_binder;
+ (void)_aidl_code;
+ return _aidl_ret_status;
+}
+
+static AIBinder_Class* _g_aidl_android_aidl_tests_ITestService_CompilerChecks_Foo_clazz = ::ndk::ICInterface::defineClass(ITestService::CompilerChecks::IFoo::descriptor, _aidl_android_aidl_tests_ITestService_CompilerChecks_Foo_onTransact);
+
+ITestService::CompilerChecks::BpFoo::BpFoo(const ::ndk::SpAIBinder& binder) : BpCInterface(binder) {}
+ITestService::CompilerChecks::BpFoo::~BpFoo() {}
+
+// Source for BnFoo
+ITestService::CompilerChecks::BnFoo::BnFoo() {}
+ITestService::CompilerChecks::BnFoo::~BnFoo() {}
+::ndk::SpAIBinder ITestService::CompilerChecks::BnFoo::createBinder() {
+ AIBinder* binder = AIBinder_new(_g_aidl_android_aidl_tests_ITestService_CompilerChecks_Foo_clazz, static_cast<void*>(this));
+ #ifdef BINDER_STABILITY_SUPPORT
+ AIBinder_markCompilationUnitStability(binder);
+ #endif // BINDER_STABILITY_SUPPORT
+ return ::ndk::SpAIBinder(binder);
+}
+// Source for IFoo
+const char* ITestService::CompilerChecks::IFoo::descriptor = "android.aidl.tests.ITestService.CompilerChecks.Foo";
+ITestService::CompilerChecks::IFoo::IFoo() {}
+ITestService::CompilerChecks::IFoo::~IFoo() {}
+
+
+std::shared_ptr<ITestService::CompilerChecks::IFoo> ITestService::CompilerChecks::IFoo::fromBinder(const ::ndk::SpAIBinder& binder) {
+ if (!AIBinder_associateClass(binder.get(), _g_aidl_android_aidl_tests_ITestService_CompilerChecks_Foo_clazz)) { return nullptr; }
+ std::shared_ptr<::ndk::ICInterface> interface = ::ndk::ICInterface::asInterface(binder.get());
+ if (interface) {
+ return std::static_pointer_cast<IFoo>(interface);
+ }
+ return ::ndk::SharedRefBase::make<ITestService::CompilerChecks::BpFoo>(binder);
+}
+
+binder_status_t ITestService::CompilerChecks::IFoo::writeToParcel(AParcel* parcel, const std::shared_ptr<IFoo>& instance) {
+ return AParcel_writeStrongBinder(parcel, instance ? instance->asBinder().get() : nullptr);
+}
+binder_status_t ITestService::CompilerChecks::IFoo::readFromParcel(const AParcel* parcel, std::shared_ptr<IFoo>* instance) {
+ ::ndk::SpAIBinder binder;
+ binder_status_t status = AParcel_readStrongBinder(parcel, binder.getR());
+ if (status != STATUS_OK) return status;
+ *instance = IFoo::fromBinder(binder);
+ return STATUS_OK;
+}
+bool ITestService::CompilerChecks::IFoo::setDefaultImpl(const std::shared_ptr<IFoo>& impl) {
+ // Only one user of this interface can use this function
+ // at a time. This is a heuristic to detect if two different
+ // users in the same process use this function.
+ assert(!IFoo::default_impl);
+ if (impl) {
+ IFoo::default_impl = impl;
+ return true;
+ }
+ return false;
+}
+const std::shared_ptr<ITestService::CompilerChecks::IFoo>& ITestService::CompilerChecks::IFoo::getDefaultImpl() {
+ return IFoo::default_impl;
+}
+std::shared_ptr<ITestService::CompilerChecks::IFoo> ITestService::CompilerChecks::IFoo::default_impl = nullptr;
+::ndk::SpAIBinder ITestService::CompilerChecks::IFooDefault::asBinder() {
+ return ::ndk::SpAIBinder();
+}
+bool ITestService::CompilerChecks::IFooDefault::isRemote() {
+ return false;
+}
+} // namespace tests
+} // namespace aidl
+} // namespace android
+} // namespace aidl
+namespace aidl {
+namespace android {
+namespace aidl {
+namespace tests {
+const char* ITestService::CompilerChecks::HasDeprecated::descriptor = "android.aidl.tests.ITestService.CompilerChecks.HasDeprecated";
+
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+binder_status_t ITestService::CompilerChecks::HasDeprecated::readFromParcel(const AParcel* _aidl_parcel) {
+ binder_status_t _aidl_ret_status = STATUS_OK;
+ int32_t _aidl_start_pos = AParcel_getDataPosition(_aidl_parcel);
+ int32_t _aidl_parcelable_size = 0;
+ _aidl_ret_status = AParcel_readInt32(_aidl_parcel, &_aidl_parcelable_size);
+ if (_aidl_ret_status != STATUS_OK) return _aidl_ret_status;
+
+ if (_aidl_parcelable_size < 4) return STATUS_BAD_VALUE;
+ if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return STATUS_BAD_VALUE;
+ if (AParcel_getDataPosition(_aidl_parcel) - _aidl_start_pos >= _aidl_parcelable_size) {
+ AParcel_setDataPosition(_aidl_parcel, _aidl_start_pos + _aidl_parcelable_size);
+ return _aidl_ret_status;
+ }
+ _aidl_ret_status = ::ndk::AParcel_readData(_aidl_parcel, &deprecated);
+ if (_aidl_ret_status != STATUS_OK) return _aidl_ret_status;
+
+ AParcel_setDataPosition(_aidl_parcel, _aidl_start_pos + _aidl_parcelable_size);
+ return _aidl_ret_status;
+}
+binder_status_t ITestService::CompilerChecks::HasDeprecated::writeToParcel(AParcel* _aidl_parcel) const {
+ binder_status_t _aidl_ret_status;
+ size_t _aidl_start_pos = AParcel_getDataPosition(_aidl_parcel);
+ _aidl_ret_status = AParcel_writeInt32(_aidl_parcel, 0);
+ if (_aidl_ret_status != STATUS_OK) return _aidl_ret_status;
+
+ _aidl_ret_status = ::ndk::AParcel_writeData(_aidl_parcel, deprecated);
+ if (_aidl_ret_status != STATUS_OK) return _aidl_ret_status;
+
+ size_t _aidl_end_pos = AParcel_getDataPosition(_aidl_parcel);
+ AParcel_setDataPosition(_aidl_parcel, _aidl_start_pos);
+ AParcel_writeInt32(_aidl_parcel, _aidl_end_pos - _aidl_start_pos);
+ AParcel_setDataPosition(_aidl_parcel, _aidl_end_pos);
+ return _aidl_ret_status;
+}
+#pragma clang diagnostic pop
+
+} // namespace tests
+} // namespace aidl
+} // namespace android
+} // namespace aidl
+namespace aidl {
+namespace android {
+namespace aidl {
+namespace tests {
+const char* ITestService::CompilerChecks::UsingHasDeprecated::descriptor = "android.aidl.tests.ITestService.CompilerChecks.UsingHasDeprecated";
+
+binder_status_t ITestService::CompilerChecks::UsingHasDeprecated::readFromParcel(const AParcel* _parcel) {
+ binder_status_t _aidl_ret_status;
+ int32_t _aidl_tag;
+ if ((_aidl_ret_status = ::ndk::AParcel_readData(_parcel, &_aidl_tag)) != STATUS_OK) return _aidl_ret_status;
+ switch (static_cast<Tag>(_aidl_tag)) {
+ case n: {
+ int32_t _aidl_value;
+ if ((_aidl_ret_status = ::ndk::AParcel_readData(_parcel, &_aidl_value)) != STATUS_OK) return _aidl_ret_status;
+ if constexpr (std::is_trivially_copyable_v<int32_t>) {
+ set<n>(_aidl_value);
+ } else {
+ // NOLINTNEXTLINE(performance-move-const-arg)
+ set<n>(std::move(_aidl_value));
+ }
+ return STATUS_OK; }
+ case m: {
+ ::aidl::android::aidl::tests::ITestService::CompilerChecks::HasDeprecated _aidl_value;
+ if ((_aidl_ret_status = ::ndk::AParcel_readData(_parcel, &_aidl_value)) != STATUS_OK) return _aidl_ret_status;
+ if constexpr (std::is_trivially_copyable_v<::aidl::android::aidl::tests::ITestService::CompilerChecks::HasDeprecated>) {
+ set<m>(_aidl_value);
+ } else {
+ // NOLINTNEXTLINE(performance-move-const-arg)
+ set<m>(std::move(_aidl_value));
+ }
+ return STATUS_OK; }
+ }
+ return STATUS_BAD_VALUE;
+}
+binder_status_t ITestService::CompilerChecks::UsingHasDeprecated::writeToParcel(AParcel* _parcel) const {
+ binder_status_t _aidl_ret_status = ::ndk::AParcel_writeData(_parcel, static_cast<int32_t>(getTag()));
+ if (_aidl_ret_status != STATUS_OK) return _aidl_ret_status;
+ switch (getTag()) {
+ case n: return ::ndk::AParcel_writeData(_parcel, get<n>());
+ case m: return ::ndk::AParcel_writeData(_parcel, get<m>());
+ }
+ __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, "can't reach here");
+}
+
+} // namespace tests
+} // namespace aidl
+} // namespace android
+} // namespace aidl
diff --git a/tests/golden_output/aidl-test-interface-ndk-source/gen/android/aidl/tests/ITestService.cpp.d b/tests/golden_output/aidl-test-interface-ndk-source/gen/android/aidl/tests/ITestService.cpp.d
index 19acd9fe..6cdbb1bc 100644
--- a/tests/golden_output/aidl-test-interface-ndk-source/gen/android/aidl/tests/ITestService.cpp.d
+++ b/tests/golden_output/aidl-test-interface-ndk-source/gen/android/aidl/tests/ITestService.cpp.d
@@ -2,6 +2,8 @@ out/soong/.intermediates/system/tools/aidl/aidl-test-interface-ndk-source/gen/an
system/tools/aidl/tests/android/aidl/tests/ITestService.aidl \
system/tools/aidl/tests/android/aidl/tests/BackendType.aidl \
system/tools/aidl/tests/android/aidl/tests/ByteEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/CircularParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ICircular.aidl \
system/tools/aidl/tests/android/aidl/tests/INamedCallback.aidl \
system/tools/aidl/tests/android/aidl/tests/INewName.aidl \
system/tools/aidl/tests/android/aidl/tests/IOldName.aidl \
diff --git a/tests/golden_output/aidl-test-interface-ndk-source/gen/android/aidl/tests/unions/EnumUnion.cpp b/tests/golden_output/aidl-test-interface-ndk-source/gen/android/aidl/tests/unions/EnumUnion.cpp
index c3f473fb..0620896d 100644
--- a/tests/golden_output/aidl-test-interface-ndk-source/gen/android/aidl/tests/unions/EnumUnion.cpp
+++ b/tests/golden_output/aidl-test-interface-ndk-source/gen/android/aidl/tests/unions/EnumUnion.cpp
@@ -9,6 +9,8 @@ namespace tests {
namespace unions {
const char* EnumUnion::descriptor = "android.aidl.tests.unions.EnumUnion";
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
binder_status_t EnumUnion::readFromParcel(const AParcel* _parcel) {
binder_status_t _aidl_ret_status;
int32_t _aidl_tag;
@@ -34,8 +36,6 @@ binder_status_t EnumUnion::readFromParcel(const AParcel* _parcel) {
set<longEnum>(std::move(_aidl_value));
}
return STATUS_OK; }
- #pragma clang diagnostic push
- #pragma clang diagnostic ignored "-Wdeprecated-declarations"
case deprecatedField: {
int32_t _aidl_value;
if ((_aidl_ret_status = ::ndk::AParcel_readData(_parcel, &_aidl_value)) != STATUS_OK) return _aidl_ret_status;
@@ -46,7 +46,6 @@ binder_status_t EnumUnion::readFromParcel(const AParcel* _parcel) {
set<deprecatedField>(std::move(_aidl_value));
}
return STATUS_OK; }
- #pragma clang diagnostic pop
}
return STATUS_BAD_VALUE;
}
@@ -63,6 +62,7 @@ binder_status_t EnumUnion::writeToParcel(AParcel* _parcel) const {
}
__assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, "can't reach here");
}
+#pragma clang diagnostic pop
} // namespace unions
} // namespace tests
diff --git a/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/ArrayOfInterfaces.h b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/ArrayOfInterfaces.h
index b2b9e7b5..dcab87f0 100644
--- a/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/ArrayOfInterfaces.h
+++ b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/ArrayOfInterfaces.h
@@ -33,8 +33,11 @@ public:
typedef std::false_type fixed_size;
static const char* descriptor;
+ class IEmptyInterfaceDelegator;
+
class IEmptyInterface : public ::ndk::ICInterface {
public:
+ typedef IEmptyInterfaceDelegator DefaultDelegator;
static const char* descriptor;
IEmptyInterface();
virtual ~IEmptyInterface();
@@ -67,8 +70,11 @@ public:
::ndk::SpAIBinder createBinder() override;
private:
};
+ class IMyInterfaceDelegator;
+
class IMyInterface : public ::ndk::ICInterface {
public:
+ typedef IMyInterfaceDelegator DefaultDelegator;
static const char* descriptor;
IMyInterface();
virtual ~IMyInterface();
diff --git a/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/BnCircular.h b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/BnCircular.h
new file mode 100644
index 00000000..7595f616
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/BnCircular.h
@@ -0,0 +1,42 @@
+#pragma once
+
+#include "aidl/android/aidl/tests/ICircular.h"
+
+#include <android/binder_ibinder.h>
+#include <cassert>
+
+#ifndef __BIONIC__
+#ifndef __assert2
+#define __assert2(a,b,c,d) ((void)0)
+#endif
+#endif
+
+namespace aidl {
+namespace android {
+namespace aidl {
+namespace tests {
+class BnCircular : public ::ndk::BnCInterface<ICircular> {
+public:
+ BnCircular();
+ virtual ~BnCircular();
+protected:
+ ::ndk::SpAIBinder createBinder() override;
+private:
+};
+class ICircularDelegator : public BnCircular {
+public:
+ explicit ICircularDelegator(const std::shared_ptr<ICircular> &impl) : _impl(impl) {
+ }
+
+ ::ndk::ScopedAStatus GetTestService(std::shared_ptr<::aidl::android::aidl::tests::ITestService>* _aidl_return) override {
+ return _impl->GetTestService(_aidl_return);
+ }
+protected:
+private:
+ std::shared_ptr<ICircular> _impl;
+};
+
+} // namespace tests
+} // namespace aidl
+} // namespace android
+} // namespace aidl
diff --git a/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/BnCircularParcelable.h b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/BnCircularParcelable.h
new file mode 100644
index 00000000..42911089
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/BnCircularParcelable.h
@@ -0,0 +1 @@
+#error TODO(b/111362593) defined_types do not have bn classes
diff --git a/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/BnTestService.h b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/BnTestService.h
index 3b5a37d3..27898717 100644
--- a/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/BnTestService.h
+++ b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/BnTestService.h
@@ -106,6 +106,9 @@ public:
::ndk::ScopedAStatus GetOtherTestService(const std::string& in_name, std::shared_ptr<::aidl::android::aidl::tests::INamedCallback>* _aidl_return) override {
return _impl->GetOtherTestService(in_name, _aidl_return);
}
+ ::ndk::ScopedAStatus SetOtherTestService(const std::string& in_name, const std::shared_ptr<::aidl::android::aidl::tests::INamedCallback>& in_service, bool* _aidl_return) override {
+ return _impl->SetOtherTestService(in_name, in_service, _aidl_return);
+ }
::ndk::ScopedAStatus VerifyName(const std::shared_ptr<::aidl::android::aidl::tests::INamedCallback>& in_service, const std::string& in_name, bool* _aidl_return) override {
return _impl->VerifyName(in_service, in_name, _aidl_return);
}
@@ -226,6 +229,9 @@ public:
::ndk::ScopedAStatus getBackendType(::aidl::android::aidl::tests::BackendType* _aidl_return) override {
return _impl->getBackendType(_aidl_return);
}
+ ::ndk::ScopedAStatus GetCircular(::aidl::android::aidl::tests::CircularParcelable* out_cp, std::shared_ptr<::aidl::android::aidl::tests::ICircular>* _aidl_return) override {
+ return _impl->GetCircular(out_cp, _aidl_return);
+ }
protected:
private:
std::shared_ptr<ITestService> _impl;
diff --git a/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/BpCircular.h b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/BpCircular.h
new file mode 100644
index 00000000..6dc7ec8b
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/BpCircular.h
@@ -0,0 +1,21 @@
+#pragma once
+
+#include "aidl/android/aidl/tests/ICircular.h"
+
+#include <android/binder_ibinder.h>
+
+namespace aidl {
+namespace android {
+namespace aidl {
+namespace tests {
+class BpCircular : public ::ndk::BpCInterface<ICircular> {
+public:
+ explicit BpCircular(const ::ndk::SpAIBinder& binder);
+ virtual ~BpCircular();
+
+ ::ndk::ScopedAStatus GetTestService(std::shared_ptr<::aidl::android::aidl::tests::ITestService>* _aidl_return) override;
+};
+} // namespace tests
+} // namespace aidl
+} // namespace android
+} // namespace aidl
diff --git a/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/BpCircularParcelable.h b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/BpCircularParcelable.h
new file mode 100644
index 00000000..e8a0db3b
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/BpCircularParcelable.h
@@ -0,0 +1 @@
+#error TODO(b/111362593) defined_types do not have bp classes
diff --git a/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/BpTestService.h b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/BpTestService.h
index 2cd97681..60dc4c6d 100644
--- a/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/BpTestService.h
+++ b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/BpTestService.h
@@ -39,6 +39,7 @@ public:
::ndk::ScopedAStatus ReverseIntEnum(const std::vector<::aidl::android::aidl::tests::IntEnum>& in_input, std::vector<::aidl::android::aidl::tests::IntEnum>* out_repeated, std::vector<::aidl::android::aidl::tests::IntEnum>* _aidl_return) override;
::ndk::ScopedAStatus ReverseLongEnum(const std::vector<::aidl::android::aidl::tests::LongEnum>& in_input, std::vector<::aidl::android::aidl::tests::LongEnum>* out_repeated, std::vector<::aidl::android::aidl::tests::LongEnum>* _aidl_return) override;
::ndk::ScopedAStatus GetOtherTestService(const std::string& in_name, std::shared_ptr<::aidl::android::aidl::tests::INamedCallback>* _aidl_return) override;
+ ::ndk::ScopedAStatus SetOtherTestService(const std::string& in_name, const std::shared_ptr<::aidl::android::aidl::tests::INamedCallback>& in_service, bool* _aidl_return) override;
::ndk::ScopedAStatus VerifyName(const std::shared_ptr<::aidl::android::aidl::tests::INamedCallback>& in_service, const std::string& in_name, bool* _aidl_return) override;
::ndk::ScopedAStatus GetInterfaceArray(const std::vector<std::string>& in_names, std::vector<std::shared_ptr<::aidl::android::aidl::tests::INamedCallback>>* _aidl_return) override;
::ndk::ScopedAStatus VerifyNamesWithInterfaceArray(const std::vector<std::shared_ptr<::aidl::android::aidl::tests::INamedCallback>>& in_services, const std::vector<std::string>& in_names, bool* _aidl_return) override;
@@ -79,6 +80,7 @@ public:
::ndk::ScopedAStatus GetUnionTags(const std::vector<::aidl::android::aidl::tests::Union>& in_input, std::vector<::aidl::android::aidl::tests::Union::Tag>* _aidl_return) override;
::ndk::ScopedAStatus GetCppJavaTests(::ndk::SpAIBinder* _aidl_return) override;
::ndk::ScopedAStatus getBackendType(::aidl::android::aidl::tests::BackendType* _aidl_return) override;
+ ::ndk::ScopedAStatus GetCircular(::aidl::android::aidl::tests::CircularParcelable* out_cp, std::shared_ptr<::aidl::android::aidl::tests::ICircular>* _aidl_return) override;
};
} // namespace tests
} // namespace aidl
diff --git a/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/CircularParcelable.h b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/CircularParcelable.h
new file mode 100644
index 00000000..80e5ffa9
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/CircularParcelable.h
@@ -0,0 +1,64 @@
+#pragma once
+
+#include <cstdint>
+#include <memory>
+#include <optional>
+#include <string>
+#include <vector>
+#include <android/binder_interface_utils.h>
+#include <android/binder_parcelable_utils.h>
+#include <android/binder_to_string.h>
+#include <aidl/android/aidl/tests/ITestService.h>
+#ifdef BINDER_STABILITY_SUPPORT
+#include <android/binder_stability.h>
+#endif // BINDER_STABILITY_SUPPORT
+
+namespace aidl::android::aidl::tests {
+class ITestService;
+} // namespace aidl::android::aidl::tests
+namespace aidl {
+namespace android {
+namespace aidl {
+namespace tests {
+class CircularParcelable {
+public:
+ typedef std::false_type fixed_size;
+ static const char* descriptor;
+
+ std::shared_ptr<::aidl::android::aidl::tests::ITestService> testService;
+
+ binder_status_t readFromParcel(const AParcel* parcel);
+ binder_status_t writeToParcel(AParcel* parcel) const;
+
+ inline bool operator!=(const CircularParcelable& rhs) const {
+ return std::tie(testService) != std::tie(rhs.testService);
+ }
+ inline bool operator<(const CircularParcelable& rhs) const {
+ return std::tie(testService) < std::tie(rhs.testService);
+ }
+ inline bool operator<=(const CircularParcelable& rhs) const {
+ return std::tie(testService) <= std::tie(rhs.testService);
+ }
+ inline bool operator==(const CircularParcelable& rhs) const {
+ return std::tie(testService) == std::tie(rhs.testService);
+ }
+ inline bool operator>(const CircularParcelable& rhs) const {
+ return std::tie(testService) > std::tie(rhs.testService);
+ }
+ inline bool operator>=(const CircularParcelable& rhs) const {
+ return std::tie(testService) >= std::tie(rhs.testService);
+ }
+
+ static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_LOCAL;
+ inline std::string toString() const {
+ std::ostringstream os;
+ os << "CircularParcelable{";
+ os << "testService: " << ::android::internal::ToString(testService);
+ os << "}";
+ return os.str();
+ }
+};
+} // namespace tests
+} // namespace aidl
+} // namespace android
+} // namespace aidl
diff --git a/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/ICircular.h b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/ICircular.h
new file mode 100644
index 00000000..5c45e97e
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/ICircular.h
@@ -0,0 +1,50 @@
+#pragma once
+
+#include <cstdint>
+#include <memory>
+#include <optional>
+#include <string>
+#include <vector>
+#include <android/binder_interface_utils.h>
+#include <aidl/android/aidl/tests/ITestService.h>
+#ifdef BINDER_STABILITY_SUPPORT
+#include <android/binder_stability.h>
+#endif // BINDER_STABILITY_SUPPORT
+
+namespace aidl::android::aidl::tests {
+class ITestService;
+} // namespace aidl::android::aidl::tests
+namespace aidl {
+namespace android {
+namespace aidl {
+namespace tests {
+class ICircularDelegator;
+
+class ICircular : public ::ndk::ICInterface {
+public:
+ typedef ICircularDelegator DefaultDelegator;
+ static const char* descriptor;
+ ICircular();
+ virtual ~ICircular();
+
+ static constexpr uint32_t TRANSACTION_GetTestService = FIRST_CALL_TRANSACTION + 0;
+
+ static std::shared_ptr<ICircular> fromBinder(const ::ndk::SpAIBinder& binder);
+ static binder_status_t writeToParcel(AParcel* parcel, const std::shared_ptr<ICircular>& instance);
+ static binder_status_t readFromParcel(const AParcel* parcel, std::shared_ptr<ICircular>* instance);
+ static bool setDefaultImpl(const std::shared_ptr<ICircular>& impl);
+ static const std::shared_ptr<ICircular>& getDefaultImpl();
+ virtual ::ndk::ScopedAStatus GetTestService(std::shared_ptr<::aidl::android::aidl::tests::ITestService>* _aidl_return) = 0;
+private:
+ static std::shared_ptr<ICircular> default_impl;
+};
+class ICircularDefault : public ICircular {
+public:
+ ::ndk::ScopedAStatus GetTestService(std::shared_ptr<::aidl::android::aidl::tests::ITestService>* _aidl_return) override;
+ ::ndk::SpAIBinder asBinder() override;
+ bool isRemote() override;
+};
+} // namespace tests
+} // namespace aidl
+} // namespace android
+} // namespace aidl
diff --git a/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/IDeprecated.h b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/IDeprecated.h
index 4c8c67c2..d00a1d45 100644
--- a/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/IDeprecated.h
+++ b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/IDeprecated.h
@@ -14,8 +14,11 @@ namespace aidl {
namespace android {
namespace aidl {
namespace tests {
+class IDeprecatedDelegator;
+
class __attribute__((deprecated("test"))) IDeprecated : public ::ndk::ICInterface {
public:
+ typedef IDeprecatedDelegator DefaultDelegator;
static const char* descriptor;
IDeprecated();
virtual ~IDeprecated();
diff --git a/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/INamedCallback.h b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/INamedCallback.h
index ca14c0f8..805b06ef 100644
--- a/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/INamedCallback.h
+++ b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/INamedCallback.h
@@ -14,8 +14,11 @@ namespace aidl {
namespace android {
namespace aidl {
namespace tests {
+class INamedCallbackDelegator;
+
class INamedCallback : public ::ndk::ICInterface {
public:
+ typedef INamedCallbackDelegator DefaultDelegator;
static const char* descriptor;
INamedCallback();
virtual ~INamedCallback();
diff --git a/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/INewName.h b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/INewName.h
index 5c42f9d8..802a18d4 100644
--- a/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/INewName.h
+++ b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/INewName.h
@@ -14,8 +14,11 @@ namespace aidl {
namespace android {
namespace aidl {
namespace tests {
+class INewNameDelegator;
+
class INewName : public ::ndk::ICInterface {
public:
+ typedef INewNameDelegator DefaultDelegator;
static const char* descriptor;
INewName();
virtual ~INewName();
diff --git a/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/IOldName.h b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/IOldName.h
index bff905d6..809821d3 100644
--- a/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/IOldName.h
+++ b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/IOldName.h
@@ -14,8 +14,11 @@ namespace aidl {
namespace android {
namespace aidl {
namespace tests {
+class IOldNameDelegator;
+
class IOldName : public ::ndk::ICInterface {
public:
+ typedef IOldNameDelegator DefaultDelegator;
static const char* descriptor;
IOldName();
virtual ~IOldName();
diff --git a/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/ITestService.h b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/ITestService.h
index 2c396b84..c23f776a 100644
--- a/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/ITestService.h
+++ b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/ITestService.h
@@ -1,10 +1,17 @@
#pragma once
+#include <array>
+#include <cassert>
#include <cstdint>
#include <memory>
#include <optional>
#include <string>
+#include <type_traits>
+#include <utility>
+#include <variant>
#include <vector>
+#include <android/binder_enums.h>
+#include <android/binder_ibinder.h>
#include <android/binder_ibinder_platform.h>
#include <android/binder_interface_utils.h>
#include <android/binder_parcel_platform.h>
@@ -12,6 +19,8 @@
#include <android/binder_to_string.h>
#include <aidl/android/aidl/tests/BackendType.h>
#include <aidl/android/aidl/tests/ByteEnum.h>
+#include <aidl/android/aidl/tests/CircularParcelable.h>
+#include <aidl/android/aidl/tests/ICircular.h>
#include <aidl/android/aidl/tests/INamedCallback.h>
#include <aidl/android/aidl/tests/INewName.h>
#include <aidl/android/aidl/tests/IOldName.h>
@@ -26,12 +35,31 @@
#include <android/binder_stability.h>
#endif // BINDER_STABILITY_SUPPORT
+#ifndef __BIONIC__
+#define __assert2(a,b,c,d) ((void)0)
+#endif
+
+namespace aidl::android::aidl::tests {
+class CircularParcelable;
+class ICircular;
+class INamedCallback;
+class INewName;
+class IOldName;
+class RecursiveList;
+class StructuredParcelable;
+} // namespace aidl::android::aidl::tests
+namespace aidl::android::aidl::tests::extension {
+class ExtendableParcelable;
+} // namespace aidl::android::aidl::tests::extension
namespace aidl {
namespace android {
namespace aidl {
namespace tests {
+class ITestServiceDelegator;
+
class ITestService : public ::ndk::ICInterface {
public:
+ typedef ITestServiceDelegator DefaultDelegator;
static const char* descriptor;
ITestService();
virtual ~ITestService();
@@ -77,6 +105,179 @@ public:
typedef std::false_type fixed_size;
static const char* descriptor;
+ class IFooDelegator;
+
+ class IFoo : public ::ndk::ICInterface {
+ public:
+ typedef IFooDelegator DefaultDelegator;
+ static const char* descriptor;
+ IFoo();
+ virtual ~IFoo();
+
+
+ static std::shared_ptr<IFoo> fromBinder(const ::ndk::SpAIBinder& binder);
+ static binder_status_t writeToParcel(AParcel* parcel, const std::shared_ptr<IFoo>& instance);
+ static binder_status_t readFromParcel(const AParcel* parcel, std::shared_ptr<IFoo>* instance);
+ static bool setDefaultImpl(const std::shared_ptr<IFoo>& impl);
+ static const std::shared_ptr<IFoo>& getDefaultImpl();
+ private:
+ static std::shared_ptr<IFoo> default_impl;
+ };
+ class IFooDefault : public IFoo {
+ public:
+ ::ndk::SpAIBinder asBinder() override;
+ bool isRemote() override;
+ };
+ class BpFoo : public ::ndk::BpCInterface<IFoo> {
+ public:
+ explicit BpFoo(const ::ndk::SpAIBinder& binder);
+ virtual ~BpFoo();
+
+ };
+ class BnFoo : public ::ndk::BnCInterface<IFoo> {
+ public:
+ BnFoo();
+ virtual ~BnFoo();
+ protected:
+ ::ndk::SpAIBinder createBinder() override;
+ private:
+ };
+ #pragma clang diagnostic push
+ #pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ class HasDeprecated {
+ public:
+ typedef std::false_type fixed_size;
+ static const char* descriptor;
+
+ int32_t __attribute__((deprecated("field"))) deprecated = 0;
+
+ binder_status_t readFromParcel(const AParcel* parcel);
+ binder_status_t writeToParcel(AParcel* parcel) const;
+
+ inline bool operator!=(const HasDeprecated& rhs) const {
+ return std::tie(deprecated) != std::tie(rhs.deprecated);
+ }
+ inline bool operator<(const HasDeprecated& rhs) const {
+ return std::tie(deprecated) < std::tie(rhs.deprecated);
+ }
+ inline bool operator<=(const HasDeprecated& rhs) const {
+ return std::tie(deprecated) <= std::tie(rhs.deprecated);
+ }
+ inline bool operator==(const HasDeprecated& rhs) const {
+ return std::tie(deprecated) == std::tie(rhs.deprecated);
+ }
+ inline bool operator>(const HasDeprecated& rhs) const {
+ return std::tie(deprecated) > std::tie(rhs.deprecated);
+ }
+ inline bool operator>=(const HasDeprecated& rhs) const {
+ return std::tie(deprecated) >= std::tie(rhs.deprecated);
+ }
+
+ static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_LOCAL;
+ inline std::string toString() const {
+ std::ostringstream os;
+ os << "HasDeprecated{";
+ os << "deprecated: " << ::android::internal::ToString(deprecated);
+ os << "}";
+ return os.str();
+ }
+ };
+ #pragma clang diagnostic pop
+ class UsingHasDeprecated {
+ public:
+ typedef std::false_type fixed_size;
+ static const char* descriptor;
+
+ enum class Tag : int32_t {
+ n = 0,
+ m = 1,
+ };
+
+ // Expose tag symbols for legacy code
+ static const inline Tag n = Tag::n;
+ static const inline Tag m = Tag::m;
+
+ template<typename _Tp>
+ static constexpr bool _not_self = !std::is_same_v<std::remove_cv_t<std::remove_reference_t<_Tp>>, UsingHasDeprecated>;
+
+ UsingHasDeprecated() : _value(std::in_place_index<static_cast<size_t>(n)>, int32_t(0)) { }
+
+ template <typename _Tp, typename = std::enable_if_t<_not_self<_Tp>>>
+ // NOLINTNEXTLINE(google-explicit-constructor)
+ constexpr UsingHasDeprecated(_Tp&& _arg)
+ : _value(std::forward<_Tp>(_arg)) {}
+
+ template <size_t _Np, typename... _Tp>
+ constexpr explicit UsingHasDeprecated(std::in_place_index_t<_Np>, _Tp&&... _args)
+ : _value(std::in_place_index<_Np>, std::forward<_Tp>(_args)...) {}
+
+ template <Tag _tag, typename... _Tp>
+ static UsingHasDeprecated make(_Tp&&... _args) {
+ return UsingHasDeprecated(std::in_place_index<static_cast<size_t>(_tag)>, std::forward<_Tp>(_args)...);
+ }
+
+ template <Tag _tag, typename _Tp, typename... _Up>
+ static UsingHasDeprecated make(std::initializer_list<_Tp> _il, _Up&&... _args) {
+ return UsingHasDeprecated(std::in_place_index<static_cast<size_t>(_tag)>, std::move(_il), std::forward<_Up>(_args)...);
+ }
+
+ Tag getTag() const {
+ return static_cast<Tag>(_value.index());
+ }
+
+ template <Tag _tag>
+ const auto& get() const {
+ if (getTag() != _tag) { __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, "bad access: a wrong tag"); }
+ return std::get<static_cast<size_t>(_tag)>(_value);
+ }
+
+ template <Tag _tag>
+ auto& get() {
+ if (getTag() != _tag) { __assert2(__FILE__, __LINE__, __PRETTY_FUNCTION__, "bad access: a wrong tag"); }
+ return std::get<static_cast<size_t>(_tag)>(_value);
+ }
+
+ template <Tag _tag, typename... _Tp>
+ void set(_Tp&&... _args) {
+ _value.emplace<static_cast<size_t>(_tag)>(std::forward<_Tp>(_args)...);
+ }
+
+ binder_status_t readFromParcel(const AParcel* _parcel);
+ binder_status_t writeToParcel(AParcel* _parcel) const;
+
+ inline bool operator!=(const UsingHasDeprecated& rhs) const {
+ return _value != rhs._value;
+ }
+ inline bool operator<(const UsingHasDeprecated& rhs) const {
+ return _value < rhs._value;
+ }
+ inline bool operator<=(const UsingHasDeprecated& rhs) const {
+ return _value <= rhs._value;
+ }
+ inline bool operator==(const UsingHasDeprecated& rhs) const {
+ return _value == rhs._value;
+ }
+ inline bool operator>(const UsingHasDeprecated& rhs) const {
+ return _value > rhs._value;
+ }
+ inline bool operator>=(const UsingHasDeprecated& rhs) const {
+ return _value >= rhs._value;
+ }
+
+ static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_LOCAL;
+ inline std::string toString() const {
+ std::ostringstream os;
+ os << "UsingHasDeprecated{";
+ switch (getTag()) {
+ case n: os << "n: " << ::android::internal::ToString(get<n>()); break;
+ case m: os << "m: " << ::android::internal::ToString(get<m>()); break;
+ }
+ os << "}";
+ return os.str();
+ }
+ private:
+ std::variant<int32_t, ::aidl::android::aidl::tests::ITestService::CompilerChecks::HasDeprecated> _value;
+ };
::ndk::SpAIBinder binder;
::ndk::SpAIBinder nullable_binder;
std::vector<::ndk::SpAIBinder> binder_array;
@@ -160,6 +361,22 @@ public:
enum : int64_t { LONG_TEST_CONSTANT = 1099511627776L };
static const char* STRING_TEST_CONSTANT;
static const char* STRING_TEST_CONSTANT2;
+ static constexpr float FLOAT_TEST_CONSTANT = 1.000000f;
+ static constexpr float FLOAT_TEST_CONSTANT2 = -1.000000f;
+ static constexpr float FLOAT_TEST_CONSTANT3 = 1.000000f;
+ static constexpr float FLOAT_TEST_CONSTANT4 = 2.200000f;
+ static constexpr float FLOAT_TEST_CONSTANT5 = -2.200000f;
+ static constexpr float FLOAT_TEST_CONSTANT6 = -0.000000f;
+ static constexpr float FLOAT_TEST_CONSTANT7 = 0.000000f;
+ static constexpr double DOUBLE_TEST_CONSTANT = 1.000000;
+ static constexpr double DOUBLE_TEST_CONSTANT2 = -1.000000;
+ static constexpr double DOUBLE_TEST_CONSTANT3 = 1.000000;
+ static constexpr double DOUBLE_TEST_CONSTANT4 = 2.200000;
+ static constexpr double DOUBLE_TEST_CONSTANT5 = -2.200000;
+ static constexpr double DOUBLE_TEST_CONSTANT6 = -0.000000;
+ static constexpr double DOUBLE_TEST_CONSTANT7 = 0.000000;
+ static constexpr double DOUBLE_TEST_CONSTANT8 = 1.100000;
+ static constexpr double DOUBLE_TEST_CONSTANT9 = -1.100000;
static const char* STRING_TEST_CONSTANT_UTF8;
enum : int32_t { A1 = 1 };
enum : int32_t { A2 = 1 };
@@ -244,46 +461,48 @@ public:
static constexpr uint32_t TRANSACTION_ReverseIntEnum = FIRST_CALL_TRANSACTION + 23;
static constexpr uint32_t TRANSACTION_ReverseLongEnum = FIRST_CALL_TRANSACTION + 24;
static constexpr uint32_t TRANSACTION_GetOtherTestService = FIRST_CALL_TRANSACTION + 25;
- static constexpr uint32_t TRANSACTION_VerifyName = FIRST_CALL_TRANSACTION + 26;
- static constexpr uint32_t TRANSACTION_GetInterfaceArray = FIRST_CALL_TRANSACTION + 27;
- static constexpr uint32_t TRANSACTION_VerifyNamesWithInterfaceArray = FIRST_CALL_TRANSACTION + 28;
- static constexpr uint32_t TRANSACTION_GetNullableInterfaceArray = FIRST_CALL_TRANSACTION + 29;
- static constexpr uint32_t TRANSACTION_VerifyNamesWithNullableInterfaceArray = FIRST_CALL_TRANSACTION + 30;
- static constexpr uint32_t TRANSACTION_GetInterfaceList = FIRST_CALL_TRANSACTION + 31;
- static constexpr uint32_t TRANSACTION_VerifyNamesWithInterfaceList = FIRST_CALL_TRANSACTION + 32;
- static constexpr uint32_t TRANSACTION_ReverseStringList = FIRST_CALL_TRANSACTION + 33;
- static constexpr uint32_t TRANSACTION_RepeatParcelFileDescriptor = FIRST_CALL_TRANSACTION + 34;
- static constexpr uint32_t TRANSACTION_ReverseParcelFileDescriptorArray = FIRST_CALL_TRANSACTION + 35;
- static constexpr uint32_t TRANSACTION_ThrowServiceException = FIRST_CALL_TRANSACTION + 36;
- static constexpr uint32_t TRANSACTION_RepeatNullableIntArray = FIRST_CALL_TRANSACTION + 37;
- static constexpr uint32_t TRANSACTION_RepeatNullableByteEnumArray = FIRST_CALL_TRANSACTION + 38;
- static constexpr uint32_t TRANSACTION_RepeatNullableIntEnumArray = FIRST_CALL_TRANSACTION + 39;
- static constexpr uint32_t TRANSACTION_RepeatNullableLongEnumArray = FIRST_CALL_TRANSACTION + 40;
- static constexpr uint32_t TRANSACTION_RepeatNullableString = FIRST_CALL_TRANSACTION + 41;
- static constexpr uint32_t TRANSACTION_RepeatNullableStringList = FIRST_CALL_TRANSACTION + 42;
- static constexpr uint32_t TRANSACTION_RepeatNullableParcelable = FIRST_CALL_TRANSACTION + 43;
- static constexpr uint32_t TRANSACTION_RepeatNullableParcelableArray = FIRST_CALL_TRANSACTION + 44;
- static constexpr uint32_t TRANSACTION_RepeatNullableParcelableList = FIRST_CALL_TRANSACTION + 45;
- static constexpr uint32_t TRANSACTION_TakesAnIBinder = FIRST_CALL_TRANSACTION + 46;
- static constexpr uint32_t TRANSACTION_TakesANullableIBinder = FIRST_CALL_TRANSACTION + 47;
- static constexpr uint32_t TRANSACTION_TakesAnIBinderList = FIRST_CALL_TRANSACTION + 48;
- static constexpr uint32_t TRANSACTION_TakesANullableIBinderList = FIRST_CALL_TRANSACTION + 49;
- static constexpr uint32_t TRANSACTION_RepeatUtf8CppString = FIRST_CALL_TRANSACTION + 50;
- static constexpr uint32_t TRANSACTION_RepeatNullableUtf8CppString = FIRST_CALL_TRANSACTION + 51;
- static constexpr uint32_t TRANSACTION_ReverseUtf8CppString = FIRST_CALL_TRANSACTION + 52;
- static constexpr uint32_t TRANSACTION_ReverseNullableUtf8CppString = FIRST_CALL_TRANSACTION + 53;
- static constexpr uint32_t TRANSACTION_ReverseUtf8CppStringList = FIRST_CALL_TRANSACTION + 54;
- static constexpr uint32_t TRANSACTION_GetCallback = FIRST_CALL_TRANSACTION + 55;
- static constexpr uint32_t TRANSACTION_FillOutStructuredParcelable = FIRST_CALL_TRANSACTION + 56;
- static constexpr uint32_t TRANSACTION_RepeatExtendableParcelable = FIRST_CALL_TRANSACTION + 57;
- static constexpr uint32_t TRANSACTION_ReverseList = FIRST_CALL_TRANSACTION + 58;
- static constexpr uint32_t TRANSACTION_ReverseIBinderArray = FIRST_CALL_TRANSACTION + 59;
- static constexpr uint32_t TRANSACTION_ReverseNullableIBinderArray = FIRST_CALL_TRANSACTION + 60;
- static constexpr uint32_t TRANSACTION_GetOldNameInterface = FIRST_CALL_TRANSACTION + 61;
- static constexpr uint32_t TRANSACTION_GetNewNameInterface = FIRST_CALL_TRANSACTION + 62;
- static constexpr uint32_t TRANSACTION_GetUnionTags = FIRST_CALL_TRANSACTION + 63;
- static constexpr uint32_t TRANSACTION_GetCppJavaTests = FIRST_CALL_TRANSACTION + 64;
- static constexpr uint32_t TRANSACTION_getBackendType = FIRST_CALL_TRANSACTION + 65;
+ static constexpr uint32_t TRANSACTION_SetOtherTestService = FIRST_CALL_TRANSACTION + 26;
+ static constexpr uint32_t TRANSACTION_VerifyName = FIRST_CALL_TRANSACTION + 27;
+ static constexpr uint32_t TRANSACTION_GetInterfaceArray = FIRST_CALL_TRANSACTION + 28;
+ static constexpr uint32_t TRANSACTION_VerifyNamesWithInterfaceArray = FIRST_CALL_TRANSACTION + 29;
+ static constexpr uint32_t TRANSACTION_GetNullableInterfaceArray = FIRST_CALL_TRANSACTION + 30;
+ static constexpr uint32_t TRANSACTION_VerifyNamesWithNullableInterfaceArray = FIRST_CALL_TRANSACTION + 31;
+ static constexpr uint32_t TRANSACTION_GetInterfaceList = FIRST_CALL_TRANSACTION + 32;
+ static constexpr uint32_t TRANSACTION_VerifyNamesWithInterfaceList = FIRST_CALL_TRANSACTION + 33;
+ static constexpr uint32_t TRANSACTION_ReverseStringList = FIRST_CALL_TRANSACTION + 34;
+ static constexpr uint32_t TRANSACTION_RepeatParcelFileDescriptor = FIRST_CALL_TRANSACTION + 35;
+ static constexpr uint32_t TRANSACTION_ReverseParcelFileDescriptorArray = FIRST_CALL_TRANSACTION + 36;
+ static constexpr uint32_t TRANSACTION_ThrowServiceException = FIRST_CALL_TRANSACTION + 37;
+ static constexpr uint32_t TRANSACTION_RepeatNullableIntArray = FIRST_CALL_TRANSACTION + 38;
+ static constexpr uint32_t TRANSACTION_RepeatNullableByteEnumArray = FIRST_CALL_TRANSACTION + 39;
+ static constexpr uint32_t TRANSACTION_RepeatNullableIntEnumArray = FIRST_CALL_TRANSACTION + 40;
+ static constexpr uint32_t TRANSACTION_RepeatNullableLongEnumArray = FIRST_CALL_TRANSACTION + 41;
+ static constexpr uint32_t TRANSACTION_RepeatNullableString = FIRST_CALL_TRANSACTION + 42;
+ static constexpr uint32_t TRANSACTION_RepeatNullableStringList = FIRST_CALL_TRANSACTION + 43;
+ static constexpr uint32_t TRANSACTION_RepeatNullableParcelable = FIRST_CALL_TRANSACTION + 44;
+ static constexpr uint32_t TRANSACTION_RepeatNullableParcelableArray = FIRST_CALL_TRANSACTION + 45;
+ static constexpr uint32_t TRANSACTION_RepeatNullableParcelableList = FIRST_CALL_TRANSACTION + 46;
+ static constexpr uint32_t TRANSACTION_TakesAnIBinder = FIRST_CALL_TRANSACTION + 47;
+ static constexpr uint32_t TRANSACTION_TakesANullableIBinder = FIRST_CALL_TRANSACTION + 48;
+ static constexpr uint32_t TRANSACTION_TakesAnIBinderList = FIRST_CALL_TRANSACTION + 49;
+ static constexpr uint32_t TRANSACTION_TakesANullableIBinderList = FIRST_CALL_TRANSACTION + 50;
+ static constexpr uint32_t TRANSACTION_RepeatUtf8CppString = FIRST_CALL_TRANSACTION + 51;
+ static constexpr uint32_t TRANSACTION_RepeatNullableUtf8CppString = FIRST_CALL_TRANSACTION + 52;
+ static constexpr uint32_t TRANSACTION_ReverseUtf8CppString = FIRST_CALL_TRANSACTION + 53;
+ static constexpr uint32_t TRANSACTION_ReverseNullableUtf8CppString = FIRST_CALL_TRANSACTION + 54;
+ static constexpr uint32_t TRANSACTION_ReverseUtf8CppStringList = FIRST_CALL_TRANSACTION + 55;
+ static constexpr uint32_t TRANSACTION_GetCallback = FIRST_CALL_TRANSACTION + 56;
+ static constexpr uint32_t TRANSACTION_FillOutStructuredParcelable = FIRST_CALL_TRANSACTION + 57;
+ static constexpr uint32_t TRANSACTION_RepeatExtendableParcelable = FIRST_CALL_TRANSACTION + 58;
+ static constexpr uint32_t TRANSACTION_ReverseList = FIRST_CALL_TRANSACTION + 59;
+ static constexpr uint32_t TRANSACTION_ReverseIBinderArray = FIRST_CALL_TRANSACTION + 60;
+ static constexpr uint32_t TRANSACTION_ReverseNullableIBinderArray = FIRST_CALL_TRANSACTION + 61;
+ static constexpr uint32_t TRANSACTION_GetOldNameInterface = FIRST_CALL_TRANSACTION + 62;
+ static constexpr uint32_t TRANSACTION_GetNewNameInterface = FIRST_CALL_TRANSACTION + 63;
+ static constexpr uint32_t TRANSACTION_GetUnionTags = FIRST_CALL_TRANSACTION + 64;
+ static constexpr uint32_t TRANSACTION_GetCppJavaTests = FIRST_CALL_TRANSACTION + 65;
+ static constexpr uint32_t TRANSACTION_getBackendType = FIRST_CALL_TRANSACTION + 66;
+ static constexpr uint32_t TRANSACTION_GetCircular = FIRST_CALL_TRANSACTION + 67;
static std::shared_ptr<ITestService> fromBinder(const ::ndk::SpAIBinder& binder);
static binder_status_t writeToParcel(AParcel* parcel, const std::shared_ptr<ITestService>& instance);
@@ -316,6 +535,7 @@ public:
virtual ::ndk::ScopedAStatus ReverseIntEnum(const std::vector<::aidl::android::aidl::tests::IntEnum>& in_input, std::vector<::aidl::android::aidl::tests::IntEnum>* out_repeated, std::vector<::aidl::android::aidl::tests::IntEnum>* _aidl_return) = 0;
virtual ::ndk::ScopedAStatus ReverseLongEnum(const std::vector<::aidl::android::aidl::tests::LongEnum>& in_input, std::vector<::aidl::android::aidl::tests::LongEnum>* out_repeated, std::vector<::aidl::android::aidl::tests::LongEnum>* _aidl_return) = 0;
virtual ::ndk::ScopedAStatus GetOtherTestService(const std::string& in_name, std::shared_ptr<::aidl::android::aidl::tests::INamedCallback>* _aidl_return) = 0;
+ virtual ::ndk::ScopedAStatus SetOtherTestService(const std::string& in_name, const std::shared_ptr<::aidl::android::aidl::tests::INamedCallback>& in_service, bool* _aidl_return) = 0;
virtual ::ndk::ScopedAStatus VerifyName(const std::shared_ptr<::aidl::android::aidl::tests::INamedCallback>& in_service, const std::string& in_name, bool* _aidl_return) = 0;
virtual ::ndk::ScopedAStatus GetInterfaceArray(const std::vector<std::string>& in_names, std::vector<std::shared_ptr<::aidl::android::aidl::tests::INamedCallback>>* _aidl_return) = 0;
virtual ::ndk::ScopedAStatus VerifyNamesWithInterfaceArray(const std::vector<std::shared_ptr<::aidl::android::aidl::tests::INamedCallback>>& in_services, const std::vector<std::string>& in_names, bool* _aidl_return) = 0;
@@ -356,6 +576,7 @@ public:
virtual ::ndk::ScopedAStatus GetUnionTags(const std::vector<::aidl::android::aidl::tests::Union>& in_input, std::vector<::aidl::android::aidl::tests::Union::Tag>* _aidl_return) = 0;
virtual ::ndk::ScopedAStatus GetCppJavaTests(::ndk::SpAIBinder* _aidl_return) = 0;
virtual ::ndk::ScopedAStatus getBackendType(::aidl::android::aidl::tests::BackendType* _aidl_return) = 0;
+ virtual ::ndk::ScopedAStatus GetCircular(::aidl::android::aidl::tests::CircularParcelable* out_cp, std::shared_ptr<::aidl::android::aidl::tests::ICircular>* _aidl_return) = 0;
private:
static std::shared_ptr<ITestService> default_impl;
};
@@ -387,6 +608,7 @@ public:
::ndk::ScopedAStatus ReverseIntEnum(const std::vector<::aidl::android::aidl::tests::IntEnum>& in_input, std::vector<::aidl::android::aidl::tests::IntEnum>* out_repeated, std::vector<::aidl::android::aidl::tests::IntEnum>* _aidl_return) override;
::ndk::ScopedAStatus ReverseLongEnum(const std::vector<::aidl::android::aidl::tests::LongEnum>& in_input, std::vector<::aidl::android::aidl::tests::LongEnum>* out_repeated, std::vector<::aidl::android::aidl::tests::LongEnum>* _aidl_return) override;
::ndk::ScopedAStatus GetOtherTestService(const std::string& in_name, std::shared_ptr<::aidl::android::aidl::tests::INamedCallback>* _aidl_return) override;
+ ::ndk::ScopedAStatus SetOtherTestService(const std::string& in_name, const std::shared_ptr<::aidl::android::aidl::tests::INamedCallback>& in_service, bool* _aidl_return) override;
::ndk::ScopedAStatus VerifyName(const std::shared_ptr<::aidl::android::aidl::tests::INamedCallback>& in_service, const std::string& in_name, bool* _aidl_return) override;
::ndk::ScopedAStatus GetInterfaceArray(const std::vector<std::string>& in_names, std::vector<std::shared_ptr<::aidl::android::aidl::tests::INamedCallback>>* _aidl_return) override;
::ndk::ScopedAStatus VerifyNamesWithInterfaceArray(const std::vector<std::shared_ptr<::aidl::android::aidl::tests::INamedCallback>>& in_services, const std::vector<std::string>& in_names, bool* _aidl_return) override;
@@ -427,6 +649,7 @@ public:
::ndk::ScopedAStatus GetUnionTags(const std::vector<::aidl::android::aidl::tests::Union>& in_input, std::vector<::aidl::android::aidl::tests::Union::Tag>* _aidl_return) override;
::ndk::ScopedAStatus GetCppJavaTests(::ndk::SpAIBinder* _aidl_return) override;
::ndk::ScopedAStatus getBackendType(::aidl::android::aidl::tests::BackendType* _aidl_return) override;
+ ::ndk::ScopedAStatus GetCircular(::aidl::android::aidl::tests::CircularParcelable* out_cp, std::shared_ptr<::aidl::android::aidl::tests::ICircular>* _aidl_return) override;
::ndk::SpAIBinder asBinder() override;
bool isRemote() override;
};
@@ -434,3 +657,33 @@ public:
} // namespace aidl
} // namespace android
} // namespace aidl
+namespace aidl {
+namespace android {
+namespace aidl {
+namespace tests {
+[[nodiscard]] static inline std::string toString(ITestService::CompilerChecks::UsingHasDeprecated::Tag val) {
+ switch(val) {
+ case ITestService::CompilerChecks::UsingHasDeprecated::Tag::n:
+ return "n";
+ case ITestService::CompilerChecks::UsingHasDeprecated::Tag::m:
+ return "m";
+ default:
+ return std::to_string(static_cast<int32_t>(val));
+ }
+}
+} // namespace tests
+} // namespace aidl
+} // namespace android
+} // namespace aidl
+namespace ndk {
+namespace internal {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wc++17-extensions"
+template <>
+constexpr inline std::array<aidl::android::aidl::tests::ITestService::CompilerChecks::UsingHasDeprecated::Tag, 2> enum_values<aidl::android::aidl::tests::ITestService::CompilerChecks::UsingHasDeprecated::Tag> = {
+ aidl::android::aidl::tests::ITestService::CompilerChecks::UsingHasDeprecated::Tag::n,
+ aidl::android::aidl::tests::ITestService::CompilerChecks::UsingHasDeprecated::Tag::m,
+};
+#pragma clang diagnostic pop
+} // namespace internal
+} // namespace ndk
diff --git a/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/ListOfInterfaces.h b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/ListOfInterfaces.h
index e0dc9687..7812f89f 100644
--- a/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/ListOfInterfaces.h
+++ b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/ListOfInterfaces.h
@@ -33,8 +33,11 @@ public:
typedef std::false_type fixed_size;
static const char* descriptor;
+ class IEmptyInterfaceDelegator;
+
class IEmptyInterface : public ::ndk::ICInterface {
public:
+ typedef IEmptyInterfaceDelegator DefaultDelegator;
static const char* descriptor;
IEmptyInterface();
virtual ~IEmptyInterface();
@@ -67,8 +70,11 @@ public:
::ndk::SpAIBinder createBinder() override;
private:
};
+ class IMyInterfaceDelegator;
+
class IMyInterface : public ::ndk::ICInterface {
public:
+ typedef IMyInterfaceDelegator DefaultDelegator;
static const char* descriptor;
IMyInterface();
virtual ~IMyInterface();
diff --git a/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/ParcelableForToString.h b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/ParcelableForToString.h
index 29de79d0..c21dd663 100644
--- a/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/ParcelableForToString.h
+++ b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/ParcelableForToString.h
@@ -17,6 +17,12 @@
#include <android/binder_stability.h>
#endif // BINDER_STABILITY_SUPPORT
+namespace aidl::android::aidl::tests {
+template <typename T, typename U, typename B>
+class GenericStructuredParcelable;
+class OtherParcelableForToString;
+class StructuredParcelable;
+} // namespace aidl::android::aidl::tests
namespace aidl {
namespace android {
namespace aidl {
diff --git a/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/RecursiveList.h b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/RecursiveList.h
index 1abd135b..a21676c5 100644
--- a/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/RecursiveList.h
+++ b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/RecursiveList.h
@@ -13,6 +13,9 @@
#include <android/binder_stability.h>
#endif // BINDER_STABILITY_SUPPORT
+namespace aidl::android::aidl::tests {
+class RecursiveList;
+} // namespace aidl::android::aidl::tests
namespace aidl {
namespace android {
namespace aidl {
diff --git a/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/extension/MyExt2.h b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/extension/MyExt2.h
index ea21b55a..7aef5995 100644
--- a/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/extension/MyExt2.h
+++ b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/extension/MyExt2.h
@@ -13,6 +13,9 @@
#include <android/binder_stability.h>
#endif // BINDER_STABILITY_SUPPORT
+namespace aidl::android::aidl::tests::extension {
+class MyExt;
+} // namespace aidl::android::aidl::tests::extension
namespace aidl {
namespace android {
namespace aidl {
diff --git a/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/nested/INestedService.h b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/nested/INestedService.h
index ef526d1a..e17a2147 100644
--- a/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/nested/INestedService.h
+++ b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/nested/INestedService.h
@@ -15,13 +15,19 @@
#include <android/binder_stability.h>
#endif // BINDER_STABILITY_SUPPORT
+namespace aidl::android::aidl::tests::nested {
+class ParcelableWithNested;
+} // namespace aidl::android::aidl::tests::nested
namespace aidl {
namespace android {
namespace aidl {
namespace tests {
namespace nested {
+class INestedServiceDelegator;
+
class INestedService : public ::ndk::ICInterface {
public:
+ typedef INestedServiceDelegator DefaultDelegator;
static const char* descriptor;
INestedService();
virtual ~INestedService();
@@ -64,8 +70,11 @@ public:
return os.str();
}
};
+ class ICallbackDelegator;
+
class ICallback : public ::ndk::ICInterface {
public:
+ typedef ICallbackDelegator DefaultDelegator;
static const char* descriptor;
ICallback();
virtual ~ICallback();
diff --git a/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/unions/EnumUnion.h b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/unions/EnumUnion.h
index 2190f500..d54db946 100644
--- a/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/unions/EnumUnion.h
+++ b/tests/golden_output/aidl-test-interface-ndk-source/gen/include/aidl/android/aidl/tests/unions/EnumUnion.h
@@ -29,6 +29,8 @@ namespace android {
namespace aidl {
namespace tests {
namespace unions {
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
class EnumUnion {
public:
typedef std::false_type fixed_size;
@@ -119,10 +121,7 @@ public:
switch (getTag()) {
case intEnum: os << "intEnum: " << ::android::internal::ToString(get<intEnum>()); break;
case longEnum: os << "longEnum: " << ::android::internal::ToString(get<longEnum>()); break;
- #pragma clang diagnostic push
- #pragma clang diagnostic ignored "-Wdeprecated-declarations"
case deprecatedField: os << "deprecatedField: " << ::android::internal::ToString(get<deprecatedField>()); break;
- #pragma clang diagnostic pop
}
os << "}";
return os.str();
@@ -130,6 +129,7 @@ public:
private:
std::variant<::aidl::android::aidl::tests::IntEnum, ::aidl::android::aidl::tests::LongEnum, int32_t> _value;
};
+#pragma clang diagnostic pop
} // namespace unions
} // namespace tests
} // namespace aidl
diff --git a/tests/golden_output/aidl-test-interface-permission-java-source/gen/android/aidl/tests/permission/INoPermission.java b/tests/golden_output/aidl-test-interface-permission-java-source/gen/android/aidl/tests/permission/INoPermission.java
new file mode 100644
index 00000000..fc65b93a
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-permission-java-source/gen/android/aidl/tests/permission/INoPermission.java
@@ -0,0 +1,134 @@
+/*
+ * This file is auto-generated. DO NOT MODIFY.
+ */
+package android.aidl.tests.permission;
+public interface INoPermission extends android.os.IInterface
+{
+ /** Default implementation for INoPermission. */
+ public static class Default implements android.aidl.tests.permission.INoPermission
+ {
+ @Override public void foo() throws android.os.RemoteException
+ {
+ }
+ @Override
+ public android.os.IBinder asBinder() {
+ return null;
+ }
+ }
+ /** Local-side IPC implementation stub class. */
+ public static abstract class Stub extends android.os.Binder implements android.aidl.tests.permission.INoPermission
+ {
+ /** Construct the stub at attach it to the interface. */
+ public Stub()
+ {
+ this.attachInterface(this, DESCRIPTOR);
+ }
+ /**
+ * Cast an IBinder object into an android.aidl.tests.permission.INoPermission interface,
+ * generating a proxy if needed.
+ */
+ public static android.aidl.tests.permission.INoPermission asInterface(android.os.IBinder obj)
+ {
+ if ((obj==null)) {
+ return null;
+ }
+ android.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);
+ if (((iin!=null)&&(iin instanceof android.aidl.tests.permission.INoPermission))) {
+ return ((android.aidl.tests.permission.INoPermission)iin);
+ }
+ return new android.aidl.tests.permission.INoPermission.Stub.Proxy(obj);
+ }
+ @Override public android.os.IBinder asBinder()
+ {
+ return this;
+ }
+ /** @hide */
+ public static java.lang.String getDefaultTransactionName(int transactionCode)
+ {
+ switch (transactionCode)
+ {
+ case TRANSACTION_foo:
+ {
+ return "foo";
+ }
+ default:
+ {
+ return null;
+ }
+ }
+ }
+ /** @hide */
+ public java.lang.String getTransactionName(int transactionCode)
+ {
+ return this.getDefaultTransactionName(transactionCode);
+ }
+ @Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException
+ {
+ java.lang.String descriptor = DESCRIPTOR;
+ if (code >= android.os.IBinder.FIRST_CALL_TRANSACTION && code <= android.os.IBinder.LAST_CALL_TRANSACTION) {
+ data.enforceInterface(descriptor);
+ }
+ switch (code)
+ {
+ case INTERFACE_TRANSACTION:
+ {
+ reply.writeString(descriptor);
+ return true;
+ }
+ }
+ switch (code)
+ {
+ case TRANSACTION_foo:
+ {
+ this.foo();
+ reply.writeNoException();
+ break;
+ }
+ default:
+ {
+ return super.onTransact(code, data, reply, flags);
+ }
+ }
+ return true;
+ }
+ private static class Proxy implements android.aidl.tests.permission.INoPermission
+ {
+ private android.os.IBinder mRemote;
+ Proxy(android.os.IBinder remote)
+ {
+ mRemote = remote;
+ }
+ @Override public android.os.IBinder asBinder()
+ {
+ return mRemote;
+ }
+ public java.lang.String getInterfaceDescriptor()
+ {
+ return DESCRIPTOR;
+ }
+ @Override public void foo() throws android.os.RemoteException
+ {
+ android.os.Parcel _data = android.os.Parcel.obtain(asBinder());
+ android.os.Parcel _reply = android.os.Parcel.obtain();
+ try {
+ _data.writeInterfaceToken(DESCRIPTOR);
+ boolean _status = mRemote.transact(Stub.TRANSACTION_foo, _data, _reply, 0);
+ _reply.readException();
+ }
+ finally {
+ _reply.recycle();
+ _data.recycle();
+ }
+ }
+ }
+ static final int TRANSACTION_foo = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0);
+ /** @hide */
+ public int getMaxTransactionId()
+ {
+ return 0;
+ }
+ }
+ public static final java.lang.String DESCRIPTOR = "android$aidl$tests$permission$INoPermission".replace('$', '.');
+ @android.annotation.RequiresNoPermission
+ public void foo() throws android.os.RemoteException;
+}
diff --git a/tests/golden_output/aidl-test-interface-permission-java-source/gen/android/aidl/tests/permission/INoPermission.java.d b/tests/golden_output/aidl-test-interface-permission-java-source/gen/android/aidl/tests/permission/INoPermission.java.d
new file mode 100644
index 00000000..c213fdc6
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-permission-java-source/gen/android/aidl/tests/permission/INoPermission.java.d
@@ -0,0 +1,2 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-permission-java-source/gen/android/aidl/tests/permission/INoPermission.java : \
+ system/tools/aidl/tests/android/aidl/tests/permission/INoPermission.aidl
diff --git a/tests/golden_output/aidl-test-interface-permission-java-source/gen/android/aidl/tests/permission/IProtected.java b/tests/golden_output/aidl-test-interface-permission-java-source/gen/android/aidl/tests/permission/IProtected.java
index c20acb46..1e10c089 100644
--- a/tests/golden_output/aidl-test-interface-permission-java-source/gen/android/aidl/tests/permission/IProtected.java
+++ b/tests/golden_output/aidl-test-interface-permission-java-source/gen/android/aidl/tests/permission/IProtected.java
@@ -19,6 +19,10 @@ public interface IProtected extends android.os.IInterface
@Override public void NonManifestPermission() throws android.os.RemoteException
{
}
+ // Used by the integration tests to dynamically set permissions that are considered granted.
+ @Override public void SetGranted(java.util.List<java.lang.String> permissions) throws android.os.RemoteException
+ {
+ }
@Override
public android.os.IBinder asBinder() {
return null;
@@ -27,10 +31,21 @@ public interface IProtected extends android.os.IInterface
/** Local-side IPC implementation stub class. */
public static abstract class Stub extends android.os.Binder implements android.aidl.tests.permission.IProtected
{
- /** Construct the stub at attach it to the interface. */
- public Stub()
+ private final android.os.PermissionEnforcer mEnforcer;
+ /** Construct the stub using the Enforcer provided. */
+ public Stub(android.os.PermissionEnforcer enforcer)
{
this.attachInterface(this, DESCRIPTOR);
+ if (enforcer == null) {
+ throw new IllegalArgumentException("enforcer cannot be null");
+ }
+ mEnforcer = enforcer;
+ }
+ @Deprecated
+ /** Default constructor. */
+ public Stub() {
+ this(android.os.PermissionEnforcer.fromContext(
+ android.app.ActivityThread.currentActivityThread().getSystemContext()));
}
/**
* Cast an IBinder object into an android.aidl.tests.permission.IProtected interface,
@@ -51,6 +66,42 @@ public interface IProtected extends android.os.IInterface
{
return this;
}
+ /** @hide */
+ public static java.lang.String getDefaultTransactionName(int transactionCode)
+ {
+ switch (transactionCode)
+ {
+ case TRANSACTION_PermissionProtected:
+ {
+ return "PermissionProtected";
+ }
+ case TRANSACTION_MultiplePermissionsAll:
+ {
+ return "MultiplePermissionsAll";
+ }
+ case TRANSACTION_MultiplePermissionsAny:
+ {
+ return "MultiplePermissionsAny";
+ }
+ case TRANSACTION_NonManifestPermission:
+ {
+ return "NonManifestPermission";
+ }
+ case TRANSACTION_SetGranted:
+ {
+ return "SetGranted";
+ }
+ default:
+ {
+ return null;
+ }
+ }
+ }
+ /** @hide */
+ public java.lang.String getTransactionName(int transactionCode)
+ {
+ return this.getDefaultTransactionName(transactionCode);
+ }
@Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException
{
java.lang.String descriptor = DESCRIPTOR;
@@ -69,40 +120,37 @@ public interface IProtected extends android.os.IInterface
{
case TRANSACTION_PermissionProtected:
{
- if ((this.permissionCheckerWrapper(android.Manifest.permission.READ_PHONE_STATE, this.getCallingPid(), new android.content.AttributionSource(getCallingUid(), null, null))!=true)) {
- throw new SecurityException("Access denied, requires: android.Manifest.permission.READ_PHONE_STATE");
- }
this.PermissionProtected();
reply.writeNoException();
break;
}
case TRANSACTION_MultiplePermissionsAll:
{
- if (((this.permissionCheckerWrapper(android.Manifest.permission.INTERNET, this.getCallingPid(), new android.content.AttributionSource(getCallingUid(), null, null))&&this.permissionCheckerWrapper(android.Manifest.permission.VIBRATE, this.getCallingPid(), new android.content.AttributionSource(getCallingUid(), null, null)))!=true)) {
- throw new SecurityException("Access denied, requires: allOf = {android.Manifest.permission.INTERNET, android.Manifest.permission.VIBRATE}");
- }
this.MultiplePermissionsAll();
reply.writeNoException();
break;
}
case TRANSACTION_MultiplePermissionsAny:
{
- if (((this.permissionCheckerWrapper(android.Manifest.permission.INTERNET, this.getCallingPid(), new android.content.AttributionSource(getCallingUid(), null, null))||this.permissionCheckerWrapper(android.Manifest.permission.VIBRATE, this.getCallingPid(), new android.content.AttributionSource(getCallingUid(), null, null)))!=true)) {
- throw new SecurityException("Access denied, requires: anyOf = {android.Manifest.permission.INTERNET, android.Manifest.permission.VIBRATE}");
- }
this.MultiplePermissionsAny();
reply.writeNoException();
break;
}
case TRANSACTION_NonManifestPermission:
{
- if ((this.permissionCheckerWrapper(android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, this.getCallingPid(), new android.content.AttributionSource(getCallingUid(), null, null))!=true)) {
- throw new SecurityException("Access denied, requires: android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK");
- }
this.NonManifestPermission();
reply.writeNoException();
break;
}
+ case TRANSACTION_SetGranted:
+ {
+ java.util.List<java.lang.String> _arg0;
+ _arg0 = data.createStringArrayList();
+ data.enforceNoDataAvail();
+ this.SetGranted(_arg0);
+ reply.writeNoException();
+ break;
+ }
default:
{
return super.onTransact(code, data, reply, flags);
@@ -127,7 +175,7 @@ public interface IProtected extends android.os.IInterface
}
@Override public void PermissionProtected() throws android.os.RemoteException
{
- android.os.Parcel _data = android.os.Parcel.obtain();
+ android.os.Parcel _data = android.os.Parcel.obtain(asBinder());
android.os.Parcel _reply = android.os.Parcel.obtain();
try {
_data.writeInterfaceToken(DESCRIPTOR);
@@ -141,7 +189,7 @@ public interface IProtected extends android.os.IInterface
}
@Override public void MultiplePermissionsAll() throws android.os.RemoteException
{
- android.os.Parcel _data = android.os.Parcel.obtain();
+ android.os.Parcel _data = android.os.Parcel.obtain(asBinder());
android.os.Parcel _reply = android.os.Parcel.obtain();
try {
_data.writeInterfaceToken(DESCRIPTOR);
@@ -155,7 +203,7 @@ public interface IProtected extends android.os.IInterface
}
@Override public void MultiplePermissionsAny() throws android.os.RemoteException
{
- android.os.Parcel _data = android.os.Parcel.obtain();
+ android.os.Parcel _data = android.os.Parcel.obtain(asBinder());
android.os.Parcel _reply = android.os.Parcel.obtain();
try {
_data.writeInterfaceToken(DESCRIPTOR);
@@ -169,7 +217,7 @@ public interface IProtected extends android.os.IInterface
}
@Override public void NonManifestPermission() throws android.os.RemoteException
{
- android.os.Parcel _data = android.os.Parcel.obtain();
+ android.os.Parcel _data = android.os.Parcel.obtain(asBinder());
android.os.Parcel _reply = android.os.Parcel.obtain();
try {
_data.writeInterfaceToken(DESCRIPTOR);
@@ -181,19 +229,51 @@ public interface IProtected extends android.os.IInterface
_data.recycle();
}
}
- }
- private boolean permissionCheckerWrapper(
- String permission, int pid, android.content.AttributionSource attributionSource) {
- android.content.Context ctx =
- android.app.ActivityThread.currentActivityThread().getSystemContext();
- return (android.content.PermissionChecker.checkPermissionForDataDelivery(
- ctx, permission, pid, attributionSource, "" /*message*/) ==
- android.content.PermissionChecker.PERMISSION_GRANTED);
+ // Used by the integration tests to dynamically set permissions that are considered granted.
+ @Override public void SetGranted(java.util.List<java.lang.String> permissions) throws android.os.RemoteException
+ {
+ android.os.Parcel _data = android.os.Parcel.obtain(asBinder());
+ android.os.Parcel _reply = android.os.Parcel.obtain();
+ try {
+ _data.writeInterfaceToken(DESCRIPTOR);
+ _data.writeStringList(permissions);
+ boolean _status = mRemote.transact(Stub.TRANSACTION_SetGranted, _data, _reply, 0);
+ _reply.readException();
+ }
+ finally {
+ _reply.recycle();
+ _data.recycle();
+ }
+ }
}
static final int TRANSACTION_PermissionProtected = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0);
+ /** Helper method to enforce permissions for PermissionProtected */
+ protected void PermissionProtected_enforcePermission() throws SecurityException {
+ mEnforcer.enforcePermission(android.Manifest.permission.READ_PHONE_STATE, getCallingPid(), getCallingUid());
+ }
static final int TRANSACTION_MultiplePermissionsAll = (android.os.IBinder.FIRST_CALL_TRANSACTION + 1);
+ static final String[] PERMISSIONS_MultiplePermissionsAll = {android.Manifest.permission.INTERNET, android.Manifest.permission.VIBRATE};
+ /** Helper method to enforce permissions for MultiplePermissionsAll */
+ protected void MultiplePermissionsAll_enforcePermission() throws SecurityException {
+ mEnforcer.enforcePermissionAllOf(PERMISSIONS_MultiplePermissionsAll, getCallingPid(), getCallingUid());
+ }
static final int TRANSACTION_MultiplePermissionsAny = (android.os.IBinder.FIRST_CALL_TRANSACTION + 2);
+ static final String[] PERMISSIONS_MultiplePermissionsAny = {android.Manifest.permission.INTERNET, android.Manifest.permission.VIBRATE};
+ /** Helper method to enforce permissions for MultiplePermissionsAny */
+ protected void MultiplePermissionsAny_enforcePermission() throws SecurityException {
+ mEnforcer.enforcePermissionAnyOf(PERMISSIONS_MultiplePermissionsAny, getCallingPid(), getCallingUid());
+ }
static final int TRANSACTION_NonManifestPermission = (android.os.IBinder.FIRST_CALL_TRANSACTION + 3);
+ /** Helper method to enforce permissions for NonManifestPermission */
+ protected void NonManifestPermission_enforcePermission() throws SecurityException {
+ mEnforcer.enforcePermission(android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK, getCallingPid(), getCallingUid());
+ }
+ static final int TRANSACTION_SetGranted = (android.os.IBinder.FIRST_CALL_TRANSACTION + 4);
+ /** @hide */
+ public int getMaxTransactionId()
+ {
+ return 4;
+ }
}
public static final java.lang.String DESCRIPTOR = "android$aidl$tests$permission$IProtected".replace('$', '.');
@android.annotation.EnforcePermission(android.Manifest.permission.READ_PHONE_STATE)
@@ -204,4 +284,7 @@ public interface IProtected extends android.os.IInterface
public void MultiplePermissionsAny() throws android.os.RemoteException;
@android.annotation.EnforcePermission(android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK)
public void NonManifestPermission() throws android.os.RemoteException;
+ // Used by the integration tests to dynamically set permissions that are considered granted.
+ @android.annotation.RequiresNoPermission
+ public void SetGranted(java.util.List<java.lang.String> permissions) throws android.os.RemoteException;
}
diff --git a/tests/golden_output/aidl-test-interface-permission-java-source/gen/android/aidl/tests/permission/IProtectedInterface.java b/tests/golden_output/aidl-test-interface-permission-java-source/gen/android/aidl/tests/permission/IProtectedInterface.java
index e8d1c1b6..5a97ed0e 100644
--- a/tests/golden_output/aidl-test-interface-permission-java-source/gen/android/aidl/tests/permission/IProtectedInterface.java
+++ b/tests/golden_output/aidl-test-interface-permission-java-source/gen/android/aidl/tests/permission/IProtectedInterface.java
@@ -2,7 +2,6 @@
* This file is auto-generated. DO NOT MODIFY.
*/
package android.aidl.tests.permission;
-@android.annotation.EnforcePermission(android.Manifest.permission.ACCESS_FINE_LOCATION)
public interface IProtectedInterface extends android.os.IInterface
{
/** Default implementation for IProtectedInterface. */
@@ -22,10 +21,21 @@ public interface IProtectedInterface extends android.os.IInterface
/** Local-side IPC implementation stub class. */
public static abstract class Stub extends android.os.Binder implements android.aidl.tests.permission.IProtectedInterface
{
- /** Construct the stub at attach it to the interface. */
- public Stub()
+ private final android.os.PermissionEnforcer mEnforcer;
+ /** Construct the stub using the Enforcer provided. */
+ public Stub(android.os.PermissionEnforcer enforcer)
{
this.attachInterface(this, DESCRIPTOR);
+ if (enforcer == null) {
+ throw new IllegalArgumentException("enforcer cannot be null");
+ }
+ mEnforcer = enforcer;
+ }
+ @Deprecated
+ /** Default constructor. */
+ public Stub() {
+ this(android.os.PermissionEnforcer.fromContext(
+ android.app.ActivityThread.currentActivityThread().getSystemContext()));
}
/**
* Cast an IBinder object into an android.aidl.tests.permission.IProtectedInterface interface,
@@ -46,6 +56,30 @@ public interface IProtectedInterface extends android.os.IInterface
{
return this;
}
+ /** @hide */
+ public static java.lang.String getDefaultTransactionName(int transactionCode)
+ {
+ switch (transactionCode)
+ {
+ case TRANSACTION_Method1:
+ {
+ return "Method1";
+ }
+ case TRANSACTION_Method2:
+ {
+ return "Method2";
+ }
+ default:
+ {
+ return null;
+ }
+ }
+ }
+ /** @hide */
+ public java.lang.String getTransactionName(int transactionCode)
+ {
+ return this.getDefaultTransactionName(transactionCode);
+ }
@Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException
{
java.lang.String descriptor = DESCRIPTOR;
@@ -64,21 +98,12 @@ public interface IProtectedInterface extends android.os.IInterface
{
case TRANSACTION_Method1:
{
- if ((this.permissionCheckerWrapper(android.Manifest.permission.ACCESS_FINE_LOCATION, this.getCallingPid(), new android.content.AttributionSource(getCallingUid(), null, null))!=true)) {
- throw new SecurityException("Access denied, requires: android.Manifest.permission.ACCESS_FINE_LOCATION");
- }
this.Method1();
reply.writeNoException();
break;
}
case TRANSACTION_Method2:
{
- if ((this.permissionCheckerWrapper(android.Manifest.permission.ACCESS_FINE_LOCATION, this.getCallingPid(), new android.content.AttributionSource(getCallingUid(), null, null))!=true)) {
- throw new SecurityException("Access denied, requires: android.Manifest.permission.ACCESS_FINE_LOCATION");
- }
- if ((this.permissionCheckerWrapper(android.Manifest.permission.INTERNET, this.getCallingPid(), new android.content.AttributionSource(getCallingUid(), null, null))!=true)) {
- throw new SecurityException("Access denied, requires: android.Manifest.permission.INTERNET");
- }
this.Method2();
reply.writeNoException();
break;
@@ -107,7 +132,7 @@ public interface IProtectedInterface extends android.os.IInterface
}
@Override public void Method1() throws android.os.RemoteException
{
- android.os.Parcel _data = android.os.Parcel.obtain();
+ android.os.Parcel _data = android.os.Parcel.obtain(asBinder());
android.os.Parcel _reply = android.os.Parcel.obtain();
try {
_data.writeInterfaceToken(DESCRIPTOR);
@@ -121,7 +146,7 @@ public interface IProtectedInterface extends android.os.IInterface
}
@Override public void Method2() throws android.os.RemoteException
{
- android.os.Parcel _data = android.os.Parcel.obtain();
+ android.os.Parcel _data = android.os.Parcel.obtain(asBinder());
android.os.Parcel _reply = android.os.Parcel.obtain();
try {
_data.writeInterfaceToken(DESCRIPTOR);
@@ -134,19 +159,25 @@ public interface IProtectedInterface extends android.os.IInterface
}
}
}
- private boolean permissionCheckerWrapper(
- String permission, int pid, android.content.AttributionSource attributionSource) {
- android.content.Context ctx =
- android.app.ActivityThread.currentActivityThread().getSystemContext();
- return (android.content.PermissionChecker.checkPermissionForDataDelivery(
- ctx, permission, pid, attributionSource, "" /*message*/) ==
- android.content.PermissionChecker.PERMISSION_GRANTED);
- }
static final int TRANSACTION_Method1 = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0);
+ /** Helper method to enforce permissions for Method1 */
+ protected void Method1_enforcePermission() throws SecurityException {
+ mEnforcer.enforcePermission(android.Manifest.permission.ACCESS_FINE_LOCATION, getCallingPid(), getCallingUid());
+ }
static final int TRANSACTION_Method2 = (android.os.IBinder.FIRST_CALL_TRANSACTION + 1);
+ /** Helper method to enforce permissions for Method2 */
+ protected void Method2_enforcePermission() throws SecurityException {
+ mEnforcer.enforcePermission(android.Manifest.permission.ACCESS_FINE_LOCATION, getCallingPid(), getCallingUid());
+ }
+ /** @hide */
+ public int getMaxTransactionId()
+ {
+ return 1;
+ }
}
public static final java.lang.String DESCRIPTOR = "android$aidl$tests$permission$IProtectedInterface".replace('$', '.');
+ @android.annotation.EnforcePermission(android.Manifest.permission.ACCESS_FINE_LOCATION)
public void Method1() throws android.os.RemoteException;
- @android.annotation.EnforcePermission(android.Manifest.permission.INTERNET)
+ @android.annotation.EnforcePermission(android.Manifest.permission.ACCESS_FINE_LOCATION)
public void Method2() throws android.os.RemoteException;
}
diff --git a/tests/golden_output/aidl-test-interface-permission-java-source/gen/android/aidl/tests/permission/platform/IProtected.java b/tests/golden_output/aidl-test-interface-permission-java-source/gen/android/aidl/tests/permission/platform/IProtected.java
index 7b6d96f9..aca8d073 100644
--- a/tests/golden_output/aidl-test-interface-permission-java-source/gen/android/aidl/tests/permission/platform/IProtected.java
+++ b/tests/golden_output/aidl-test-interface-permission-java-source/gen/android/aidl/tests/permission/platform/IProtected.java
@@ -18,10 +18,21 @@ public interface IProtected extends android.os.IInterface
/** Local-side IPC implementation stub class. */
public static abstract class Stub extends android.os.Binder implements android.aidl.tests.permission.platform.IProtected
{
- /** Construct the stub at attach it to the interface. */
- public Stub()
+ private final android.os.PermissionEnforcer mEnforcer;
+ /** Construct the stub using the Enforcer provided. */
+ public Stub(android.os.PermissionEnforcer enforcer)
{
this.attachInterface(this, DESCRIPTOR);
+ if (enforcer == null) {
+ throw new IllegalArgumentException("enforcer cannot be null");
+ }
+ mEnforcer = enforcer;
+ }
+ @Deprecated
+ /** Default constructor. */
+ public Stub() {
+ this(android.os.PermissionEnforcer.fromContext(
+ android.app.ActivityThread.currentActivityThread().getSystemContext()));
}
/**
* Cast an IBinder object into an android.aidl.tests.permission.platform.IProtected interface,
@@ -42,6 +53,26 @@ public interface IProtected extends android.os.IInterface
{
return this;
}
+ /** @hide */
+ public static java.lang.String getDefaultTransactionName(int transactionCode)
+ {
+ switch (transactionCode)
+ {
+ case TRANSACTION_ProtectedWithSourceAttribution:
+ {
+ return "ProtectedWithSourceAttribution";
+ }
+ default:
+ {
+ return null;
+ }
+ }
+ }
+ /** @hide */
+ public java.lang.String getTransactionName(int transactionCode)
+ {
+ return this.getDefaultTransactionName(transactionCode);
+ }
@Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException
{
java.lang.String descriptor = DESCRIPTOR;
@@ -63,9 +94,6 @@ public interface IProtected extends android.os.IInterface
android.content.AttributionSource _arg0;
_arg0 = data.readTypedObject(android.content.AttributionSource.CREATOR);
data.enforceNoDataAvail();
- if (((this.permissionCheckerWrapper(android.Manifest.permission.INTERNET, this.getCallingPid(), _arg0)&&this.permissionCheckerWrapper(android.Manifest.permission.VIBRATE, this.getCallingPid(), _arg0))!=true)) {
- throw new SecurityException("Access denied, requires: allOf = {android.Manifest.permission.INTERNET, android.Manifest.permission.VIBRATE}");
- }
this.ProtectedWithSourceAttribution(_arg0);
reply.writeNoException();
break;
@@ -94,7 +122,7 @@ public interface IProtected extends android.os.IInterface
}
@Override public void ProtectedWithSourceAttribution(android.content.AttributionSource source) throws android.os.RemoteException
{
- android.os.Parcel _data = android.os.Parcel.obtain();
+ android.os.Parcel _data = android.os.Parcel.obtain(asBinder());
android.os.Parcel _reply = android.os.Parcel.obtain();
try {
_data.writeInterfaceToken(DESCRIPTOR);
@@ -108,15 +136,17 @@ public interface IProtected extends android.os.IInterface
}
}
}
- private boolean permissionCheckerWrapper(
- String permission, int pid, android.content.AttributionSource attributionSource) {
- android.content.Context ctx =
- android.app.ActivityThread.currentActivityThread().getSystemContext();
- return (android.content.PermissionChecker.checkPermissionForDataDelivery(
- ctx, permission, pid, attributionSource, "" /*message*/) ==
- android.content.PermissionChecker.PERMISSION_GRANTED);
- }
static final int TRANSACTION_ProtectedWithSourceAttribution = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0);
+ static final String[] PERMISSIONS_ProtectedWithSourceAttribution = {android.Manifest.permission.INTERNET, android.Manifest.permission.VIBRATE};
+ /** Helper method to enforce permissions for ProtectedWithSourceAttribution */
+ protected void ProtectedWithSourceAttribution_enforcePermission() throws SecurityException {
+ mEnforcer.enforcePermissionAllOf(PERMISSIONS_ProtectedWithSourceAttribution, getCallingPid(), getCallingUid());
+ }
+ /** @hide */
+ public int getMaxTransactionId()
+ {
+ return 0;
+ }
}
public static final java.lang.String DESCRIPTOR = "android$aidl$tests$permission$platform$IProtected".replace('$', '.');
@android.annotation.EnforcePermission(allOf = {android.Manifest.permission.INTERNET, android.Manifest.permission.VIBRATE})
diff --git a/tests/golden_output/aidl-test-interface-platform-java-source/gen/android/aidl/tests/permission/platform/IProtected.java b/tests/golden_output/aidl-test-interface-platform-java-source/gen/android/aidl/tests/permission/platform/IProtected.java
deleted file mode 100644
index 7b6d96f9..00000000
--- a/tests/golden_output/aidl-test-interface-platform-java-source/gen/android/aidl/tests/permission/platform/IProtected.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * This file is auto-generated. DO NOT MODIFY.
- */
-package android.aidl.tests.permission.platform;
-public interface IProtected extends android.os.IInterface
-{
- /** Default implementation for IProtected. */
- public static class Default implements android.aidl.tests.permission.platform.IProtected
- {
- @Override public void ProtectedWithSourceAttribution(android.content.AttributionSource source) throws android.os.RemoteException
- {
- }
- @Override
- public android.os.IBinder asBinder() {
- return null;
- }
- }
- /** Local-side IPC implementation stub class. */
- public static abstract class Stub extends android.os.Binder implements android.aidl.tests.permission.platform.IProtected
- {
- /** Construct the stub at attach it to the interface. */
- public Stub()
- {
- this.attachInterface(this, DESCRIPTOR);
- }
- /**
- * Cast an IBinder object into an android.aidl.tests.permission.platform.IProtected interface,
- * generating a proxy if needed.
- */
- public static android.aidl.tests.permission.platform.IProtected asInterface(android.os.IBinder obj)
- {
- if ((obj==null)) {
- return null;
- }
- android.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);
- if (((iin!=null)&&(iin instanceof android.aidl.tests.permission.platform.IProtected))) {
- return ((android.aidl.tests.permission.platform.IProtected)iin);
- }
- return new android.aidl.tests.permission.platform.IProtected.Stub.Proxy(obj);
- }
- @Override public android.os.IBinder asBinder()
- {
- return this;
- }
- @Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException
- {
- java.lang.String descriptor = DESCRIPTOR;
- if (code >= android.os.IBinder.FIRST_CALL_TRANSACTION && code <= android.os.IBinder.LAST_CALL_TRANSACTION) {
- data.enforceInterface(descriptor);
- }
- switch (code)
- {
- case INTERFACE_TRANSACTION:
- {
- reply.writeString(descriptor);
- return true;
- }
- }
- switch (code)
- {
- case TRANSACTION_ProtectedWithSourceAttribution:
- {
- android.content.AttributionSource _arg0;
- _arg0 = data.readTypedObject(android.content.AttributionSource.CREATOR);
- data.enforceNoDataAvail();
- if (((this.permissionCheckerWrapper(android.Manifest.permission.INTERNET, this.getCallingPid(), _arg0)&&this.permissionCheckerWrapper(android.Manifest.permission.VIBRATE, this.getCallingPid(), _arg0))!=true)) {
- throw new SecurityException("Access denied, requires: allOf = {android.Manifest.permission.INTERNET, android.Manifest.permission.VIBRATE}");
- }
- this.ProtectedWithSourceAttribution(_arg0);
- reply.writeNoException();
- break;
- }
- default:
- {
- return super.onTransact(code, data, reply, flags);
- }
- }
- return true;
- }
- private static class Proxy implements android.aidl.tests.permission.platform.IProtected
- {
- private android.os.IBinder mRemote;
- Proxy(android.os.IBinder remote)
- {
- mRemote = remote;
- }
- @Override public android.os.IBinder asBinder()
- {
- return mRemote;
- }
- public java.lang.String getInterfaceDescriptor()
- {
- return DESCRIPTOR;
- }
- @Override public void ProtectedWithSourceAttribution(android.content.AttributionSource source) throws android.os.RemoteException
- {
- android.os.Parcel _data = android.os.Parcel.obtain();
- android.os.Parcel _reply = android.os.Parcel.obtain();
- try {
- _data.writeInterfaceToken(DESCRIPTOR);
- _data.writeTypedObject(source, 0);
- boolean _status = mRemote.transact(Stub.TRANSACTION_ProtectedWithSourceAttribution, _data, _reply, 0);
- _reply.readException();
- }
- finally {
- _reply.recycle();
- _data.recycle();
- }
- }
- }
- private boolean permissionCheckerWrapper(
- String permission, int pid, android.content.AttributionSource attributionSource) {
- android.content.Context ctx =
- android.app.ActivityThread.currentActivityThread().getSystemContext();
- return (android.content.PermissionChecker.checkPermissionForDataDelivery(
- ctx, permission, pid, attributionSource, "" /*message*/) ==
- android.content.PermissionChecker.PERMISSION_GRANTED);
- }
- static final int TRANSACTION_ProtectedWithSourceAttribution = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0);
- }
- public static final java.lang.String DESCRIPTOR = "android$aidl$tests$permission$platform$IProtected".replace('$', '.');
- @android.annotation.EnforcePermission(allOf = {android.Manifest.permission.INTERNET, android.Manifest.permission.VIBRATE})
- public void ProtectedWithSourceAttribution(android.content.AttributionSource source) throws android.os.RemoteException;
-}
diff --git a/tests/golden_output/aidl-test-interface-platform-java-source/gen/android/aidl/tests/permission/platform/IProtected.java.d b/tests/golden_output/aidl-test-interface-platform-java-source/gen/android/aidl/tests/permission/platform/IProtected.java.d
deleted file mode 100644
index 51e500e0..00000000
--- a/tests/golden_output/aidl-test-interface-platform-java-source/gen/android/aidl/tests/permission/platform/IProtected.java.d
+++ /dev/null
@@ -1,3 +0,0 @@
-out/soong/.intermediates/system/tools/aidl/aidl-test-interface-platform-java-source/gen/android/aidl/tests/permission/platform/IProtected.java : \
- system/tools/aidl/tests/android/aidl/tests/permission/platform/IProtected.aidl \
- frameworks/base/core/java/android/content/AttributionSource.aidl
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ArrayOfInterfaces.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ArrayOfInterfaces.rs
index 42b05dc7..93ad5907 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ArrayOfInterfaces.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ArrayOfInterfaces.rs
@@ -1,15 +1,15 @@
#![forbid(unsafe_code)]
#![rustfmt::skip]
#[derive(Debug)]
-pub struct ArrayOfInterfaces {
+pub struct r#ArrayOfInterfaces {
}
-impl Default for ArrayOfInterfaces {
+impl Default for r#ArrayOfInterfaces {
fn default() -> Self {
Self {
}
}
}
-impl binder::Parcelable for ArrayOfInterfaces {
+impl binder::Parcelable for r#ArrayOfInterfaces {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_write(|subparcel| {
Ok(())
@@ -21,12 +21,12 @@ impl binder::Parcelable for ArrayOfInterfaces {
})
}
}
-binder::impl_serialize_for_parcelable!(ArrayOfInterfaces);
-binder::impl_deserialize_for_parcelable!(ArrayOfInterfaces);
-impl binder::binder_impl::ParcelableMetadata for ArrayOfInterfaces {
+binder::impl_serialize_for_parcelable!(r#ArrayOfInterfaces);
+binder::impl_deserialize_for_parcelable!(r#ArrayOfInterfaces);
+impl binder::binder_impl::ParcelableMetadata for r#ArrayOfInterfaces {
fn get_descriptor() -> &'static str { "android.aidl.tests.ArrayOfInterfaces" }
}
-pub mod IEmptyInterface {
+pub mod r#IEmptyInterface {
#![allow(non_upper_case_globals)]
#![allow(non_snake_case)]
#[allow(unused_imports)] use binder::binder_impl::IBinderInternal;
@@ -103,7 +103,7 @@ pub mod IEmptyInterface {
}
}
}
-pub mod IMyInterface {
+pub mod r#IMyInterface {
#![allow(non_upper_case_globals)]
#![allow(non_snake_case)]
#[allow(unused_imports)] use binder::binder_impl::IBinderInternal;
@@ -118,7 +118,7 @@ pub mod IMyInterface {
}
pub trait IMyInterface: binder::Interface + Send {
fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.ArrayOfInterfaces.IMyInterface" }
- fn methodWithInterfaces(&self, _arg_iface: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>, _arg_nullable_iface: Option<&binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>, _arg_iface_array_in: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>], _arg_iface_array_out: &mut Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>, _arg_iface_array_inout: &mut Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>, _arg_nullable_iface_array_in: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>]>, _arg_nullable_iface_array_out: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>, _arg_nullable_iface_array_inout: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>>;
+ fn r#methodWithInterfaces(&self, _arg_iface: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>, _arg_nullable_iface: Option<&binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>, _arg_iface_array_in: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>], _arg_iface_array_out: &mut Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>, _arg_iface_array_inout: &mut Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>, _arg_nullable_iface_array_in: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>]>, _arg_nullable_iface_array_out: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>, _arg_nullable_iface_array_inout: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>>;
fn getDefaultImpl() -> IMyInterfaceDefaultRef where Self: Sized {
DEFAULT_IMPL.lock().unwrap().clone()
}
@@ -128,12 +128,12 @@ pub mod IMyInterface {
}
pub trait IMyInterfaceAsync<P>: binder::Interface + Send {
fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.ArrayOfInterfaces.IMyInterface" }
- fn methodWithInterfaces<'a>(&'a self, _arg_iface: &'a binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>, _arg_nullable_iface: Option<&'a binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>, _arg_iface_array_in: &'a [binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>], _arg_iface_array_out: &'a mut Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>, _arg_iface_array_inout: &'a mut Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>, _arg_nullable_iface_array_in: Option<&'a [Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>]>, _arg_nullable_iface_array_out: &'a mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>, _arg_nullable_iface_array_inout: &'a mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>>>;
+ fn r#methodWithInterfaces<'a>(&'a self, _arg_iface: &'a binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>, _arg_nullable_iface: Option<&'a binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>, _arg_iface_array_in: &'a [binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>], _arg_iface_array_out: &'a mut Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>, _arg_iface_array_inout: &'a mut Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>, _arg_nullable_iface_array_in: Option<&'a [Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>]>, _arg_nullable_iface_array_out: &'a mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>, _arg_nullable_iface_array_inout: &'a mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>>>;
}
#[::async_trait::async_trait]
pub trait IMyInterfaceAsyncServer: binder::Interface + Send {
fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.ArrayOfInterfaces.IMyInterface" }
- async fn methodWithInterfaces(&self, _arg_iface: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>, _arg_nullable_iface: Option<&binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>, _arg_iface_array_in: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>], _arg_iface_array_out: &mut Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>, _arg_iface_array_inout: &mut Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>, _arg_nullable_iface_array_in: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>]>, _arg_nullable_iface_array_out: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>, _arg_nullable_iface_array_inout: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>>;
+ async fn r#methodWithInterfaces(&self, _arg_iface: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>, _arg_nullable_iface: Option<&binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>, _arg_iface_array_in: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>], _arg_iface_array_out: &mut Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>, _arg_iface_array_inout: &mut Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>, _arg_nullable_iface_array_in: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>]>, _arg_nullable_iface_array_out: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>, _arg_nullable_iface_array_inout: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>>;
}
impl BnMyInterface {
/// Create a new async binder service.
@@ -155,8 +155,8 @@ pub mod IMyInterface {
T: IMyInterfaceAsyncServer + Send + Sync + 'static,
R: binder::binder_impl::BinderAsyncRuntime + Send + Sync + 'static,
{
- fn methodWithInterfaces(&self, _arg_iface: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>, _arg_nullable_iface: Option<&binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>, _arg_iface_array_in: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>], _arg_iface_array_out: &mut Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>, _arg_iface_array_inout: &mut Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>, _arg_nullable_iface_array_in: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>]>, _arg_nullable_iface_array_out: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>, _arg_nullable_iface_array_inout: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>> {
- self._rt.block_on(self._inner.methodWithInterfaces(_arg_iface, _arg_nullable_iface, _arg_iface_array_in, _arg_iface_array_out, _arg_iface_array_inout, _arg_nullable_iface_array_in, _arg_nullable_iface_array_out, _arg_nullable_iface_array_inout))
+ fn r#methodWithInterfaces(&self, _arg_iface: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>, _arg_nullable_iface: Option<&binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>, _arg_iface_array_in: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>], _arg_iface_array_out: &mut Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>, _arg_iface_array_inout: &mut Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>, _arg_nullable_iface_array_in: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>]>, _arg_nullable_iface_array_out: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>, _arg_nullable_iface_array_inout: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>> {
+ self._rt.block_on(self._inner.r#methodWithInterfaces(_arg_iface, _arg_nullable_iface, _arg_iface_array_in, _arg_iface_array_out, _arg_iface_array_inout, _arg_nullable_iface_array_in, _arg_nullable_iface_array_out, _arg_nullable_iface_array_inout))
}
}
let wrapped = Wrapper { _inner: inner, _rt: rt };
@@ -164,12 +164,12 @@ pub mod IMyInterface {
}
}
pub trait IMyInterfaceDefault: Send + Sync {
- fn methodWithInterfaces(&self, _arg_iface: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>, _arg_nullable_iface: Option<&binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>, _arg_iface_array_in: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>], _arg_iface_array_out: &mut Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>, _arg_iface_array_inout: &mut Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>, _arg_nullable_iface_array_in: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>]>, _arg_nullable_iface_array_out: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>, _arg_nullable_iface_array_inout: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>> {
+ fn r#methodWithInterfaces(&self, _arg_iface: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>, _arg_nullable_iface: Option<&binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>, _arg_iface_array_in: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>], _arg_iface_array_out: &mut Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>, _arg_iface_array_inout: &mut Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>, _arg_nullable_iface_array_in: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>]>, _arg_nullable_iface_array_out: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>, _arg_nullable_iface_array_inout: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
}
pub mod transactions {
- pub const methodWithInterfaces: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 0;
+ pub const r#methodWithInterfaces: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 0;
}
pub type IMyInterfaceDefaultRef = Option<std::sync::Arc<dyn IMyInterfaceDefault>>;
use lazy_static::lazy_static;
@@ -192,7 +192,7 @@ pub mod IMyInterface {
fn read_response_methodWithInterfaces(&self, _arg_iface: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>, _arg_nullable_iface: Option<&binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>, _arg_iface_array_in: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>], _arg_iface_array_out: &mut Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>, _arg_iface_array_inout: &mut Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>, _arg_nullable_iface_array_in: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>]>, _arg_nullable_iface_array_out: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>, _arg_nullable_iface_array_inout: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as IMyInterface>::getDefaultImpl() {
- return _aidl_default_impl.methodWithInterfaces(_arg_iface, _arg_nullable_iface, _arg_iface_array_in, _arg_iface_array_out, _arg_iface_array_inout, _arg_nullable_iface_array_in, _arg_nullable_iface_array_out, _arg_nullable_iface_array_inout);
+ return _aidl_default_impl.r#methodWithInterfaces(_arg_iface, _arg_nullable_iface, _arg_iface_array_in, _arg_iface_array_out, _arg_iface_array_inout, _arg_nullable_iface_array_in, _arg_nullable_iface_array_out, _arg_nullable_iface_array_inout);
}
}
let _aidl_reply = _aidl_reply?;
@@ -207,21 +207,21 @@ pub mod IMyInterface {
}
}
impl IMyInterface for BpMyInterface {
- fn methodWithInterfaces(&self, _arg_iface: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>, _arg_nullable_iface: Option<&binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>, _arg_iface_array_in: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>], _arg_iface_array_out: &mut Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>, _arg_iface_array_inout: &mut Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>, _arg_nullable_iface_array_in: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>]>, _arg_nullable_iface_array_out: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>, _arg_nullable_iface_array_inout: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>> {
+ fn r#methodWithInterfaces(&self, _arg_iface: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>, _arg_nullable_iface: Option<&binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>, _arg_iface_array_in: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>], _arg_iface_array_out: &mut Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>, _arg_iface_array_inout: &mut Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>, _arg_nullable_iface_array_in: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>]>, _arg_nullable_iface_array_out: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>, _arg_nullable_iface_array_inout: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>> {
let _aidl_data = self.build_parcel_methodWithInterfaces(_arg_iface, _arg_nullable_iface, _arg_iface_array_in, _arg_iface_array_out, _arg_iface_array_inout, _arg_nullable_iface_array_in, _arg_nullable_iface_array_out, _arg_nullable_iface_array_inout)?;
- let _aidl_reply = self.binder.submit_transact(transactions::methodWithInterfaces, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#methodWithInterfaces, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_methodWithInterfaces(_arg_iface, _arg_nullable_iface, _arg_iface_array_in, _arg_iface_array_out, _arg_iface_array_inout, _arg_nullable_iface_array_in, _arg_nullable_iface_array_out, _arg_nullable_iface_array_inout, _aidl_reply)
}
}
impl<P: binder::BinderAsyncPool> IMyInterfaceAsync<P> for BpMyInterface {
- fn methodWithInterfaces<'a>(&'a self, _arg_iface: &'a binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>, _arg_nullable_iface: Option<&'a binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>, _arg_iface_array_in: &'a [binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>], _arg_iface_array_out: &'a mut Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>, _arg_iface_array_inout: &'a mut Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>, _arg_nullable_iface_array_in: Option<&'a [Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>]>, _arg_nullable_iface_array_out: &'a mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>, _arg_nullable_iface_array_inout: &'a mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>>> {
+ fn r#methodWithInterfaces<'a>(&'a self, _arg_iface: &'a binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>, _arg_nullable_iface: Option<&'a binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>, _arg_iface_array_in: &'a [binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>], _arg_iface_array_out: &'a mut Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>, _arg_iface_array_inout: &'a mut Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>, _arg_nullable_iface_array_in: Option<&'a [Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>]>, _arg_nullable_iface_array_out: &'a mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>, _arg_nullable_iface_array_inout: &'a mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>>> {
let _aidl_data = match self.build_parcel_methodWithInterfaces(_arg_iface, _arg_nullable_iface, _arg_iface_array_in, _arg_iface_array_out, _arg_iface_array_inout, _arg_nullable_iface_array_in, _arg_nullable_iface_array_out, _arg_nullable_iface_array_inout) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::methodWithInterfaces, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#methodWithInterfaces, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_methodWithInterfaces(_arg_iface, _arg_nullable_iface, _arg_iface_array_in, _arg_iface_array_out, _arg_iface_array_inout, _arg_nullable_iface_array_in, _arg_nullable_iface_array_out, _arg_nullable_iface_array_inout, _aidl_reply)
}
@@ -229,11 +229,11 @@ pub mod IMyInterface {
}
}
impl IMyInterface for binder::binder_impl::Binder<BnMyInterface> {
- fn methodWithInterfaces(&self, _arg_iface: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>, _arg_nullable_iface: Option<&binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>, _arg_iface_array_in: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>], _arg_iface_array_out: &mut Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>, _arg_iface_array_inout: &mut Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>, _arg_nullable_iface_array_in: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>]>, _arg_nullable_iface_array_out: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>, _arg_nullable_iface_array_inout: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>> { self.0.methodWithInterfaces(_arg_iface, _arg_nullable_iface, _arg_iface_array_in, _arg_iface_array_out, _arg_iface_array_inout, _arg_nullable_iface_array_in, _arg_nullable_iface_array_out, _arg_nullable_iface_array_inout) }
+ fn r#methodWithInterfaces(&self, _arg_iface: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>, _arg_nullable_iface: Option<&binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>, _arg_iface_array_in: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>], _arg_iface_array_out: &mut Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>, _arg_iface_array_inout: &mut Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>, _arg_nullable_iface_array_in: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>]>, _arg_nullable_iface_array_out: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>, _arg_nullable_iface_array_inout: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>> { self.0.r#methodWithInterfaces(_arg_iface, _arg_nullable_iface, _arg_iface_array_in, _arg_iface_array_out, _arg_iface_array_inout, _arg_nullable_iface_array_in, _arg_nullable_iface_array_out, _arg_nullable_iface_array_inout) }
}
fn on_transact(_aidl_service: &dyn IMyInterface, _aidl_code: binder::binder_impl::TransactionCode, _aidl_data: &binder::binder_impl::BorrowedParcel<'_>, _aidl_reply: &mut binder::binder_impl::BorrowedParcel<'_>) -> std::result::Result<(), binder::StatusCode> {
match _aidl_code {
- transactions::methodWithInterfaces => {
+ transactions::r#methodWithInterfaces => {
let _arg_iface: binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface> = _aidl_data.read()?;
let _arg_nullable_iface: Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>> = _aidl_data.read()?;
let _arg_iface_array_in: Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>> = _aidl_data.read()?;
@@ -244,7 +244,7 @@ pub mod IMyInterface {
let mut _arg_nullable_iface_array_out: Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>> = Default::default();
_aidl_data.resize_nullable_out_vec(&mut _arg_nullable_iface_array_out)?;
let mut _arg_nullable_iface_array_inout: Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>> = _aidl_data.read()?;
- let _aidl_return = _aidl_service.methodWithInterfaces(&_arg_iface, _arg_nullable_iface.as_ref(), &_arg_iface_array_in, &mut _arg_iface_array_out, &mut _arg_iface_array_inout, _arg_nullable_iface_array_in.as_deref(), &mut _arg_nullable_iface_array_out, &mut _arg_nullable_iface_array_inout);
+ let _aidl_return = _aidl_service.r#methodWithInterfaces(&_arg_iface, _arg_nullable_iface.as_ref(), &_arg_iface_array_in, &mut _arg_iface_array_out, &mut _arg_iface_array_inout, _arg_nullable_iface_array_in.as_deref(), &mut _arg_nullable_iface_array_out, &mut _arg_nullable_iface_array_inout);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -262,73 +262,73 @@ pub mod IMyInterface {
}
}
}
-pub mod MyParcelable {
+pub mod r#MyParcelable {
#[derive(Debug)]
- pub struct MyParcelable {
- pub iface: Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>,
- pub nullable_iface: Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>,
- pub iface_array: Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>,
- pub nullable_iface_array: Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>,
+ pub struct r#MyParcelable {
+ pub r#iface: Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>,
+ pub r#nullable_iface: Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>,
+ pub r#iface_array: Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>,
+ pub r#nullable_iface_array: Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>,
}
- impl Default for MyParcelable {
+ impl Default for r#MyParcelable {
fn default() -> Self {
Self {
- iface: Default::default(),
- nullable_iface: Default::default(),
- iface_array: Default::default(),
- nullable_iface_array: Default::default(),
+ r#iface: Default::default(),
+ r#nullable_iface: Default::default(),
+ r#iface_array: Default::default(),
+ r#nullable_iface_array: Default::default(),
}
}
}
- impl binder::Parcelable for MyParcelable {
+ impl binder::Parcelable for r#MyParcelable {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_write(|subparcel| {
- let __field_ref = self.iface.as_ref().ok_or(binder::StatusCode::UNEXPECTED_NULL)?;
+ let __field_ref = self.r#iface.as_ref().ok_or(binder::StatusCode::UNEXPECTED_NULL)?;
subparcel.write(__field_ref)?;
- subparcel.write(&self.nullable_iface)?;
- subparcel.write(&self.iface_array)?;
- subparcel.write(&self.nullable_iface_array)?;
+ subparcel.write(&self.r#nullable_iface)?;
+ subparcel.write(&self.r#iface_array)?;
+ subparcel.write(&self.r#nullable_iface_array)?;
Ok(())
})
}
fn read_from_parcel(&mut self, parcel: &binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_read(|subparcel| {
if subparcel.has_more_data() {
- self.iface = Some(subparcel.read()?);
+ self.r#iface = Some(subparcel.read()?);
}
if subparcel.has_more_data() {
- self.nullable_iface = subparcel.read()?;
+ self.r#nullable_iface = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.iface_array = subparcel.read()?;
+ self.r#iface_array = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.nullable_iface_array = subparcel.read()?;
+ self.r#nullable_iface_array = subparcel.read()?;
}
Ok(())
})
}
}
- binder::impl_serialize_for_parcelable!(MyParcelable);
- binder::impl_deserialize_for_parcelable!(MyParcelable);
- impl binder::binder_impl::ParcelableMetadata for MyParcelable {
+ binder::impl_serialize_for_parcelable!(r#MyParcelable);
+ binder::impl_deserialize_for_parcelable!(r#MyParcelable);
+ impl binder::binder_impl::ParcelableMetadata for r#MyParcelable {
fn get_descriptor() -> &'static str { "android.aidl.tests.ArrayOfInterfaces.MyParcelable" }
}
}
-pub mod MyUnion {
+pub mod r#MyUnion {
#[derive(Debug)]
- pub enum MyUnion {
+ pub enum r#MyUnion {
Iface(Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>),
Nullable_iface(Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>),
Iface_array(Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>),
Nullable_iface_array(Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface>>>>),
}
- impl Default for MyUnion {
+ impl Default for r#MyUnion {
fn default() -> Self {
Self::Iface(Default::default())
}
}
- impl binder::Parcelable for MyUnion {
+ impl binder::Parcelable for r#MyUnion {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
match self {
Self::Iface(v) => {
@@ -379,29 +379,29 @@ pub mod MyUnion {
}
}
}
- binder::impl_serialize_for_parcelable!(MyUnion);
- binder::impl_deserialize_for_parcelable!(MyUnion);
- impl binder::binder_impl::ParcelableMetadata for MyUnion {
+ binder::impl_serialize_for_parcelable!(r#MyUnion);
+ binder::impl_deserialize_for_parcelable!(r#MyUnion);
+ impl binder::binder_impl::ParcelableMetadata for r#MyUnion {
fn get_descriptor() -> &'static str { "android.aidl.tests.ArrayOfInterfaces.MyUnion" }
}
- pub mod Tag {
+ pub mod r#Tag {
#![allow(non_upper_case_globals)]
use binder::declare_binder_enum;
declare_binder_enum! {
- Tag : [i32; 4] {
- iface = 0,
- nullable_iface = 1,
- iface_array = 2,
- nullable_iface_array = 3,
+ r#Tag : [i32; 4] {
+ r#iface = 0,
+ r#nullable_iface = 1,
+ r#iface_array = 2,
+ r#nullable_iface_array = 3,
}
}
}
}
pub(crate) mod mangled {
- pub use super::ArrayOfInterfaces as _7_android_4_aidl_5_tests_17_ArrayOfInterfaces;
- pub use super::IEmptyInterface::IEmptyInterface as _7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface;
- pub use super::IMyInterface::IMyInterface as _7_android_4_aidl_5_tests_17_ArrayOfInterfaces_12_IMyInterface;
- pub use super::MyParcelable::MyParcelable as _7_android_4_aidl_5_tests_17_ArrayOfInterfaces_12_MyParcelable;
- pub use super::MyUnion::MyUnion as _7_android_4_aidl_5_tests_17_ArrayOfInterfaces_7_MyUnion;
- pub use super::MyUnion::Tag::Tag as _7_android_4_aidl_5_tests_17_ArrayOfInterfaces_7_MyUnion_3_Tag;
+ pub use super::r#ArrayOfInterfaces as _7_android_4_aidl_5_tests_17_ArrayOfInterfaces;
+ pub use super::r#IEmptyInterface::r#IEmptyInterface as _7_android_4_aidl_5_tests_17_ArrayOfInterfaces_15_IEmptyInterface;
+ pub use super::r#IMyInterface::r#IMyInterface as _7_android_4_aidl_5_tests_17_ArrayOfInterfaces_12_IMyInterface;
+ pub use super::r#MyParcelable::r#MyParcelable as _7_android_4_aidl_5_tests_17_ArrayOfInterfaces_12_MyParcelable;
+ pub use super::r#MyUnion::r#MyUnion as _7_android_4_aidl_5_tests_17_ArrayOfInterfaces_7_MyUnion;
+ pub use super::r#MyUnion::r#Tag::r#Tag as _7_android_4_aidl_5_tests_17_ArrayOfInterfaces_7_MyUnion_3_Tag;
}
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/BackendType.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/BackendType.rs
index 7f4be564..30160f75 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/BackendType.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/BackendType.rs
@@ -3,13 +3,13 @@
#![allow(non_upper_case_globals)]
use binder::declare_binder_enum;
declare_binder_enum! {
- BackendType : [i8; 4] {
- CPP = 0,
- JAVA = 1,
- NDK = 2,
- RUST = 3,
+ r#BackendType : [i8; 4] {
+ r#CPP = 0,
+ r#JAVA = 1,
+ r#NDK = 2,
+ r#RUST = 3,
}
}
pub(crate) mod mangled {
- pub use super::BackendType as _7_android_4_aidl_5_tests_11_BackendType;
+ pub use super::r#BackendType as _7_android_4_aidl_5_tests_11_BackendType;
}
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ByteEnum.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ByteEnum.rs
index 57c61eed..f7926cbe 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ByteEnum.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ByteEnum.rs
@@ -3,12 +3,12 @@
#![allow(non_upper_case_globals)]
use binder::declare_binder_enum;
declare_binder_enum! {
- ByteEnum : [i8; 3] {
- FOO = 1,
- BAR = 2,
- BAZ = 3,
+ r#ByteEnum : [i8; 3] {
+ r#FOO = 1,
+ r#BAR = 2,
+ r#BAZ = 3,
}
}
pub(crate) mod mangled {
- pub use super::ByteEnum as _7_android_4_aidl_5_tests_8_ByteEnum;
+ pub use super::r#ByteEnum as _7_android_4_aidl_5_tests_8_ByteEnum;
}
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/CircularParcelable.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/CircularParcelable.rs
new file mode 100644
index 00000000..89bcb37a
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/CircularParcelable.rs
@@ -0,0 +1,37 @@
+#![forbid(unsafe_code)]
+#![rustfmt::skip]
+#[derive(Debug)]
+pub struct r#CircularParcelable {
+ pub r#testService: Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_12_ITestService>>,
+}
+impl Default for r#CircularParcelable {
+ fn default() -> Self {
+ Self {
+ r#testService: Default::default(),
+ }
+ }
+}
+impl binder::Parcelable for r#CircularParcelable {
+ fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
+ parcel.sized_write(|subparcel| {
+ subparcel.write(&self.r#testService)?;
+ Ok(())
+ })
+ }
+ fn read_from_parcel(&mut self, parcel: &binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
+ parcel.sized_read(|subparcel| {
+ if subparcel.has_more_data() {
+ self.r#testService = subparcel.read()?;
+ }
+ Ok(())
+ })
+ }
+}
+binder::impl_serialize_for_parcelable!(r#CircularParcelable);
+binder::impl_deserialize_for_parcelable!(r#CircularParcelable);
+impl binder::binder_impl::ParcelableMetadata for r#CircularParcelable {
+ fn get_descriptor() -> &'static str { "android.aidl.tests.CircularParcelable" }
+}
+pub(crate) mod mangled {
+ pub use super::r#CircularParcelable as _7_android_4_aidl_5_tests_18_CircularParcelable;
+}
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/CircularParcelable.rs.d b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/CircularParcelable.rs.d
new file mode 100644
index 00000000..f0318082
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/CircularParcelable.rs.d
@@ -0,0 +1,16 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-rust-source/gen/android/aidl/tests/CircularParcelable.rs : \
+ system/tools/aidl/tests/android/aidl/tests/CircularParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ITestService.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ByteEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/IntEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/LongEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/INamedCallback.aidl \
+ system/tools/aidl/tests/android/aidl/tests/StructuredParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/extension/ExtendableParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/RecursiveList.aidl \
+ system/tools/aidl/tests/android/aidl/tests/IOldName.aidl \
+ system/tools/aidl/tests/android/aidl/tests/INewName.aidl \
+ system/tools/aidl/tests/android/aidl/tests/Union.aidl \
+ system/tools/aidl/tests/android/aidl/tests/BackendType.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ICircular.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ConstantExpressionEnum.aidl
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ConstantExpressionEnum.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ConstantExpressionEnum.rs
index 32a19426..eac40f11 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ConstantExpressionEnum.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ConstantExpressionEnum.rs
@@ -3,19 +3,19 @@
#![allow(non_upper_case_globals)]
use binder::declare_binder_enum;
declare_binder_enum! {
- ConstantExpressionEnum : [i32; 10] {
- decInt32_1 = 1,
- decInt32_2 = 1,
- decInt64_1 = 1,
- decInt64_2 = 1,
- decInt64_3 = 1,
- decInt64_4 = 1,
- hexInt32_1 = 1,
- hexInt32_2 = 1,
- hexInt32_3 = 1,
- hexInt64_1 = 1,
+ r#ConstantExpressionEnum : [i32; 10] {
+ r#decInt32_1 = 1,
+ r#decInt32_2 = 1,
+ r#decInt64_1 = 1,
+ r#decInt64_2 = 1,
+ r#decInt64_3 = 1,
+ r#decInt64_4 = 1,
+ r#hexInt32_1 = 1,
+ r#hexInt32_2 = 1,
+ r#hexInt32_3 = 1,
+ r#hexInt64_1 = 1,
}
}
pub(crate) mod mangled {
- pub use super::ConstantExpressionEnum as _7_android_4_aidl_5_tests_22_ConstantExpressionEnum;
+ pub use super::r#ConstantExpressionEnum as _7_android_4_aidl_5_tests_22_ConstantExpressionEnum;
}
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/DeprecatedEnum.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/DeprecatedEnum.rs
index 5d3b054f..e3e4c232 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/DeprecatedEnum.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/DeprecatedEnum.rs
@@ -4,12 +4,12 @@
use binder::declare_binder_enum;
declare_binder_enum! {
#[deprecated = "test"]
- DeprecatedEnum : [i32; 3] {
- A = 0,
- B = 1,
- C = 2,
+ r#DeprecatedEnum : [i32; 3] {
+ r#A = 0,
+ r#B = 1,
+ r#C = 2,
}
}
pub(crate) mod mangled {
- pub use super::DeprecatedEnum as _7_android_4_aidl_5_tests_14_DeprecatedEnum;
+ pub use super::r#DeprecatedEnum as _7_android_4_aidl_5_tests_14_DeprecatedEnum;
}
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/DeprecatedParcelable.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/DeprecatedParcelable.rs
index a13deb67..621f5f6b 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/DeprecatedParcelable.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/DeprecatedParcelable.rs
@@ -2,15 +2,15 @@
#![rustfmt::skip]
#[derive(Debug)]
#[deprecated = "test"]
-pub struct DeprecatedParcelable {
+pub struct r#DeprecatedParcelable {
}
-impl Default for DeprecatedParcelable {
+impl Default for r#DeprecatedParcelable {
fn default() -> Self {
Self {
}
}
}
-impl binder::Parcelable for DeprecatedParcelable {
+impl binder::Parcelable for r#DeprecatedParcelable {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_write(|subparcel| {
Ok(())
@@ -22,11 +22,11 @@ impl binder::Parcelable for DeprecatedParcelable {
})
}
}
-binder::impl_serialize_for_parcelable!(DeprecatedParcelable);
-binder::impl_deserialize_for_parcelable!(DeprecatedParcelable);
-impl binder::binder_impl::ParcelableMetadata for DeprecatedParcelable {
+binder::impl_serialize_for_parcelable!(r#DeprecatedParcelable);
+binder::impl_deserialize_for_parcelable!(r#DeprecatedParcelable);
+impl binder::binder_impl::ParcelableMetadata for r#DeprecatedParcelable {
fn get_descriptor() -> &'static str { "android.aidl.tests.DeprecatedParcelable" }
}
pub(crate) mod mangled {
- pub use super::DeprecatedParcelable as _7_android_4_aidl_5_tests_20_DeprecatedParcelable;
+ pub use super::r#DeprecatedParcelable as _7_android_4_aidl_5_tests_20_DeprecatedParcelable;
}
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/FixedSize.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/FixedSize.rs
index 2ea4430b..cd73b70d 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/FixedSize.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/FixedSize.rs
@@ -1,15 +1,15 @@
#![forbid(unsafe_code)]
#![rustfmt::skip]
#[derive(Debug)]
-pub struct FixedSize {
+pub struct r#FixedSize {
}
-impl Default for FixedSize {
+impl Default for r#FixedSize {
fn default() -> Self {
Self {
}
}
}
-impl binder::Parcelable for FixedSize {
+impl binder::Parcelable for r#FixedSize {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_write(|subparcel| {
Ok(())
@@ -21,96 +21,96 @@ impl binder::Parcelable for FixedSize {
})
}
}
-binder::impl_serialize_for_parcelable!(FixedSize);
-binder::impl_deserialize_for_parcelable!(FixedSize);
-impl binder::binder_impl::ParcelableMetadata for FixedSize {
+binder::impl_serialize_for_parcelable!(r#FixedSize);
+binder::impl_deserialize_for_parcelable!(r#FixedSize);
+impl binder::binder_impl::ParcelableMetadata for r#FixedSize {
fn get_descriptor() -> &'static str { "android.aidl.tests.FixedSize" }
}
-pub mod FixedParcelable {
+pub mod r#FixedParcelable {
#[derive(Debug)]
- pub struct FixedParcelable {
- pub booleanValue: bool,
- pub byteValue: i8,
- pub charValue: u16,
- pub intValue: i32,
- pub longValue: i64,
- pub floatValue: f32,
- pub doubleValue: f64,
- pub enumValue: crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum,
- pub parcelableValue: crate::mangled::_7_android_4_aidl_5_tests_9_FixedSize_10_FixedUnion,
+ pub struct r#FixedParcelable {
+ pub r#booleanValue: bool,
+ pub r#byteValue: i8,
+ pub r#charValue: u16,
+ pub r#intValue: i32,
+ pub r#longValue: i64,
+ pub r#floatValue: f32,
+ pub r#doubleValue: f64,
+ pub r#enumValue: crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum,
+ pub r#parcelableValue: crate::mangled::_7_android_4_aidl_5_tests_9_FixedSize_10_FixedUnion,
}
- impl Default for FixedParcelable {
+ impl Default for r#FixedParcelable {
fn default() -> Self {
Self {
- booleanValue: false,
- byteValue: 0,
- charValue: '\0' as u16,
- intValue: 0,
- longValue: 0,
- floatValue: 0.000000f32,
- doubleValue: 0.000000f64,
- enumValue: crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum::FOO,
- parcelableValue: Default::default(),
+ r#booleanValue: false,
+ r#byteValue: 0,
+ r#charValue: '\0' as u16,
+ r#intValue: 0,
+ r#longValue: 0,
+ r#floatValue: 0.000000f32,
+ r#doubleValue: 0.000000f64,
+ r#enumValue: crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum::FOO,
+ r#parcelableValue: Default::default(),
}
}
}
- impl binder::Parcelable for FixedParcelable {
+ impl binder::Parcelable for r#FixedParcelable {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_write(|subparcel| {
- subparcel.write(&self.booleanValue)?;
- subparcel.write(&self.byteValue)?;
- subparcel.write(&self.charValue)?;
- subparcel.write(&self.intValue)?;
- subparcel.write(&self.longValue)?;
- subparcel.write(&self.floatValue)?;
- subparcel.write(&self.doubleValue)?;
- subparcel.write(&self.enumValue)?;
- subparcel.write(&self.parcelableValue)?;
+ subparcel.write(&self.r#booleanValue)?;
+ subparcel.write(&self.r#byteValue)?;
+ subparcel.write(&self.r#charValue)?;
+ subparcel.write(&self.r#intValue)?;
+ subparcel.write(&self.r#longValue)?;
+ subparcel.write(&self.r#floatValue)?;
+ subparcel.write(&self.r#doubleValue)?;
+ subparcel.write(&self.r#enumValue)?;
+ subparcel.write(&self.r#parcelableValue)?;
Ok(())
})
}
fn read_from_parcel(&mut self, parcel: &binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_read(|subparcel| {
if subparcel.has_more_data() {
- self.booleanValue = subparcel.read()?;
+ self.r#booleanValue = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.byteValue = subparcel.read()?;
+ self.r#byteValue = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.charValue = subparcel.read()?;
+ self.r#charValue = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.intValue = subparcel.read()?;
+ self.r#intValue = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.longValue = subparcel.read()?;
+ self.r#longValue = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.floatValue = subparcel.read()?;
+ self.r#floatValue = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.doubleValue = subparcel.read()?;
+ self.r#doubleValue = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.enumValue = subparcel.read()?;
+ self.r#enumValue = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.parcelableValue = subparcel.read()?;
+ self.r#parcelableValue = subparcel.read()?;
}
Ok(())
})
}
}
- binder::impl_serialize_for_parcelable!(FixedParcelable);
- binder::impl_deserialize_for_parcelable!(FixedParcelable);
- impl binder::binder_impl::ParcelableMetadata for FixedParcelable {
+ binder::impl_serialize_for_parcelable!(r#FixedParcelable);
+ binder::impl_deserialize_for_parcelable!(r#FixedParcelable);
+ impl binder::binder_impl::ParcelableMetadata for r#FixedParcelable {
fn get_descriptor() -> &'static str { "android.aidl.tests.FixedSize.FixedParcelable" }
}
}
-pub mod FixedUnion {
+pub mod r#FixedUnion {
#[derive(Debug)]
- pub enum FixedUnion {
+ pub enum r#FixedUnion {
BooleanValue(bool),
ByteValue(i8),
CharValue(u16),
@@ -120,12 +120,12 @@ pub mod FixedUnion {
DoubleValue(f64),
EnumValue(crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum),
}
- impl Default for FixedUnion {
+ impl Default for r#FixedUnion {
fn default() -> Self {
Self::BooleanValue(false)
}
}
- impl binder::Parcelable for FixedUnion {
+ impl binder::Parcelable for r#FixedUnion {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
match self {
Self::BooleanValue(v) => {
@@ -211,31 +211,31 @@ pub mod FixedUnion {
}
}
}
- binder::impl_serialize_for_parcelable!(FixedUnion);
- binder::impl_deserialize_for_parcelable!(FixedUnion);
- impl binder::binder_impl::ParcelableMetadata for FixedUnion {
+ binder::impl_serialize_for_parcelable!(r#FixedUnion);
+ binder::impl_deserialize_for_parcelable!(r#FixedUnion);
+ impl binder::binder_impl::ParcelableMetadata for r#FixedUnion {
fn get_descriptor() -> &'static str { "android.aidl.tests.FixedSize.FixedUnion" }
}
- pub mod Tag {
+ pub mod r#Tag {
#![allow(non_upper_case_globals)]
use binder::declare_binder_enum;
declare_binder_enum! {
- Tag : [i8; 8] {
- booleanValue = 0,
- byteValue = 1,
- charValue = 2,
- intValue = 3,
- longValue = 4,
- floatValue = 5,
- doubleValue = 6,
- enumValue = 7,
+ r#Tag : [i8; 8] {
+ r#booleanValue = 0,
+ r#byteValue = 1,
+ r#charValue = 2,
+ r#intValue = 3,
+ r#longValue = 4,
+ r#floatValue = 5,
+ r#doubleValue = 6,
+ r#enumValue = 7,
}
}
}
}
pub(crate) mod mangled {
- pub use super::FixedSize as _7_android_4_aidl_5_tests_9_FixedSize;
- pub use super::FixedParcelable::FixedParcelable as _7_android_4_aidl_5_tests_9_FixedSize_15_FixedParcelable;
- pub use super::FixedUnion::FixedUnion as _7_android_4_aidl_5_tests_9_FixedSize_10_FixedUnion;
- pub use super::FixedUnion::Tag::Tag as _7_android_4_aidl_5_tests_9_FixedSize_10_FixedUnion_3_Tag;
+ pub use super::r#FixedSize as _7_android_4_aidl_5_tests_9_FixedSize;
+ pub use super::r#FixedParcelable::r#FixedParcelable as _7_android_4_aidl_5_tests_9_FixedSize_15_FixedParcelable;
+ pub use super::r#FixedUnion::r#FixedUnion as _7_android_4_aidl_5_tests_9_FixedSize_10_FixedUnion;
+ pub use super::r#FixedUnion::r#Tag::r#Tag as _7_android_4_aidl_5_tests_9_FixedSize_10_FixedUnion_3_Tag;
}
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/GenericStructuredParcelable.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/GenericStructuredParcelable.rs
index 2729f519..9323b155 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/GenericStructuredParcelable.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/GenericStructuredParcelable.rs
@@ -1,43 +1,49 @@
#![forbid(unsafe_code)]
#![rustfmt::skip]
-#[derive(Debug)]
-pub struct GenericStructuredParcelable {
- pub a: i32,
- pub b: i32,
+#[derive(Debug, Clone, Copy, Eq, PartialEq)]
+pub struct r#GenericStructuredParcelable<T,U,B,> {
+ pub r#a: i32,
+ pub r#b: i32,
+ _phantom_B: std::marker::PhantomData<B>,
+ _phantom_T: std::marker::PhantomData<T>,
+ _phantom_U: std::marker::PhantomData<U>,
}
-impl Default for GenericStructuredParcelable {
+impl<T: Default,U: Default,B: Default,> Default for r#GenericStructuredParcelable<T,U,B,> {
fn default() -> Self {
Self {
- a: 0,
- b: 0,
+ r#a: 0,
+ r#b: 0,
+ r#_phantom_B: Default::default(),
+ r#_phantom_T: Default::default(),
+ r#_phantom_U: Default::default(),
}
}
}
-impl binder::Parcelable for GenericStructuredParcelable {
+impl<T,U,B,> binder::Parcelable for r#GenericStructuredParcelable<T,U,B,> {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_write(|subparcel| {
- subparcel.write(&self.a)?;
- subparcel.write(&self.b)?;
+ subparcel.write(&self.r#a)?;
+ subparcel.write(&self.r#b)?;
Ok(())
})
}
fn read_from_parcel(&mut self, parcel: &binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_read(|subparcel| {
if subparcel.has_more_data() {
- self.a = subparcel.read()?;
+ self.r#a = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.b = subparcel.read()?;
+ self.r#b = subparcel.read()?;
}
Ok(())
})
}
}
-binder::impl_serialize_for_parcelable!(GenericStructuredParcelable);
-binder::impl_deserialize_for_parcelable!(GenericStructuredParcelable);
-impl binder::binder_impl::ParcelableMetadata for GenericStructuredParcelable {
+binder::impl_serialize_for_parcelable!(r#GenericStructuredParcelable<T,U,B,>);
+binder::impl_deserialize_for_parcelable!(r#GenericStructuredParcelable<T,U,B,>);
+impl<T,U,B,> binder::binder_impl::ParcelableMetadata for r#GenericStructuredParcelable<T,U,B,> {
fn get_descriptor() -> &'static str { "android.aidl.tests.GenericStructuredParcelable" }
}
pub(crate) mod mangled {
- pub use super::GenericStructuredParcelable as _7_android_4_aidl_5_tests_27_GenericStructuredParcelable;
+ pub use super::r#GenericStructuredParcelable as _7_android_4_aidl_5_tests_27_GenericStructuredParcelable;
}
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ICircular.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ICircular.rs
new file mode 100644
index 00000000..b6b55bda
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ICircular.rs
@@ -0,0 +1,136 @@
+#![forbid(unsafe_code)]
+#![rustfmt::skip]
+#![allow(non_upper_case_globals)]
+#![allow(non_snake_case)]
+#[allow(unused_imports)] use binder::binder_impl::IBinderInternal;
+use binder::declare_binder_interface;
+declare_binder_interface! {
+ ICircular["android.aidl.tests.ICircular"] {
+ native: BnCircular(on_transact),
+ proxy: BpCircular {
+ },
+ async: ICircularAsync,
+ }
+}
+pub trait ICircular: binder::Interface + Send {
+ fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.ICircular" }
+ fn r#GetTestService(&self) -> binder::Result<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_12_ITestService>>>;
+ fn getDefaultImpl() -> ICircularDefaultRef where Self: Sized {
+ DEFAULT_IMPL.lock().unwrap().clone()
+ }
+ fn setDefaultImpl(d: ICircularDefaultRef) -> ICircularDefaultRef where Self: Sized {
+ std::mem::replace(&mut *DEFAULT_IMPL.lock().unwrap(), d)
+ }
+}
+pub trait ICircularAsync<P>: binder::Interface + Send {
+ fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.ICircular" }
+ fn r#GetTestService<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_12_ITestService>>>>;
+}
+#[::async_trait::async_trait]
+pub trait ICircularAsyncServer: binder::Interface + Send {
+ fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.ICircular" }
+ async fn r#GetTestService(&self) -> binder::Result<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_12_ITestService>>>;
+}
+impl BnCircular {
+ /// Create a new async binder service.
+ pub fn new_async_binder<T, R>(inner: T, rt: R, features: binder::BinderFeatures) -> binder::Strong<dyn ICircular>
+ where
+ T: ICircularAsyncServer + binder::Interface + Send + Sync + 'static,
+ R: binder::binder_impl::BinderAsyncRuntime + Send + Sync + 'static,
+ {
+ struct Wrapper<T, R> {
+ _inner: T,
+ _rt: R,
+ }
+ impl<T, R> binder::Interface for Wrapper<T, R> where T: binder::Interface, R: Send + Sync {
+ fn as_binder(&self) -> binder::SpIBinder { self._inner.as_binder() }
+ fn dump(&self, _file: &std::fs::File, _args: &[&std::ffi::CStr]) -> std::result::Result<(), binder::StatusCode> { self._inner.dump(_file, _args) }
+ }
+ impl<T, R> ICircular for Wrapper<T, R>
+ where
+ T: ICircularAsyncServer + Send + Sync + 'static,
+ R: binder::binder_impl::BinderAsyncRuntime + Send + Sync + 'static,
+ {
+ fn r#GetTestService(&self) -> binder::Result<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_12_ITestService>>> {
+ self._rt.block_on(self._inner.r#GetTestService())
+ }
+ }
+ let wrapped = Wrapper { _inner: inner, _rt: rt };
+ Self::new_binder(wrapped, features)
+ }
+}
+pub trait ICircularDefault: Send + Sync {
+ fn r#GetTestService(&self) -> binder::Result<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_12_ITestService>>> {
+ Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
+ }
+}
+pub mod transactions {
+ pub const r#GetTestService: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 0;
+}
+pub type ICircularDefaultRef = Option<std::sync::Arc<dyn ICircularDefault>>;
+use lazy_static::lazy_static;
+lazy_static! {
+ static ref DEFAULT_IMPL: std::sync::Mutex<ICircularDefaultRef> = std::sync::Mutex::new(None);
+}
+impl BpCircular {
+ fn build_parcel_GetTestService(&self) -> binder::Result<binder::binder_impl::Parcel> {
+ let mut aidl_data = self.binder.prepare_transact()?;
+ Ok(aidl_data)
+ }
+ fn read_response_GetTestService(&self, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_12_ITestService>>> {
+ if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
+ if let Some(_aidl_default_impl) = <Self as ICircular>::getDefaultImpl() {
+ return _aidl_default_impl.r#GetTestService();
+ }
+ }
+ let _aidl_reply = _aidl_reply?;
+ let _aidl_status: binder::Status = _aidl_reply.read()?;
+ if !_aidl_status.is_ok() { return Err(_aidl_status); }
+ let _aidl_return: Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_12_ITestService>> = _aidl_reply.read()?;
+ Ok(_aidl_return)
+ }
+}
+impl ICircular for BpCircular {
+ fn r#GetTestService(&self) -> binder::Result<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_12_ITestService>>> {
+ let _aidl_data = self.build_parcel_GetTestService()?;
+ let _aidl_reply = self.binder.submit_transact(transactions::r#GetTestService, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ self.read_response_GetTestService(_aidl_reply)
+ }
+}
+impl<P: binder::BinderAsyncPool> ICircularAsync<P> for BpCircular {
+ fn r#GetTestService<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_12_ITestService>>>> {
+ let _aidl_data = match self.build_parcel_GetTestService() {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::r#GetTestService, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_GetTestService(_aidl_reply)
+ }
+ )
+ }
+}
+impl ICircular for binder::binder_impl::Binder<BnCircular> {
+ fn r#GetTestService(&self) -> binder::Result<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_12_ITestService>>> { self.0.r#GetTestService() }
+}
+fn on_transact(_aidl_service: &dyn ICircular, _aidl_code: binder::binder_impl::TransactionCode, _aidl_data: &binder::binder_impl::BorrowedParcel<'_>, _aidl_reply: &mut binder::binder_impl::BorrowedParcel<'_>) -> std::result::Result<(), binder::StatusCode> {
+ match _aidl_code {
+ transactions::r#GetTestService => {
+ let _aidl_return = _aidl_service.r#GetTestService();
+ match &_aidl_return {
+ Ok(_aidl_return) => {
+ _aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
+ _aidl_reply.write(_aidl_return)?;
+ }
+ Err(_aidl_status) => _aidl_reply.write(_aidl_status)?
+ }
+ Ok(())
+ }
+ _ => Err(binder::StatusCode::UNKNOWN_TRANSACTION)
+ }
+}
+pub(crate) mod mangled {
+ pub use super::r#ICircular as _7_android_4_aidl_5_tests_9_ICircular;
+}
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ICircular.rs.d b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ICircular.rs.d
new file mode 100644
index 00000000..22373374
--- /dev/null
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ICircular.rs.d
@@ -0,0 +1,16 @@
+out/soong/.intermediates/system/tools/aidl/aidl-test-interface-rust-source/gen/android/aidl/tests/ICircular.rs : \
+ system/tools/aidl/tests/android/aidl/tests/ICircular.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ITestService.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ByteEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/IntEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/LongEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/INamedCallback.aidl \
+ system/tools/aidl/tests/android/aidl/tests/StructuredParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/extension/ExtendableParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/RecursiveList.aidl \
+ system/tools/aidl/tests/android/aidl/tests/IOldName.aidl \
+ system/tools/aidl/tests/android/aidl/tests/INewName.aidl \
+ system/tools/aidl/tests/android/aidl/tests/Union.aidl \
+ system/tools/aidl/tests/android/aidl/tests/BackendType.aidl \
+ system/tools/aidl/tests/android/aidl/tests/CircularParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ConstantExpressionEnum.aidl
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/IDeprecated.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/IDeprecated.rs
index 599a651f..5e67e1b2 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/IDeprecated.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/IDeprecated.rs
@@ -79,5 +79,5 @@ fn on_transact(_aidl_service: &dyn IDeprecated, _aidl_code: binder::binder_impl:
}
}
pub(crate) mod mangled {
- pub use super::IDeprecated as _7_android_4_aidl_5_tests_11_IDeprecated;
+ pub use super::r#IDeprecated as _7_android_4_aidl_5_tests_11_IDeprecated;
}
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/INamedCallback.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/INamedCallback.rs
index 49ae5846..9ba10f04 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/INamedCallback.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/INamedCallback.rs
@@ -14,7 +14,7 @@ declare_binder_interface! {
}
pub trait INamedCallback: binder::Interface + Send {
fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.INamedCallback" }
- fn GetName(&self) -> binder::Result<String>;
+ fn r#GetName(&self) -> binder::Result<String>;
fn getDefaultImpl() -> INamedCallbackDefaultRef where Self: Sized {
DEFAULT_IMPL.lock().unwrap().clone()
}
@@ -24,12 +24,12 @@ pub trait INamedCallback: binder::Interface + Send {
}
pub trait INamedCallbackAsync<P>: binder::Interface + Send {
fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.INamedCallback" }
- fn GetName<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<String>>;
+ fn r#GetName<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<String>>;
}
#[::async_trait::async_trait]
pub trait INamedCallbackAsyncServer: binder::Interface + Send {
fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.INamedCallback" }
- async fn GetName(&self) -> binder::Result<String>;
+ async fn r#GetName(&self) -> binder::Result<String>;
}
impl BnNamedCallback {
/// Create a new async binder service.
@@ -51,8 +51,8 @@ impl BnNamedCallback {
T: INamedCallbackAsyncServer + Send + Sync + 'static,
R: binder::binder_impl::BinderAsyncRuntime + Send + Sync + 'static,
{
- fn GetName(&self) -> binder::Result<String> {
- self._rt.block_on(self._inner.GetName())
+ fn r#GetName(&self) -> binder::Result<String> {
+ self._rt.block_on(self._inner.r#GetName())
}
}
let wrapped = Wrapper { _inner: inner, _rt: rt };
@@ -60,12 +60,12 @@ impl BnNamedCallback {
}
}
pub trait INamedCallbackDefault: Send + Sync {
- fn GetName(&self) -> binder::Result<String> {
+ fn r#GetName(&self) -> binder::Result<String> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
}
pub mod transactions {
- pub const GetName: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 0;
+ pub const r#GetName: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 0;
}
pub type INamedCallbackDefaultRef = Option<std::sync::Arc<dyn INamedCallbackDefault>>;
use lazy_static::lazy_static;
@@ -80,7 +80,7 @@ impl BpNamedCallback {
fn read_response_GetName(&self, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<String> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as INamedCallback>::getDefaultImpl() {
- return _aidl_default_impl.GetName();
+ return _aidl_default_impl.r#GetName();
}
}
let _aidl_reply = _aidl_reply?;
@@ -91,21 +91,21 @@ impl BpNamedCallback {
}
}
impl INamedCallback for BpNamedCallback {
- fn GetName(&self) -> binder::Result<String> {
+ fn r#GetName(&self) -> binder::Result<String> {
let _aidl_data = self.build_parcel_GetName()?;
- let _aidl_reply = self.binder.submit_transact(transactions::GetName, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#GetName, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_GetName(_aidl_reply)
}
}
impl<P: binder::BinderAsyncPool> INamedCallbackAsync<P> for BpNamedCallback {
- fn GetName<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<String>> {
+ fn r#GetName<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<String>> {
let _aidl_data = match self.build_parcel_GetName() {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::GetName, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#GetName, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_GetName(_aidl_reply)
}
@@ -113,12 +113,12 @@ impl<P: binder::BinderAsyncPool> INamedCallbackAsync<P> for BpNamedCallback {
}
}
impl INamedCallback for binder::binder_impl::Binder<BnNamedCallback> {
- fn GetName(&self) -> binder::Result<String> { self.0.GetName() }
+ fn r#GetName(&self) -> binder::Result<String> { self.0.r#GetName() }
}
fn on_transact(_aidl_service: &dyn INamedCallback, _aidl_code: binder::binder_impl::TransactionCode, _aidl_data: &binder::binder_impl::BorrowedParcel<'_>, _aidl_reply: &mut binder::binder_impl::BorrowedParcel<'_>) -> std::result::Result<(), binder::StatusCode> {
match _aidl_code {
- transactions::GetName => {
- let _aidl_return = _aidl_service.GetName();
+ transactions::r#GetName => {
+ let _aidl_return = _aidl_service.r#GetName();
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -132,5 +132,5 @@ fn on_transact(_aidl_service: &dyn INamedCallback, _aidl_code: binder::binder_im
}
}
pub(crate) mod mangled {
- pub use super::INamedCallback as _7_android_4_aidl_5_tests_14_INamedCallback;
+ pub use super::r#INamedCallback as _7_android_4_aidl_5_tests_14_INamedCallback;
}
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/INewName.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/INewName.rs
index f8003b5f..b0fdf91d 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/INewName.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/INewName.rs
@@ -14,7 +14,7 @@ declare_binder_interface! {
}
pub trait INewName: binder::Interface + Send {
fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.IOldName" }
- fn RealName(&self) -> binder::Result<String>;
+ fn r#RealName(&self) -> binder::Result<String>;
fn getDefaultImpl() -> INewNameDefaultRef where Self: Sized {
DEFAULT_IMPL.lock().unwrap().clone()
}
@@ -24,12 +24,12 @@ pub trait INewName: binder::Interface + Send {
}
pub trait INewNameAsync<P>: binder::Interface + Send {
fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.IOldName" }
- fn RealName<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<String>>;
+ fn r#RealName<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<String>>;
}
#[::async_trait::async_trait]
pub trait INewNameAsyncServer: binder::Interface + Send {
fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.IOldName" }
- async fn RealName(&self) -> binder::Result<String>;
+ async fn r#RealName(&self) -> binder::Result<String>;
}
impl BnNewName {
/// Create a new async binder service.
@@ -51,8 +51,8 @@ impl BnNewName {
T: INewNameAsyncServer + Send + Sync + 'static,
R: binder::binder_impl::BinderAsyncRuntime + Send + Sync + 'static,
{
- fn RealName(&self) -> binder::Result<String> {
- self._rt.block_on(self._inner.RealName())
+ fn r#RealName(&self) -> binder::Result<String> {
+ self._rt.block_on(self._inner.r#RealName())
}
}
let wrapped = Wrapper { _inner: inner, _rt: rt };
@@ -60,12 +60,12 @@ impl BnNewName {
}
}
pub trait INewNameDefault: Send + Sync {
- fn RealName(&self) -> binder::Result<String> {
+ fn r#RealName(&self) -> binder::Result<String> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
}
pub mod transactions {
- pub const RealName: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 0;
+ pub const r#RealName: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 0;
}
pub type INewNameDefaultRef = Option<std::sync::Arc<dyn INewNameDefault>>;
use lazy_static::lazy_static;
@@ -80,7 +80,7 @@ impl BpNewName {
fn read_response_RealName(&self, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<String> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as INewName>::getDefaultImpl() {
- return _aidl_default_impl.RealName();
+ return _aidl_default_impl.r#RealName();
}
}
let _aidl_reply = _aidl_reply?;
@@ -91,21 +91,21 @@ impl BpNewName {
}
}
impl INewName for BpNewName {
- fn RealName(&self) -> binder::Result<String> {
+ fn r#RealName(&self) -> binder::Result<String> {
let _aidl_data = self.build_parcel_RealName()?;
- let _aidl_reply = self.binder.submit_transact(transactions::RealName, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#RealName, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_RealName(_aidl_reply)
}
}
impl<P: binder::BinderAsyncPool> INewNameAsync<P> for BpNewName {
- fn RealName<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<String>> {
+ fn r#RealName<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<String>> {
let _aidl_data = match self.build_parcel_RealName() {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::RealName, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#RealName, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_RealName(_aidl_reply)
}
@@ -113,12 +113,12 @@ impl<P: binder::BinderAsyncPool> INewNameAsync<P> for BpNewName {
}
}
impl INewName for binder::binder_impl::Binder<BnNewName> {
- fn RealName(&self) -> binder::Result<String> { self.0.RealName() }
+ fn r#RealName(&self) -> binder::Result<String> { self.0.r#RealName() }
}
fn on_transact(_aidl_service: &dyn INewName, _aidl_code: binder::binder_impl::TransactionCode, _aidl_data: &binder::binder_impl::BorrowedParcel<'_>, _aidl_reply: &mut binder::binder_impl::BorrowedParcel<'_>) -> std::result::Result<(), binder::StatusCode> {
match _aidl_code {
- transactions::RealName => {
- let _aidl_return = _aidl_service.RealName();
+ transactions::r#RealName => {
+ let _aidl_return = _aidl_service.r#RealName();
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -132,5 +132,5 @@ fn on_transact(_aidl_service: &dyn INewName, _aidl_code: binder::binder_impl::Tr
}
}
pub(crate) mod mangled {
- pub use super::INewName as _7_android_4_aidl_5_tests_8_INewName;
+ pub use super::r#INewName as _7_android_4_aidl_5_tests_8_INewName;
}
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/IOldName.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/IOldName.rs
index e10bf923..97d330b7 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/IOldName.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/IOldName.rs
@@ -14,7 +14,7 @@ declare_binder_interface! {
}
pub trait IOldName: binder::Interface + Send {
fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.IOldName" }
- fn RealName(&self) -> binder::Result<String>;
+ fn r#RealName(&self) -> binder::Result<String>;
fn getDefaultImpl() -> IOldNameDefaultRef where Self: Sized {
DEFAULT_IMPL.lock().unwrap().clone()
}
@@ -24,12 +24,12 @@ pub trait IOldName: binder::Interface + Send {
}
pub trait IOldNameAsync<P>: binder::Interface + Send {
fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.IOldName" }
- fn RealName<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<String>>;
+ fn r#RealName<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<String>>;
}
#[::async_trait::async_trait]
pub trait IOldNameAsyncServer: binder::Interface + Send {
fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.IOldName" }
- async fn RealName(&self) -> binder::Result<String>;
+ async fn r#RealName(&self) -> binder::Result<String>;
}
impl BnOldName {
/// Create a new async binder service.
@@ -51,8 +51,8 @@ impl BnOldName {
T: IOldNameAsyncServer + Send + Sync + 'static,
R: binder::binder_impl::BinderAsyncRuntime + Send + Sync + 'static,
{
- fn RealName(&self) -> binder::Result<String> {
- self._rt.block_on(self._inner.RealName())
+ fn r#RealName(&self) -> binder::Result<String> {
+ self._rt.block_on(self._inner.r#RealName())
}
}
let wrapped = Wrapper { _inner: inner, _rt: rt };
@@ -60,12 +60,12 @@ impl BnOldName {
}
}
pub trait IOldNameDefault: Send + Sync {
- fn RealName(&self) -> binder::Result<String> {
+ fn r#RealName(&self) -> binder::Result<String> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
}
pub mod transactions {
- pub const RealName: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 0;
+ pub const r#RealName: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 0;
}
pub type IOldNameDefaultRef = Option<std::sync::Arc<dyn IOldNameDefault>>;
use lazy_static::lazy_static;
@@ -80,7 +80,7 @@ impl BpOldName {
fn read_response_RealName(&self, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<String> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as IOldName>::getDefaultImpl() {
- return _aidl_default_impl.RealName();
+ return _aidl_default_impl.r#RealName();
}
}
let _aidl_reply = _aidl_reply?;
@@ -91,21 +91,21 @@ impl BpOldName {
}
}
impl IOldName for BpOldName {
- fn RealName(&self) -> binder::Result<String> {
+ fn r#RealName(&self) -> binder::Result<String> {
let _aidl_data = self.build_parcel_RealName()?;
- let _aidl_reply = self.binder.submit_transact(transactions::RealName, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#RealName, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_RealName(_aidl_reply)
}
}
impl<P: binder::BinderAsyncPool> IOldNameAsync<P> for BpOldName {
- fn RealName<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<String>> {
+ fn r#RealName<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<String>> {
let _aidl_data = match self.build_parcel_RealName() {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::RealName, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#RealName, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_RealName(_aidl_reply)
}
@@ -113,12 +113,12 @@ impl<P: binder::BinderAsyncPool> IOldNameAsync<P> for BpOldName {
}
}
impl IOldName for binder::binder_impl::Binder<BnOldName> {
- fn RealName(&self) -> binder::Result<String> { self.0.RealName() }
+ fn r#RealName(&self) -> binder::Result<String> { self.0.r#RealName() }
}
fn on_transact(_aidl_service: &dyn IOldName, _aidl_code: binder::binder_impl::TransactionCode, _aidl_data: &binder::binder_impl::BorrowedParcel<'_>, _aidl_reply: &mut binder::binder_impl::BorrowedParcel<'_>) -> std::result::Result<(), binder::StatusCode> {
match _aidl_code {
- transactions::RealName => {
- let _aidl_return = _aidl_service.RealName();
+ transactions::r#RealName => {
+ let _aidl_return = _aidl_service.r#RealName();
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -132,5 +132,5 @@ fn on_transact(_aidl_service: &dyn IOldName, _aidl_code: binder::binder_impl::Tr
}
}
pub(crate) mod mangled {
- pub use super::IOldName as _7_android_4_aidl_5_tests_8_IOldName;
+ pub use super::r#IOldName as _7_android_4_aidl_5_tests_8_IOldName;
}
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ITestService.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ITestService.rs
index 36c03d44..b9b36d37 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ITestService.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ITestService.rs
@@ -14,73 +14,75 @@ declare_binder_interface! {
}
pub trait ITestService: binder::Interface + Send {
fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.ITestService" }
- fn UnimplementedMethod(&self, _arg_arg: i32) -> binder::Result<i32>;
+ fn r#UnimplementedMethod(&self, _arg_arg: i32) -> binder::Result<i32>;
#[deprecated = "to make sure we have something in system/tools/aidl which does a compile check of deprecated and make sure this is reflected in goldens"]
- fn Deprecated(&self) -> binder::Result<()>;
- fn TestOneway(&self) -> binder::Result<()>;
- fn RepeatBoolean(&self, _arg_token: bool) -> binder::Result<bool>;
- fn RepeatByte(&self, _arg_token: i8) -> binder::Result<i8>;
- fn RepeatChar(&self, _arg_token: u16) -> binder::Result<u16>;
- fn RepeatInt(&self, _arg_token: i32) -> binder::Result<i32>;
- fn RepeatLong(&self, _arg_token: i64) -> binder::Result<i64>;
- fn RepeatFloat(&self, _arg_token: f32) -> binder::Result<f32>;
- fn RepeatDouble(&self, _arg_token: f64) -> binder::Result<f64>;
- fn RepeatString(&self, _arg_token: &str) -> binder::Result<String>;
- fn RepeatByteEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>;
- fn RepeatIntEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>;
- fn RepeatLongEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>;
- fn ReverseBoolean(&self, _arg_input: &[bool], _arg_repeated: &mut Vec<bool>) -> binder::Result<Vec<bool>>;
- fn ReverseByte(&self, _arg_input: &[u8], _arg_repeated: &mut Vec<u8>) -> binder::Result<Vec<u8>>;
- fn ReverseChar(&self, _arg_input: &[u16], _arg_repeated: &mut Vec<u16>) -> binder::Result<Vec<u16>>;
- fn ReverseInt(&self, _arg_input: &[i32], _arg_repeated: &mut Vec<i32>) -> binder::Result<Vec<i32>>;
- fn ReverseLong(&self, _arg_input: &[i64], _arg_repeated: &mut Vec<i64>) -> binder::Result<Vec<i64>>;
- fn ReverseFloat(&self, _arg_input: &[f32], _arg_repeated: &mut Vec<f32>) -> binder::Result<Vec<f32>>;
- fn ReverseDouble(&self, _arg_input: &[f64], _arg_repeated: &mut Vec<f64>) -> binder::Result<Vec<f64>>;
- fn ReverseString(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::Result<Vec<String>>;
- fn ReverseByteEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>>;
- fn ReverseIntEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>>;
- fn ReverseLongEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>>;
- fn GetOtherTestService(&self, _arg_name: &str) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>;
- fn VerifyName(&self, _arg_service: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>, _arg_name: &str) -> binder::Result<bool>;
- fn GetInterfaceArray(&self, _arg_names: &[String]) -> binder::Result<Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>;
- fn VerifyNamesWithInterfaceArray(&self, _arg_services: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>], _arg_names: &[String]) -> binder::Result<bool>;
- fn GetNullableInterfaceArray(&self, _arg_names: Option<&[Option<String>]>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>>;
- fn VerifyNamesWithNullableInterfaceArray(&self, _arg_services: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>]>, _arg_names: Option<&[Option<String>]>) -> binder::Result<bool>;
- fn GetInterfaceList(&self, _arg_names: Option<&[Option<String>]>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>>;
- fn VerifyNamesWithInterfaceList(&self, _arg_services: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>]>, _arg_names: Option<&[Option<String>]>) -> binder::Result<bool>;
- fn ReverseStringList(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::Result<Vec<String>>;
- fn RepeatParcelFileDescriptor(&self, _arg_read: &binder::ParcelFileDescriptor) -> binder::Result<binder::ParcelFileDescriptor>;
- fn ReverseParcelFileDescriptorArray(&self, _arg_input: &[binder::ParcelFileDescriptor], _arg_repeated: &mut Vec<Option<binder::ParcelFileDescriptor>>) -> binder::Result<Vec<binder::ParcelFileDescriptor>>;
- fn ThrowServiceException(&self, _arg_code: i32) -> binder::Result<()>;
- fn RepeatNullableIntArray(&self, _arg_input: Option<&[i32]>) -> binder::Result<Option<Vec<i32>>>;
- fn RepeatNullableByteEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum]>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>>>;
- fn RepeatNullableIntEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum]>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>>>;
- fn RepeatNullableLongEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum]>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>>>;
- fn RepeatNullableString(&self, _arg_input: Option<&str>) -> binder::Result<Option<String>>;
- fn RepeatNullableStringList(&self, _arg_input: Option<&[Option<String>]>) -> binder::Result<Option<Vec<Option<String>>>>;
- fn RepeatNullableParcelable(&self, _arg_input: Option<&crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>) -> binder::Result<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>;
- fn RepeatNullableParcelableArray(&self, _arg_input: Option<&[Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>>;
- fn RepeatNullableParcelableList(&self, _arg_input: Option<&[Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>>;
- fn TakesAnIBinder(&self, _arg_input: &binder::SpIBinder) -> binder::Result<()>;
- fn TakesANullableIBinder(&self, _arg_input: Option<&binder::SpIBinder>) -> binder::Result<()>;
- fn TakesAnIBinderList(&self, _arg_input: &[binder::SpIBinder]) -> binder::Result<()>;
- fn TakesANullableIBinderList(&self, _arg_input: Option<&[Option<binder::SpIBinder>]>) -> binder::Result<()>;
- fn RepeatUtf8CppString(&self, _arg_token: &str) -> binder::Result<String>;
- fn RepeatNullableUtf8CppString(&self, _arg_token: Option<&str>) -> binder::Result<Option<String>>;
- fn ReverseUtf8CppString(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::Result<Vec<String>>;
- fn ReverseNullableUtf8CppString(&self, _arg_input: Option<&[Option<String>]>, _arg_repeated: &mut Option<Vec<Option<String>>>) -> binder::Result<Option<Vec<Option<String>>>>;
- fn ReverseUtf8CppStringList(&self, _arg_input: Option<&[Option<String>]>, _arg_repeated: &mut Option<Vec<Option<String>>>) -> binder::Result<Option<Vec<Option<String>>>>;
- fn GetCallback(&self, _arg_return_null: bool) -> binder::Result<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>;
- fn FillOutStructuredParcelable(&self, _arg_parcel: &mut crate::mangled::_7_android_4_aidl_5_tests_20_StructuredParcelable) -> binder::Result<()>;
- fn RepeatExtendableParcelable(&self, _arg_ep: &crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable, _arg_ep2: &mut crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable) -> binder::Result<()>;
- fn ReverseList(&self, _arg_list: &crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList>;
- fn ReverseIBinderArray(&self, _arg_input: &[binder::SpIBinder], _arg_repeated: &mut Vec<Option<binder::SpIBinder>>) -> binder::Result<Vec<binder::SpIBinder>>;
- fn ReverseNullableIBinderArray(&self, _arg_input: Option<&[Option<binder::SpIBinder>]>, _arg_repeated: &mut Option<Vec<Option<binder::SpIBinder>>>) -> binder::Result<Option<Vec<Option<binder::SpIBinder>>>>;
- fn GetOldNameInterface(&self) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_IOldName>>;
- fn GetNewNameInterface(&self) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_INewName>>;
- fn GetUnionTags(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_5_Union]) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_5_Union_3_Tag>>;
- fn GetCppJavaTests(&self) -> binder::Result<Option<binder::SpIBinder>>;
- fn getBackendType(&self) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_11_BackendType>;
+ fn r#Deprecated(&self) -> binder::Result<()>;
+ fn r#TestOneway(&self) -> binder::Result<()>;
+ fn r#RepeatBoolean(&self, _arg_token: bool) -> binder::Result<bool>;
+ fn r#RepeatByte(&self, _arg_token: i8) -> binder::Result<i8>;
+ fn r#RepeatChar(&self, _arg_token: u16) -> binder::Result<u16>;
+ fn r#RepeatInt(&self, _arg_token: i32) -> binder::Result<i32>;
+ fn r#RepeatLong(&self, _arg_token: i64) -> binder::Result<i64>;
+ fn r#RepeatFloat(&self, _arg_token: f32) -> binder::Result<f32>;
+ fn r#RepeatDouble(&self, _arg_token: f64) -> binder::Result<f64>;
+ fn r#RepeatString(&self, _arg_token: &str) -> binder::Result<String>;
+ fn r#RepeatByteEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>;
+ fn r#RepeatIntEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>;
+ fn r#RepeatLongEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>;
+ fn r#ReverseBoolean(&self, _arg_input: &[bool], _arg_repeated: &mut Vec<bool>) -> binder::Result<Vec<bool>>;
+ fn r#ReverseByte(&self, _arg_input: &[u8], _arg_repeated: &mut Vec<u8>) -> binder::Result<Vec<u8>>;
+ fn r#ReverseChar(&self, _arg_input: &[u16], _arg_repeated: &mut Vec<u16>) -> binder::Result<Vec<u16>>;
+ fn r#ReverseInt(&self, _arg_input: &[i32], _arg_repeated: &mut Vec<i32>) -> binder::Result<Vec<i32>>;
+ fn r#ReverseLong(&self, _arg_input: &[i64], _arg_repeated: &mut Vec<i64>) -> binder::Result<Vec<i64>>;
+ fn r#ReverseFloat(&self, _arg_input: &[f32], _arg_repeated: &mut Vec<f32>) -> binder::Result<Vec<f32>>;
+ fn r#ReverseDouble(&self, _arg_input: &[f64], _arg_repeated: &mut Vec<f64>) -> binder::Result<Vec<f64>>;
+ fn r#ReverseString(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::Result<Vec<String>>;
+ fn r#ReverseByteEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>>;
+ fn r#ReverseIntEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>>;
+ fn r#ReverseLongEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>>;
+ fn r#GetOtherTestService(&self, _arg_name: &str) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>;
+ fn r#SetOtherTestService(&self, _arg_name: &str, _arg_service: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>) -> binder::Result<bool>;
+ fn r#VerifyName(&self, _arg_service: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>, _arg_name: &str) -> binder::Result<bool>;
+ fn r#GetInterfaceArray(&self, _arg_names: &[String]) -> binder::Result<Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>;
+ fn r#VerifyNamesWithInterfaceArray(&self, _arg_services: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>], _arg_names: &[String]) -> binder::Result<bool>;
+ fn r#GetNullableInterfaceArray(&self, _arg_names: Option<&[Option<String>]>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>>;
+ fn r#VerifyNamesWithNullableInterfaceArray(&self, _arg_services: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>]>, _arg_names: Option<&[Option<String>]>) -> binder::Result<bool>;
+ fn r#GetInterfaceList(&self, _arg_names: Option<&[Option<String>]>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>>;
+ fn r#VerifyNamesWithInterfaceList(&self, _arg_services: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>]>, _arg_names: Option<&[Option<String>]>) -> binder::Result<bool>;
+ fn r#ReverseStringList(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::Result<Vec<String>>;
+ fn r#RepeatParcelFileDescriptor(&self, _arg_read: &binder::ParcelFileDescriptor) -> binder::Result<binder::ParcelFileDescriptor>;
+ fn r#ReverseParcelFileDescriptorArray(&self, _arg_input: &[binder::ParcelFileDescriptor], _arg_repeated: &mut Vec<Option<binder::ParcelFileDescriptor>>) -> binder::Result<Vec<binder::ParcelFileDescriptor>>;
+ fn r#ThrowServiceException(&self, _arg_code: i32) -> binder::Result<()>;
+ fn r#RepeatNullableIntArray(&self, _arg_input: Option<&[i32]>) -> binder::Result<Option<Vec<i32>>>;
+ fn r#RepeatNullableByteEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum]>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>>>;
+ fn r#RepeatNullableIntEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum]>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>>>;
+ fn r#RepeatNullableLongEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum]>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>>>;
+ fn r#RepeatNullableString(&self, _arg_input: Option<&str>) -> binder::Result<Option<String>>;
+ fn r#RepeatNullableStringList(&self, _arg_input: Option<&[Option<String>]>) -> binder::Result<Option<Vec<Option<String>>>>;
+ fn r#RepeatNullableParcelable(&self, _arg_input: Option<&crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>) -> binder::Result<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>;
+ fn r#RepeatNullableParcelableArray(&self, _arg_input: Option<&[Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>>;
+ fn r#RepeatNullableParcelableList(&self, _arg_input: Option<&[Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>>;
+ fn r#TakesAnIBinder(&self, _arg_input: &binder::SpIBinder) -> binder::Result<()>;
+ fn r#TakesANullableIBinder(&self, _arg_input: Option<&binder::SpIBinder>) -> binder::Result<()>;
+ fn r#TakesAnIBinderList(&self, _arg_input: &[binder::SpIBinder]) -> binder::Result<()>;
+ fn r#TakesANullableIBinderList(&self, _arg_input: Option<&[Option<binder::SpIBinder>]>) -> binder::Result<()>;
+ fn r#RepeatUtf8CppString(&self, _arg_token: &str) -> binder::Result<String>;
+ fn r#RepeatNullableUtf8CppString(&self, _arg_token: Option<&str>) -> binder::Result<Option<String>>;
+ fn r#ReverseUtf8CppString(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::Result<Vec<String>>;
+ fn r#ReverseNullableUtf8CppString(&self, _arg_input: Option<&[Option<String>]>, _arg_repeated: &mut Option<Vec<Option<String>>>) -> binder::Result<Option<Vec<Option<String>>>>;
+ fn r#ReverseUtf8CppStringList(&self, _arg_input: Option<&[Option<String>]>, _arg_repeated: &mut Option<Vec<Option<String>>>) -> binder::Result<Option<Vec<Option<String>>>>;
+ fn r#GetCallback(&self, _arg_return_null: bool) -> binder::Result<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>;
+ fn r#FillOutStructuredParcelable(&self, _arg_parcel: &mut crate::mangled::_7_android_4_aidl_5_tests_20_StructuredParcelable) -> binder::Result<()>;
+ fn r#RepeatExtendableParcelable(&self, _arg_ep: &crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable, _arg_ep2: &mut crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable) -> binder::Result<()>;
+ fn r#ReverseList(&self, _arg_list: &crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList>;
+ fn r#ReverseIBinderArray(&self, _arg_input: &[binder::SpIBinder], _arg_repeated: &mut Vec<Option<binder::SpIBinder>>) -> binder::Result<Vec<binder::SpIBinder>>;
+ fn r#ReverseNullableIBinderArray(&self, _arg_input: Option<&[Option<binder::SpIBinder>]>, _arg_repeated: &mut Option<Vec<Option<binder::SpIBinder>>>) -> binder::Result<Option<Vec<Option<binder::SpIBinder>>>>;
+ fn r#GetOldNameInterface(&self) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_IOldName>>;
+ fn r#GetNewNameInterface(&self) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_INewName>>;
+ fn r#GetUnionTags(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_5_Union]) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_5_Union_3_Tag>>;
+ fn r#GetCppJavaTests(&self) -> binder::Result<Option<binder::SpIBinder>>;
+ fn r#getBackendType(&self) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_11_BackendType>;
+ fn r#GetCircular(&self, _arg_cp: &mut crate::mangled::_7_android_4_aidl_5_tests_18_CircularParcelable) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_9_ICircular>>;
fn getDefaultImpl() -> ITestServiceDefaultRef where Self: Sized {
DEFAULT_IMPL.lock().unwrap().clone()
}
@@ -90,144 +92,148 @@ pub trait ITestService: binder::Interface + Send {
}
pub trait ITestServiceAsync<P>: binder::Interface + Send {
fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.ITestService" }
- fn UnimplementedMethod<'a>(&'a self, _arg_arg: i32) -> binder::BoxFuture<'a, binder::Result<i32>>;
+ fn r#UnimplementedMethod<'a>(&'a self, _arg_arg: i32) -> binder::BoxFuture<'a, binder::Result<i32>>;
#[deprecated = "to make sure we have something in system/tools/aidl which does a compile check of deprecated and make sure this is reflected in goldens"]
- fn Deprecated<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<()>>;
- fn TestOneway(&self) -> std::future::Ready<binder::Result<()>>;
- fn RepeatBoolean<'a>(&'a self, _arg_token: bool) -> binder::BoxFuture<'a, binder::Result<bool>>;
- fn RepeatByte<'a>(&'a self, _arg_token: i8) -> binder::BoxFuture<'a, binder::Result<i8>>;
- fn RepeatChar<'a>(&'a self, _arg_token: u16) -> binder::BoxFuture<'a, binder::Result<u16>>;
- fn RepeatInt<'a>(&'a self, _arg_token: i32) -> binder::BoxFuture<'a, binder::Result<i32>>;
- fn RepeatLong<'a>(&'a self, _arg_token: i64) -> binder::BoxFuture<'a, binder::Result<i64>>;
- fn RepeatFloat<'a>(&'a self, _arg_token: f32) -> binder::BoxFuture<'a, binder::Result<f32>>;
- fn RepeatDouble<'a>(&'a self, _arg_token: f64) -> binder::BoxFuture<'a, binder::Result<f64>>;
- fn RepeatString<'a>(&'a self, _arg_token: &'a str) -> binder::BoxFuture<'a, binder::Result<String>>;
- fn RepeatByteEnum<'a>(&'a self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum) -> binder::BoxFuture<'a, binder::Result<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>>;
- fn RepeatIntEnum<'a>(&'a self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum) -> binder::BoxFuture<'a, binder::Result<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>>;
- fn RepeatLongEnum<'a>(&'a self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum) -> binder::BoxFuture<'a, binder::Result<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>>;
- fn ReverseBoolean<'a>(&'a self, _arg_input: &'a [bool], _arg_repeated: &'a mut Vec<bool>) -> binder::BoxFuture<'a, binder::Result<Vec<bool>>>;
- fn ReverseByte<'a>(&'a self, _arg_input: &'a [u8], _arg_repeated: &'a mut Vec<u8>) -> binder::BoxFuture<'a, binder::Result<Vec<u8>>>;
- fn ReverseChar<'a>(&'a self, _arg_input: &'a [u16], _arg_repeated: &'a mut Vec<u16>) -> binder::BoxFuture<'a, binder::Result<Vec<u16>>>;
- fn ReverseInt<'a>(&'a self, _arg_input: &'a [i32], _arg_repeated: &'a mut Vec<i32>) -> binder::BoxFuture<'a, binder::Result<Vec<i32>>>;
- fn ReverseLong<'a>(&'a self, _arg_input: &'a [i64], _arg_repeated: &'a mut Vec<i64>) -> binder::BoxFuture<'a, binder::Result<Vec<i64>>>;
- fn ReverseFloat<'a>(&'a self, _arg_input: &'a [f32], _arg_repeated: &'a mut Vec<f32>) -> binder::BoxFuture<'a, binder::Result<Vec<f32>>>;
- fn ReverseDouble<'a>(&'a self, _arg_input: &'a [f64], _arg_repeated: &'a mut Vec<f64>) -> binder::BoxFuture<'a, binder::Result<Vec<f64>>>;
- fn ReverseString<'a>(&'a self, _arg_input: &'a [String], _arg_repeated: &'a mut Vec<String>) -> binder::BoxFuture<'a, binder::Result<Vec<String>>>;
- fn ReverseByteEnum<'a>(&'a self, _arg_input: &'a [crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum], _arg_repeated: &'a mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>) -> binder::BoxFuture<'a, binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>>>;
- fn ReverseIntEnum<'a>(&'a self, _arg_input: &'a [crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum], _arg_repeated: &'a mut Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>) -> binder::BoxFuture<'a, binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>>>;
- fn ReverseLongEnum<'a>(&'a self, _arg_input: &'a [crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum], _arg_repeated: &'a mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>) -> binder::BoxFuture<'a, binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>>>;
- fn GetOtherTestService<'a>(&'a self, _arg_name: &'a str) -> binder::BoxFuture<'a, binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>;
- fn VerifyName<'a>(&'a self, _arg_service: &'a binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>, _arg_name: &'a str) -> binder::BoxFuture<'a, binder::Result<bool>>;
- fn GetInterfaceArray<'a>(&'a self, _arg_names: &'a [String]) -> binder::BoxFuture<'a, binder::Result<Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>;
- fn VerifyNamesWithInterfaceArray<'a>(&'a self, _arg_services: &'a [binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>], _arg_names: &'a [String]) -> binder::BoxFuture<'a, binder::Result<bool>>;
- fn GetNullableInterfaceArray<'a>(&'a self, _arg_names: Option<&'a [Option<String>]>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>>>;
- fn VerifyNamesWithNullableInterfaceArray<'a>(&'a self, _arg_services: Option<&'a [Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>]>, _arg_names: Option<&'a [Option<String>]>) -> binder::BoxFuture<'a, binder::Result<bool>>;
- fn GetInterfaceList<'a>(&'a self, _arg_names: Option<&'a [Option<String>]>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>>>;
- fn VerifyNamesWithInterfaceList<'a>(&'a self, _arg_services: Option<&'a [Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>]>, _arg_names: Option<&'a [Option<String>]>) -> binder::BoxFuture<'a, binder::Result<bool>>;
- fn ReverseStringList<'a>(&'a self, _arg_input: &'a [String], _arg_repeated: &'a mut Vec<String>) -> binder::BoxFuture<'a, binder::Result<Vec<String>>>;
- fn RepeatParcelFileDescriptor<'a>(&'a self, _arg_read: &'a binder::ParcelFileDescriptor) -> binder::BoxFuture<'a, binder::Result<binder::ParcelFileDescriptor>>;
- fn ReverseParcelFileDescriptorArray<'a>(&'a self, _arg_input: &'a [binder::ParcelFileDescriptor], _arg_repeated: &'a mut Vec<Option<binder::ParcelFileDescriptor>>) -> binder::BoxFuture<'a, binder::Result<Vec<binder::ParcelFileDescriptor>>>;
- fn ThrowServiceException<'a>(&'a self, _arg_code: i32) -> binder::BoxFuture<'a, binder::Result<()>>;
- fn RepeatNullableIntArray<'a>(&'a self, _arg_input: Option<&'a [i32]>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<i32>>>>;
- fn RepeatNullableByteEnumArray<'a>(&'a self, _arg_input: Option<&'a [crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum]>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>>>>;
- fn RepeatNullableIntEnumArray<'a>(&'a self, _arg_input: Option<&'a [crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum]>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>>>>;
- fn RepeatNullableLongEnumArray<'a>(&'a self, _arg_input: Option<&'a [crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum]>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>>>>;
- fn RepeatNullableString<'a>(&'a self, _arg_input: Option<&'a str>) -> binder::BoxFuture<'a, binder::Result<Option<String>>>;
- fn RepeatNullableStringList<'a>(&'a self, _arg_input: Option<&'a [Option<String>]>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<String>>>>>;
- fn RepeatNullableParcelable<'a>(&'a self, _arg_input: Option<&'a crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>) -> binder::BoxFuture<'a, binder::Result<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>;
- fn RepeatNullableParcelableArray<'a>(&'a self, _arg_input: Option<&'a [Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>>>;
- fn RepeatNullableParcelableList<'a>(&'a self, _arg_input: Option<&'a [Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>>>;
- fn TakesAnIBinder<'a>(&'a self, _arg_input: &'a binder::SpIBinder) -> binder::BoxFuture<'a, binder::Result<()>>;
- fn TakesANullableIBinder<'a>(&'a self, _arg_input: Option<&'a binder::SpIBinder>) -> binder::BoxFuture<'a, binder::Result<()>>;
- fn TakesAnIBinderList<'a>(&'a self, _arg_input: &'a [binder::SpIBinder]) -> binder::BoxFuture<'a, binder::Result<()>>;
- fn TakesANullableIBinderList<'a>(&'a self, _arg_input: Option<&'a [Option<binder::SpIBinder>]>) -> binder::BoxFuture<'a, binder::Result<()>>;
- fn RepeatUtf8CppString<'a>(&'a self, _arg_token: &'a str) -> binder::BoxFuture<'a, binder::Result<String>>;
- fn RepeatNullableUtf8CppString<'a>(&'a self, _arg_token: Option<&'a str>) -> binder::BoxFuture<'a, binder::Result<Option<String>>>;
- fn ReverseUtf8CppString<'a>(&'a self, _arg_input: &'a [String], _arg_repeated: &'a mut Vec<String>) -> binder::BoxFuture<'a, binder::Result<Vec<String>>>;
- fn ReverseNullableUtf8CppString<'a>(&'a self, _arg_input: Option<&'a [Option<String>]>, _arg_repeated: &'a mut Option<Vec<Option<String>>>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<String>>>>>;
- fn ReverseUtf8CppStringList<'a>(&'a self, _arg_input: Option<&'a [Option<String>]>, _arg_repeated: &'a mut Option<Vec<Option<String>>>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<String>>>>>;
- fn GetCallback<'a>(&'a self, _arg_return_null: bool) -> binder::BoxFuture<'a, binder::Result<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>;
- fn FillOutStructuredParcelable<'a>(&'a self, _arg_parcel: &'a mut crate::mangled::_7_android_4_aidl_5_tests_20_StructuredParcelable) -> binder::BoxFuture<'a, binder::Result<()>>;
- fn RepeatExtendableParcelable<'a>(&'a self, _arg_ep: &'a crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable, _arg_ep2: &'a mut crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable) -> binder::BoxFuture<'a, binder::Result<()>>;
- fn ReverseList<'a>(&'a self, _arg_list: &'a crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList) -> binder::BoxFuture<'a, binder::Result<crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList>>;
- fn ReverseIBinderArray<'a>(&'a self, _arg_input: &'a [binder::SpIBinder], _arg_repeated: &'a mut Vec<Option<binder::SpIBinder>>) -> binder::BoxFuture<'a, binder::Result<Vec<binder::SpIBinder>>>;
- fn ReverseNullableIBinderArray<'a>(&'a self, _arg_input: Option<&'a [Option<binder::SpIBinder>]>, _arg_repeated: &'a mut Option<Vec<Option<binder::SpIBinder>>>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<binder::SpIBinder>>>>>;
- fn GetOldNameInterface<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_IOldName>>>;
- fn GetNewNameInterface<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_INewName>>>;
- fn GetUnionTags<'a>(&'a self, _arg_input: &'a [crate::mangled::_7_android_4_aidl_5_tests_5_Union]) -> binder::BoxFuture<'a, binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_5_Union_3_Tag>>>;
- fn GetCppJavaTests<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<Option<binder::SpIBinder>>>;
- fn getBackendType<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<crate::mangled::_7_android_4_aidl_5_tests_11_BackendType>>;
+ fn r#Deprecated<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<()>>;
+ fn r#TestOneway(&self) -> std::future::Ready<binder::Result<()>>;
+ fn r#RepeatBoolean<'a>(&'a self, _arg_token: bool) -> binder::BoxFuture<'a, binder::Result<bool>>;
+ fn r#RepeatByte<'a>(&'a self, _arg_token: i8) -> binder::BoxFuture<'a, binder::Result<i8>>;
+ fn r#RepeatChar<'a>(&'a self, _arg_token: u16) -> binder::BoxFuture<'a, binder::Result<u16>>;
+ fn r#RepeatInt<'a>(&'a self, _arg_token: i32) -> binder::BoxFuture<'a, binder::Result<i32>>;
+ fn r#RepeatLong<'a>(&'a self, _arg_token: i64) -> binder::BoxFuture<'a, binder::Result<i64>>;
+ fn r#RepeatFloat<'a>(&'a self, _arg_token: f32) -> binder::BoxFuture<'a, binder::Result<f32>>;
+ fn r#RepeatDouble<'a>(&'a self, _arg_token: f64) -> binder::BoxFuture<'a, binder::Result<f64>>;
+ fn r#RepeatString<'a>(&'a self, _arg_token: &'a str) -> binder::BoxFuture<'a, binder::Result<String>>;
+ fn r#RepeatByteEnum<'a>(&'a self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum) -> binder::BoxFuture<'a, binder::Result<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>>;
+ fn r#RepeatIntEnum<'a>(&'a self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum) -> binder::BoxFuture<'a, binder::Result<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>>;
+ fn r#RepeatLongEnum<'a>(&'a self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum) -> binder::BoxFuture<'a, binder::Result<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>>;
+ fn r#ReverseBoolean<'a>(&'a self, _arg_input: &'a [bool], _arg_repeated: &'a mut Vec<bool>) -> binder::BoxFuture<'a, binder::Result<Vec<bool>>>;
+ fn r#ReverseByte<'a>(&'a self, _arg_input: &'a [u8], _arg_repeated: &'a mut Vec<u8>) -> binder::BoxFuture<'a, binder::Result<Vec<u8>>>;
+ fn r#ReverseChar<'a>(&'a self, _arg_input: &'a [u16], _arg_repeated: &'a mut Vec<u16>) -> binder::BoxFuture<'a, binder::Result<Vec<u16>>>;
+ fn r#ReverseInt<'a>(&'a self, _arg_input: &'a [i32], _arg_repeated: &'a mut Vec<i32>) -> binder::BoxFuture<'a, binder::Result<Vec<i32>>>;
+ fn r#ReverseLong<'a>(&'a self, _arg_input: &'a [i64], _arg_repeated: &'a mut Vec<i64>) -> binder::BoxFuture<'a, binder::Result<Vec<i64>>>;
+ fn r#ReverseFloat<'a>(&'a self, _arg_input: &'a [f32], _arg_repeated: &'a mut Vec<f32>) -> binder::BoxFuture<'a, binder::Result<Vec<f32>>>;
+ fn r#ReverseDouble<'a>(&'a self, _arg_input: &'a [f64], _arg_repeated: &'a mut Vec<f64>) -> binder::BoxFuture<'a, binder::Result<Vec<f64>>>;
+ fn r#ReverseString<'a>(&'a self, _arg_input: &'a [String], _arg_repeated: &'a mut Vec<String>) -> binder::BoxFuture<'a, binder::Result<Vec<String>>>;
+ fn r#ReverseByteEnum<'a>(&'a self, _arg_input: &'a [crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum], _arg_repeated: &'a mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>) -> binder::BoxFuture<'a, binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>>>;
+ fn r#ReverseIntEnum<'a>(&'a self, _arg_input: &'a [crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum], _arg_repeated: &'a mut Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>) -> binder::BoxFuture<'a, binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>>>;
+ fn r#ReverseLongEnum<'a>(&'a self, _arg_input: &'a [crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum], _arg_repeated: &'a mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>) -> binder::BoxFuture<'a, binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>>>;
+ fn r#GetOtherTestService<'a>(&'a self, _arg_name: &'a str) -> binder::BoxFuture<'a, binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>;
+ fn r#SetOtherTestService<'a>(&'a self, _arg_name: &'a str, _arg_service: &'a binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>) -> binder::BoxFuture<'a, binder::Result<bool>>;
+ fn r#VerifyName<'a>(&'a self, _arg_service: &'a binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>, _arg_name: &'a str) -> binder::BoxFuture<'a, binder::Result<bool>>;
+ fn r#GetInterfaceArray<'a>(&'a self, _arg_names: &'a [String]) -> binder::BoxFuture<'a, binder::Result<Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>;
+ fn r#VerifyNamesWithInterfaceArray<'a>(&'a self, _arg_services: &'a [binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>], _arg_names: &'a [String]) -> binder::BoxFuture<'a, binder::Result<bool>>;
+ fn r#GetNullableInterfaceArray<'a>(&'a self, _arg_names: Option<&'a [Option<String>]>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>>>;
+ fn r#VerifyNamesWithNullableInterfaceArray<'a>(&'a self, _arg_services: Option<&'a [Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>]>, _arg_names: Option<&'a [Option<String>]>) -> binder::BoxFuture<'a, binder::Result<bool>>;
+ fn r#GetInterfaceList<'a>(&'a self, _arg_names: Option<&'a [Option<String>]>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>>>;
+ fn r#VerifyNamesWithInterfaceList<'a>(&'a self, _arg_services: Option<&'a [Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>]>, _arg_names: Option<&'a [Option<String>]>) -> binder::BoxFuture<'a, binder::Result<bool>>;
+ fn r#ReverseStringList<'a>(&'a self, _arg_input: &'a [String], _arg_repeated: &'a mut Vec<String>) -> binder::BoxFuture<'a, binder::Result<Vec<String>>>;
+ fn r#RepeatParcelFileDescriptor<'a>(&'a self, _arg_read: &'a binder::ParcelFileDescriptor) -> binder::BoxFuture<'a, binder::Result<binder::ParcelFileDescriptor>>;
+ fn r#ReverseParcelFileDescriptorArray<'a>(&'a self, _arg_input: &'a [binder::ParcelFileDescriptor], _arg_repeated: &'a mut Vec<Option<binder::ParcelFileDescriptor>>) -> binder::BoxFuture<'a, binder::Result<Vec<binder::ParcelFileDescriptor>>>;
+ fn r#ThrowServiceException<'a>(&'a self, _arg_code: i32) -> binder::BoxFuture<'a, binder::Result<()>>;
+ fn r#RepeatNullableIntArray<'a>(&'a self, _arg_input: Option<&'a [i32]>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<i32>>>>;
+ fn r#RepeatNullableByteEnumArray<'a>(&'a self, _arg_input: Option<&'a [crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum]>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>>>>;
+ fn r#RepeatNullableIntEnumArray<'a>(&'a self, _arg_input: Option<&'a [crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum]>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>>>>;
+ fn r#RepeatNullableLongEnumArray<'a>(&'a self, _arg_input: Option<&'a [crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum]>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>>>>;
+ fn r#RepeatNullableString<'a>(&'a self, _arg_input: Option<&'a str>) -> binder::BoxFuture<'a, binder::Result<Option<String>>>;
+ fn r#RepeatNullableStringList<'a>(&'a self, _arg_input: Option<&'a [Option<String>]>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<String>>>>>;
+ fn r#RepeatNullableParcelable<'a>(&'a self, _arg_input: Option<&'a crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>) -> binder::BoxFuture<'a, binder::Result<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>;
+ fn r#RepeatNullableParcelableArray<'a>(&'a self, _arg_input: Option<&'a [Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>>>;
+ fn r#RepeatNullableParcelableList<'a>(&'a self, _arg_input: Option<&'a [Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>>>;
+ fn r#TakesAnIBinder<'a>(&'a self, _arg_input: &'a binder::SpIBinder) -> binder::BoxFuture<'a, binder::Result<()>>;
+ fn r#TakesANullableIBinder<'a>(&'a self, _arg_input: Option<&'a binder::SpIBinder>) -> binder::BoxFuture<'a, binder::Result<()>>;
+ fn r#TakesAnIBinderList<'a>(&'a self, _arg_input: &'a [binder::SpIBinder]) -> binder::BoxFuture<'a, binder::Result<()>>;
+ fn r#TakesANullableIBinderList<'a>(&'a self, _arg_input: Option<&'a [Option<binder::SpIBinder>]>) -> binder::BoxFuture<'a, binder::Result<()>>;
+ fn r#RepeatUtf8CppString<'a>(&'a self, _arg_token: &'a str) -> binder::BoxFuture<'a, binder::Result<String>>;
+ fn r#RepeatNullableUtf8CppString<'a>(&'a self, _arg_token: Option<&'a str>) -> binder::BoxFuture<'a, binder::Result<Option<String>>>;
+ fn r#ReverseUtf8CppString<'a>(&'a self, _arg_input: &'a [String], _arg_repeated: &'a mut Vec<String>) -> binder::BoxFuture<'a, binder::Result<Vec<String>>>;
+ fn r#ReverseNullableUtf8CppString<'a>(&'a self, _arg_input: Option<&'a [Option<String>]>, _arg_repeated: &'a mut Option<Vec<Option<String>>>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<String>>>>>;
+ fn r#ReverseUtf8CppStringList<'a>(&'a self, _arg_input: Option<&'a [Option<String>]>, _arg_repeated: &'a mut Option<Vec<Option<String>>>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<String>>>>>;
+ fn r#GetCallback<'a>(&'a self, _arg_return_null: bool) -> binder::BoxFuture<'a, binder::Result<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>;
+ fn r#FillOutStructuredParcelable<'a>(&'a self, _arg_parcel: &'a mut crate::mangled::_7_android_4_aidl_5_tests_20_StructuredParcelable) -> binder::BoxFuture<'a, binder::Result<()>>;
+ fn r#RepeatExtendableParcelable<'a>(&'a self, _arg_ep: &'a crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable, _arg_ep2: &'a mut crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable) -> binder::BoxFuture<'a, binder::Result<()>>;
+ fn r#ReverseList<'a>(&'a self, _arg_list: &'a crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList) -> binder::BoxFuture<'a, binder::Result<crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList>>;
+ fn r#ReverseIBinderArray<'a>(&'a self, _arg_input: &'a [binder::SpIBinder], _arg_repeated: &'a mut Vec<Option<binder::SpIBinder>>) -> binder::BoxFuture<'a, binder::Result<Vec<binder::SpIBinder>>>;
+ fn r#ReverseNullableIBinderArray<'a>(&'a self, _arg_input: Option<&'a [Option<binder::SpIBinder>]>, _arg_repeated: &'a mut Option<Vec<Option<binder::SpIBinder>>>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<binder::SpIBinder>>>>>;
+ fn r#GetOldNameInterface<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_IOldName>>>;
+ fn r#GetNewNameInterface<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_INewName>>>;
+ fn r#GetUnionTags<'a>(&'a self, _arg_input: &'a [crate::mangled::_7_android_4_aidl_5_tests_5_Union]) -> binder::BoxFuture<'a, binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_5_Union_3_Tag>>>;
+ fn r#GetCppJavaTests<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<Option<binder::SpIBinder>>>;
+ fn r#getBackendType<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<crate::mangled::_7_android_4_aidl_5_tests_11_BackendType>>;
+ fn r#GetCircular<'a>(&'a self, _arg_cp: &'a mut crate::mangled::_7_android_4_aidl_5_tests_18_CircularParcelable) -> binder::BoxFuture<'a, binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_9_ICircular>>>;
}
#[::async_trait::async_trait]
pub trait ITestServiceAsyncServer: binder::Interface + Send {
fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.ITestService" }
- async fn UnimplementedMethod(&self, _arg_arg: i32) -> binder::Result<i32>;
+ async fn r#UnimplementedMethod(&self, _arg_arg: i32) -> binder::Result<i32>;
#[deprecated = "to make sure we have something in system/tools/aidl which does a compile check of deprecated and make sure this is reflected in goldens"]
- async fn Deprecated(&self) -> binder::Result<()>;
- async fn TestOneway(&self) -> binder::Result<()>;
- async fn RepeatBoolean(&self, _arg_token: bool) -> binder::Result<bool>;
- async fn RepeatByte(&self, _arg_token: i8) -> binder::Result<i8>;
- async fn RepeatChar(&self, _arg_token: u16) -> binder::Result<u16>;
- async fn RepeatInt(&self, _arg_token: i32) -> binder::Result<i32>;
- async fn RepeatLong(&self, _arg_token: i64) -> binder::Result<i64>;
- async fn RepeatFloat(&self, _arg_token: f32) -> binder::Result<f32>;
- async fn RepeatDouble(&self, _arg_token: f64) -> binder::Result<f64>;
- async fn RepeatString(&self, _arg_token: &str) -> binder::Result<String>;
- async fn RepeatByteEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>;
- async fn RepeatIntEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>;
- async fn RepeatLongEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>;
- async fn ReverseBoolean(&self, _arg_input: &[bool], _arg_repeated: &mut Vec<bool>) -> binder::Result<Vec<bool>>;
- async fn ReverseByte(&self, _arg_input: &[u8], _arg_repeated: &mut Vec<u8>) -> binder::Result<Vec<u8>>;
- async fn ReverseChar(&self, _arg_input: &[u16], _arg_repeated: &mut Vec<u16>) -> binder::Result<Vec<u16>>;
- async fn ReverseInt(&self, _arg_input: &[i32], _arg_repeated: &mut Vec<i32>) -> binder::Result<Vec<i32>>;
- async fn ReverseLong(&self, _arg_input: &[i64], _arg_repeated: &mut Vec<i64>) -> binder::Result<Vec<i64>>;
- async fn ReverseFloat(&self, _arg_input: &[f32], _arg_repeated: &mut Vec<f32>) -> binder::Result<Vec<f32>>;
- async fn ReverseDouble(&self, _arg_input: &[f64], _arg_repeated: &mut Vec<f64>) -> binder::Result<Vec<f64>>;
- async fn ReverseString(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::Result<Vec<String>>;
- async fn ReverseByteEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>>;
- async fn ReverseIntEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>>;
- async fn ReverseLongEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>>;
- async fn GetOtherTestService(&self, _arg_name: &str) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>;
- async fn VerifyName(&self, _arg_service: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>, _arg_name: &str) -> binder::Result<bool>;
- async fn GetInterfaceArray(&self, _arg_names: &[String]) -> binder::Result<Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>;
- async fn VerifyNamesWithInterfaceArray(&self, _arg_services: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>], _arg_names: &[String]) -> binder::Result<bool>;
- async fn GetNullableInterfaceArray(&self, _arg_names: Option<&[Option<String>]>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>>;
- async fn VerifyNamesWithNullableInterfaceArray(&self, _arg_services: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>]>, _arg_names: Option<&[Option<String>]>) -> binder::Result<bool>;
- async fn GetInterfaceList(&self, _arg_names: Option<&[Option<String>]>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>>;
- async fn VerifyNamesWithInterfaceList(&self, _arg_services: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>]>, _arg_names: Option<&[Option<String>]>) -> binder::Result<bool>;
- async fn ReverseStringList(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::Result<Vec<String>>;
- async fn RepeatParcelFileDescriptor(&self, _arg_read: &binder::ParcelFileDescriptor) -> binder::Result<binder::ParcelFileDescriptor>;
- async fn ReverseParcelFileDescriptorArray(&self, _arg_input: &[binder::ParcelFileDescriptor], _arg_repeated: &mut Vec<Option<binder::ParcelFileDescriptor>>) -> binder::Result<Vec<binder::ParcelFileDescriptor>>;
- async fn ThrowServiceException(&self, _arg_code: i32) -> binder::Result<()>;
- async fn RepeatNullableIntArray(&self, _arg_input: Option<&[i32]>) -> binder::Result<Option<Vec<i32>>>;
- async fn RepeatNullableByteEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum]>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>>>;
- async fn RepeatNullableIntEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum]>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>>>;
- async fn RepeatNullableLongEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum]>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>>>;
- async fn RepeatNullableString(&self, _arg_input: Option<&str>) -> binder::Result<Option<String>>;
- async fn RepeatNullableStringList(&self, _arg_input: Option<&[Option<String>]>) -> binder::Result<Option<Vec<Option<String>>>>;
- async fn RepeatNullableParcelable(&self, _arg_input: Option<&crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>) -> binder::Result<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>;
- async fn RepeatNullableParcelableArray(&self, _arg_input: Option<&[Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>>;
- async fn RepeatNullableParcelableList(&self, _arg_input: Option<&[Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>>;
- async fn TakesAnIBinder(&self, _arg_input: &binder::SpIBinder) -> binder::Result<()>;
- async fn TakesANullableIBinder(&self, _arg_input: Option<&binder::SpIBinder>) -> binder::Result<()>;
- async fn TakesAnIBinderList(&self, _arg_input: &[binder::SpIBinder]) -> binder::Result<()>;
- async fn TakesANullableIBinderList(&self, _arg_input: Option<&[Option<binder::SpIBinder>]>) -> binder::Result<()>;
- async fn RepeatUtf8CppString(&self, _arg_token: &str) -> binder::Result<String>;
- async fn RepeatNullableUtf8CppString(&self, _arg_token: Option<&str>) -> binder::Result<Option<String>>;
- async fn ReverseUtf8CppString(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::Result<Vec<String>>;
- async fn ReverseNullableUtf8CppString(&self, _arg_input: Option<&[Option<String>]>, _arg_repeated: &mut Option<Vec<Option<String>>>) -> binder::Result<Option<Vec<Option<String>>>>;
- async fn ReverseUtf8CppStringList(&self, _arg_input: Option<&[Option<String>]>, _arg_repeated: &mut Option<Vec<Option<String>>>) -> binder::Result<Option<Vec<Option<String>>>>;
- async fn GetCallback(&self, _arg_return_null: bool) -> binder::Result<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>;
- async fn FillOutStructuredParcelable(&self, _arg_parcel: &mut crate::mangled::_7_android_4_aidl_5_tests_20_StructuredParcelable) -> binder::Result<()>;
- async fn RepeatExtendableParcelable(&self, _arg_ep: &crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable, _arg_ep2: &mut crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable) -> binder::Result<()>;
- async fn ReverseList(&self, _arg_list: &crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList>;
- async fn ReverseIBinderArray(&self, _arg_input: &[binder::SpIBinder], _arg_repeated: &mut Vec<Option<binder::SpIBinder>>) -> binder::Result<Vec<binder::SpIBinder>>;
- async fn ReverseNullableIBinderArray(&self, _arg_input: Option<&[Option<binder::SpIBinder>]>, _arg_repeated: &mut Option<Vec<Option<binder::SpIBinder>>>) -> binder::Result<Option<Vec<Option<binder::SpIBinder>>>>;
- async fn GetOldNameInterface(&self) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_IOldName>>;
- async fn GetNewNameInterface(&self) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_INewName>>;
- async fn GetUnionTags(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_5_Union]) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_5_Union_3_Tag>>;
- async fn GetCppJavaTests(&self) -> binder::Result<Option<binder::SpIBinder>>;
- async fn getBackendType(&self) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_11_BackendType>;
+ async fn r#Deprecated(&self) -> binder::Result<()>;
+ async fn r#TestOneway(&self) -> binder::Result<()>;
+ async fn r#RepeatBoolean(&self, _arg_token: bool) -> binder::Result<bool>;
+ async fn r#RepeatByte(&self, _arg_token: i8) -> binder::Result<i8>;
+ async fn r#RepeatChar(&self, _arg_token: u16) -> binder::Result<u16>;
+ async fn r#RepeatInt(&self, _arg_token: i32) -> binder::Result<i32>;
+ async fn r#RepeatLong(&self, _arg_token: i64) -> binder::Result<i64>;
+ async fn r#RepeatFloat(&self, _arg_token: f32) -> binder::Result<f32>;
+ async fn r#RepeatDouble(&self, _arg_token: f64) -> binder::Result<f64>;
+ async fn r#RepeatString(&self, _arg_token: &str) -> binder::Result<String>;
+ async fn r#RepeatByteEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>;
+ async fn r#RepeatIntEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>;
+ async fn r#RepeatLongEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>;
+ async fn r#ReverseBoolean(&self, _arg_input: &[bool], _arg_repeated: &mut Vec<bool>) -> binder::Result<Vec<bool>>;
+ async fn r#ReverseByte(&self, _arg_input: &[u8], _arg_repeated: &mut Vec<u8>) -> binder::Result<Vec<u8>>;
+ async fn r#ReverseChar(&self, _arg_input: &[u16], _arg_repeated: &mut Vec<u16>) -> binder::Result<Vec<u16>>;
+ async fn r#ReverseInt(&self, _arg_input: &[i32], _arg_repeated: &mut Vec<i32>) -> binder::Result<Vec<i32>>;
+ async fn r#ReverseLong(&self, _arg_input: &[i64], _arg_repeated: &mut Vec<i64>) -> binder::Result<Vec<i64>>;
+ async fn r#ReverseFloat(&self, _arg_input: &[f32], _arg_repeated: &mut Vec<f32>) -> binder::Result<Vec<f32>>;
+ async fn r#ReverseDouble(&self, _arg_input: &[f64], _arg_repeated: &mut Vec<f64>) -> binder::Result<Vec<f64>>;
+ async fn r#ReverseString(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::Result<Vec<String>>;
+ async fn r#ReverseByteEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>>;
+ async fn r#ReverseIntEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>>;
+ async fn r#ReverseLongEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>>;
+ async fn r#GetOtherTestService(&self, _arg_name: &str) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>;
+ async fn r#SetOtherTestService(&self, _arg_name: &str, _arg_service: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>) -> binder::Result<bool>;
+ async fn r#VerifyName(&self, _arg_service: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>, _arg_name: &str) -> binder::Result<bool>;
+ async fn r#GetInterfaceArray(&self, _arg_names: &[String]) -> binder::Result<Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>;
+ async fn r#VerifyNamesWithInterfaceArray(&self, _arg_services: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>], _arg_names: &[String]) -> binder::Result<bool>;
+ async fn r#GetNullableInterfaceArray(&self, _arg_names: Option<&[Option<String>]>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>>;
+ async fn r#VerifyNamesWithNullableInterfaceArray(&self, _arg_services: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>]>, _arg_names: Option<&[Option<String>]>) -> binder::Result<bool>;
+ async fn r#GetInterfaceList(&self, _arg_names: Option<&[Option<String>]>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>>;
+ async fn r#VerifyNamesWithInterfaceList(&self, _arg_services: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>]>, _arg_names: Option<&[Option<String>]>) -> binder::Result<bool>;
+ async fn r#ReverseStringList(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::Result<Vec<String>>;
+ async fn r#RepeatParcelFileDescriptor(&self, _arg_read: &binder::ParcelFileDescriptor) -> binder::Result<binder::ParcelFileDescriptor>;
+ async fn r#ReverseParcelFileDescriptorArray(&self, _arg_input: &[binder::ParcelFileDescriptor], _arg_repeated: &mut Vec<Option<binder::ParcelFileDescriptor>>) -> binder::Result<Vec<binder::ParcelFileDescriptor>>;
+ async fn r#ThrowServiceException(&self, _arg_code: i32) -> binder::Result<()>;
+ async fn r#RepeatNullableIntArray(&self, _arg_input: Option<&[i32]>) -> binder::Result<Option<Vec<i32>>>;
+ async fn r#RepeatNullableByteEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum]>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>>>;
+ async fn r#RepeatNullableIntEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum]>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>>>;
+ async fn r#RepeatNullableLongEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum]>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>>>;
+ async fn r#RepeatNullableString(&self, _arg_input: Option<&str>) -> binder::Result<Option<String>>;
+ async fn r#RepeatNullableStringList(&self, _arg_input: Option<&[Option<String>]>) -> binder::Result<Option<Vec<Option<String>>>>;
+ async fn r#RepeatNullableParcelable(&self, _arg_input: Option<&crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>) -> binder::Result<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>;
+ async fn r#RepeatNullableParcelableArray(&self, _arg_input: Option<&[Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>>;
+ async fn r#RepeatNullableParcelableList(&self, _arg_input: Option<&[Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>>;
+ async fn r#TakesAnIBinder(&self, _arg_input: &binder::SpIBinder) -> binder::Result<()>;
+ async fn r#TakesANullableIBinder(&self, _arg_input: Option<&binder::SpIBinder>) -> binder::Result<()>;
+ async fn r#TakesAnIBinderList(&self, _arg_input: &[binder::SpIBinder]) -> binder::Result<()>;
+ async fn r#TakesANullableIBinderList(&self, _arg_input: Option<&[Option<binder::SpIBinder>]>) -> binder::Result<()>;
+ async fn r#RepeatUtf8CppString(&self, _arg_token: &str) -> binder::Result<String>;
+ async fn r#RepeatNullableUtf8CppString(&self, _arg_token: Option<&str>) -> binder::Result<Option<String>>;
+ async fn r#ReverseUtf8CppString(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::Result<Vec<String>>;
+ async fn r#ReverseNullableUtf8CppString(&self, _arg_input: Option<&[Option<String>]>, _arg_repeated: &mut Option<Vec<Option<String>>>) -> binder::Result<Option<Vec<Option<String>>>>;
+ async fn r#ReverseUtf8CppStringList(&self, _arg_input: Option<&[Option<String>]>, _arg_repeated: &mut Option<Vec<Option<String>>>) -> binder::Result<Option<Vec<Option<String>>>>;
+ async fn r#GetCallback(&self, _arg_return_null: bool) -> binder::Result<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>;
+ async fn r#FillOutStructuredParcelable(&self, _arg_parcel: &mut crate::mangled::_7_android_4_aidl_5_tests_20_StructuredParcelable) -> binder::Result<()>;
+ async fn r#RepeatExtendableParcelable(&self, _arg_ep: &crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable, _arg_ep2: &mut crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable) -> binder::Result<()>;
+ async fn r#ReverseList(&self, _arg_list: &crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList>;
+ async fn r#ReverseIBinderArray(&self, _arg_input: &[binder::SpIBinder], _arg_repeated: &mut Vec<Option<binder::SpIBinder>>) -> binder::Result<Vec<binder::SpIBinder>>;
+ async fn r#ReverseNullableIBinderArray(&self, _arg_input: Option<&[Option<binder::SpIBinder>]>, _arg_repeated: &mut Option<Vec<Option<binder::SpIBinder>>>) -> binder::Result<Option<Vec<Option<binder::SpIBinder>>>>;
+ async fn r#GetOldNameInterface(&self) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_IOldName>>;
+ async fn r#GetNewNameInterface(&self) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_INewName>>;
+ async fn r#GetUnionTags(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_5_Union]) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_5_Union_3_Tag>>;
+ async fn r#GetCppJavaTests(&self) -> binder::Result<Option<binder::SpIBinder>>;
+ async fn r#getBackendType(&self) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_11_BackendType>;
+ async fn r#GetCircular(&self, _arg_cp: &mut crate::mangled::_7_android_4_aidl_5_tests_18_CircularParcelable) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_9_ICircular>>;
}
impl BnTestService {
/// Create a new async binder service.
@@ -249,203 +255,209 @@ impl BnTestService {
T: ITestServiceAsyncServer + Send + Sync + 'static,
R: binder::binder_impl::BinderAsyncRuntime + Send + Sync + 'static,
{
- fn UnimplementedMethod(&self, _arg_arg: i32) -> binder::Result<i32> {
- self._rt.block_on(self._inner.UnimplementedMethod(_arg_arg))
+ fn r#UnimplementedMethod(&self, _arg_arg: i32) -> binder::Result<i32> {
+ self._rt.block_on(self._inner.r#UnimplementedMethod(_arg_arg))
}
- fn Deprecated(&self) -> binder::Result<()> {
- self._rt.block_on(self._inner.Deprecated())
+ fn r#Deprecated(&self) -> binder::Result<()> {
+ self._rt.block_on(self._inner.r#Deprecated())
}
- fn TestOneway(&self) -> binder::Result<()> {
- self._rt.block_on(self._inner.TestOneway())
+ fn r#TestOneway(&self) -> binder::Result<()> {
+ self._rt.block_on(self._inner.r#TestOneway())
}
- fn RepeatBoolean(&self, _arg_token: bool) -> binder::Result<bool> {
- self._rt.block_on(self._inner.RepeatBoolean(_arg_token))
+ fn r#RepeatBoolean(&self, _arg_token: bool) -> binder::Result<bool> {
+ self._rt.block_on(self._inner.r#RepeatBoolean(_arg_token))
}
- fn RepeatByte(&self, _arg_token: i8) -> binder::Result<i8> {
- self._rt.block_on(self._inner.RepeatByte(_arg_token))
+ fn r#RepeatByte(&self, _arg_token: i8) -> binder::Result<i8> {
+ self._rt.block_on(self._inner.r#RepeatByte(_arg_token))
}
- fn RepeatChar(&self, _arg_token: u16) -> binder::Result<u16> {
- self._rt.block_on(self._inner.RepeatChar(_arg_token))
+ fn r#RepeatChar(&self, _arg_token: u16) -> binder::Result<u16> {
+ self._rt.block_on(self._inner.r#RepeatChar(_arg_token))
}
- fn RepeatInt(&self, _arg_token: i32) -> binder::Result<i32> {
- self._rt.block_on(self._inner.RepeatInt(_arg_token))
+ fn r#RepeatInt(&self, _arg_token: i32) -> binder::Result<i32> {
+ self._rt.block_on(self._inner.r#RepeatInt(_arg_token))
}
- fn RepeatLong(&self, _arg_token: i64) -> binder::Result<i64> {
- self._rt.block_on(self._inner.RepeatLong(_arg_token))
+ fn r#RepeatLong(&self, _arg_token: i64) -> binder::Result<i64> {
+ self._rt.block_on(self._inner.r#RepeatLong(_arg_token))
}
- fn RepeatFloat(&self, _arg_token: f32) -> binder::Result<f32> {
- self._rt.block_on(self._inner.RepeatFloat(_arg_token))
+ fn r#RepeatFloat(&self, _arg_token: f32) -> binder::Result<f32> {
+ self._rt.block_on(self._inner.r#RepeatFloat(_arg_token))
}
- fn RepeatDouble(&self, _arg_token: f64) -> binder::Result<f64> {
- self._rt.block_on(self._inner.RepeatDouble(_arg_token))
+ fn r#RepeatDouble(&self, _arg_token: f64) -> binder::Result<f64> {
+ self._rt.block_on(self._inner.r#RepeatDouble(_arg_token))
}
- fn RepeatString(&self, _arg_token: &str) -> binder::Result<String> {
- self._rt.block_on(self._inner.RepeatString(_arg_token))
+ fn r#RepeatString(&self, _arg_token: &str) -> binder::Result<String> {
+ self._rt.block_on(self._inner.r#RepeatString(_arg_token))
}
- fn RepeatByteEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum> {
- self._rt.block_on(self._inner.RepeatByteEnum(_arg_token))
+ fn r#RepeatByteEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum> {
+ self._rt.block_on(self._inner.r#RepeatByteEnum(_arg_token))
}
- fn RepeatIntEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum> {
- self._rt.block_on(self._inner.RepeatIntEnum(_arg_token))
+ fn r#RepeatIntEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum> {
+ self._rt.block_on(self._inner.r#RepeatIntEnum(_arg_token))
}
- fn RepeatLongEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum> {
- self._rt.block_on(self._inner.RepeatLongEnum(_arg_token))
+ fn r#RepeatLongEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum> {
+ self._rt.block_on(self._inner.r#RepeatLongEnum(_arg_token))
}
- fn ReverseBoolean(&self, _arg_input: &[bool], _arg_repeated: &mut Vec<bool>) -> binder::Result<Vec<bool>> {
- self._rt.block_on(self._inner.ReverseBoolean(_arg_input, _arg_repeated))
+ fn r#ReverseBoolean(&self, _arg_input: &[bool], _arg_repeated: &mut Vec<bool>) -> binder::Result<Vec<bool>> {
+ self._rt.block_on(self._inner.r#ReverseBoolean(_arg_input, _arg_repeated))
}
- fn ReverseByte(&self, _arg_input: &[u8], _arg_repeated: &mut Vec<u8>) -> binder::Result<Vec<u8>> {
- self._rt.block_on(self._inner.ReverseByte(_arg_input, _arg_repeated))
+ fn r#ReverseByte(&self, _arg_input: &[u8], _arg_repeated: &mut Vec<u8>) -> binder::Result<Vec<u8>> {
+ self._rt.block_on(self._inner.r#ReverseByte(_arg_input, _arg_repeated))
}
- fn ReverseChar(&self, _arg_input: &[u16], _arg_repeated: &mut Vec<u16>) -> binder::Result<Vec<u16>> {
- self._rt.block_on(self._inner.ReverseChar(_arg_input, _arg_repeated))
+ fn r#ReverseChar(&self, _arg_input: &[u16], _arg_repeated: &mut Vec<u16>) -> binder::Result<Vec<u16>> {
+ self._rt.block_on(self._inner.r#ReverseChar(_arg_input, _arg_repeated))
}
- fn ReverseInt(&self, _arg_input: &[i32], _arg_repeated: &mut Vec<i32>) -> binder::Result<Vec<i32>> {
- self._rt.block_on(self._inner.ReverseInt(_arg_input, _arg_repeated))
+ fn r#ReverseInt(&self, _arg_input: &[i32], _arg_repeated: &mut Vec<i32>) -> binder::Result<Vec<i32>> {
+ self._rt.block_on(self._inner.r#ReverseInt(_arg_input, _arg_repeated))
}
- fn ReverseLong(&self, _arg_input: &[i64], _arg_repeated: &mut Vec<i64>) -> binder::Result<Vec<i64>> {
- self._rt.block_on(self._inner.ReverseLong(_arg_input, _arg_repeated))
+ fn r#ReverseLong(&self, _arg_input: &[i64], _arg_repeated: &mut Vec<i64>) -> binder::Result<Vec<i64>> {
+ self._rt.block_on(self._inner.r#ReverseLong(_arg_input, _arg_repeated))
}
- fn ReverseFloat(&self, _arg_input: &[f32], _arg_repeated: &mut Vec<f32>) -> binder::Result<Vec<f32>> {
- self._rt.block_on(self._inner.ReverseFloat(_arg_input, _arg_repeated))
+ fn r#ReverseFloat(&self, _arg_input: &[f32], _arg_repeated: &mut Vec<f32>) -> binder::Result<Vec<f32>> {
+ self._rt.block_on(self._inner.r#ReverseFloat(_arg_input, _arg_repeated))
}
- fn ReverseDouble(&self, _arg_input: &[f64], _arg_repeated: &mut Vec<f64>) -> binder::Result<Vec<f64>> {
- self._rt.block_on(self._inner.ReverseDouble(_arg_input, _arg_repeated))
+ fn r#ReverseDouble(&self, _arg_input: &[f64], _arg_repeated: &mut Vec<f64>) -> binder::Result<Vec<f64>> {
+ self._rt.block_on(self._inner.r#ReverseDouble(_arg_input, _arg_repeated))
}
- fn ReverseString(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::Result<Vec<String>> {
- self._rt.block_on(self._inner.ReverseString(_arg_input, _arg_repeated))
+ fn r#ReverseString(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::Result<Vec<String>> {
+ self._rt.block_on(self._inner.r#ReverseString(_arg_input, _arg_repeated))
}
- fn ReverseByteEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>> {
- self._rt.block_on(self._inner.ReverseByteEnum(_arg_input, _arg_repeated))
+ fn r#ReverseByteEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>> {
+ self._rt.block_on(self._inner.r#ReverseByteEnum(_arg_input, _arg_repeated))
}
- fn ReverseIntEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>> {
- self._rt.block_on(self._inner.ReverseIntEnum(_arg_input, _arg_repeated))
+ fn r#ReverseIntEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>> {
+ self._rt.block_on(self._inner.r#ReverseIntEnum(_arg_input, _arg_repeated))
}
- fn ReverseLongEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>> {
- self._rt.block_on(self._inner.ReverseLongEnum(_arg_input, _arg_repeated))
+ fn r#ReverseLongEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>> {
+ self._rt.block_on(self._inner.r#ReverseLongEnum(_arg_input, _arg_repeated))
}
- fn GetOtherTestService(&self, _arg_name: &str) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>> {
- self._rt.block_on(self._inner.GetOtherTestService(_arg_name))
+ fn r#GetOtherTestService(&self, _arg_name: &str) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>> {
+ self._rt.block_on(self._inner.r#GetOtherTestService(_arg_name))
}
- fn VerifyName(&self, _arg_service: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>, _arg_name: &str) -> binder::Result<bool> {
- self._rt.block_on(self._inner.VerifyName(_arg_service, _arg_name))
+ fn r#SetOtherTestService(&self, _arg_name: &str, _arg_service: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>) -> binder::Result<bool> {
+ self._rt.block_on(self._inner.r#SetOtherTestService(_arg_name, _arg_service))
}
- fn GetInterfaceArray(&self, _arg_names: &[String]) -> binder::Result<Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>> {
- self._rt.block_on(self._inner.GetInterfaceArray(_arg_names))
+ fn r#VerifyName(&self, _arg_service: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>, _arg_name: &str) -> binder::Result<bool> {
+ self._rt.block_on(self._inner.r#VerifyName(_arg_service, _arg_name))
}
- fn VerifyNamesWithInterfaceArray(&self, _arg_services: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>], _arg_names: &[String]) -> binder::Result<bool> {
- self._rt.block_on(self._inner.VerifyNamesWithInterfaceArray(_arg_services, _arg_names))
+ fn r#GetInterfaceArray(&self, _arg_names: &[String]) -> binder::Result<Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>> {
+ self._rt.block_on(self._inner.r#GetInterfaceArray(_arg_names))
}
- fn GetNullableInterfaceArray(&self, _arg_names: Option<&[Option<String>]>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>> {
- self._rt.block_on(self._inner.GetNullableInterfaceArray(_arg_names))
+ fn r#VerifyNamesWithInterfaceArray(&self, _arg_services: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>], _arg_names: &[String]) -> binder::Result<bool> {
+ self._rt.block_on(self._inner.r#VerifyNamesWithInterfaceArray(_arg_services, _arg_names))
}
- fn VerifyNamesWithNullableInterfaceArray(&self, _arg_services: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>]>, _arg_names: Option<&[Option<String>]>) -> binder::Result<bool> {
- self._rt.block_on(self._inner.VerifyNamesWithNullableInterfaceArray(_arg_services, _arg_names))
+ fn r#GetNullableInterfaceArray(&self, _arg_names: Option<&[Option<String>]>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>> {
+ self._rt.block_on(self._inner.r#GetNullableInterfaceArray(_arg_names))
}
- fn GetInterfaceList(&self, _arg_names: Option<&[Option<String>]>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>> {
- self._rt.block_on(self._inner.GetInterfaceList(_arg_names))
+ fn r#VerifyNamesWithNullableInterfaceArray(&self, _arg_services: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>]>, _arg_names: Option<&[Option<String>]>) -> binder::Result<bool> {
+ self._rt.block_on(self._inner.r#VerifyNamesWithNullableInterfaceArray(_arg_services, _arg_names))
}
- fn VerifyNamesWithInterfaceList(&self, _arg_services: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>]>, _arg_names: Option<&[Option<String>]>) -> binder::Result<bool> {
- self._rt.block_on(self._inner.VerifyNamesWithInterfaceList(_arg_services, _arg_names))
+ fn r#GetInterfaceList(&self, _arg_names: Option<&[Option<String>]>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>> {
+ self._rt.block_on(self._inner.r#GetInterfaceList(_arg_names))
}
- fn ReverseStringList(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::Result<Vec<String>> {
- self._rt.block_on(self._inner.ReverseStringList(_arg_input, _arg_repeated))
+ fn r#VerifyNamesWithInterfaceList(&self, _arg_services: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>]>, _arg_names: Option<&[Option<String>]>) -> binder::Result<bool> {
+ self._rt.block_on(self._inner.r#VerifyNamesWithInterfaceList(_arg_services, _arg_names))
}
- fn RepeatParcelFileDescriptor(&self, _arg_read: &binder::ParcelFileDescriptor) -> binder::Result<binder::ParcelFileDescriptor> {
- self._rt.block_on(self._inner.RepeatParcelFileDescriptor(_arg_read))
+ fn r#ReverseStringList(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::Result<Vec<String>> {
+ self._rt.block_on(self._inner.r#ReverseStringList(_arg_input, _arg_repeated))
}
- fn ReverseParcelFileDescriptorArray(&self, _arg_input: &[binder::ParcelFileDescriptor], _arg_repeated: &mut Vec<Option<binder::ParcelFileDescriptor>>) -> binder::Result<Vec<binder::ParcelFileDescriptor>> {
- self._rt.block_on(self._inner.ReverseParcelFileDescriptorArray(_arg_input, _arg_repeated))
+ fn r#RepeatParcelFileDescriptor(&self, _arg_read: &binder::ParcelFileDescriptor) -> binder::Result<binder::ParcelFileDescriptor> {
+ self._rt.block_on(self._inner.r#RepeatParcelFileDescriptor(_arg_read))
}
- fn ThrowServiceException(&self, _arg_code: i32) -> binder::Result<()> {
- self._rt.block_on(self._inner.ThrowServiceException(_arg_code))
+ fn r#ReverseParcelFileDescriptorArray(&self, _arg_input: &[binder::ParcelFileDescriptor], _arg_repeated: &mut Vec<Option<binder::ParcelFileDescriptor>>) -> binder::Result<Vec<binder::ParcelFileDescriptor>> {
+ self._rt.block_on(self._inner.r#ReverseParcelFileDescriptorArray(_arg_input, _arg_repeated))
}
- fn RepeatNullableIntArray(&self, _arg_input: Option<&[i32]>) -> binder::Result<Option<Vec<i32>>> {
- self._rt.block_on(self._inner.RepeatNullableIntArray(_arg_input))
+ fn r#ThrowServiceException(&self, _arg_code: i32) -> binder::Result<()> {
+ self._rt.block_on(self._inner.r#ThrowServiceException(_arg_code))
}
- fn RepeatNullableByteEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum]>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>>> {
- self._rt.block_on(self._inner.RepeatNullableByteEnumArray(_arg_input))
+ fn r#RepeatNullableIntArray(&self, _arg_input: Option<&[i32]>) -> binder::Result<Option<Vec<i32>>> {
+ self._rt.block_on(self._inner.r#RepeatNullableIntArray(_arg_input))
}
- fn RepeatNullableIntEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum]>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>>> {
- self._rt.block_on(self._inner.RepeatNullableIntEnumArray(_arg_input))
+ fn r#RepeatNullableByteEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum]>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>>> {
+ self._rt.block_on(self._inner.r#RepeatNullableByteEnumArray(_arg_input))
}
- fn RepeatNullableLongEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum]>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>>> {
- self._rt.block_on(self._inner.RepeatNullableLongEnumArray(_arg_input))
+ fn r#RepeatNullableIntEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum]>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>>> {
+ self._rt.block_on(self._inner.r#RepeatNullableIntEnumArray(_arg_input))
}
- fn RepeatNullableString(&self, _arg_input: Option<&str>) -> binder::Result<Option<String>> {
- self._rt.block_on(self._inner.RepeatNullableString(_arg_input))
+ fn r#RepeatNullableLongEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum]>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>>> {
+ self._rt.block_on(self._inner.r#RepeatNullableLongEnumArray(_arg_input))
}
- fn RepeatNullableStringList(&self, _arg_input: Option<&[Option<String>]>) -> binder::Result<Option<Vec<Option<String>>>> {
- self._rt.block_on(self._inner.RepeatNullableStringList(_arg_input))
+ fn r#RepeatNullableString(&self, _arg_input: Option<&str>) -> binder::Result<Option<String>> {
+ self._rt.block_on(self._inner.r#RepeatNullableString(_arg_input))
}
- fn RepeatNullableParcelable(&self, _arg_input: Option<&crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>) -> binder::Result<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>> {
- self._rt.block_on(self._inner.RepeatNullableParcelable(_arg_input))
+ fn r#RepeatNullableStringList(&self, _arg_input: Option<&[Option<String>]>) -> binder::Result<Option<Vec<Option<String>>>> {
+ self._rt.block_on(self._inner.r#RepeatNullableStringList(_arg_input))
}
- fn RepeatNullableParcelableArray(&self, _arg_input: Option<&[Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>> {
- self._rt.block_on(self._inner.RepeatNullableParcelableArray(_arg_input))
+ fn r#RepeatNullableParcelable(&self, _arg_input: Option<&crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>) -> binder::Result<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>> {
+ self._rt.block_on(self._inner.r#RepeatNullableParcelable(_arg_input))
}
- fn RepeatNullableParcelableList(&self, _arg_input: Option<&[Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>> {
- self._rt.block_on(self._inner.RepeatNullableParcelableList(_arg_input))
+ fn r#RepeatNullableParcelableArray(&self, _arg_input: Option<&[Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>> {
+ self._rt.block_on(self._inner.r#RepeatNullableParcelableArray(_arg_input))
}
- fn TakesAnIBinder(&self, _arg_input: &binder::SpIBinder) -> binder::Result<()> {
- self._rt.block_on(self._inner.TakesAnIBinder(_arg_input))
+ fn r#RepeatNullableParcelableList(&self, _arg_input: Option<&[Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>> {
+ self._rt.block_on(self._inner.r#RepeatNullableParcelableList(_arg_input))
}
- fn TakesANullableIBinder(&self, _arg_input: Option<&binder::SpIBinder>) -> binder::Result<()> {
- self._rt.block_on(self._inner.TakesANullableIBinder(_arg_input))
+ fn r#TakesAnIBinder(&self, _arg_input: &binder::SpIBinder) -> binder::Result<()> {
+ self._rt.block_on(self._inner.r#TakesAnIBinder(_arg_input))
}
- fn TakesAnIBinderList(&self, _arg_input: &[binder::SpIBinder]) -> binder::Result<()> {
- self._rt.block_on(self._inner.TakesAnIBinderList(_arg_input))
+ fn r#TakesANullableIBinder(&self, _arg_input: Option<&binder::SpIBinder>) -> binder::Result<()> {
+ self._rt.block_on(self._inner.r#TakesANullableIBinder(_arg_input))
}
- fn TakesANullableIBinderList(&self, _arg_input: Option<&[Option<binder::SpIBinder>]>) -> binder::Result<()> {
- self._rt.block_on(self._inner.TakesANullableIBinderList(_arg_input))
+ fn r#TakesAnIBinderList(&self, _arg_input: &[binder::SpIBinder]) -> binder::Result<()> {
+ self._rt.block_on(self._inner.r#TakesAnIBinderList(_arg_input))
}
- fn RepeatUtf8CppString(&self, _arg_token: &str) -> binder::Result<String> {
- self._rt.block_on(self._inner.RepeatUtf8CppString(_arg_token))
+ fn r#TakesANullableIBinderList(&self, _arg_input: Option<&[Option<binder::SpIBinder>]>) -> binder::Result<()> {
+ self._rt.block_on(self._inner.r#TakesANullableIBinderList(_arg_input))
}
- fn RepeatNullableUtf8CppString(&self, _arg_token: Option<&str>) -> binder::Result<Option<String>> {
- self._rt.block_on(self._inner.RepeatNullableUtf8CppString(_arg_token))
+ fn r#RepeatUtf8CppString(&self, _arg_token: &str) -> binder::Result<String> {
+ self._rt.block_on(self._inner.r#RepeatUtf8CppString(_arg_token))
}
- fn ReverseUtf8CppString(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::Result<Vec<String>> {
- self._rt.block_on(self._inner.ReverseUtf8CppString(_arg_input, _arg_repeated))
+ fn r#RepeatNullableUtf8CppString(&self, _arg_token: Option<&str>) -> binder::Result<Option<String>> {
+ self._rt.block_on(self._inner.r#RepeatNullableUtf8CppString(_arg_token))
}
- fn ReverseNullableUtf8CppString(&self, _arg_input: Option<&[Option<String>]>, _arg_repeated: &mut Option<Vec<Option<String>>>) -> binder::Result<Option<Vec<Option<String>>>> {
- self._rt.block_on(self._inner.ReverseNullableUtf8CppString(_arg_input, _arg_repeated))
+ fn r#ReverseUtf8CppString(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::Result<Vec<String>> {
+ self._rt.block_on(self._inner.r#ReverseUtf8CppString(_arg_input, _arg_repeated))
}
- fn ReverseUtf8CppStringList(&self, _arg_input: Option<&[Option<String>]>, _arg_repeated: &mut Option<Vec<Option<String>>>) -> binder::Result<Option<Vec<Option<String>>>> {
- self._rt.block_on(self._inner.ReverseUtf8CppStringList(_arg_input, _arg_repeated))
+ fn r#ReverseNullableUtf8CppString(&self, _arg_input: Option<&[Option<String>]>, _arg_repeated: &mut Option<Vec<Option<String>>>) -> binder::Result<Option<Vec<Option<String>>>> {
+ self._rt.block_on(self._inner.r#ReverseNullableUtf8CppString(_arg_input, _arg_repeated))
}
- fn GetCallback(&self, _arg_return_null: bool) -> binder::Result<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>> {
- self._rt.block_on(self._inner.GetCallback(_arg_return_null))
+ fn r#ReverseUtf8CppStringList(&self, _arg_input: Option<&[Option<String>]>, _arg_repeated: &mut Option<Vec<Option<String>>>) -> binder::Result<Option<Vec<Option<String>>>> {
+ self._rt.block_on(self._inner.r#ReverseUtf8CppStringList(_arg_input, _arg_repeated))
}
- fn FillOutStructuredParcelable(&self, _arg_parcel: &mut crate::mangled::_7_android_4_aidl_5_tests_20_StructuredParcelable) -> binder::Result<()> {
- self._rt.block_on(self._inner.FillOutStructuredParcelable(_arg_parcel))
+ fn r#GetCallback(&self, _arg_return_null: bool) -> binder::Result<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>> {
+ self._rt.block_on(self._inner.r#GetCallback(_arg_return_null))
}
- fn RepeatExtendableParcelable(&self, _arg_ep: &crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable, _arg_ep2: &mut crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable) -> binder::Result<()> {
- self._rt.block_on(self._inner.RepeatExtendableParcelable(_arg_ep, _arg_ep2))
+ fn r#FillOutStructuredParcelable(&self, _arg_parcel: &mut crate::mangled::_7_android_4_aidl_5_tests_20_StructuredParcelable) -> binder::Result<()> {
+ self._rt.block_on(self._inner.r#FillOutStructuredParcelable(_arg_parcel))
}
- fn ReverseList(&self, _arg_list: &crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList> {
- self._rt.block_on(self._inner.ReverseList(_arg_list))
+ fn r#RepeatExtendableParcelable(&self, _arg_ep: &crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable, _arg_ep2: &mut crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable) -> binder::Result<()> {
+ self._rt.block_on(self._inner.r#RepeatExtendableParcelable(_arg_ep, _arg_ep2))
}
- fn ReverseIBinderArray(&self, _arg_input: &[binder::SpIBinder], _arg_repeated: &mut Vec<Option<binder::SpIBinder>>) -> binder::Result<Vec<binder::SpIBinder>> {
- self._rt.block_on(self._inner.ReverseIBinderArray(_arg_input, _arg_repeated))
+ fn r#ReverseList(&self, _arg_list: &crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList> {
+ self._rt.block_on(self._inner.r#ReverseList(_arg_list))
}
- fn ReverseNullableIBinderArray(&self, _arg_input: Option<&[Option<binder::SpIBinder>]>, _arg_repeated: &mut Option<Vec<Option<binder::SpIBinder>>>) -> binder::Result<Option<Vec<Option<binder::SpIBinder>>>> {
- self._rt.block_on(self._inner.ReverseNullableIBinderArray(_arg_input, _arg_repeated))
+ fn r#ReverseIBinderArray(&self, _arg_input: &[binder::SpIBinder], _arg_repeated: &mut Vec<Option<binder::SpIBinder>>) -> binder::Result<Vec<binder::SpIBinder>> {
+ self._rt.block_on(self._inner.r#ReverseIBinderArray(_arg_input, _arg_repeated))
}
- fn GetOldNameInterface(&self) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_IOldName>> {
- self._rt.block_on(self._inner.GetOldNameInterface())
+ fn r#ReverseNullableIBinderArray(&self, _arg_input: Option<&[Option<binder::SpIBinder>]>, _arg_repeated: &mut Option<Vec<Option<binder::SpIBinder>>>) -> binder::Result<Option<Vec<Option<binder::SpIBinder>>>> {
+ self._rt.block_on(self._inner.r#ReverseNullableIBinderArray(_arg_input, _arg_repeated))
}
- fn GetNewNameInterface(&self) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_INewName>> {
- self._rt.block_on(self._inner.GetNewNameInterface())
+ fn r#GetOldNameInterface(&self) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_IOldName>> {
+ self._rt.block_on(self._inner.r#GetOldNameInterface())
}
- fn GetUnionTags(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_5_Union]) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_5_Union_3_Tag>> {
- self._rt.block_on(self._inner.GetUnionTags(_arg_input))
+ fn r#GetNewNameInterface(&self) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_INewName>> {
+ self._rt.block_on(self._inner.r#GetNewNameInterface())
}
- fn GetCppJavaTests(&self) -> binder::Result<Option<binder::SpIBinder>> {
- self._rt.block_on(self._inner.GetCppJavaTests())
+ fn r#GetUnionTags(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_5_Union]) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_5_Union_3_Tag>> {
+ self._rt.block_on(self._inner.r#GetUnionTags(_arg_input))
}
- fn getBackendType(&self) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_11_BackendType> {
- self._rt.block_on(self._inner.getBackendType())
+ fn r#GetCppJavaTests(&self) -> binder::Result<Option<binder::SpIBinder>> {
+ self._rt.block_on(self._inner.r#GetCppJavaTests())
+ }
+ fn r#getBackendType(&self) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_11_BackendType> {
+ self._rt.block_on(self._inner.r#getBackendType())
+ }
+ fn r#GetCircular(&self, _arg_cp: &mut crate::mangled::_7_android_4_aidl_5_tests_18_CircularParcelable) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_9_ICircular>> {
+ self._rt.block_on(self._inner.r#GetCircular(_arg_cp))
}
}
let wrapped = Wrapper { _inner: inner, _rt: rt };
@@ -453,352 +465,376 @@ impl BnTestService {
}
}
pub trait ITestServiceDefault: Send + Sync {
- fn UnimplementedMethod(&self, _arg_arg: i32) -> binder::Result<i32> {
+ fn r#UnimplementedMethod(&self, _arg_arg: i32) -> binder::Result<i32> {
+ Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
+ }
+ fn r#Deprecated(&self) -> binder::Result<()> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn Deprecated(&self) -> binder::Result<()> {
+ fn r#TestOneway(&self) -> binder::Result<()> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn TestOneway(&self) -> binder::Result<()> {
+ fn r#RepeatBoolean(&self, _arg_token: bool) -> binder::Result<bool> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn RepeatBoolean(&self, _arg_token: bool) -> binder::Result<bool> {
+ fn r#RepeatByte(&self, _arg_token: i8) -> binder::Result<i8> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn RepeatByte(&self, _arg_token: i8) -> binder::Result<i8> {
+ fn r#RepeatChar(&self, _arg_token: u16) -> binder::Result<u16> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn RepeatChar(&self, _arg_token: u16) -> binder::Result<u16> {
+ fn r#RepeatInt(&self, _arg_token: i32) -> binder::Result<i32> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn RepeatInt(&self, _arg_token: i32) -> binder::Result<i32> {
+ fn r#RepeatLong(&self, _arg_token: i64) -> binder::Result<i64> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn RepeatLong(&self, _arg_token: i64) -> binder::Result<i64> {
+ fn r#RepeatFloat(&self, _arg_token: f32) -> binder::Result<f32> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn RepeatFloat(&self, _arg_token: f32) -> binder::Result<f32> {
+ fn r#RepeatDouble(&self, _arg_token: f64) -> binder::Result<f64> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn RepeatDouble(&self, _arg_token: f64) -> binder::Result<f64> {
+ fn r#RepeatString(&self, _arg_token: &str) -> binder::Result<String> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn RepeatString(&self, _arg_token: &str) -> binder::Result<String> {
+ fn r#RepeatByteEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn RepeatByteEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum> {
+ fn r#RepeatIntEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn RepeatIntEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum> {
+ fn r#RepeatLongEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn RepeatLongEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum> {
+ fn r#ReverseBoolean(&self, _arg_input: &[bool], _arg_repeated: &mut Vec<bool>) -> binder::Result<Vec<bool>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn ReverseBoolean(&self, _arg_input: &[bool], _arg_repeated: &mut Vec<bool>) -> binder::Result<Vec<bool>> {
+ fn r#ReverseByte(&self, _arg_input: &[u8], _arg_repeated: &mut Vec<u8>) -> binder::Result<Vec<u8>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn ReverseByte(&self, _arg_input: &[u8], _arg_repeated: &mut Vec<u8>) -> binder::Result<Vec<u8>> {
+ fn r#ReverseChar(&self, _arg_input: &[u16], _arg_repeated: &mut Vec<u16>) -> binder::Result<Vec<u16>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn ReverseChar(&self, _arg_input: &[u16], _arg_repeated: &mut Vec<u16>) -> binder::Result<Vec<u16>> {
+ fn r#ReverseInt(&self, _arg_input: &[i32], _arg_repeated: &mut Vec<i32>) -> binder::Result<Vec<i32>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn ReverseInt(&self, _arg_input: &[i32], _arg_repeated: &mut Vec<i32>) -> binder::Result<Vec<i32>> {
+ fn r#ReverseLong(&self, _arg_input: &[i64], _arg_repeated: &mut Vec<i64>) -> binder::Result<Vec<i64>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn ReverseLong(&self, _arg_input: &[i64], _arg_repeated: &mut Vec<i64>) -> binder::Result<Vec<i64>> {
+ fn r#ReverseFloat(&self, _arg_input: &[f32], _arg_repeated: &mut Vec<f32>) -> binder::Result<Vec<f32>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn ReverseFloat(&self, _arg_input: &[f32], _arg_repeated: &mut Vec<f32>) -> binder::Result<Vec<f32>> {
+ fn r#ReverseDouble(&self, _arg_input: &[f64], _arg_repeated: &mut Vec<f64>) -> binder::Result<Vec<f64>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn ReverseDouble(&self, _arg_input: &[f64], _arg_repeated: &mut Vec<f64>) -> binder::Result<Vec<f64>> {
+ fn r#ReverseString(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::Result<Vec<String>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn ReverseString(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::Result<Vec<String>> {
+ fn r#ReverseByteEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn ReverseByteEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>> {
+ fn r#ReverseIntEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn ReverseIntEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>> {
+ fn r#ReverseLongEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn ReverseLongEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>> {
+ fn r#GetOtherTestService(&self, _arg_name: &str) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn GetOtherTestService(&self, _arg_name: &str) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>> {
+ fn r#SetOtherTestService(&self, _arg_name: &str, _arg_service: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>) -> binder::Result<bool> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn VerifyName(&self, _arg_service: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>, _arg_name: &str) -> binder::Result<bool> {
+ fn r#VerifyName(&self, _arg_service: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>, _arg_name: &str) -> binder::Result<bool> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn GetInterfaceArray(&self, _arg_names: &[String]) -> binder::Result<Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>> {
+ fn r#GetInterfaceArray(&self, _arg_names: &[String]) -> binder::Result<Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn VerifyNamesWithInterfaceArray(&self, _arg_services: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>], _arg_names: &[String]) -> binder::Result<bool> {
+ fn r#VerifyNamesWithInterfaceArray(&self, _arg_services: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>], _arg_names: &[String]) -> binder::Result<bool> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn GetNullableInterfaceArray(&self, _arg_names: Option<&[Option<String>]>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>> {
+ fn r#GetNullableInterfaceArray(&self, _arg_names: Option<&[Option<String>]>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn VerifyNamesWithNullableInterfaceArray(&self, _arg_services: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>]>, _arg_names: Option<&[Option<String>]>) -> binder::Result<bool> {
+ fn r#VerifyNamesWithNullableInterfaceArray(&self, _arg_services: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>]>, _arg_names: Option<&[Option<String>]>) -> binder::Result<bool> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn GetInterfaceList(&self, _arg_names: Option<&[Option<String>]>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>> {
+ fn r#GetInterfaceList(&self, _arg_names: Option<&[Option<String>]>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn VerifyNamesWithInterfaceList(&self, _arg_services: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>]>, _arg_names: Option<&[Option<String>]>) -> binder::Result<bool> {
+ fn r#VerifyNamesWithInterfaceList(&self, _arg_services: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>]>, _arg_names: Option<&[Option<String>]>) -> binder::Result<bool> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn ReverseStringList(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::Result<Vec<String>> {
+ fn r#ReverseStringList(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::Result<Vec<String>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn RepeatParcelFileDescriptor(&self, _arg_read: &binder::ParcelFileDescriptor) -> binder::Result<binder::ParcelFileDescriptor> {
+ fn r#RepeatParcelFileDescriptor(&self, _arg_read: &binder::ParcelFileDescriptor) -> binder::Result<binder::ParcelFileDescriptor> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn ReverseParcelFileDescriptorArray(&self, _arg_input: &[binder::ParcelFileDescriptor], _arg_repeated: &mut Vec<Option<binder::ParcelFileDescriptor>>) -> binder::Result<Vec<binder::ParcelFileDescriptor>> {
+ fn r#ReverseParcelFileDescriptorArray(&self, _arg_input: &[binder::ParcelFileDescriptor], _arg_repeated: &mut Vec<Option<binder::ParcelFileDescriptor>>) -> binder::Result<Vec<binder::ParcelFileDescriptor>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn ThrowServiceException(&self, _arg_code: i32) -> binder::Result<()> {
+ fn r#ThrowServiceException(&self, _arg_code: i32) -> binder::Result<()> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn RepeatNullableIntArray(&self, _arg_input: Option<&[i32]>) -> binder::Result<Option<Vec<i32>>> {
+ fn r#RepeatNullableIntArray(&self, _arg_input: Option<&[i32]>) -> binder::Result<Option<Vec<i32>>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn RepeatNullableByteEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum]>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>>> {
+ fn r#RepeatNullableByteEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum]>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn RepeatNullableIntEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum]>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>>> {
+ fn r#RepeatNullableIntEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum]>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn RepeatNullableLongEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum]>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>>> {
+ fn r#RepeatNullableLongEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum]>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn RepeatNullableString(&self, _arg_input: Option<&str>) -> binder::Result<Option<String>> {
+ fn r#RepeatNullableString(&self, _arg_input: Option<&str>) -> binder::Result<Option<String>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn RepeatNullableStringList(&self, _arg_input: Option<&[Option<String>]>) -> binder::Result<Option<Vec<Option<String>>>> {
+ fn r#RepeatNullableStringList(&self, _arg_input: Option<&[Option<String>]>) -> binder::Result<Option<Vec<Option<String>>>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn RepeatNullableParcelable(&self, _arg_input: Option<&crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>) -> binder::Result<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>> {
+ fn r#RepeatNullableParcelable(&self, _arg_input: Option<&crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>) -> binder::Result<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn RepeatNullableParcelableArray(&self, _arg_input: Option<&[Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>> {
+ fn r#RepeatNullableParcelableArray(&self, _arg_input: Option<&[Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn RepeatNullableParcelableList(&self, _arg_input: Option<&[Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>> {
+ fn r#RepeatNullableParcelableList(&self, _arg_input: Option<&[Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn TakesAnIBinder(&self, _arg_input: &binder::SpIBinder) -> binder::Result<()> {
+ fn r#TakesAnIBinder(&self, _arg_input: &binder::SpIBinder) -> binder::Result<()> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn TakesANullableIBinder(&self, _arg_input: Option<&binder::SpIBinder>) -> binder::Result<()> {
+ fn r#TakesANullableIBinder(&self, _arg_input: Option<&binder::SpIBinder>) -> binder::Result<()> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn TakesAnIBinderList(&self, _arg_input: &[binder::SpIBinder]) -> binder::Result<()> {
+ fn r#TakesAnIBinderList(&self, _arg_input: &[binder::SpIBinder]) -> binder::Result<()> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn TakesANullableIBinderList(&self, _arg_input: Option<&[Option<binder::SpIBinder>]>) -> binder::Result<()> {
+ fn r#TakesANullableIBinderList(&self, _arg_input: Option<&[Option<binder::SpIBinder>]>) -> binder::Result<()> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn RepeatUtf8CppString(&self, _arg_token: &str) -> binder::Result<String> {
+ fn r#RepeatUtf8CppString(&self, _arg_token: &str) -> binder::Result<String> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn RepeatNullableUtf8CppString(&self, _arg_token: Option<&str>) -> binder::Result<Option<String>> {
+ fn r#RepeatNullableUtf8CppString(&self, _arg_token: Option<&str>) -> binder::Result<Option<String>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn ReverseUtf8CppString(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::Result<Vec<String>> {
+ fn r#ReverseUtf8CppString(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::Result<Vec<String>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn ReverseNullableUtf8CppString(&self, _arg_input: Option<&[Option<String>]>, _arg_repeated: &mut Option<Vec<Option<String>>>) -> binder::Result<Option<Vec<Option<String>>>> {
+ fn r#ReverseNullableUtf8CppString(&self, _arg_input: Option<&[Option<String>]>, _arg_repeated: &mut Option<Vec<Option<String>>>) -> binder::Result<Option<Vec<Option<String>>>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn ReverseUtf8CppStringList(&self, _arg_input: Option<&[Option<String>]>, _arg_repeated: &mut Option<Vec<Option<String>>>) -> binder::Result<Option<Vec<Option<String>>>> {
+ fn r#ReverseUtf8CppStringList(&self, _arg_input: Option<&[Option<String>]>, _arg_repeated: &mut Option<Vec<Option<String>>>) -> binder::Result<Option<Vec<Option<String>>>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn GetCallback(&self, _arg_return_null: bool) -> binder::Result<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>> {
+ fn r#GetCallback(&self, _arg_return_null: bool) -> binder::Result<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn FillOutStructuredParcelable(&self, _arg_parcel: &mut crate::mangled::_7_android_4_aidl_5_tests_20_StructuredParcelable) -> binder::Result<()> {
+ fn r#FillOutStructuredParcelable(&self, _arg_parcel: &mut crate::mangled::_7_android_4_aidl_5_tests_20_StructuredParcelable) -> binder::Result<()> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn RepeatExtendableParcelable(&self, _arg_ep: &crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable, _arg_ep2: &mut crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable) -> binder::Result<()> {
+ fn r#RepeatExtendableParcelable(&self, _arg_ep: &crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable, _arg_ep2: &mut crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable) -> binder::Result<()> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn ReverseList(&self, _arg_list: &crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList> {
+ fn r#ReverseList(&self, _arg_list: &crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn ReverseIBinderArray(&self, _arg_input: &[binder::SpIBinder], _arg_repeated: &mut Vec<Option<binder::SpIBinder>>) -> binder::Result<Vec<binder::SpIBinder>> {
+ fn r#ReverseIBinderArray(&self, _arg_input: &[binder::SpIBinder], _arg_repeated: &mut Vec<Option<binder::SpIBinder>>) -> binder::Result<Vec<binder::SpIBinder>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn ReverseNullableIBinderArray(&self, _arg_input: Option<&[Option<binder::SpIBinder>]>, _arg_repeated: &mut Option<Vec<Option<binder::SpIBinder>>>) -> binder::Result<Option<Vec<Option<binder::SpIBinder>>>> {
+ fn r#ReverseNullableIBinderArray(&self, _arg_input: Option<&[Option<binder::SpIBinder>]>, _arg_repeated: &mut Option<Vec<Option<binder::SpIBinder>>>) -> binder::Result<Option<Vec<Option<binder::SpIBinder>>>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn GetOldNameInterface(&self) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_IOldName>> {
+ fn r#GetOldNameInterface(&self) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_IOldName>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn GetNewNameInterface(&self) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_INewName>> {
+ fn r#GetNewNameInterface(&self) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_INewName>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn GetUnionTags(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_5_Union]) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_5_Union_3_Tag>> {
+ fn r#GetUnionTags(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_5_Union]) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_5_Union_3_Tag>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn GetCppJavaTests(&self) -> binder::Result<Option<binder::SpIBinder>> {
+ fn r#GetCppJavaTests(&self) -> binder::Result<Option<binder::SpIBinder>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn getBackendType(&self) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_11_BackendType> {
+ fn r#getBackendType(&self) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_11_BackendType> {
+ Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
+ }
+ fn r#GetCircular(&self, _arg_cp: &mut crate::mangled::_7_android_4_aidl_5_tests_18_CircularParcelable) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_9_ICircular>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
}
pub mod transactions {
- pub const UnimplementedMethod: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 0;
- pub const Deprecated: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 1;
- pub const TestOneway: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 2;
- pub const RepeatBoolean: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 3;
- pub const RepeatByte: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 4;
- pub const RepeatChar: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 5;
- pub const RepeatInt: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 6;
- pub const RepeatLong: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 7;
- pub const RepeatFloat: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 8;
- pub const RepeatDouble: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 9;
- pub const RepeatString: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 10;
- pub const RepeatByteEnum: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 11;
- pub const RepeatIntEnum: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 12;
- pub const RepeatLongEnum: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 13;
- pub const ReverseBoolean: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 14;
- pub const ReverseByte: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 15;
- pub const ReverseChar: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 16;
- pub const ReverseInt: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 17;
- pub const ReverseLong: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 18;
- pub const ReverseFloat: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 19;
- pub const ReverseDouble: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 20;
- pub const ReverseString: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 21;
- pub const ReverseByteEnum: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 22;
- pub const ReverseIntEnum: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 23;
- pub const ReverseLongEnum: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 24;
- pub const GetOtherTestService: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 25;
- pub const VerifyName: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 26;
- pub const GetInterfaceArray: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 27;
- pub const VerifyNamesWithInterfaceArray: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 28;
- pub const GetNullableInterfaceArray: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 29;
- pub const VerifyNamesWithNullableInterfaceArray: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 30;
- pub const GetInterfaceList: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 31;
- pub const VerifyNamesWithInterfaceList: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 32;
- pub const ReverseStringList: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 33;
- pub const RepeatParcelFileDescriptor: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 34;
- pub const ReverseParcelFileDescriptorArray: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 35;
- pub const ThrowServiceException: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 36;
- pub const RepeatNullableIntArray: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 37;
- pub const RepeatNullableByteEnumArray: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 38;
- pub const RepeatNullableIntEnumArray: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 39;
- pub const RepeatNullableLongEnumArray: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 40;
- pub const RepeatNullableString: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 41;
- pub const RepeatNullableStringList: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 42;
- pub const RepeatNullableParcelable: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 43;
- pub const RepeatNullableParcelableArray: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 44;
- pub const RepeatNullableParcelableList: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 45;
- pub const TakesAnIBinder: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 46;
- pub const TakesANullableIBinder: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 47;
- pub const TakesAnIBinderList: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 48;
- pub const TakesANullableIBinderList: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 49;
- pub const RepeatUtf8CppString: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 50;
- pub const RepeatNullableUtf8CppString: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 51;
- pub const ReverseUtf8CppString: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 52;
- pub const ReverseNullableUtf8CppString: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 53;
- pub const ReverseUtf8CppStringList: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 54;
- pub const GetCallback: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 55;
- pub const FillOutStructuredParcelable: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 56;
- pub const RepeatExtendableParcelable: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 57;
- pub const ReverseList: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 58;
- pub const ReverseIBinderArray: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 59;
- pub const ReverseNullableIBinderArray: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 60;
- pub const GetOldNameInterface: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 61;
- pub const GetNewNameInterface: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 62;
- pub const GetUnionTags: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 63;
- pub const GetCppJavaTests: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 64;
- pub const getBackendType: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 65;
+ pub const r#UnimplementedMethod: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 0;
+ pub const r#Deprecated: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 1;
+ pub const r#TestOneway: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 2;
+ pub const r#RepeatBoolean: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 3;
+ pub const r#RepeatByte: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 4;
+ pub const r#RepeatChar: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 5;
+ pub const r#RepeatInt: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 6;
+ pub const r#RepeatLong: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 7;
+ pub const r#RepeatFloat: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 8;
+ pub const r#RepeatDouble: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 9;
+ pub const r#RepeatString: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 10;
+ pub const r#RepeatByteEnum: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 11;
+ pub const r#RepeatIntEnum: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 12;
+ pub const r#RepeatLongEnum: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 13;
+ pub const r#ReverseBoolean: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 14;
+ pub const r#ReverseByte: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 15;
+ pub const r#ReverseChar: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 16;
+ pub const r#ReverseInt: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 17;
+ pub const r#ReverseLong: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 18;
+ pub const r#ReverseFloat: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 19;
+ pub const r#ReverseDouble: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 20;
+ pub const r#ReverseString: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 21;
+ pub const r#ReverseByteEnum: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 22;
+ pub const r#ReverseIntEnum: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 23;
+ pub const r#ReverseLongEnum: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 24;
+ pub const r#GetOtherTestService: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 25;
+ pub const r#SetOtherTestService: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 26;
+ pub const r#VerifyName: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 27;
+ pub const r#GetInterfaceArray: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 28;
+ pub const r#VerifyNamesWithInterfaceArray: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 29;
+ pub const r#GetNullableInterfaceArray: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 30;
+ pub const r#VerifyNamesWithNullableInterfaceArray: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 31;
+ pub const r#GetInterfaceList: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 32;
+ pub const r#VerifyNamesWithInterfaceList: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 33;
+ pub const r#ReverseStringList: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 34;
+ pub const r#RepeatParcelFileDescriptor: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 35;
+ pub const r#ReverseParcelFileDescriptorArray: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 36;
+ pub const r#ThrowServiceException: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 37;
+ pub const r#RepeatNullableIntArray: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 38;
+ pub const r#RepeatNullableByteEnumArray: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 39;
+ pub const r#RepeatNullableIntEnumArray: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 40;
+ pub const r#RepeatNullableLongEnumArray: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 41;
+ pub const r#RepeatNullableString: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 42;
+ pub const r#RepeatNullableStringList: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 43;
+ pub const r#RepeatNullableParcelable: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 44;
+ pub const r#RepeatNullableParcelableArray: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 45;
+ pub const r#RepeatNullableParcelableList: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 46;
+ pub const r#TakesAnIBinder: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 47;
+ pub const r#TakesANullableIBinder: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 48;
+ pub const r#TakesAnIBinderList: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 49;
+ pub const r#TakesANullableIBinderList: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 50;
+ pub const r#RepeatUtf8CppString: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 51;
+ pub const r#RepeatNullableUtf8CppString: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 52;
+ pub const r#ReverseUtf8CppString: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 53;
+ pub const r#ReverseNullableUtf8CppString: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 54;
+ pub const r#ReverseUtf8CppStringList: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 55;
+ pub const r#GetCallback: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 56;
+ pub const r#FillOutStructuredParcelable: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 57;
+ pub const r#RepeatExtendableParcelable: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 58;
+ pub const r#ReverseList: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 59;
+ pub const r#ReverseIBinderArray: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 60;
+ pub const r#ReverseNullableIBinderArray: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 61;
+ pub const r#GetOldNameInterface: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 62;
+ pub const r#GetNewNameInterface: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 63;
+ pub const r#GetUnionTags: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 64;
+ pub const r#GetCppJavaTests: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 65;
+ pub const r#getBackendType: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 66;
+ pub const r#GetCircular: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 67;
}
pub type ITestServiceDefaultRef = Option<std::sync::Arc<dyn ITestServiceDefault>>;
use lazy_static::lazy_static;
lazy_static! {
static ref DEFAULT_IMPL: std::sync::Mutex<ITestServiceDefaultRef> = std::sync::Mutex::new(None);
}
-pub const TEST_CONSTANT: i32 = 42;
-pub const TEST_CONSTANT2: i32 = -42;
-pub const TEST_CONSTANT3: i32 = 42;
-pub const TEST_CONSTANT4: i32 = 4;
-pub const TEST_CONSTANT5: i32 = -4;
-pub const TEST_CONSTANT6: i32 = 0;
-pub const TEST_CONSTANT7: i32 = 0;
-pub const TEST_CONSTANT8: i32 = 0;
-pub const TEST_CONSTANT9: i32 = 86;
-pub const TEST_CONSTANT10: i32 = 165;
-pub const TEST_CONSTANT11: i32 = 250;
-pub const TEST_CONSTANT12: i32 = -1;
-pub const BYTE_TEST_CONSTANT: i8 = 17;
-pub const LONG_TEST_CONSTANT: i64 = 1099511627776;
-pub const STRING_TEST_CONSTANT: &str = "foo";
-pub const STRING_TEST_CONSTANT2: &str = "bar";
-pub const STRING_TEST_CONSTANT_UTF8: &str = "baz";
-pub const A1: i32 = 1;
-pub const A2: i32 = 1;
-pub const A3: i32 = 1;
-pub const A4: i32 = 1;
-pub const A5: i32 = 1;
-pub const A6: i32 = 1;
-pub const A7: i32 = 1;
-pub const A8: i32 = 1;
-pub const A9: i32 = 1;
-pub const A10: i32 = 1;
-pub const A11: i32 = 1;
-pub const A12: i32 = 1;
-pub const A13: i32 = 1;
-pub const A14: i32 = 1;
-pub const A15: i32 = 1;
-pub const A16: i32 = 1;
-pub const A17: i32 = 1;
-pub const A18: i32 = 1;
-pub const A19: i32 = 1;
-pub const A20: i32 = 1;
-pub const A21: i32 = 1;
-pub const A22: i32 = 1;
-pub const A23: i32 = 1;
-pub const A24: i32 = 1;
-pub const A25: i32 = 1;
-pub const A26: i32 = 1;
-pub const A27: i32 = 1;
-pub const A28: i32 = 1;
-pub const A29: i32 = 1;
-pub const A30: i32 = 1;
-pub const A31: i32 = 1;
-pub const A32: i32 = 1;
-pub const A33: i32 = 1;
-pub const A34: i32 = 1;
-pub const A35: i32 = 1;
-pub const A36: i32 = 1;
-pub const A37: i32 = 1;
-pub const A38: i32 = 1;
-pub const A39: i32 = 1;
-pub const A40: i32 = 1;
-pub const A41: i32 = 1;
-pub const A42: i32 = 1;
-pub const A43: i32 = 1;
-pub const A44: i32 = 1;
-pub const A45: i32 = 1;
-pub const A46: i32 = 1;
-pub const A47: i32 = 1;
-pub const A48: i32 = 1;
-pub const A49: i32 = 1;
-pub const A50: i32 = 1;
-pub const A51: i32 = 1;
-pub const A52: i32 = 1;
-pub const A53: i32 = 1;
-pub const A54: i32 = 1;
-pub const A55: i32 = 1;
-pub const A56: i32 = 1;
-pub const A57: i32 = 1;
+pub const r#TEST_CONSTANT: i32 = 42;
+pub const r#TEST_CONSTANT2: i32 = -42;
+pub const r#TEST_CONSTANT3: i32 = 42;
+pub const r#TEST_CONSTANT4: i32 = 4;
+pub const r#TEST_CONSTANT5: i32 = -4;
+pub const r#TEST_CONSTANT6: i32 = 0;
+pub const r#TEST_CONSTANT7: i32 = 0;
+pub const r#TEST_CONSTANT8: i32 = 0;
+pub const r#TEST_CONSTANT9: i32 = 86;
+pub const r#TEST_CONSTANT10: i32 = 165;
+pub const r#TEST_CONSTANT11: i32 = 250;
+pub const r#TEST_CONSTANT12: i32 = -1;
+pub const r#BYTE_TEST_CONSTANT: i8 = 17;
+pub const r#LONG_TEST_CONSTANT: i64 = 1099511627776;
+pub const r#STRING_TEST_CONSTANT: &str = "foo";
+pub const r#STRING_TEST_CONSTANT2: &str = "bar";
+pub const r#FLOAT_TEST_CONSTANT: f32 = 1.000000f32;
+pub const r#FLOAT_TEST_CONSTANT2: f32 = -1.000000f32;
+pub const r#FLOAT_TEST_CONSTANT3: f32 = 1.000000f32;
+pub const r#FLOAT_TEST_CONSTANT4: f32 = 2.200000f32;
+pub const r#FLOAT_TEST_CONSTANT5: f32 = -2.200000f32;
+pub const r#FLOAT_TEST_CONSTANT6: f32 = -0.000000f32;
+pub const r#FLOAT_TEST_CONSTANT7: f32 = 0.000000f32;
+pub const r#DOUBLE_TEST_CONSTANT: f64 = 1.000000f64;
+pub const r#DOUBLE_TEST_CONSTANT2: f64 = -1.000000f64;
+pub const r#DOUBLE_TEST_CONSTANT3: f64 = 1.000000f64;
+pub const r#DOUBLE_TEST_CONSTANT4: f64 = 2.200000f64;
+pub const r#DOUBLE_TEST_CONSTANT5: f64 = -2.200000f64;
+pub const r#DOUBLE_TEST_CONSTANT6: f64 = -0.000000f64;
+pub const r#DOUBLE_TEST_CONSTANT7: f64 = 0.000000f64;
+pub const r#DOUBLE_TEST_CONSTANT8: f64 = 1.100000f64;
+pub const r#DOUBLE_TEST_CONSTANT9: f64 = -1.100000f64;
+pub const r#STRING_TEST_CONSTANT_UTF8: &str = "baz";
+pub const r#A1: i32 = 1;
+pub const r#A2: i32 = 1;
+pub const r#A3: i32 = 1;
+pub const r#A4: i32 = 1;
+pub const r#A5: i32 = 1;
+pub const r#A6: i32 = 1;
+pub const r#A7: i32 = 1;
+pub const r#A8: i32 = 1;
+pub const r#A9: i32 = 1;
+pub const r#A10: i32 = 1;
+pub const r#A11: i32 = 1;
+pub const r#A12: i32 = 1;
+pub const r#A13: i32 = 1;
+pub const r#A14: i32 = 1;
+pub const r#A15: i32 = 1;
+pub const r#A16: i32 = 1;
+pub const r#A17: i32 = 1;
+pub const r#A18: i32 = 1;
+pub const r#A19: i32 = 1;
+pub const r#A20: i32 = 1;
+pub const r#A21: i32 = 1;
+pub const r#A22: i32 = 1;
+pub const r#A23: i32 = 1;
+pub const r#A24: i32 = 1;
+pub const r#A25: i32 = 1;
+pub const r#A26: i32 = 1;
+pub const r#A27: i32 = 1;
+pub const r#A28: i32 = 1;
+pub const r#A29: i32 = 1;
+pub const r#A30: i32 = 1;
+pub const r#A31: i32 = 1;
+pub const r#A32: i32 = 1;
+pub const r#A33: i32 = 1;
+pub const r#A34: i32 = 1;
+pub const r#A35: i32 = 1;
+pub const r#A36: i32 = 1;
+pub const r#A37: i32 = 1;
+pub const r#A38: i32 = 1;
+pub const r#A39: i32 = 1;
+pub const r#A40: i32 = 1;
+pub const r#A41: i32 = 1;
+pub const r#A42: i32 = 1;
+pub const r#A43: i32 = 1;
+pub const r#A44: i32 = 1;
+pub const r#A45: i32 = 1;
+pub const r#A46: i32 = 1;
+pub const r#A47: i32 = 1;
+pub const r#A48: i32 = 1;
+pub const r#A49: i32 = 1;
+pub const r#A50: i32 = 1;
+pub const r#A51: i32 = 1;
+pub const r#A52: i32 = 1;
+pub const r#A53: i32 = 1;
+pub const r#A54: i32 = 1;
+pub const r#A55: i32 = 1;
+pub const r#A56: i32 = 1;
+pub const r#A57: i32 = 1;
impl BpTestService {
fn build_parcel_UnimplementedMethod(&self, _arg_arg: i32) -> binder::Result<binder::binder_impl::Parcel> {
let mut aidl_data = self.binder.prepare_transact()?;
@@ -809,7 +845,7 @@ impl BpTestService {
fn read_response_UnimplementedMethod(&self, _arg_arg: i32, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<i32> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.UnimplementedMethod(_arg_arg);
+ return _aidl_default_impl.r#UnimplementedMethod(_arg_arg);
}
}
let _aidl_reply = _aidl_reply?;
@@ -826,7 +862,7 @@ impl BpTestService {
fn read_response_Deprecated(&self, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<()> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.Deprecated();
+ return _aidl_default_impl.r#Deprecated();
}
}
let _aidl_reply = _aidl_reply?;
@@ -842,7 +878,7 @@ impl BpTestService {
fn read_response_TestOneway(&self, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<()> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.TestOneway();
+ return _aidl_default_impl.r#TestOneway();
}
}
let _aidl_reply = _aidl_reply?;
@@ -857,7 +893,7 @@ impl BpTestService {
fn read_response_RepeatBoolean(&self, _arg_token: bool, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<bool> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.RepeatBoolean(_arg_token);
+ return _aidl_default_impl.r#RepeatBoolean(_arg_token);
}
}
let _aidl_reply = _aidl_reply?;
@@ -875,7 +911,7 @@ impl BpTestService {
fn read_response_RepeatByte(&self, _arg_token: i8, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<i8> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.RepeatByte(_arg_token);
+ return _aidl_default_impl.r#RepeatByte(_arg_token);
}
}
let _aidl_reply = _aidl_reply?;
@@ -893,7 +929,7 @@ impl BpTestService {
fn read_response_RepeatChar(&self, _arg_token: u16, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<u16> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.RepeatChar(_arg_token);
+ return _aidl_default_impl.r#RepeatChar(_arg_token);
}
}
let _aidl_reply = _aidl_reply?;
@@ -911,7 +947,7 @@ impl BpTestService {
fn read_response_RepeatInt(&self, _arg_token: i32, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<i32> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.RepeatInt(_arg_token);
+ return _aidl_default_impl.r#RepeatInt(_arg_token);
}
}
let _aidl_reply = _aidl_reply?;
@@ -929,7 +965,7 @@ impl BpTestService {
fn read_response_RepeatLong(&self, _arg_token: i64, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<i64> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.RepeatLong(_arg_token);
+ return _aidl_default_impl.r#RepeatLong(_arg_token);
}
}
let _aidl_reply = _aidl_reply?;
@@ -947,7 +983,7 @@ impl BpTestService {
fn read_response_RepeatFloat(&self, _arg_token: f32, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<f32> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.RepeatFloat(_arg_token);
+ return _aidl_default_impl.r#RepeatFloat(_arg_token);
}
}
let _aidl_reply = _aidl_reply?;
@@ -965,7 +1001,7 @@ impl BpTestService {
fn read_response_RepeatDouble(&self, _arg_token: f64, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<f64> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.RepeatDouble(_arg_token);
+ return _aidl_default_impl.r#RepeatDouble(_arg_token);
}
}
let _aidl_reply = _aidl_reply?;
@@ -983,7 +1019,7 @@ impl BpTestService {
fn read_response_RepeatString(&self, _arg_token: &str, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<String> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.RepeatString(_arg_token);
+ return _aidl_default_impl.r#RepeatString(_arg_token);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1001,7 +1037,7 @@ impl BpTestService {
fn read_response_RepeatByteEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.RepeatByteEnum(_arg_token);
+ return _aidl_default_impl.r#RepeatByteEnum(_arg_token);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1019,7 +1055,7 @@ impl BpTestService {
fn read_response_RepeatIntEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.RepeatIntEnum(_arg_token);
+ return _aidl_default_impl.r#RepeatIntEnum(_arg_token);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1037,7 +1073,7 @@ impl BpTestService {
fn read_response_RepeatLongEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.RepeatLongEnum(_arg_token);
+ return _aidl_default_impl.r#RepeatLongEnum(_arg_token);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1056,7 +1092,7 @@ impl BpTestService {
fn read_response_ReverseBoolean(&self, _arg_input: &[bool], _arg_repeated: &mut Vec<bool>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Vec<bool>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.ReverseBoolean(_arg_input, _arg_repeated);
+ return _aidl_default_impl.r#ReverseBoolean(_arg_input, _arg_repeated);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1076,7 +1112,7 @@ impl BpTestService {
fn read_response_ReverseByte(&self, _arg_input: &[u8], _arg_repeated: &mut Vec<u8>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Vec<u8>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.ReverseByte(_arg_input, _arg_repeated);
+ return _aidl_default_impl.r#ReverseByte(_arg_input, _arg_repeated);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1096,7 +1132,7 @@ impl BpTestService {
fn read_response_ReverseChar(&self, _arg_input: &[u16], _arg_repeated: &mut Vec<u16>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Vec<u16>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.ReverseChar(_arg_input, _arg_repeated);
+ return _aidl_default_impl.r#ReverseChar(_arg_input, _arg_repeated);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1116,7 +1152,7 @@ impl BpTestService {
fn read_response_ReverseInt(&self, _arg_input: &[i32], _arg_repeated: &mut Vec<i32>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Vec<i32>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.ReverseInt(_arg_input, _arg_repeated);
+ return _aidl_default_impl.r#ReverseInt(_arg_input, _arg_repeated);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1136,7 +1172,7 @@ impl BpTestService {
fn read_response_ReverseLong(&self, _arg_input: &[i64], _arg_repeated: &mut Vec<i64>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Vec<i64>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.ReverseLong(_arg_input, _arg_repeated);
+ return _aidl_default_impl.r#ReverseLong(_arg_input, _arg_repeated);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1156,7 +1192,7 @@ impl BpTestService {
fn read_response_ReverseFloat(&self, _arg_input: &[f32], _arg_repeated: &mut Vec<f32>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Vec<f32>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.ReverseFloat(_arg_input, _arg_repeated);
+ return _aidl_default_impl.r#ReverseFloat(_arg_input, _arg_repeated);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1176,7 +1212,7 @@ impl BpTestService {
fn read_response_ReverseDouble(&self, _arg_input: &[f64], _arg_repeated: &mut Vec<f64>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Vec<f64>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.ReverseDouble(_arg_input, _arg_repeated);
+ return _aidl_default_impl.r#ReverseDouble(_arg_input, _arg_repeated);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1196,7 +1232,7 @@ impl BpTestService {
fn read_response_ReverseString(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Vec<String>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.ReverseString(_arg_input, _arg_repeated);
+ return _aidl_default_impl.r#ReverseString(_arg_input, _arg_repeated);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1216,7 +1252,7 @@ impl BpTestService {
fn read_response_ReverseByteEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.ReverseByteEnum(_arg_input, _arg_repeated);
+ return _aidl_default_impl.r#ReverseByteEnum(_arg_input, _arg_repeated);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1236,7 +1272,7 @@ impl BpTestService {
fn read_response_ReverseIntEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.ReverseIntEnum(_arg_input, _arg_repeated);
+ return _aidl_default_impl.r#ReverseIntEnum(_arg_input, _arg_repeated);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1256,7 +1292,7 @@ impl BpTestService {
fn read_response_ReverseLongEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.ReverseLongEnum(_arg_input, _arg_repeated);
+ return _aidl_default_impl.r#ReverseLongEnum(_arg_input, _arg_repeated);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1275,7 +1311,7 @@ impl BpTestService {
fn read_response_GetOtherTestService(&self, _arg_name: &str, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.GetOtherTestService(_arg_name);
+ return _aidl_default_impl.r#GetOtherTestService(_arg_name);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1284,6 +1320,25 @@ impl BpTestService {
let _aidl_return: binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback> = _aidl_reply.read()?;
Ok(_aidl_return)
}
+ fn build_parcel_SetOtherTestService(&self, _arg_name: &str, _arg_service: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>) -> binder::Result<binder::binder_impl::Parcel> {
+ let mut aidl_data = self.binder.prepare_transact()?;
+ aidl_data.mark_sensitive();
+ aidl_data.write(_arg_name)?;
+ aidl_data.write(_arg_service)?;
+ Ok(aidl_data)
+ }
+ fn read_response_SetOtherTestService(&self, _arg_name: &str, _arg_service: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<bool> {
+ if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
+ if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
+ return _aidl_default_impl.r#SetOtherTestService(_arg_name, _arg_service);
+ }
+ }
+ let _aidl_reply = _aidl_reply?;
+ let _aidl_status: binder::Status = _aidl_reply.read()?;
+ if !_aidl_status.is_ok() { return Err(_aidl_status); }
+ let _aidl_return: bool = _aidl_reply.read()?;
+ Ok(_aidl_return)
+ }
fn build_parcel_VerifyName(&self, _arg_service: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>, _arg_name: &str) -> binder::Result<binder::binder_impl::Parcel> {
let mut aidl_data = self.binder.prepare_transact()?;
aidl_data.mark_sensitive();
@@ -1294,7 +1349,7 @@ impl BpTestService {
fn read_response_VerifyName(&self, _arg_service: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>, _arg_name: &str, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<bool> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.VerifyName(_arg_service, _arg_name);
+ return _aidl_default_impl.r#VerifyName(_arg_service, _arg_name);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1312,7 +1367,7 @@ impl BpTestService {
fn read_response_GetInterfaceArray(&self, _arg_names: &[String], _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.GetInterfaceArray(_arg_names);
+ return _aidl_default_impl.r#GetInterfaceArray(_arg_names);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1331,7 +1386,7 @@ impl BpTestService {
fn read_response_VerifyNamesWithInterfaceArray(&self, _arg_services: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>], _arg_names: &[String], _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<bool> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.VerifyNamesWithInterfaceArray(_arg_services, _arg_names);
+ return _aidl_default_impl.r#VerifyNamesWithInterfaceArray(_arg_services, _arg_names);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1349,7 +1404,7 @@ impl BpTestService {
fn read_response_GetNullableInterfaceArray(&self, _arg_names: Option<&[Option<String>]>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.GetNullableInterfaceArray(_arg_names);
+ return _aidl_default_impl.r#GetNullableInterfaceArray(_arg_names);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1368,7 +1423,7 @@ impl BpTestService {
fn read_response_VerifyNamesWithNullableInterfaceArray(&self, _arg_services: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>]>, _arg_names: Option<&[Option<String>]>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<bool> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.VerifyNamesWithNullableInterfaceArray(_arg_services, _arg_names);
+ return _aidl_default_impl.r#VerifyNamesWithNullableInterfaceArray(_arg_services, _arg_names);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1386,7 +1441,7 @@ impl BpTestService {
fn read_response_GetInterfaceList(&self, _arg_names: Option<&[Option<String>]>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.GetInterfaceList(_arg_names);
+ return _aidl_default_impl.r#GetInterfaceList(_arg_names);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1405,7 +1460,7 @@ impl BpTestService {
fn read_response_VerifyNamesWithInterfaceList(&self, _arg_services: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>]>, _arg_names: Option<&[Option<String>]>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<bool> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.VerifyNamesWithInterfaceList(_arg_services, _arg_names);
+ return _aidl_default_impl.r#VerifyNamesWithInterfaceList(_arg_services, _arg_names);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1423,7 +1478,7 @@ impl BpTestService {
fn read_response_ReverseStringList(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Vec<String>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.ReverseStringList(_arg_input, _arg_repeated);
+ return _aidl_default_impl.r#ReverseStringList(_arg_input, _arg_repeated);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1442,7 +1497,7 @@ impl BpTestService {
fn read_response_RepeatParcelFileDescriptor(&self, _arg_read: &binder::ParcelFileDescriptor, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<binder::ParcelFileDescriptor> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.RepeatParcelFileDescriptor(_arg_read);
+ return _aidl_default_impl.r#RepeatParcelFileDescriptor(_arg_read);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1461,7 +1516,7 @@ impl BpTestService {
fn read_response_ReverseParcelFileDescriptorArray(&self, _arg_input: &[binder::ParcelFileDescriptor], _arg_repeated: &mut Vec<Option<binder::ParcelFileDescriptor>>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Vec<binder::ParcelFileDescriptor>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.ReverseParcelFileDescriptorArray(_arg_input, _arg_repeated);
+ return _aidl_default_impl.r#ReverseParcelFileDescriptorArray(_arg_input, _arg_repeated);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1480,7 +1535,7 @@ impl BpTestService {
fn read_response_ThrowServiceException(&self, _arg_code: i32, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<()> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.ThrowServiceException(_arg_code);
+ return _aidl_default_impl.r#ThrowServiceException(_arg_code);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1497,7 +1552,7 @@ impl BpTestService {
fn read_response_RepeatNullableIntArray(&self, _arg_input: Option<&[i32]>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Option<Vec<i32>>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.RepeatNullableIntArray(_arg_input);
+ return _aidl_default_impl.r#RepeatNullableIntArray(_arg_input);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1515,7 +1570,7 @@ impl BpTestService {
fn read_response_RepeatNullableByteEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum]>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.RepeatNullableByteEnumArray(_arg_input);
+ return _aidl_default_impl.r#RepeatNullableByteEnumArray(_arg_input);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1533,7 +1588,7 @@ impl BpTestService {
fn read_response_RepeatNullableIntEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum]>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.RepeatNullableIntEnumArray(_arg_input);
+ return _aidl_default_impl.r#RepeatNullableIntEnumArray(_arg_input);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1551,7 +1606,7 @@ impl BpTestService {
fn read_response_RepeatNullableLongEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum]>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.RepeatNullableLongEnumArray(_arg_input);
+ return _aidl_default_impl.r#RepeatNullableLongEnumArray(_arg_input);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1569,7 +1624,7 @@ impl BpTestService {
fn read_response_RepeatNullableString(&self, _arg_input: Option<&str>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Option<String>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.RepeatNullableString(_arg_input);
+ return _aidl_default_impl.r#RepeatNullableString(_arg_input);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1587,7 +1642,7 @@ impl BpTestService {
fn read_response_RepeatNullableStringList(&self, _arg_input: Option<&[Option<String>]>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Option<Vec<Option<String>>>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.RepeatNullableStringList(_arg_input);
+ return _aidl_default_impl.r#RepeatNullableStringList(_arg_input);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1605,7 +1660,7 @@ impl BpTestService {
fn read_response_RepeatNullableParcelable(&self, _arg_input: Option<&crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.RepeatNullableParcelable(_arg_input);
+ return _aidl_default_impl.r#RepeatNullableParcelable(_arg_input);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1623,7 +1678,7 @@ impl BpTestService {
fn read_response_RepeatNullableParcelableArray(&self, _arg_input: Option<&[Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.RepeatNullableParcelableArray(_arg_input);
+ return _aidl_default_impl.r#RepeatNullableParcelableArray(_arg_input);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1641,7 +1696,7 @@ impl BpTestService {
fn read_response_RepeatNullableParcelableList(&self, _arg_input: Option<&[Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.RepeatNullableParcelableList(_arg_input);
+ return _aidl_default_impl.r#RepeatNullableParcelableList(_arg_input);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1659,7 +1714,7 @@ impl BpTestService {
fn read_response_TakesAnIBinder(&self, _arg_input: &binder::SpIBinder, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<()> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.TakesAnIBinder(_arg_input);
+ return _aidl_default_impl.r#TakesAnIBinder(_arg_input);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1676,7 +1731,7 @@ impl BpTestService {
fn read_response_TakesANullableIBinder(&self, _arg_input: Option<&binder::SpIBinder>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<()> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.TakesANullableIBinder(_arg_input);
+ return _aidl_default_impl.r#TakesANullableIBinder(_arg_input);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1693,7 +1748,7 @@ impl BpTestService {
fn read_response_TakesAnIBinderList(&self, _arg_input: &[binder::SpIBinder], _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<()> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.TakesAnIBinderList(_arg_input);
+ return _aidl_default_impl.r#TakesAnIBinderList(_arg_input);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1710,7 +1765,7 @@ impl BpTestService {
fn read_response_TakesANullableIBinderList(&self, _arg_input: Option<&[Option<binder::SpIBinder>]>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<()> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.TakesANullableIBinderList(_arg_input);
+ return _aidl_default_impl.r#TakesANullableIBinderList(_arg_input);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1727,7 +1782,7 @@ impl BpTestService {
fn read_response_RepeatUtf8CppString(&self, _arg_token: &str, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<String> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.RepeatUtf8CppString(_arg_token);
+ return _aidl_default_impl.r#RepeatUtf8CppString(_arg_token);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1745,7 +1800,7 @@ impl BpTestService {
fn read_response_RepeatNullableUtf8CppString(&self, _arg_token: Option<&str>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Option<String>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.RepeatNullableUtf8CppString(_arg_token);
+ return _aidl_default_impl.r#RepeatNullableUtf8CppString(_arg_token);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1764,7 +1819,7 @@ impl BpTestService {
fn read_response_ReverseUtf8CppString(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Vec<String>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.ReverseUtf8CppString(_arg_input, _arg_repeated);
+ return _aidl_default_impl.r#ReverseUtf8CppString(_arg_input, _arg_repeated);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1784,7 +1839,7 @@ impl BpTestService {
fn read_response_ReverseNullableUtf8CppString(&self, _arg_input: Option<&[Option<String>]>, _arg_repeated: &mut Option<Vec<Option<String>>>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Option<Vec<Option<String>>>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.ReverseNullableUtf8CppString(_arg_input, _arg_repeated);
+ return _aidl_default_impl.r#ReverseNullableUtf8CppString(_arg_input, _arg_repeated);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1803,7 +1858,7 @@ impl BpTestService {
fn read_response_ReverseUtf8CppStringList(&self, _arg_input: Option<&[Option<String>]>, _arg_repeated: &mut Option<Vec<Option<String>>>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Option<Vec<Option<String>>>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.ReverseUtf8CppStringList(_arg_input, _arg_repeated);
+ return _aidl_default_impl.r#ReverseUtf8CppStringList(_arg_input, _arg_repeated);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1822,7 +1877,7 @@ impl BpTestService {
fn read_response_GetCallback(&self, _arg_return_null: bool, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.GetCallback(_arg_return_null);
+ return _aidl_default_impl.r#GetCallback(_arg_return_null);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1840,7 +1895,7 @@ impl BpTestService {
fn read_response_FillOutStructuredParcelable(&self, _arg_parcel: &mut crate::mangled::_7_android_4_aidl_5_tests_20_StructuredParcelable, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<()> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.FillOutStructuredParcelable(_arg_parcel);
+ return _aidl_default_impl.r#FillOutStructuredParcelable(_arg_parcel);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1858,7 +1913,7 @@ impl BpTestService {
fn read_response_RepeatExtendableParcelable(&self, _arg_ep: &crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable, _arg_ep2: &mut crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<()> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.RepeatExtendableParcelable(_arg_ep, _arg_ep2);
+ return _aidl_default_impl.r#RepeatExtendableParcelable(_arg_ep, _arg_ep2);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1876,7 +1931,7 @@ impl BpTestService {
fn read_response_ReverseList(&self, _arg_list: &crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.ReverseList(_arg_list);
+ return _aidl_default_impl.r#ReverseList(_arg_list);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1895,7 +1950,7 @@ impl BpTestService {
fn read_response_ReverseIBinderArray(&self, _arg_input: &[binder::SpIBinder], _arg_repeated: &mut Vec<Option<binder::SpIBinder>>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Vec<binder::SpIBinder>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.ReverseIBinderArray(_arg_input, _arg_repeated);
+ return _aidl_default_impl.r#ReverseIBinderArray(_arg_input, _arg_repeated);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1915,7 +1970,7 @@ impl BpTestService {
fn read_response_ReverseNullableIBinderArray(&self, _arg_input: Option<&[Option<binder::SpIBinder>]>, _arg_repeated: &mut Option<Vec<Option<binder::SpIBinder>>>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Option<Vec<Option<binder::SpIBinder>>>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.ReverseNullableIBinderArray(_arg_input, _arg_repeated);
+ return _aidl_default_impl.r#ReverseNullableIBinderArray(_arg_input, _arg_repeated);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1933,7 +1988,7 @@ impl BpTestService {
fn read_response_GetOldNameInterface(&self, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_IOldName>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.GetOldNameInterface();
+ return _aidl_default_impl.r#GetOldNameInterface();
}
}
let _aidl_reply = _aidl_reply?;
@@ -1950,7 +2005,7 @@ impl BpTestService {
fn read_response_GetNewNameInterface(&self, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_INewName>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.GetNewNameInterface();
+ return _aidl_default_impl.r#GetNewNameInterface();
}
}
let _aidl_reply = _aidl_reply?;
@@ -1968,7 +2023,7 @@ impl BpTestService {
fn read_response_GetUnionTags(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_5_Union], _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_5_Union_3_Tag>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.GetUnionTags(_arg_input);
+ return _aidl_default_impl.r#GetUnionTags(_arg_input);
}
}
let _aidl_reply = _aidl_reply?;
@@ -1985,7 +2040,7 @@ impl BpTestService {
fn read_response_GetCppJavaTests(&self, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Option<binder::SpIBinder>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.GetCppJavaTests();
+ return _aidl_default_impl.r#GetCppJavaTests();
}
}
let _aidl_reply = _aidl_reply?;
@@ -2002,7 +2057,7 @@ impl BpTestService {
fn read_response_getBackendType(&self, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_11_BackendType> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
- return _aidl_default_impl.getBackendType();
+ return _aidl_default_impl.r#getBackendType();
}
}
let _aidl_reply = _aidl_reply?;
@@ -2011,1267 +2066,1323 @@ impl BpTestService {
let _aidl_return: crate::mangled::_7_android_4_aidl_5_tests_11_BackendType = _aidl_reply.read()?;
Ok(_aidl_return)
}
+ fn build_parcel_GetCircular(&self, _arg_cp: &mut crate::mangled::_7_android_4_aidl_5_tests_18_CircularParcelable) -> binder::Result<binder::binder_impl::Parcel> {
+ let mut aidl_data = self.binder.prepare_transact()?;
+ aidl_data.mark_sensitive();
+ Ok(aidl_data)
+ }
+ fn read_response_GetCircular(&self, _arg_cp: &mut crate::mangled::_7_android_4_aidl_5_tests_18_CircularParcelable, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_9_ICircular>> {
+ if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
+ if let Some(_aidl_default_impl) = <Self as ITestService>::getDefaultImpl() {
+ return _aidl_default_impl.r#GetCircular(_arg_cp);
+ }
+ }
+ let _aidl_reply = _aidl_reply?;
+ let _aidl_status: binder::Status = _aidl_reply.read()?;
+ if !_aidl_status.is_ok() { return Err(_aidl_status); }
+ let _aidl_return: binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_9_ICircular> = _aidl_reply.read()?;
+ _aidl_reply.read_onto(_arg_cp)?;
+ Ok(_aidl_return)
+ }
}
impl ITestService for BpTestService {
- fn UnimplementedMethod(&self, _arg_arg: i32) -> binder::Result<i32> {
+ fn r#UnimplementedMethod(&self, _arg_arg: i32) -> binder::Result<i32> {
let _aidl_data = self.build_parcel_UnimplementedMethod(_arg_arg)?;
- let _aidl_reply = self.binder.submit_transact(transactions::UnimplementedMethod, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#UnimplementedMethod, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_UnimplementedMethod(_arg_arg, _aidl_reply)
}
- fn Deprecated(&self) -> binder::Result<()> {
+ fn r#Deprecated(&self) -> binder::Result<()> {
let _aidl_data = self.build_parcel_Deprecated()?;
- let _aidl_reply = self.binder.submit_transact(transactions::Deprecated, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#Deprecated, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_Deprecated(_aidl_reply)
}
- fn TestOneway(&self) -> binder::Result<()> {
+ fn r#TestOneway(&self) -> binder::Result<()> {
let _aidl_data = self.build_parcel_TestOneway()?;
- let _aidl_reply = self.binder.submit_transact(transactions::TestOneway, _aidl_data, binder::binder_impl::FLAG_ONEWAY | binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#TestOneway, _aidl_data, binder::binder_impl::FLAG_ONEWAY | binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_TestOneway(_aidl_reply)
}
- fn RepeatBoolean(&self, _arg_token: bool) -> binder::Result<bool> {
+ fn r#RepeatBoolean(&self, _arg_token: bool) -> binder::Result<bool> {
let _aidl_data = self.build_parcel_RepeatBoolean(_arg_token)?;
- let _aidl_reply = self.binder.submit_transact(transactions::RepeatBoolean, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#RepeatBoolean, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_RepeatBoolean(_arg_token, _aidl_reply)
}
- fn RepeatByte(&self, _arg_token: i8) -> binder::Result<i8> {
+ fn r#RepeatByte(&self, _arg_token: i8) -> binder::Result<i8> {
let _aidl_data = self.build_parcel_RepeatByte(_arg_token)?;
- let _aidl_reply = self.binder.submit_transact(transactions::RepeatByte, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#RepeatByte, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_RepeatByte(_arg_token, _aidl_reply)
}
- fn RepeatChar(&self, _arg_token: u16) -> binder::Result<u16> {
+ fn r#RepeatChar(&self, _arg_token: u16) -> binder::Result<u16> {
let _aidl_data = self.build_parcel_RepeatChar(_arg_token)?;
- let _aidl_reply = self.binder.submit_transact(transactions::RepeatChar, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#RepeatChar, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_RepeatChar(_arg_token, _aidl_reply)
}
- fn RepeatInt(&self, _arg_token: i32) -> binder::Result<i32> {
+ fn r#RepeatInt(&self, _arg_token: i32) -> binder::Result<i32> {
let _aidl_data = self.build_parcel_RepeatInt(_arg_token)?;
- let _aidl_reply = self.binder.submit_transact(transactions::RepeatInt, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#RepeatInt, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_RepeatInt(_arg_token, _aidl_reply)
}
- fn RepeatLong(&self, _arg_token: i64) -> binder::Result<i64> {
+ fn r#RepeatLong(&self, _arg_token: i64) -> binder::Result<i64> {
let _aidl_data = self.build_parcel_RepeatLong(_arg_token)?;
- let _aidl_reply = self.binder.submit_transact(transactions::RepeatLong, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#RepeatLong, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_RepeatLong(_arg_token, _aidl_reply)
}
- fn RepeatFloat(&self, _arg_token: f32) -> binder::Result<f32> {
+ fn r#RepeatFloat(&self, _arg_token: f32) -> binder::Result<f32> {
let _aidl_data = self.build_parcel_RepeatFloat(_arg_token)?;
- let _aidl_reply = self.binder.submit_transact(transactions::RepeatFloat, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#RepeatFloat, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_RepeatFloat(_arg_token, _aidl_reply)
}
- fn RepeatDouble(&self, _arg_token: f64) -> binder::Result<f64> {
+ fn r#RepeatDouble(&self, _arg_token: f64) -> binder::Result<f64> {
let _aidl_data = self.build_parcel_RepeatDouble(_arg_token)?;
- let _aidl_reply = self.binder.submit_transact(transactions::RepeatDouble, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#RepeatDouble, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_RepeatDouble(_arg_token, _aidl_reply)
}
- fn RepeatString(&self, _arg_token: &str) -> binder::Result<String> {
+ fn r#RepeatString(&self, _arg_token: &str) -> binder::Result<String> {
let _aidl_data = self.build_parcel_RepeatString(_arg_token)?;
- let _aidl_reply = self.binder.submit_transact(transactions::RepeatString, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#RepeatString, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_RepeatString(_arg_token, _aidl_reply)
}
- fn RepeatByteEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum> {
+ fn r#RepeatByteEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum> {
let _aidl_data = self.build_parcel_RepeatByteEnum(_arg_token)?;
- let _aidl_reply = self.binder.submit_transact(transactions::RepeatByteEnum, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#RepeatByteEnum, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_RepeatByteEnum(_arg_token, _aidl_reply)
}
- fn RepeatIntEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum> {
+ fn r#RepeatIntEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum> {
let _aidl_data = self.build_parcel_RepeatIntEnum(_arg_token)?;
- let _aidl_reply = self.binder.submit_transact(transactions::RepeatIntEnum, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#RepeatIntEnum, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_RepeatIntEnum(_arg_token, _aidl_reply)
}
- fn RepeatLongEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum> {
+ fn r#RepeatLongEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum> {
let _aidl_data = self.build_parcel_RepeatLongEnum(_arg_token)?;
- let _aidl_reply = self.binder.submit_transact(transactions::RepeatLongEnum, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#RepeatLongEnum, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_RepeatLongEnum(_arg_token, _aidl_reply)
}
- fn ReverseBoolean(&self, _arg_input: &[bool], _arg_repeated: &mut Vec<bool>) -> binder::Result<Vec<bool>> {
+ fn r#ReverseBoolean(&self, _arg_input: &[bool], _arg_repeated: &mut Vec<bool>) -> binder::Result<Vec<bool>> {
let _aidl_data = self.build_parcel_ReverseBoolean(_arg_input, _arg_repeated)?;
- let _aidl_reply = self.binder.submit_transact(transactions::ReverseBoolean, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#ReverseBoolean, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_ReverseBoolean(_arg_input, _arg_repeated, _aidl_reply)
}
- fn ReverseByte(&self, _arg_input: &[u8], _arg_repeated: &mut Vec<u8>) -> binder::Result<Vec<u8>> {
+ fn r#ReverseByte(&self, _arg_input: &[u8], _arg_repeated: &mut Vec<u8>) -> binder::Result<Vec<u8>> {
let _aidl_data = self.build_parcel_ReverseByte(_arg_input, _arg_repeated)?;
- let _aidl_reply = self.binder.submit_transact(transactions::ReverseByte, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#ReverseByte, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_ReverseByte(_arg_input, _arg_repeated, _aidl_reply)
}
- fn ReverseChar(&self, _arg_input: &[u16], _arg_repeated: &mut Vec<u16>) -> binder::Result<Vec<u16>> {
+ fn r#ReverseChar(&self, _arg_input: &[u16], _arg_repeated: &mut Vec<u16>) -> binder::Result<Vec<u16>> {
let _aidl_data = self.build_parcel_ReverseChar(_arg_input, _arg_repeated)?;
- let _aidl_reply = self.binder.submit_transact(transactions::ReverseChar, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#ReverseChar, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_ReverseChar(_arg_input, _arg_repeated, _aidl_reply)
}
- fn ReverseInt(&self, _arg_input: &[i32], _arg_repeated: &mut Vec<i32>) -> binder::Result<Vec<i32>> {
+ fn r#ReverseInt(&self, _arg_input: &[i32], _arg_repeated: &mut Vec<i32>) -> binder::Result<Vec<i32>> {
let _aidl_data = self.build_parcel_ReverseInt(_arg_input, _arg_repeated)?;
- let _aidl_reply = self.binder.submit_transact(transactions::ReverseInt, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#ReverseInt, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_ReverseInt(_arg_input, _arg_repeated, _aidl_reply)
}
- fn ReverseLong(&self, _arg_input: &[i64], _arg_repeated: &mut Vec<i64>) -> binder::Result<Vec<i64>> {
+ fn r#ReverseLong(&self, _arg_input: &[i64], _arg_repeated: &mut Vec<i64>) -> binder::Result<Vec<i64>> {
let _aidl_data = self.build_parcel_ReverseLong(_arg_input, _arg_repeated)?;
- let _aidl_reply = self.binder.submit_transact(transactions::ReverseLong, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#ReverseLong, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_ReverseLong(_arg_input, _arg_repeated, _aidl_reply)
}
- fn ReverseFloat(&self, _arg_input: &[f32], _arg_repeated: &mut Vec<f32>) -> binder::Result<Vec<f32>> {
+ fn r#ReverseFloat(&self, _arg_input: &[f32], _arg_repeated: &mut Vec<f32>) -> binder::Result<Vec<f32>> {
let _aidl_data = self.build_parcel_ReverseFloat(_arg_input, _arg_repeated)?;
- let _aidl_reply = self.binder.submit_transact(transactions::ReverseFloat, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#ReverseFloat, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_ReverseFloat(_arg_input, _arg_repeated, _aidl_reply)
}
- fn ReverseDouble(&self, _arg_input: &[f64], _arg_repeated: &mut Vec<f64>) -> binder::Result<Vec<f64>> {
+ fn r#ReverseDouble(&self, _arg_input: &[f64], _arg_repeated: &mut Vec<f64>) -> binder::Result<Vec<f64>> {
let _aidl_data = self.build_parcel_ReverseDouble(_arg_input, _arg_repeated)?;
- let _aidl_reply = self.binder.submit_transact(transactions::ReverseDouble, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#ReverseDouble, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_ReverseDouble(_arg_input, _arg_repeated, _aidl_reply)
}
- fn ReverseString(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::Result<Vec<String>> {
+ fn r#ReverseString(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::Result<Vec<String>> {
let _aidl_data = self.build_parcel_ReverseString(_arg_input, _arg_repeated)?;
- let _aidl_reply = self.binder.submit_transact(transactions::ReverseString, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#ReverseString, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_ReverseString(_arg_input, _arg_repeated, _aidl_reply)
}
- fn ReverseByteEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>> {
+ fn r#ReverseByteEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>> {
let _aidl_data = self.build_parcel_ReverseByteEnum(_arg_input, _arg_repeated)?;
- let _aidl_reply = self.binder.submit_transact(transactions::ReverseByteEnum, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#ReverseByteEnum, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_ReverseByteEnum(_arg_input, _arg_repeated, _aidl_reply)
}
- fn ReverseIntEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>> {
+ fn r#ReverseIntEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>> {
let _aidl_data = self.build_parcel_ReverseIntEnum(_arg_input, _arg_repeated)?;
- let _aidl_reply = self.binder.submit_transact(transactions::ReverseIntEnum, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#ReverseIntEnum, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_ReverseIntEnum(_arg_input, _arg_repeated, _aidl_reply)
}
- fn ReverseLongEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>> {
+ fn r#ReverseLongEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>> {
let _aidl_data = self.build_parcel_ReverseLongEnum(_arg_input, _arg_repeated)?;
- let _aidl_reply = self.binder.submit_transact(transactions::ReverseLongEnum, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#ReverseLongEnum, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_ReverseLongEnum(_arg_input, _arg_repeated, _aidl_reply)
}
- fn GetOtherTestService(&self, _arg_name: &str) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>> {
+ fn r#GetOtherTestService(&self, _arg_name: &str) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>> {
let _aidl_data = self.build_parcel_GetOtherTestService(_arg_name)?;
- let _aidl_reply = self.binder.submit_transact(transactions::GetOtherTestService, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#GetOtherTestService, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_GetOtherTestService(_arg_name, _aidl_reply)
}
- fn VerifyName(&self, _arg_service: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>, _arg_name: &str) -> binder::Result<bool> {
+ fn r#SetOtherTestService(&self, _arg_name: &str, _arg_service: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>) -> binder::Result<bool> {
+ let _aidl_data = self.build_parcel_SetOtherTestService(_arg_name, _arg_service)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::r#SetOtherTestService, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ self.read_response_SetOtherTestService(_arg_name, _arg_service, _aidl_reply)
+ }
+ fn r#VerifyName(&self, _arg_service: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>, _arg_name: &str) -> binder::Result<bool> {
let _aidl_data = self.build_parcel_VerifyName(_arg_service, _arg_name)?;
- let _aidl_reply = self.binder.submit_transact(transactions::VerifyName, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#VerifyName, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_VerifyName(_arg_service, _arg_name, _aidl_reply)
}
- fn GetInterfaceArray(&self, _arg_names: &[String]) -> binder::Result<Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>> {
+ fn r#GetInterfaceArray(&self, _arg_names: &[String]) -> binder::Result<Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>> {
let _aidl_data = self.build_parcel_GetInterfaceArray(_arg_names)?;
- let _aidl_reply = self.binder.submit_transact(transactions::GetInterfaceArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#GetInterfaceArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_GetInterfaceArray(_arg_names, _aidl_reply)
}
- fn VerifyNamesWithInterfaceArray(&self, _arg_services: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>], _arg_names: &[String]) -> binder::Result<bool> {
+ fn r#VerifyNamesWithInterfaceArray(&self, _arg_services: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>], _arg_names: &[String]) -> binder::Result<bool> {
let _aidl_data = self.build_parcel_VerifyNamesWithInterfaceArray(_arg_services, _arg_names)?;
- let _aidl_reply = self.binder.submit_transact(transactions::VerifyNamesWithInterfaceArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#VerifyNamesWithInterfaceArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_VerifyNamesWithInterfaceArray(_arg_services, _arg_names, _aidl_reply)
}
- fn GetNullableInterfaceArray(&self, _arg_names: Option<&[Option<String>]>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>> {
+ fn r#GetNullableInterfaceArray(&self, _arg_names: Option<&[Option<String>]>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>> {
let _aidl_data = self.build_parcel_GetNullableInterfaceArray(_arg_names)?;
- let _aidl_reply = self.binder.submit_transact(transactions::GetNullableInterfaceArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#GetNullableInterfaceArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_GetNullableInterfaceArray(_arg_names, _aidl_reply)
}
- fn VerifyNamesWithNullableInterfaceArray(&self, _arg_services: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>]>, _arg_names: Option<&[Option<String>]>) -> binder::Result<bool> {
+ fn r#VerifyNamesWithNullableInterfaceArray(&self, _arg_services: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>]>, _arg_names: Option<&[Option<String>]>) -> binder::Result<bool> {
let _aidl_data = self.build_parcel_VerifyNamesWithNullableInterfaceArray(_arg_services, _arg_names)?;
- let _aidl_reply = self.binder.submit_transact(transactions::VerifyNamesWithNullableInterfaceArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#VerifyNamesWithNullableInterfaceArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_VerifyNamesWithNullableInterfaceArray(_arg_services, _arg_names, _aidl_reply)
}
- fn GetInterfaceList(&self, _arg_names: Option<&[Option<String>]>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>> {
+ fn r#GetInterfaceList(&self, _arg_names: Option<&[Option<String>]>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>> {
let _aidl_data = self.build_parcel_GetInterfaceList(_arg_names)?;
- let _aidl_reply = self.binder.submit_transact(transactions::GetInterfaceList, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#GetInterfaceList, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_GetInterfaceList(_arg_names, _aidl_reply)
}
- fn VerifyNamesWithInterfaceList(&self, _arg_services: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>]>, _arg_names: Option<&[Option<String>]>) -> binder::Result<bool> {
+ fn r#VerifyNamesWithInterfaceList(&self, _arg_services: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>]>, _arg_names: Option<&[Option<String>]>) -> binder::Result<bool> {
let _aidl_data = self.build_parcel_VerifyNamesWithInterfaceList(_arg_services, _arg_names)?;
- let _aidl_reply = self.binder.submit_transact(transactions::VerifyNamesWithInterfaceList, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#VerifyNamesWithInterfaceList, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_VerifyNamesWithInterfaceList(_arg_services, _arg_names, _aidl_reply)
}
- fn ReverseStringList(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::Result<Vec<String>> {
+ fn r#ReverseStringList(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::Result<Vec<String>> {
let _aidl_data = self.build_parcel_ReverseStringList(_arg_input, _arg_repeated)?;
- let _aidl_reply = self.binder.submit_transact(transactions::ReverseStringList, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#ReverseStringList, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_ReverseStringList(_arg_input, _arg_repeated, _aidl_reply)
}
- fn RepeatParcelFileDescriptor(&self, _arg_read: &binder::ParcelFileDescriptor) -> binder::Result<binder::ParcelFileDescriptor> {
+ fn r#RepeatParcelFileDescriptor(&self, _arg_read: &binder::ParcelFileDescriptor) -> binder::Result<binder::ParcelFileDescriptor> {
let _aidl_data = self.build_parcel_RepeatParcelFileDescriptor(_arg_read)?;
- let _aidl_reply = self.binder.submit_transact(transactions::RepeatParcelFileDescriptor, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#RepeatParcelFileDescriptor, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_RepeatParcelFileDescriptor(_arg_read, _aidl_reply)
}
- fn ReverseParcelFileDescriptorArray(&self, _arg_input: &[binder::ParcelFileDescriptor], _arg_repeated: &mut Vec<Option<binder::ParcelFileDescriptor>>) -> binder::Result<Vec<binder::ParcelFileDescriptor>> {
+ fn r#ReverseParcelFileDescriptorArray(&self, _arg_input: &[binder::ParcelFileDescriptor], _arg_repeated: &mut Vec<Option<binder::ParcelFileDescriptor>>) -> binder::Result<Vec<binder::ParcelFileDescriptor>> {
let _aidl_data = self.build_parcel_ReverseParcelFileDescriptorArray(_arg_input, _arg_repeated)?;
- let _aidl_reply = self.binder.submit_transact(transactions::ReverseParcelFileDescriptorArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#ReverseParcelFileDescriptorArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_ReverseParcelFileDescriptorArray(_arg_input, _arg_repeated, _aidl_reply)
}
- fn ThrowServiceException(&self, _arg_code: i32) -> binder::Result<()> {
+ fn r#ThrowServiceException(&self, _arg_code: i32) -> binder::Result<()> {
let _aidl_data = self.build_parcel_ThrowServiceException(_arg_code)?;
- let _aidl_reply = self.binder.submit_transact(transactions::ThrowServiceException, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#ThrowServiceException, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_ThrowServiceException(_arg_code, _aidl_reply)
}
- fn RepeatNullableIntArray(&self, _arg_input: Option<&[i32]>) -> binder::Result<Option<Vec<i32>>> {
+ fn r#RepeatNullableIntArray(&self, _arg_input: Option<&[i32]>) -> binder::Result<Option<Vec<i32>>> {
let _aidl_data = self.build_parcel_RepeatNullableIntArray(_arg_input)?;
- let _aidl_reply = self.binder.submit_transact(transactions::RepeatNullableIntArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#RepeatNullableIntArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_RepeatNullableIntArray(_arg_input, _aidl_reply)
}
- fn RepeatNullableByteEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum]>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>>> {
+ fn r#RepeatNullableByteEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum]>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>>> {
let _aidl_data = self.build_parcel_RepeatNullableByteEnumArray(_arg_input)?;
- let _aidl_reply = self.binder.submit_transact(transactions::RepeatNullableByteEnumArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#RepeatNullableByteEnumArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_RepeatNullableByteEnumArray(_arg_input, _aidl_reply)
}
- fn RepeatNullableIntEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum]>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>>> {
+ fn r#RepeatNullableIntEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum]>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>>> {
let _aidl_data = self.build_parcel_RepeatNullableIntEnumArray(_arg_input)?;
- let _aidl_reply = self.binder.submit_transact(transactions::RepeatNullableIntEnumArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#RepeatNullableIntEnumArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_RepeatNullableIntEnumArray(_arg_input, _aidl_reply)
}
- fn RepeatNullableLongEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum]>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>>> {
+ fn r#RepeatNullableLongEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum]>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>>> {
let _aidl_data = self.build_parcel_RepeatNullableLongEnumArray(_arg_input)?;
- let _aidl_reply = self.binder.submit_transact(transactions::RepeatNullableLongEnumArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#RepeatNullableLongEnumArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_RepeatNullableLongEnumArray(_arg_input, _aidl_reply)
}
- fn RepeatNullableString(&self, _arg_input: Option<&str>) -> binder::Result<Option<String>> {
+ fn r#RepeatNullableString(&self, _arg_input: Option<&str>) -> binder::Result<Option<String>> {
let _aidl_data = self.build_parcel_RepeatNullableString(_arg_input)?;
- let _aidl_reply = self.binder.submit_transact(transactions::RepeatNullableString, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#RepeatNullableString, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_RepeatNullableString(_arg_input, _aidl_reply)
}
- fn RepeatNullableStringList(&self, _arg_input: Option<&[Option<String>]>) -> binder::Result<Option<Vec<Option<String>>>> {
+ fn r#RepeatNullableStringList(&self, _arg_input: Option<&[Option<String>]>) -> binder::Result<Option<Vec<Option<String>>>> {
let _aidl_data = self.build_parcel_RepeatNullableStringList(_arg_input)?;
- let _aidl_reply = self.binder.submit_transact(transactions::RepeatNullableStringList, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#RepeatNullableStringList, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_RepeatNullableStringList(_arg_input, _aidl_reply)
}
- fn RepeatNullableParcelable(&self, _arg_input: Option<&crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>) -> binder::Result<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>> {
+ fn r#RepeatNullableParcelable(&self, _arg_input: Option<&crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>) -> binder::Result<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>> {
let _aidl_data = self.build_parcel_RepeatNullableParcelable(_arg_input)?;
- let _aidl_reply = self.binder.submit_transact(transactions::RepeatNullableParcelable, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#RepeatNullableParcelable, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_RepeatNullableParcelable(_arg_input, _aidl_reply)
}
- fn RepeatNullableParcelableArray(&self, _arg_input: Option<&[Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>> {
+ fn r#RepeatNullableParcelableArray(&self, _arg_input: Option<&[Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>> {
let _aidl_data = self.build_parcel_RepeatNullableParcelableArray(_arg_input)?;
- let _aidl_reply = self.binder.submit_transact(transactions::RepeatNullableParcelableArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#RepeatNullableParcelableArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_RepeatNullableParcelableArray(_arg_input, _aidl_reply)
}
- fn RepeatNullableParcelableList(&self, _arg_input: Option<&[Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>> {
+ fn r#RepeatNullableParcelableList(&self, _arg_input: Option<&[Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>> {
let _aidl_data = self.build_parcel_RepeatNullableParcelableList(_arg_input)?;
- let _aidl_reply = self.binder.submit_transact(transactions::RepeatNullableParcelableList, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#RepeatNullableParcelableList, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_RepeatNullableParcelableList(_arg_input, _aidl_reply)
}
- fn TakesAnIBinder(&self, _arg_input: &binder::SpIBinder) -> binder::Result<()> {
+ fn r#TakesAnIBinder(&self, _arg_input: &binder::SpIBinder) -> binder::Result<()> {
let _aidl_data = self.build_parcel_TakesAnIBinder(_arg_input)?;
- let _aidl_reply = self.binder.submit_transact(transactions::TakesAnIBinder, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#TakesAnIBinder, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_TakesAnIBinder(_arg_input, _aidl_reply)
}
- fn TakesANullableIBinder(&self, _arg_input: Option<&binder::SpIBinder>) -> binder::Result<()> {
+ fn r#TakesANullableIBinder(&self, _arg_input: Option<&binder::SpIBinder>) -> binder::Result<()> {
let _aidl_data = self.build_parcel_TakesANullableIBinder(_arg_input)?;
- let _aidl_reply = self.binder.submit_transact(transactions::TakesANullableIBinder, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#TakesANullableIBinder, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_TakesANullableIBinder(_arg_input, _aidl_reply)
}
- fn TakesAnIBinderList(&self, _arg_input: &[binder::SpIBinder]) -> binder::Result<()> {
+ fn r#TakesAnIBinderList(&self, _arg_input: &[binder::SpIBinder]) -> binder::Result<()> {
let _aidl_data = self.build_parcel_TakesAnIBinderList(_arg_input)?;
- let _aidl_reply = self.binder.submit_transact(transactions::TakesAnIBinderList, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#TakesAnIBinderList, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_TakesAnIBinderList(_arg_input, _aidl_reply)
}
- fn TakesANullableIBinderList(&self, _arg_input: Option<&[Option<binder::SpIBinder>]>) -> binder::Result<()> {
+ fn r#TakesANullableIBinderList(&self, _arg_input: Option<&[Option<binder::SpIBinder>]>) -> binder::Result<()> {
let _aidl_data = self.build_parcel_TakesANullableIBinderList(_arg_input)?;
- let _aidl_reply = self.binder.submit_transact(transactions::TakesANullableIBinderList, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#TakesANullableIBinderList, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_TakesANullableIBinderList(_arg_input, _aidl_reply)
}
- fn RepeatUtf8CppString(&self, _arg_token: &str) -> binder::Result<String> {
+ fn r#RepeatUtf8CppString(&self, _arg_token: &str) -> binder::Result<String> {
let _aidl_data = self.build_parcel_RepeatUtf8CppString(_arg_token)?;
- let _aidl_reply = self.binder.submit_transact(transactions::RepeatUtf8CppString, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#RepeatUtf8CppString, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_RepeatUtf8CppString(_arg_token, _aidl_reply)
}
- fn RepeatNullableUtf8CppString(&self, _arg_token: Option<&str>) -> binder::Result<Option<String>> {
+ fn r#RepeatNullableUtf8CppString(&self, _arg_token: Option<&str>) -> binder::Result<Option<String>> {
let _aidl_data = self.build_parcel_RepeatNullableUtf8CppString(_arg_token)?;
- let _aidl_reply = self.binder.submit_transact(transactions::RepeatNullableUtf8CppString, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#RepeatNullableUtf8CppString, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_RepeatNullableUtf8CppString(_arg_token, _aidl_reply)
}
- fn ReverseUtf8CppString(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::Result<Vec<String>> {
+ fn r#ReverseUtf8CppString(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::Result<Vec<String>> {
let _aidl_data = self.build_parcel_ReverseUtf8CppString(_arg_input, _arg_repeated)?;
- let _aidl_reply = self.binder.submit_transact(transactions::ReverseUtf8CppString, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#ReverseUtf8CppString, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_ReverseUtf8CppString(_arg_input, _arg_repeated, _aidl_reply)
}
- fn ReverseNullableUtf8CppString(&self, _arg_input: Option<&[Option<String>]>, _arg_repeated: &mut Option<Vec<Option<String>>>) -> binder::Result<Option<Vec<Option<String>>>> {
+ fn r#ReverseNullableUtf8CppString(&self, _arg_input: Option<&[Option<String>]>, _arg_repeated: &mut Option<Vec<Option<String>>>) -> binder::Result<Option<Vec<Option<String>>>> {
let _aidl_data = self.build_parcel_ReverseNullableUtf8CppString(_arg_input, _arg_repeated)?;
- let _aidl_reply = self.binder.submit_transact(transactions::ReverseNullableUtf8CppString, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#ReverseNullableUtf8CppString, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_ReverseNullableUtf8CppString(_arg_input, _arg_repeated, _aidl_reply)
}
- fn ReverseUtf8CppStringList(&self, _arg_input: Option<&[Option<String>]>, _arg_repeated: &mut Option<Vec<Option<String>>>) -> binder::Result<Option<Vec<Option<String>>>> {
+ fn r#ReverseUtf8CppStringList(&self, _arg_input: Option<&[Option<String>]>, _arg_repeated: &mut Option<Vec<Option<String>>>) -> binder::Result<Option<Vec<Option<String>>>> {
let _aidl_data = self.build_parcel_ReverseUtf8CppStringList(_arg_input, _arg_repeated)?;
- let _aidl_reply = self.binder.submit_transact(transactions::ReverseUtf8CppStringList, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#ReverseUtf8CppStringList, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_ReverseUtf8CppStringList(_arg_input, _arg_repeated, _aidl_reply)
}
- fn GetCallback(&self, _arg_return_null: bool) -> binder::Result<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>> {
+ fn r#GetCallback(&self, _arg_return_null: bool) -> binder::Result<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>> {
let _aidl_data = self.build_parcel_GetCallback(_arg_return_null)?;
- let _aidl_reply = self.binder.submit_transact(transactions::GetCallback, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#GetCallback, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_GetCallback(_arg_return_null, _aidl_reply)
}
- fn FillOutStructuredParcelable(&self, _arg_parcel: &mut crate::mangled::_7_android_4_aidl_5_tests_20_StructuredParcelable) -> binder::Result<()> {
+ fn r#FillOutStructuredParcelable(&self, _arg_parcel: &mut crate::mangled::_7_android_4_aidl_5_tests_20_StructuredParcelable) -> binder::Result<()> {
let _aidl_data = self.build_parcel_FillOutStructuredParcelable(_arg_parcel)?;
- let _aidl_reply = self.binder.submit_transact(transactions::FillOutStructuredParcelable, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#FillOutStructuredParcelable, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_FillOutStructuredParcelable(_arg_parcel, _aidl_reply)
}
- fn RepeatExtendableParcelable(&self, _arg_ep: &crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable, _arg_ep2: &mut crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable) -> binder::Result<()> {
+ fn r#RepeatExtendableParcelable(&self, _arg_ep: &crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable, _arg_ep2: &mut crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable) -> binder::Result<()> {
let _aidl_data = self.build_parcel_RepeatExtendableParcelable(_arg_ep, _arg_ep2)?;
- let _aidl_reply = self.binder.submit_transact(transactions::RepeatExtendableParcelable, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#RepeatExtendableParcelable, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_RepeatExtendableParcelable(_arg_ep, _arg_ep2, _aidl_reply)
}
- fn ReverseList(&self, _arg_list: &crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList> {
+ fn r#ReverseList(&self, _arg_list: &crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList> {
let _aidl_data = self.build_parcel_ReverseList(_arg_list)?;
- let _aidl_reply = self.binder.submit_transact(transactions::ReverseList, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#ReverseList, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_ReverseList(_arg_list, _aidl_reply)
}
- fn ReverseIBinderArray(&self, _arg_input: &[binder::SpIBinder], _arg_repeated: &mut Vec<Option<binder::SpIBinder>>) -> binder::Result<Vec<binder::SpIBinder>> {
+ fn r#ReverseIBinderArray(&self, _arg_input: &[binder::SpIBinder], _arg_repeated: &mut Vec<Option<binder::SpIBinder>>) -> binder::Result<Vec<binder::SpIBinder>> {
let _aidl_data = self.build_parcel_ReverseIBinderArray(_arg_input, _arg_repeated)?;
- let _aidl_reply = self.binder.submit_transact(transactions::ReverseIBinderArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#ReverseIBinderArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_ReverseIBinderArray(_arg_input, _arg_repeated, _aidl_reply)
}
- fn ReverseNullableIBinderArray(&self, _arg_input: Option<&[Option<binder::SpIBinder>]>, _arg_repeated: &mut Option<Vec<Option<binder::SpIBinder>>>) -> binder::Result<Option<Vec<Option<binder::SpIBinder>>>> {
+ fn r#ReverseNullableIBinderArray(&self, _arg_input: Option<&[Option<binder::SpIBinder>]>, _arg_repeated: &mut Option<Vec<Option<binder::SpIBinder>>>) -> binder::Result<Option<Vec<Option<binder::SpIBinder>>>> {
let _aidl_data = self.build_parcel_ReverseNullableIBinderArray(_arg_input, _arg_repeated)?;
- let _aidl_reply = self.binder.submit_transact(transactions::ReverseNullableIBinderArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#ReverseNullableIBinderArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_ReverseNullableIBinderArray(_arg_input, _arg_repeated, _aidl_reply)
}
- fn GetOldNameInterface(&self) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_IOldName>> {
+ fn r#GetOldNameInterface(&self) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_IOldName>> {
let _aidl_data = self.build_parcel_GetOldNameInterface()?;
- let _aidl_reply = self.binder.submit_transact(transactions::GetOldNameInterface, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#GetOldNameInterface, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_GetOldNameInterface(_aidl_reply)
}
- fn GetNewNameInterface(&self) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_INewName>> {
+ fn r#GetNewNameInterface(&self) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_INewName>> {
let _aidl_data = self.build_parcel_GetNewNameInterface()?;
- let _aidl_reply = self.binder.submit_transact(transactions::GetNewNameInterface, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#GetNewNameInterface, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_GetNewNameInterface(_aidl_reply)
}
- fn GetUnionTags(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_5_Union]) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_5_Union_3_Tag>> {
+ fn r#GetUnionTags(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_5_Union]) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_5_Union_3_Tag>> {
let _aidl_data = self.build_parcel_GetUnionTags(_arg_input)?;
- let _aidl_reply = self.binder.submit_transact(transactions::GetUnionTags, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#GetUnionTags, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_GetUnionTags(_arg_input, _aidl_reply)
}
- fn GetCppJavaTests(&self) -> binder::Result<Option<binder::SpIBinder>> {
+ fn r#GetCppJavaTests(&self) -> binder::Result<Option<binder::SpIBinder>> {
let _aidl_data = self.build_parcel_GetCppJavaTests()?;
- let _aidl_reply = self.binder.submit_transact(transactions::GetCppJavaTests, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#GetCppJavaTests, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_GetCppJavaTests(_aidl_reply)
}
- fn getBackendType(&self) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_11_BackendType> {
+ fn r#getBackendType(&self) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_11_BackendType> {
let _aidl_data = self.build_parcel_getBackendType()?;
- let _aidl_reply = self.binder.submit_transact(transactions::getBackendType, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#getBackendType, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_getBackendType(_aidl_reply)
}
+ fn r#GetCircular(&self, _arg_cp: &mut crate::mangled::_7_android_4_aidl_5_tests_18_CircularParcelable) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_9_ICircular>> {
+ let _aidl_data = self.build_parcel_GetCircular(_arg_cp)?;
+ let _aidl_reply = self.binder.submit_transact(transactions::r#GetCircular, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ self.read_response_GetCircular(_arg_cp, _aidl_reply)
+ }
}
impl<P: binder::BinderAsyncPool> ITestServiceAsync<P> for BpTestService {
- fn UnimplementedMethod<'a>(&'a self, _arg_arg: i32) -> binder::BoxFuture<'a, binder::Result<i32>> {
+ fn r#UnimplementedMethod<'a>(&'a self, _arg_arg: i32) -> binder::BoxFuture<'a, binder::Result<i32>> {
let _aidl_data = match self.build_parcel_UnimplementedMethod(_arg_arg) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::UnimplementedMethod, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#UnimplementedMethod, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_UnimplementedMethod(_arg_arg, _aidl_reply)
}
)
}
- fn Deprecated<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<()>> {
+ fn r#Deprecated<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<()>> {
let _aidl_data = match self.build_parcel_Deprecated() {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::Deprecated, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#Deprecated, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_Deprecated(_aidl_reply)
}
)
}
- fn TestOneway(&self) -> std::future::Ready<binder::Result<()>> {
+ fn r#TestOneway(&self) -> std::future::Ready<binder::Result<()>> {
let _aidl_data = match self.build_parcel_TestOneway() {
Ok(_aidl_data) => _aidl_data,
Err(err) => return std::future::ready(Err(err)),
};
- let _aidl_reply = self.binder.submit_transact(transactions::TestOneway, _aidl_data, binder::binder_impl::FLAG_ONEWAY | binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#TestOneway, _aidl_data, binder::binder_impl::FLAG_ONEWAY | binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL);
std::future::ready(self.read_response_TestOneway(_aidl_reply))
}
- fn RepeatBoolean<'a>(&'a self, _arg_token: bool) -> binder::BoxFuture<'a, binder::Result<bool>> {
+ fn r#RepeatBoolean<'a>(&'a self, _arg_token: bool) -> binder::BoxFuture<'a, binder::Result<bool>> {
let _aidl_data = match self.build_parcel_RepeatBoolean(_arg_token) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::RepeatBoolean, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#RepeatBoolean, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_RepeatBoolean(_arg_token, _aidl_reply)
}
)
}
- fn RepeatByte<'a>(&'a self, _arg_token: i8) -> binder::BoxFuture<'a, binder::Result<i8>> {
+ fn r#RepeatByte<'a>(&'a self, _arg_token: i8) -> binder::BoxFuture<'a, binder::Result<i8>> {
let _aidl_data = match self.build_parcel_RepeatByte(_arg_token) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::RepeatByte, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#RepeatByte, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_RepeatByte(_arg_token, _aidl_reply)
}
)
}
- fn RepeatChar<'a>(&'a self, _arg_token: u16) -> binder::BoxFuture<'a, binder::Result<u16>> {
+ fn r#RepeatChar<'a>(&'a self, _arg_token: u16) -> binder::BoxFuture<'a, binder::Result<u16>> {
let _aidl_data = match self.build_parcel_RepeatChar(_arg_token) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::RepeatChar, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#RepeatChar, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_RepeatChar(_arg_token, _aidl_reply)
}
)
}
- fn RepeatInt<'a>(&'a self, _arg_token: i32) -> binder::BoxFuture<'a, binder::Result<i32>> {
+ fn r#RepeatInt<'a>(&'a self, _arg_token: i32) -> binder::BoxFuture<'a, binder::Result<i32>> {
let _aidl_data = match self.build_parcel_RepeatInt(_arg_token) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::RepeatInt, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#RepeatInt, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_RepeatInt(_arg_token, _aidl_reply)
}
)
}
- fn RepeatLong<'a>(&'a self, _arg_token: i64) -> binder::BoxFuture<'a, binder::Result<i64>> {
+ fn r#RepeatLong<'a>(&'a self, _arg_token: i64) -> binder::BoxFuture<'a, binder::Result<i64>> {
let _aidl_data = match self.build_parcel_RepeatLong(_arg_token) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::RepeatLong, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#RepeatLong, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_RepeatLong(_arg_token, _aidl_reply)
}
)
}
- fn RepeatFloat<'a>(&'a self, _arg_token: f32) -> binder::BoxFuture<'a, binder::Result<f32>> {
+ fn r#RepeatFloat<'a>(&'a self, _arg_token: f32) -> binder::BoxFuture<'a, binder::Result<f32>> {
let _aidl_data = match self.build_parcel_RepeatFloat(_arg_token) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::RepeatFloat, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#RepeatFloat, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_RepeatFloat(_arg_token, _aidl_reply)
}
)
}
- fn RepeatDouble<'a>(&'a self, _arg_token: f64) -> binder::BoxFuture<'a, binder::Result<f64>> {
+ fn r#RepeatDouble<'a>(&'a self, _arg_token: f64) -> binder::BoxFuture<'a, binder::Result<f64>> {
let _aidl_data = match self.build_parcel_RepeatDouble(_arg_token) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::RepeatDouble, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#RepeatDouble, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_RepeatDouble(_arg_token, _aidl_reply)
}
)
}
- fn RepeatString<'a>(&'a self, _arg_token: &'a str) -> binder::BoxFuture<'a, binder::Result<String>> {
+ fn r#RepeatString<'a>(&'a self, _arg_token: &'a str) -> binder::BoxFuture<'a, binder::Result<String>> {
let _aidl_data = match self.build_parcel_RepeatString(_arg_token) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::RepeatString, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#RepeatString, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_RepeatString(_arg_token, _aidl_reply)
}
)
}
- fn RepeatByteEnum<'a>(&'a self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum) -> binder::BoxFuture<'a, binder::Result<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>> {
+ fn r#RepeatByteEnum<'a>(&'a self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum) -> binder::BoxFuture<'a, binder::Result<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>> {
let _aidl_data = match self.build_parcel_RepeatByteEnum(_arg_token) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::RepeatByteEnum, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#RepeatByteEnum, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_RepeatByteEnum(_arg_token, _aidl_reply)
}
)
}
- fn RepeatIntEnum<'a>(&'a self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum) -> binder::BoxFuture<'a, binder::Result<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>> {
+ fn r#RepeatIntEnum<'a>(&'a self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum) -> binder::BoxFuture<'a, binder::Result<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>> {
let _aidl_data = match self.build_parcel_RepeatIntEnum(_arg_token) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::RepeatIntEnum, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#RepeatIntEnum, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_RepeatIntEnum(_arg_token, _aidl_reply)
}
)
}
- fn RepeatLongEnum<'a>(&'a self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum) -> binder::BoxFuture<'a, binder::Result<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>> {
+ fn r#RepeatLongEnum<'a>(&'a self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum) -> binder::BoxFuture<'a, binder::Result<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>> {
let _aidl_data = match self.build_parcel_RepeatLongEnum(_arg_token) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::RepeatLongEnum, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#RepeatLongEnum, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_RepeatLongEnum(_arg_token, _aidl_reply)
}
)
}
- fn ReverseBoolean<'a>(&'a self, _arg_input: &'a [bool], _arg_repeated: &'a mut Vec<bool>) -> binder::BoxFuture<'a, binder::Result<Vec<bool>>> {
+ fn r#ReverseBoolean<'a>(&'a self, _arg_input: &'a [bool], _arg_repeated: &'a mut Vec<bool>) -> binder::BoxFuture<'a, binder::Result<Vec<bool>>> {
let _aidl_data = match self.build_parcel_ReverseBoolean(_arg_input, _arg_repeated) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::ReverseBoolean, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#ReverseBoolean, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_ReverseBoolean(_arg_input, _arg_repeated, _aidl_reply)
}
)
}
- fn ReverseByte<'a>(&'a self, _arg_input: &'a [u8], _arg_repeated: &'a mut Vec<u8>) -> binder::BoxFuture<'a, binder::Result<Vec<u8>>> {
+ fn r#ReverseByte<'a>(&'a self, _arg_input: &'a [u8], _arg_repeated: &'a mut Vec<u8>) -> binder::BoxFuture<'a, binder::Result<Vec<u8>>> {
let _aidl_data = match self.build_parcel_ReverseByte(_arg_input, _arg_repeated) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::ReverseByte, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#ReverseByte, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_ReverseByte(_arg_input, _arg_repeated, _aidl_reply)
}
)
}
- fn ReverseChar<'a>(&'a self, _arg_input: &'a [u16], _arg_repeated: &'a mut Vec<u16>) -> binder::BoxFuture<'a, binder::Result<Vec<u16>>> {
+ fn r#ReverseChar<'a>(&'a self, _arg_input: &'a [u16], _arg_repeated: &'a mut Vec<u16>) -> binder::BoxFuture<'a, binder::Result<Vec<u16>>> {
let _aidl_data = match self.build_parcel_ReverseChar(_arg_input, _arg_repeated) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::ReverseChar, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#ReverseChar, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_ReverseChar(_arg_input, _arg_repeated, _aidl_reply)
}
)
}
- fn ReverseInt<'a>(&'a self, _arg_input: &'a [i32], _arg_repeated: &'a mut Vec<i32>) -> binder::BoxFuture<'a, binder::Result<Vec<i32>>> {
+ fn r#ReverseInt<'a>(&'a self, _arg_input: &'a [i32], _arg_repeated: &'a mut Vec<i32>) -> binder::BoxFuture<'a, binder::Result<Vec<i32>>> {
let _aidl_data = match self.build_parcel_ReverseInt(_arg_input, _arg_repeated) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::ReverseInt, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#ReverseInt, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_ReverseInt(_arg_input, _arg_repeated, _aidl_reply)
}
)
}
- fn ReverseLong<'a>(&'a self, _arg_input: &'a [i64], _arg_repeated: &'a mut Vec<i64>) -> binder::BoxFuture<'a, binder::Result<Vec<i64>>> {
+ fn r#ReverseLong<'a>(&'a self, _arg_input: &'a [i64], _arg_repeated: &'a mut Vec<i64>) -> binder::BoxFuture<'a, binder::Result<Vec<i64>>> {
let _aidl_data = match self.build_parcel_ReverseLong(_arg_input, _arg_repeated) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::ReverseLong, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#ReverseLong, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_ReverseLong(_arg_input, _arg_repeated, _aidl_reply)
}
)
}
- fn ReverseFloat<'a>(&'a self, _arg_input: &'a [f32], _arg_repeated: &'a mut Vec<f32>) -> binder::BoxFuture<'a, binder::Result<Vec<f32>>> {
+ fn r#ReverseFloat<'a>(&'a self, _arg_input: &'a [f32], _arg_repeated: &'a mut Vec<f32>) -> binder::BoxFuture<'a, binder::Result<Vec<f32>>> {
let _aidl_data = match self.build_parcel_ReverseFloat(_arg_input, _arg_repeated) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::ReverseFloat, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#ReverseFloat, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_ReverseFloat(_arg_input, _arg_repeated, _aidl_reply)
}
)
}
- fn ReverseDouble<'a>(&'a self, _arg_input: &'a [f64], _arg_repeated: &'a mut Vec<f64>) -> binder::BoxFuture<'a, binder::Result<Vec<f64>>> {
+ fn r#ReverseDouble<'a>(&'a self, _arg_input: &'a [f64], _arg_repeated: &'a mut Vec<f64>) -> binder::BoxFuture<'a, binder::Result<Vec<f64>>> {
let _aidl_data = match self.build_parcel_ReverseDouble(_arg_input, _arg_repeated) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::ReverseDouble, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#ReverseDouble, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_ReverseDouble(_arg_input, _arg_repeated, _aidl_reply)
}
)
}
- fn ReverseString<'a>(&'a self, _arg_input: &'a [String], _arg_repeated: &'a mut Vec<String>) -> binder::BoxFuture<'a, binder::Result<Vec<String>>> {
+ fn r#ReverseString<'a>(&'a self, _arg_input: &'a [String], _arg_repeated: &'a mut Vec<String>) -> binder::BoxFuture<'a, binder::Result<Vec<String>>> {
let _aidl_data = match self.build_parcel_ReverseString(_arg_input, _arg_repeated) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::ReverseString, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#ReverseString, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_ReverseString(_arg_input, _arg_repeated, _aidl_reply)
}
)
}
- fn ReverseByteEnum<'a>(&'a self, _arg_input: &'a [crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum], _arg_repeated: &'a mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>) -> binder::BoxFuture<'a, binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>>> {
+ fn r#ReverseByteEnum<'a>(&'a self, _arg_input: &'a [crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum], _arg_repeated: &'a mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>) -> binder::BoxFuture<'a, binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>>> {
let _aidl_data = match self.build_parcel_ReverseByteEnum(_arg_input, _arg_repeated) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::ReverseByteEnum, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#ReverseByteEnum, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_ReverseByteEnum(_arg_input, _arg_repeated, _aidl_reply)
}
)
}
- fn ReverseIntEnum<'a>(&'a self, _arg_input: &'a [crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum], _arg_repeated: &'a mut Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>) -> binder::BoxFuture<'a, binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>>> {
+ fn r#ReverseIntEnum<'a>(&'a self, _arg_input: &'a [crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum], _arg_repeated: &'a mut Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>) -> binder::BoxFuture<'a, binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>>> {
let _aidl_data = match self.build_parcel_ReverseIntEnum(_arg_input, _arg_repeated) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::ReverseIntEnum, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#ReverseIntEnum, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_ReverseIntEnum(_arg_input, _arg_repeated, _aidl_reply)
}
)
}
- fn ReverseLongEnum<'a>(&'a self, _arg_input: &'a [crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum], _arg_repeated: &'a mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>) -> binder::BoxFuture<'a, binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>>> {
+ fn r#ReverseLongEnum<'a>(&'a self, _arg_input: &'a [crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum], _arg_repeated: &'a mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>) -> binder::BoxFuture<'a, binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>>> {
let _aidl_data = match self.build_parcel_ReverseLongEnum(_arg_input, _arg_repeated) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::ReverseLongEnum, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#ReverseLongEnum, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_ReverseLongEnum(_arg_input, _arg_repeated, _aidl_reply)
}
)
}
- fn GetOtherTestService<'a>(&'a self, _arg_name: &'a str) -> binder::BoxFuture<'a, binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>> {
+ fn r#GetOtherTestService<'a>(&'a self, _arg_name: &'a str) -> binder::BoxFuture<'a, binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>> {
let _aidl_data = match self.build_parcel_GetOtherTestService(_arg_name) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::GetOtherTestService, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#GetOtherTestService, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_GetOtherTestService(_arg_name, _aidl_reply)
}
)
}
- fn VerifyName<'a>(&'a self, _arg_service: &'a binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>, _arg_name: &'a str) -> binder::BoxFuture<'a, binder::Result<bool>> {
+ fn r#SetOtherTestService<'a>(&'a self, _arg_name: &'a str, _arg_service: &'a binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>) -> binder::BoxFuture<'a, binder::Result<bool>> {
+ let _aidl_data = match self.build_parcel_SetOtherTestService(_arg_name, _arg_service) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::r#SetOtherTestService, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_SetOtherTestService(_arg_name, _arg_service, _aidl_reply)
+ }
+ )
+ }
+ fn r#VerifyName<'a>(&'a self, _arg_service: &'a binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>, _arg_name: &'a str) -> binder::BoxFuture<'a, binder::Result<bool>> {
let _aidl_data = match self.build_parcel_VerifyName(_arg_service, _arg_name) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::VerifyName, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#VerifyName, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_VerifyName(_arg_service, _arg_name, _aidl_reply)
}
)
}
- fn GetInterfaceArray<'a>(&'a self, _arg_names: &'a [String]) -> binder::BoxFuture<'a, binder::Result<Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>> {
+ fn r#GetInterfaceArray<'a>(&'a self, _arg_names: &'a [String]) -> binder::BoxFuture<'a, binder::Result<Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>> {
let _aidl_data = match self.build_parcel_GetInterfaceArray(_arg_names) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::GetInterfaceArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#GetInterfaceArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_GetInterfaceArray(_arg_names, _aidl_reply)
}
)
}
- fn VerifyNamesWithInterfaceArray<'a>(&'a self, _arg_services: &'a [binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>], _arg_names: &'a [String]) -> binder::BoxFuture<'a, binder::Result<bool>> {
+ fn r#VerifyNamesWithInterfaceArray<'a>(&'a self, _arg_services: &'a [binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>], _arg_names: &'a [String]) -> binder::BoxFuture<'a, binder::Result<bool>> {
let _aidl_data = match self.build_parcel_VerifyNamesWithInterfaceArray(_arg_services, _arg_names) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::VerifyNamesWithInterfaceArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#VerifyNamesWithInterfaceArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_VerifyNamesWithInterfaceArray(_arg_services, _arg_names, _aidl_reply)
}
)
}
- fn GetNullableInterfaceArray<'a>(&'a self, _arg_names: Option<&'a [Option<String>]>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>>> {
+ fn r#GetNullableInterfaceArray<'a>(&'a self, _arg_names: Option<&'a [Option<String>]>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>>> {
let _aidl_data = match self.build_parcel_GetNullableInterfaceArray(_arg_names) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::GetNullableInterfaceArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#GetNullableInterfaceArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_GetNullableInterfaceArray(_arg_names, _aidl_reply)
}
)
}
- fn VerifyNamesWithNullableInterfaceArray<'a>(&'a self, _arg_services: Option<&'a [Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>]>, _arg_names: Option<&'a [Option<String>]>) -> binder::BoxFuture<'a, binder::Result<bool>> {
+ fn r#VerifyNamesWithNullableInterfaceArray<'a>(&'a self, _arg_services: Option<&'a [Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>]>, _arg_names: Option<&'a [Option<String>]>) -> binder::BoxFuture<'a, binder::Result<bool>> {
let _aidl_data = match self.build_parcel_VerifyNamesWithNullableInterfaceArray(_arg_services, _arg_names) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::VerifyNamesWithNullableInterfaceArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#VerifyNamesWithNullableInterfaceArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_VerifyNamesWithNullableInterfaceArray(_arg_services, _arg_names, _aidl_reply)
}
)
}
- fn GetInterfaceList<'a>(&'a self, _arg_names: Option<&'a [Option<String>]>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>>> {
+ fn r#GetInterfaceList<'a>(&'a self, _arg_names: Option<&'a [Option<String>]>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>>> {
let _aidl_data = match self.build_parcel_GetInterfaceList(_arg_names) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::GetInterfaceList, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#GetInterfaceList, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_GetInterfaceList(_arg_names, _aidl_reply)
}
)
}
- fn VerifyNamesWithInterfaceList<'a>(&'a self, _arg_services: Option<&'a [Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>]>, _arg_names: Option<&'a [Option<String>]>) -> binder::BoxFuture<'a, binder::Result<bool>> {
+ fn r#VerifyNamesWithInterfaceList<'a>(&'a self, _arg_services: Option<&'a [Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>]>, _arg_names: Option<&'a [Option<String>]>) -> binder::BoxFuture<'a, binder::Result<bool>> {
let _aidl_data = match self.build_parcel_VerifyNamesWithInterfaceList(_arg_services, _arg_names) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::VerifyNamesWithInterfaceList, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#VerifyNamesWithInterfaceList, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_VerifyNamesWithInterfaceList(_arg_services, _arg_names, _aidl_reply)
}
)
}
- fn ReverseStringList<'a>(&'a self, _arg_input: &'a [String], _arg_repeated: &'a mut Vec<String>) -> binder::BoxFuture<'a, binder::Result<Vec<String>>> {
+ fn r#ReverseStringList<'a>(&'a self, _arg_input: &'a [String], _arg_repeated: &'a mut Vec<String>) -> binder::BoxFuture<'a, binder::Result<Vec<String>>> {
let _aidl_data = match self.build_parcel_ReverseStringList(_arg_input, _arg_repeated) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::ReverseStringList, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#ReverseStringList, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_ReverseStringList(_arg_input, _arg_repeated, _aidl_reply)
}
)
}
- fn RepeatParcelFileDescriptor<'a>(&'a self, _arg_read: &'a binder::ParcelFileDescriptor) -> binder::BoxFuture<'a, binder::Result<binder::ParcelFileDescriptor>> {
+ fn r#RepeatParcelFileDescriptor<'a>(&'a self, _arg_read: &'a binder::ParcelFileDescriptor) -> binder::BoxFuture<'a, binder::Result<binder::ParcelFileDescriptor>> {
let _aidl_data = match self.build_parcel_RepeatParcelFileDescriptor(_arg_read) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::RepeatParcelFileDescriptor, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#RepeatParcelFileDescriptor, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_RepeatParcelFileDescriptor(_arg_read, _aidl_reply)
}
)
}
- fn ReverseParcelFileDescriptorArray<'a>(&'a self, _arg_input: &'a [binder::ParcelFileDescriptor], _arg_repeated: &'a mut Vec<Option<binder::ParcelFileDescriptor>>) -> binder::BoxFuture<'a, binder::Result<Vec<binder::ParcelFileDescriptor>>> {
+ fn r#ReverseParcelFileDescriptorArray<'a>(&'a self, _arg_input: &'a [binder::ParcelFileDescriptor], _arg_repeated: &'a mut Vec<Option<binder::ParcelFileDescriptor>>) -> binder::BoxFuture<'a, binder::Result<Vec<binder::ParcelFileDescriptor>>> {
let _aidl_data = match self.build_parcel_ReverseParcelFileDescriptorArray(_arg_input, _arg_repeated) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::ReverseParcelFileDescriptorArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#ReverseParcelFileDescriptorArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_ReverseParcelFileDescriptorArray(_arg_input, _arg_repeated, _aidl_reply)
}
)
}
- fn ThrowServiceException<'a>(&'a self, _arg_code: i32) -> binder::BoxFuture<'a, binder::Result<()>> {
+ fn r#ThrowServiceException<'a>(&'a self, _arg_code: i32) -> binder::BoxFuture<'a, binder::Result<()>> {
let _aidl_data = match self.build_parcel_ThrowServiceException(_arg_code) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::ThrowServiceException, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#ThrowServiceException, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_ThrowServiceException(_arg_code, _aidl_reply)
}
)
}
- fn RepeatNullableIntArray<'a>(&'a self, _arg_input: Option<&'a [i32]>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<i32>>>> {
+ fn r#RepeatNullableIntArray<'a>(&'a self, _arg_input: Option<&'a [i32]>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<i32>>>> {
let _aidl_data = match self.build_parcel_RepeatNullableIntArray(_arg_input) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::RepeatNullableIntArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#RepeatNullableIntArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_RepeatNullableIntArray(_arg_input, _aidl_reply)
}
)
}
- fn RepeatNullableByteEnumArray<'a>(&'a self, _arg_input: Option<&'a [crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum]>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>>>> {
+ fn r#RepeatNullableByteEnumArray<'a>(&'a self, _arg_input: Option<&'a [crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum]>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>>>> {
let _aidl_data = match self.build_parcel_RepeatNullableByteEnumArray(_arg_input) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::RepeatNullableByteEnumArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#RepeatNullableByteEnumArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_RepeatNullableByteEnumArray(_arg_input, _aidl_reply)
}
)
}
- fn RepeatNullableIntEnumArray<'a>(&'a self, _arg_input: Option<&'a [crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum]>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>>>> {
+ fn r#RepeatNullableIntEnumArray<'a>(&'a self, _arg_input: Option<&'a [crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum]>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>>>> {
let _aidl_data = match self.build_parcel_RepeatNullableIntEnumArray(_arg_input) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::RepeatNullableIntEnumArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#RepeatNullableIntEnumArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_RepeatNullableIntEnumArray(_arg_input, _aidl_reply)
}
)
}
- fn RepeatNullableLongEnumArray<'a>(&'a self, _arg_input: Option<&'a [crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum]>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>>>> {
+ fn r#RepeatNullableLongEnumArray<'a>(&'a self, _arg_input: Option<&'a [crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum]>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>>>> {
let _aidl_data = match self.build_parcel_RepeatNullableLongEnumArray(_arg_input) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::RepeatNullableLongEnumArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#RepeatNullableLongEnumArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_RepeatNullableLongEnumArray(_arg_input, _aidl_reply)
}
)
}
- fn RepeatNullableString<'a>(&'a self, _arg_input: Option<&'a str>) -> binder::BoxFuture<'a, binder::Result<Option<String>>> {
+ fn r#RepeatNullableString<'a>(&'a self, _arg_input: Option<&'a str>) -> binder::BoxFuture<'a, binder::Result<Option<String>>> {
let _aidl_data = match self.build_parcel_RepeatNullableString(_arg_input) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::RepeatNullableString, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#RepeatNullableString, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_RepeatNullableString(_arg_input, _aidl_reply)
}
)
}
- fn RepeatNullableStringList<'a>(&'a self, _arg_input: Option<&'a [Option<String>]>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<String>>>>> {
+ fn r#RepeatNullableStringList<'a>(&'a self, _arg_input: Option<&'a [Option<String>]>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<String>>>>> {
let _aidl_data = match self.build_parcel_RepeatNullableStringList(_arg_input) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::RepeatNullableStringList, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#RepeatNullableStringList, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_RepeatNullableStringList(_arg_input, _aidl_reply)
}
)
}
- fn RepeatNullableParcelable<'a>(&'a self, _arg_input: Option<&'a crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>) -> binder::BoxFuture<'a, binder::Result<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>> {
+ fn r#RepeatNullableParcelable<'a>(&'a self, _arg_input: Option<&'a crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>) -> binder::BoxFuture<'a, binder::Result<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>> {
let _aidl_data = match self.build_parcel_RepeatNullableParcelable(_arg_input) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::RepeatNullableParcelable, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#RepeatNullableParcelable, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_RepeatNullableParcelable(_arg_input, _aidl_reply)
}
)
}
- fn RepeatNullableParcelableArray<'a>(&'a self, _arg_input: Option<&'a [Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>>> {
+ fn r#RepeatNullableParcelableArray<'a>(&'a self, _arg_input: Option<&'a [Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>>> {
let _aidl_data = match self.build_parcel_RepeatNullableParcelableArray(_arg_input) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::RepeatNullableParcelableArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#RepeatNullableParcelableArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_RepeatNullableParcelableArray(_arg_input, _aidl_reply)
}
)
}
- fn RepeatNullableParcelableList<'a>(&'a self, _arg_input: Option<&'a [Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>>> {
+ fn r#RepeatNullableParcelableList<'a>(&'a self, _arg_input: Option<&'a [Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>>> {
let _aidl_data = match self.build_parcel_RepeatNullableParcelableList(_arg_input) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::RepeatNullableParcelableList, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#RepeatNullableParcelableList, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_RepeatNullableParcelableList(_arg_input, _aidl_reply)
}
)
}
- fn TakesAnIBinder<'a>(&'a self, _arg_input: &'a binder::SpIBinder) -> binder::BoxFuture<'a, binder::Result<()>> {
+ fn r#TakesAnIBinder<'a>(&'a self, _arg_input: &'a binder::SpIBinder) -> binder::BoxFuture<'a, binder::Result<()>> {
let _aidl_data = match self.build_parcel_TakesAnIBinder(_arg_input) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::TakesAnIBinder, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#TakesAnIBinder, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_TakesAnIBinder(_arg_input, _aidl_reply)
}
)
}
- fn TakesANullableIBinder<'a>(&'a self, _arg_input: Option<&'a binder::SpIBinder>) -> binder::BoxFuture<'a, binder::Result<()>> {
+ fn r#TakesANullableIBinder<'a>(&'a self, _arg_input: Option<&'a binder::SpIBinder>) -> binder::BoxFuture<'a, binder::Result<()>> {
let _aidl_data = match self.build_parcel_TakesANullableIBinder(_arg_input) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::TakesANullableIBinder, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#TakesANullableIBinder, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_TakesANullableIBinder(_arg_input, _aidl_reply)
}
)
}
- fn TakesAnIBinderList<'a>(&'a self, _arg_input: &'a [binder::SpIBinder]) -> binder::BoxFuture<'a, binder::Result<()>> {
+ fn r#TakesAnIBinderList<'a>(&'a self, _arg_input: &'a [binder::SpIBinder]) -> binder::BoxFuture<'a, binder::Result<()>> {
let _aidl_data = match self.build_parcel_TakesAnIBinderList(_arg_input) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::TakesAnIBinderList, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#TakesAnIBinderList, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_TakesAnIBinderList(_arg_input, _aidl_reply)
}
)
}
- fn TakesANullableIBinderList<'a>(&'a self, _arg_input: Option<&'a [Option<binder::SpIBinder>]>) -> binder::BoxFuture<'a, binder::Result<()>> {
+ fn r#TakesANullableIBinderList<'a>(&'a self, _arg_input: Option<&'a [Option<binder::SpIBinder>]>) -> binder::BoxFuture<'a, binder::Result<()>> {
let _aidl_data = match self.build_parcel_TakesANullableIBinderList(_arg_input) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::TakesANullableIBinderList, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#TakesANullableIBinderList, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_TakesANullableIBinderList(_arg_input, _aidl_reply)
}
)
}
- fn RepeatUtf8CppString<'a>(&'a self, _arg_token: &'a str) -> binder::BoxFuture<'a, binder::Result<String>> {
+ fn r#RepeatUtf8CppString<'a>(&'a self, _arg_token: &'a str) -> binder::BoxFuture<'a, binder::Result<String>> {
let _aidl_data = match self.build_parcel_RepeatUtf8CppString(_arg_token) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::RepeatUtf8CppString, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#RepeatUtf8CppString, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_RepeatUtf8CppString(_arg_token, _aidl_reply)
}
)
}
- fn RepeatNullableUtf8CppString<'a>(&'a self, _arg_token: Option<&'a str>) -> binder::BoxFuture<'a, binder::Result<Option<String>>> {
+ fn r#RepeatNullableUtf8CppString<'a>(&'a self, _arg_token: Option<&'a str>) -> binder::BoxFuture<'a, binder::Result<Option<String>>> {
let _aidl_data = match self.build_parcel_RepeatNullableUtf8CppString(_arg_token) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::RepeatNullableUtf8CppString, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#RepeatNullableUtf8CppString, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_RepeatNullableUtf8CppString(_arg_token, _aidl_reply)
}
)
}
- fn ReverseUtf8CppString<'a>(&'a self, _arg_input: &'a [String], _arg_repeated: &'a mut Vec<String>) -> binder::BoxFuture<'a, binder::Result<Vec<String>>> {
+ fn r#ReverseUtf8CppString<'a>(&'a self, _arg_input: &'a [String], _arg_repeated: &'a mut Vec<String>) -> binder::BoxFuture<'a, binder::Result<Vec<String>>> {
let _aidl_data = match self.build_parcel_ReverseUtf8CppString(_arg_input, _arg_repeated) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::ReverseUtf8CppString, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#ReverseUtf8CppString, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_ReverseUtf8CppString(_arg_input, _arg_repeated, _aidl_reply)
}
)
}
- fn ReverseNullableUtf8CppString<'a>(&'a self, _arg_input: Option<&'a [Option<String>]>, _arg_repeated: &'a mut Option<Vec<Option<String>>>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<String>>>>> {
+ fn r#ReverseNullableUtf8CppString<'a>(&'a self, _arg_input: Option<&'a [Option<String>]>, _arg_repeated: &'a mut Option<Vec<Option<String>>>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<String>>>>> {
let _aidl_data = match self.build_parcel_ReverseNullableUtf8CppString(_arg_input, _arg_repeated) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::ReverseNullableUtf8CppString, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#ReverseNullableUtf8CppString, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_ReverseNullableUtf8CppString(_arg_input, _arg_repeated, _aidl_reply)
}
)
}
- fn ReverseUtf8CppStringList<'a>(&'a self, _arg_input: Option<&'a [Option<String>]>, _arg_repeated: &'a mut Option<Vec<Option<String>>>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<String>>>>> {
+ fn r#ReverseUtf8CppStringList<'a>(&'a self, _arg_input: Option<&'a [Option<String>]>, _arg_repeated: &'a mut Option<Vec<Option<String>>>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<String>>>>> {
let _aidl_data = match self.build_parcel_ReverseUtf8CppStringList(_arg_input, _arg_repeated) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::ReverseUtf8CppStringList, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#ReverseUtf8CppStringList, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_ReverseUtf8CppStringList(_arg_input, _arg_repeated, _aidl_reply)
}
)
}
- fn GetCallback<'a>(&'a self, _arg_return_null: bool) -> binder::BoxFuture<'a, binder::Result<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>> {
+ fn r#GetCallback<'a>(&'a self, _arg_return_null: bool) -> binder::BoxFuture<'a, binder::Result<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>> {
let _aidl_data = match self.build_parcel_GetCallback(_arg_return_null) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::GetCallback, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#GetCallback, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_GetCallback(_arg_return_null, _aidl_reply)
}
)
}
- fn FillOutStructuredParcelable<'a>(&'a self, _arg_parcel: &'a mut crate::mangled::_7_android_4_aidl_5_tests_20_StructuredParcelable) -> binder::BoxFuture<'a, binder::Result<()>> {
+ fn r#FillOutStructuredParcelable<'a>(&'a self, _arg_parcel: &'a mut crate::mangled::_7_android_4_aidl_5_tests_20_StructuredParcelable) -> binder::BoxFuture<'a, binder::Result<()>> {
let _aidl_data = match self.build_parcel_FillOutStructuredParcelable(_arg_parcel) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::FillOutStructuredParcelable, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#FillOutStructuredParcelable, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_FillOutStructuredParcelable(_arg_parcel, _aidl_reply)
}
)
}
- fn RepeatExtendableParcelable<'a>(&'a self, _arg_ep: &'a crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable, _arg_ep2: &'a mut crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable) -> binder::BoxFuture<'a, binder::Result<()>> {
+ fn r#RepeatExtendableParcelable<'a>(&'a self, _arg_ep: &'a crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable, _arg_ep2: &'a mut crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable) -> binder::BoxFuture<'a, binder::Result<()>> {
let _aidl_data = match self.build_parcel_RepeatExtendableParcelable(_arg_ep, _arg_ep2) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::RepeatExtendableParcelable, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#RepeatExtendableParcelable, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_RepeatExtendableParcelable(_arg_ep, _arg_ep2, _aidl_reply)
}
)
}
- fn ReverseList<'a>(&'a self, _arg_list: &'a crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList) -> binder::BoxFuture<'a, binder::Result<crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList>> {
+ fn r#ReverseList<'a>(&'a self, _arg_list: &'a crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList) -> binder::BoxFuture<'a, binder::Result<crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList>> {
let _aidl_data = match self.build_parcel_ReverseList(_arg_list) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::ReverseList, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#ReverseList, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_ReverseList(_arg_list, _aidl_reply)
}
)
}
- fn ReverseIBinderArray<'a>(&'a self, _arg_input: &'a [binder::SpIBinder], _arg_repeated: &'a mut Vec<Option<binder::SpIBinder>>) -> binder::BoxFuture<'a, binder::Result<Vec<binder::SpIBinder>>> {
+ fn r#ReverseIBinderArray<'a>(&'a self, _arg_input: &'a [binder::SpIBinder], _arg_repeated: &'a mut Vec<Option<binder::SpIBinder>>) -> binder::BoxFuture<'a, binder::Result<Vec<binder::SpIBinder>>> {
let _aidl_data = match self.build_parcel_ReverseIBinderArray(_arg_input, _arg_repeated) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::ReverseIBinderArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#ReverseIBinderArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_ReverseIBinderArray(_arg_input, _arg_repeated, _aidl_reply)
}
)
}
- fn ReverseNullableIBinderArray<'a>(&'a self, _arg_input: Option<&'a [Option<binder::SpIBinder>]>, _arg_repeated: &'a mut Option<Vec<Option<binder::SpIBinder>>>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<binder::SpIBinder>>>>> {
+ fn r#ReverseNullableIBinderArray<'a>(&'a self, _arg_input: Option<&'a [Option<binder::SpIBinder>]>, _arg_repeated: &'a mut Option<Vec<Option<binder::SpIBinder>>>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<binder::SpIBinder>>>>> {
let _aidl_data = match self.build_parcel_ReverseNullableIBinderArray(_arg_input, _arg_repeated) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::ReverseNullableIBinderArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#ReverseNullableIBinderArray, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_ReverseNullableIBinderArray(_arg_input, _arg_repeated, _aidl_reply)
}
)
}
- fn GetOldNameInterface<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_IOldName>>> {
+ fn r#GetOldNameInterface<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_IOldName>>> {
let _aidl_data = match self.build_parcel_GetOldNameInterface() {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::GetOldNameInterface, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#GetOldNameInterface, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_GetOldNameInterface(_aidl_reply)
}
)
}
- fn GetNewNameInterface<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_INewName>>> {
+ fn r#GetNewNameInterface<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_INewName>>> {
let _aidl_data = match self.build_parcel_GetNewNameInterface() {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::GetNewNameInterface, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#GetNewNameInterface, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_GetNewNameInterface(_aidl_reply)
}
)
}
- fn GetUnionTags<'a>(&'a self, _arg_input: &'a [crate::mangled::_7_android_4_aidl_5_tests_5_Union]) -> binder::BoxFuture<'a, binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_5_Union_3_Tag>>> {
+ fn r#GetUnionTags<'a>(&'a self, _arg_input: &'a [crate::mangled::_7_android_4_aidl_5_tests_5_Union]) -> binder::BoxFuture<'a, binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_5_Union_3_Tag>>> {
let _aidl_data = match self.build_parcel_GetUnionTags(_arg_input) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::GetUnionTags, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#GetUnionTags, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_GetUnionTags(_arg_input, _aidl_reply)
}
)
}
- fn GetCppJavaTests<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<Option<binder::SpIBinder>>> {
+ fn r#GetCppJavaTests<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<Option<binder::SpIBinder>>> {
let _aidl_data = match self.build_parcel_GetCppJavaTests() {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::GetCppJavaTests, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#GetCppJavaTests, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_GetCppJavaTests(_aidl_reply)
}
)
}
- fn getBackendType<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<crate::mangled::_7_android_4_aidl_5_tests_11_BackendType>> {
+ fn r#getBackendType<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<crate::mangled::_7_android_4_aidl_5_tests_11_BackendType>> {
let _aidl_data = match self.build_parcel_getBackendType() {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::getBackendType, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#getBackendType, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_getBackendType(_aidl_reply)
}
)
}
+ fn r#GetCircular<'a>(&'a self, _arg_cp: &'a mut crate::mangled::_7_android_4_aidl_5_tests_18_CircularParcelable) -> binder::BoxFuture<'a, binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_9_ICircular>>> {
+ let _aidl_data = match self.build_parcel_GetCircular(_arg_cp) {
+ Ok(_aidl_data) => _aidl_data,
+ Err(err) => return Box::pin(std::future::ready(Err(err))),
+ };
+ let binder = self.binder.clone();
+ P::spawn(
+ move || binder.submit_transact(transactions::r#GetCircular, _aidl_data, binder::binder_impl::FLAG_CLEAR_BUF | binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move |_aidl_reply| async move {
+ self.read_response_GetCircular(_arg_cp, _aidl_reply)
+ }
+ )
+ }
}
impl ITestService for binder::binder_impl::Binder<BnTestService> {
- fn UnimplementedMethod(&self, _arg_arg: i32) -> binder::Result<i32> { self.0.UnimplementedMethod(_arg_arg) }
- fn Deprecated(&self) -> binder::Result<()> { self.0.Deprecated() }
- fn TestOneway(&self) -> binder::Result<()> { self.0.TestOneway() }
- fn RepeatBoolean(&self, _arg_token: bool) -> binder::Result<bool> { self.0.RepeatBoolean(_arg_token) }
- fn RepeatByte(&self, _arg_token: i8) -> binder::Result<i8> { self.0.RepeatByte(_arg_token) }
- fn RepeatChar(&self, _arg_token: u16) -> binder::Result<u16> { self.0.RepeatChar(_arg_token) }
- fn RepeatInt(&self, _arg_token: i32) -> binder::Result<i32> { self.0.RepeatInt(_arg_token) }
- fn RepeatLong(&self, _arg_token: i64) -> binder::Result<i64> { self.0.RepeatLong(_arg_token) }
- fn RepeatFloat(&self, _arg_token: f32) -> binder::Result<f32> { self.0.RepeatFloat(_arg_token) }
- fn RepeatDouble(&self, _arg_token: f64) -> binder::Result<f64> { self.0.RepeatDouble(_arg_token) }
- fn RepeatString(&self, _arg_token: &str) -> binder::Result<String> { self.0.RepeatString(_arg_token) }
- fn RepeatByteEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum> { self.0.RepeatByteEnum(_arg_token) }
- fn RepeatIntEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum> { self.0.RepeatIntEnum(_arg_token) }
- fn RepeatLongEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum> { self.0.RepeatLongEnum(_arg_token) }
- fn ReverseBoolean(&self, _arg_input: &[bool], _arg_repeated: &mut Vec<bool>) -> binder::Result<Vec<bool>> { self.0.ReverseBoolean(_arg_input, _arg_repeated) }
- fn ReverseByte(&self, _arg_input: &[u8], _arg_repeated: &mut Vec<u8>) -> binder::Result<Vec<u8>> { self.0.ReverseByte(_arg_input, _arg_repeated) }
- fn ReverseChar(&self, _arg_input: &[u16], _arg_repeated: &mut Vec<u16>) -> binder::Result<Vec<u16>> { self.0.ReverseChar(_arg_input, _arg_repeated) }
- fn ReverseInt(&self, _arg_input: &[i32], _arg_repeated: &mut Vec<i32>) -> binder::Result<Vec<i32>> { self.0.ReverseInt(_arg_input, _arg_repeated) }
- fn ReverseLong(&self, _arg_input: &[i64], _arg_repeated: &mut Vec<i64>) -> binder::Result<Vec<i64>> { self.0.ReverseLong(_arg_input, _arg_repeated) }
- fn ReverseFloat(&self, _arg_input: &[f32], _arg_repeated: &mut Vec<f32>) -> binder::Result<Vec<f32>> { self.0.ReverseFloat(_arg_input, _arg_repeated) }
- fn ReverseDouble(&self, _arg_input: &[f64], _arg_repeated: &mut Vec<f64>) -> binder::Result<Vec<f64>> { self.0.ReverseDouble(_arg_input, _arg_repeated) }
- fn ReverseString(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::Result<Vec<String>> { self.0.ReverseString(_arg_input, _arg_repeated) }
- fn ReverseByteEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>> { self.0.ReverseByteEnum(_arg_input, _arg_repeated) }
- fn ReverseIntEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>> { self.0.ReverseIntEnum(_arg_input, _arg_repeated) }
- fn ReverseLongEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>> { self.0.ReverseLongEnum(_arg_input, _arg_repeated) }
- fn GetOtherTestService(&self, _arg_name: &str) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>> { self.0.GetOtherTestService(_arg_name) }
- fn VerifyName(&self, _arg_service: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>, _arg_name: &str) -> binder::Result<bool> { self.0.VerifyName(_arg_service, _arg_name) }
- fn GetInterfaceArray(&self, _arg_names: &[String]) -> binder::Result<Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>> { self.0.GetInterfaceArray(_arg_names) }
- fn VerifyNamesWithInterfaceArray(&self, _arg_services: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>], _arg_names: &[String]) -> binder::Result<bool> { self.0.VerifyNamesWithInterfaceArray(_arg_services, _arg_names) }
- fn GetNullableInterfaceArray(&self, _arg_names: Option<&[Option<String>]>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>> { self.0.GetNullableInterfaceArray(_arg_names) }
- fn VerifyNamesWithNullableInterfaceArray(&self, _arg_services: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>]>, _arg_names: Option<&[Option<String>]>) -> binder::Result<bool> { self.0.VerifyNamesWithNullableInterfaceArray(_arg_services, _arg_names) }
- fn GetInterfaceList(&self, _arg_names: Option<&[Option<String>]>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>> { self.0.GetInterfaceList(_arg_names) }
- fn VerifyNamesWithInterfaceList(&self, _arg_services: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>]>, _arg_names: Option<&[Option<String>]>) -> binder::Result<bool> { self.0.VerifyNamesWithInterfaceList(_arg_services, _arg_names) }
- fn ReverseStringList(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::Result<Vec<String>> { self.0.ReverseStringList(_arg_input, _arg_repeated) }
- fn RepeatParcelFileDescriptor(&self, _arg_read: &binder::ParcelFileDescriptor) -> binder::Result<binder::ParcelFileDescriptor> { self.0.RepeatParcelFileDescriptor(_arg_read) }
- fn ReverseParcelFileDescriptorArray(&self, _arg_input: &[binder::ParcelFileDescriptor], _arg_repeated: &mut Vec<Option<binder::ParcelFileDescriptor>>) -> binder::Result<Vec<binder::ParcelFileDescriptor>> { self.0.ReverseParcelFileDescriptorArray(_arg_input, _arg_repeated) }
- fn ThrowServiceException(&self, _arg_code: i32) -> binder::Result<()> { self.0.ThrowServiceException(_arg_code) }
- fn RepeatNullableIntArray(&self, _arg_input: Option<&[i32]>) -> binder::Result<Option<Vec<i32>>> { self.0.RepeatNullableIntArray(_arg_input) }
- fn RepeatNullableByteEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum]>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>>> { self.0.RepeatNullableByteEnumArray(_arg_input) }
- fn RepeatNullableIntEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum]>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>>> { self.0.RepeatNullableIntEnumArray(_arg_input) }
- fn RepeatNullableLongEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum]>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>>> { self.0.RepeatNullableLongEnumArray(_arg_input) }
- fn RepeatNullableString(&self, _arg_input: Option<&str>) -> binder::Result<Option<String>> { self.0.RepeatNullableString(_arg_input) }
- fn RepeatNullableStringList(&self, _arg_input: Option<&[Option<String>]>) -> binder::Result<Option<Vec<Option<String>>>> { self.0.RepeatNullableStringList(_arg_input) }
- fn RepeatNullableParcelable(&self, _arg_input: Option<&crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>) -> binder::Result<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>> { self.0.RepeatNullableParcelable(_arg_input) }
- fn RepeatNullableParcelableArray(&self, _arg_input: Option<&[Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>> { self.0.RepeatNullableParcelableArray(_arg_input) }
- fn RepeatNullableParcelableList(&self, _arg_input: Option<&[Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>> { self.0.RepeatNullableParcelableList(_arg_input) }
- fn TakesAnIBinder(&self, _arg_input: &binder::SpIBinder) -> binder::Result<()> { self.0.TakesAnIBinder(_arg_input) }
- fn TakesANullableIBinder(&self, _arg_input: Option<&binder::SpIBinder>) -> binder::Result<()> { self.0.TakesANullableIBinder(_arg_input) }
- fn TakesAnIBinderList(&self, _arg_input: &[binder::SpIBinder]) -> binder::Result<()> { self.0.TakesAnIBinderList(_arg_input) }
- fn TakesANullableIBinderList(&self, _arg_input: Option<&[Option<binder::SpIBinder>]>) -> binder::Result<()> { self.0.TakesANullableIBinderList(_arg_input) }
- fn RepeatUtf8CppString(&self, _arg_token: &str) -> binder::Result<String> { self.0.RepeatUtf8CppString(_arg_token) }
- fn RepeatNullableUtf8CppString(&self, _arg_token: Option<&str>) -> binder::Result<Option<String>> { self.0.RepeatNullableUtf8CppString(_arg_token) }
- fn ReverseUtf8CppString(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::Result<Vec<String>> { self.0.ReverseUtf8CppString(_arg_input, _arg_repeated) }
- fn ReverseNullableUtf8CppString(&self, _arg_input: Option<&[Option<String>]>, _arg_repeated: &mut Option<Vec<Option<String>>>) -> binder::Result<Option<Vec<Option<String>>>> { self.0.ReverseNullableUtf8CppString(_arg_input, _arg_repeated) }
- fn ReverseUtf8CppStringList(&self, _arg_input: Option<&[Option<String>]>, _arg_repeated: &mut Option<Vec<Option<String>>>) -> binder::Result<Option<Vec<Option<String>>>> { self.0.ReverseUtf8CppStringList(_arg_input, _arg_repeated) }
- fn GetCallback(&self, _arg_return_null: bool) -> binder::Result<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>> { self.0.GetCallback(_arg_return_null) }
- fn FillOutStructuredParcelable(&self, _arg_parcel: &mut crate::mangled::_7_android_4_aidl_5_tests_20_StructuredParcelable) -> binder::Result<()> { self.0.FillOutStructuredParcelable(_arg_parcel) }
- fn RepeatExtendableParcelable(&self, _arg_ep: &crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable, _arg_ep2: &mut crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable) -> binder::Result<()> { self.0.RepeatExtendableParcelable(_arg_ep, _arg_ep2) }
- fn ReverseList(&self, _arg_list: &crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList> { self.0.ReverseList(_arg_list) }
- fn ReverseIBinderArray(&self, _arg_input: &[binder::SpIBinder], _arg_repeated: &mut Vec<Option<binder::SpIBinder>>) -> binder::Result<Vec<binder::SpIBinder>> { self.0.ReverseIBinderArray(_arg_input, _arg_repeated) }
- fn ReverseNullableIBinderArray(&self, _arg_input: Option<&[Option<binder::SpIBinder>]>, _arg_repeated: &mut Option<Vec<Option<binder::SpIBinder>>>) -> binder::Result<Option<Vec<Option<binder::SpIBinder>>>> { self.0.ReverseNullableIBinderArray(_arg_input, _arg_repeated) }
- fn GetOldNameInterface(&self) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_IOldName>> { self.0.GetOldNameInterface() }
- fn GetNewNameInterface(&self) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_INewName>> { self.0.GetNewNameInterface() }
- fn GetUnionTags(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_5_Union]) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_5_Union_3_Tag>> { self.0.GetUnionTags(_arg_input) }
- fn GetCppJavaTests(&self) -> binder::Result<Option<binder::SpIBinder>> { self.0.GetCppJavaTests() }
- fn getBackendType(&self) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_11_BackendType> { self.0.getBackendType() }
+ fn r#UnimplementedMethod(&self, _arg_arg: i32) -> binder::Result<i32> { self.0.r#UnimplementedMethod(_arg_arg) }
+ fn r#Deprecated(&self) -> binder::Result<()> { self.0.r#Deprecated() }
+ fn r#TestOneway(&self) -> binder::Result<()> { self.0.r#TestOneway() }
+ fn r#RepeatBoolean(&self, _arg_token: bool) -> binder::Result<bool> { self.0.r#RepeatBoolean(_arg_token) }
+ fn r#RepeatByte(&self, _arg_token: i8) -> binder::Result<i8> { self.0.r#RepeatByte(_arg_token) }
+ fn r#RepeatChar(&self, _arg_token: u16) -> binder::Result<u16> { self.0.r#RepeatChar(_arg_token) }
+ fn r#RepeatInt(&self, _arg_token: i32) -> binder::Result<i32> { self.0.r#RepeatInt(_arg_token) }
+ fn r#RepeatLong(&self, _arg_token: i64) -> binder::Result<i64> { self.0.r#RepeatLong(_arg_token) }
+ fn r#RepeatFloat(&self, _arg_token: f32) -> binder::Result<f32> { self.0.r#RepeatFloat(_arg_token) }
+ fn r#RepeatDouble(&self, _arg_token: f64) -> binder::Result<f64> { self.0.r#RepeatDouble(_arg_token) }
+ fn r#RepeatString(&self, _arg_token: &str) -> binder::Result<String> { self.0.r#RepeatString(_arg_token) }
+ fn r#RepeatByteEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum> { self.0.r#RepeatByteEnum(_arg_token) }
+ fn r#RepeatIntEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum> { self.0.r#RepeatIntEnum(_arg_token) }
+ fn r#RepeatLongEnum(&self, _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum> { self.0.r#RepeatLongEnum(_arg_token) }
+ fn r#ReverseBoolean(&self, _arg_input: &[bool], _arg_repeated: &mut Vec<bool>) -> binder::Result<Vec<bool>> { self.0.r#ReverseBoolean(_arg_input, _arg_repeated) }
+ fn r#ReverseByte(&self, _arg_input: &[u8], _arg_repeated: &mut Vec<u8>) -> binder::Result<Vec<u8>> { self.0.r#ReverseByte(_arg_input, _arg_repeated) }
+ fn r#ReverseChar(&self, _arg_input: &[u16], _arg_repeated: &mut Vec<u16>) -> binder::Result<Vec<u16>> { self.0.r#ReverseChar(_arg_input, _arg_repeated) }
+ fn r#ReverseInt(&self, _arg_input: &[i32], _arg_repeated: &mut Vec<i32>) -> binder::Result<Vec<i32>> { self.0.r#ReverseInt(_arg_input, _arg_repeated) }
+ fn r#ReverseLong(&self, _arg_input: &[i64], _arg_repeated: &mut Vec<i64>) -> binder::Result<Vec<i64>> { self.0.r#ReverseLong(_arg_input, _arg_repeated) }
+ fn r#ReverseFloat(&self, _arg_input: &[f32], _arg_repeated: &mut Vec<f32>) -> binder::Result<Vec<f32>> { self.0.r#ReverseFloat(_arg_input, _arg_repeated) }
+ fn r#ReverseDouble(&self, _arg_input: &[f64], _arg_repeated: &mut Vec<f64>) -> binder::Result<Vec<f64>> { self.0.r#ReverseDouble(_arg_input, _arg_repeated) }
+ fn r#ReverseString(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::Result<Vec<String>> { self.0.r#ReverseString(_arg_input, _arg_repeated) }
+ fn r#ReverseByteEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>> { self.0.r#ReverseByteEnum(_arg_input, _arg_repeated) }
+ fn r#ReverseIntEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>> { self.0.r#ReverseIntEnum(_arg_input, _arg_repeated) }
+ fn r#ReverseLongEnum(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum], _arg_repeated: &mut Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>> { self.0.r#ReverseLongEnum(_arg_input, _arg_repeated) }
+ fn r#GetOtherTestService(&self, _arg_name: &str) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>> { self.0.r#GetOtherTestService(_arg_name) }
+ fn r#SetOtherTestService(&self, _arg_name: &str, _arg_service: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>) -> binder::Result<bool> { self.0.r#SetOtherTestService(_arg_name, _arg_service) }
+ fn r#VerifyName(&self, _arg_service: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>, _arg_name: &str) -> binder::Result<bool> { self.0.r#VerifyName(_arg_service, _arg_name) }
+ fn r#GetInterfaceArray(&self, _arg_names: &[String]) -> binder::Result<Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>> { self.0.r#GetInterfaceArray(_arg_names) }
+ fn r#VerifyNamesWithInterfaceArray(&self, _arg_services: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>], _arg_names: &[String]) -> binder::Result<bool> { self.0.r#VerifyNamesWithInterfaceArray(_arg_services, _arg_names) }
+ fn r#GetNullableInterfaceArray(&self, _arg_names: Option<&[Option<String>]>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>> { self.0.r#GetNullableInterfaceArray(_arg_names) }
+ fn r#VerifyNamesWithNullableInterfaceArray(&self, _arg_services: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>]>, _arg_names: Option<&[Option<String>]>) -> binder::Result<bool> { self.0.r#VerifyNamesWithNullableInterfaceArray(_arg_services, _arg_names) }
+ fn r#GetInterfaceList(&self, _arg_names: Option<&[Option<String>]>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>>> { self.0.r#GetInterfaceList(_arg_names) }
+ fn r#VerifyNamesWithInterfaceList(&self, _arg_services: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>]>, _arg_names: Option<&[Option<String>]>) -> binder::Result<bool> { self.0.r#VerifyNamesWithInterfaceList(_arg_services, _arg_names) }
+ fn r#ReverseStringList(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::Result<Vec<String>> { self.0.r#ReverseStringList(_arg_input, _arg_repeated) }
+ fn r#RepeatParcelFileDescriptor(&self, _arg_read: &binder::ParcelFileDescriptor) -> binder::Result<binder::ParcelFileDescriptor> { self.0.r#RepeatParcelFileDescriptor(_arg_read) }
+ fn r#ReverseParcelFileDescriptorArray(&self, _arg_input: &[binder::ParcelFileDescriptor], _arg_repeated: &mut Vec<Option<binder::ParcelFileDescriptor>>) -> binder::Result<Vec<binder::ParcelFileDescriptor>> { self.0.r#ReverseParcelFileDescriptorArray(_arg_input, _arg_repeated) }
+ fn r#ThrowServiceException(&self, _arg_code: i32) -> binder::Result<()> { self.0.r#ThrowServiceException(_arg_code) }
+ fn r#RepeatNullableIntArray(&self, _arg_input: Option<&[i32]>) -> binder::Result<Option<Vec<i32>>> { self.0.r#RepeatNullableIntArray(_arg_input) }
+ fn r#RepeatNullableByteEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum]>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>>> { self.0.r#RepeatNullableByteEnumArray(_arg_input) }
+ fn r#RepeatNullableIntEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum]>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>>> { self.0.r#RepeatNullableIntEnumArray(_arg_input) }
+ fn r#RepeatNullableLongEnumArray(&self, _arg_input: Option<&[crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum]>) -> binder::Result<Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>>> { self.0.r#RepeatNullableLongEnumArray(_arg_input) }
+ fn r#RepeatNullableString(&self, _arg_input: Option<&str>) -> binder::Result<Option<String>> { self.0.r#RepeatNullableString(_arg_input) }
+ fn r#RepeatNullableStringList(&self, _arg_input: Option<&[Option<String>]>) -> binder::Result<Option<Vec<Option<String>>>> { self.0.r#RepeatNullableStringList(_arg_input) }
+ fn r#RepeatNullableParcelable(&self, _arg_input: Option<&crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>) -> binder::Result<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>> { self.0.r#RepeatNullableParcelable(_arg_input) }
+ fn r#RepeatNullableParcelableArray(&self, _arg_input: Option<&[Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>> { self.0.r#RepeatNullableParcelableArray(_arg_input) }
+ fn r#RepeatNullableParcelableList(&self, _arg_input: Option<&[Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>]>) -> binder::Result<Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>> { self.0.r#RepeatNullableParcelableList(_arg_input) }
+ fn r#TakesAnIBinder(&self, _arg_input: &binder::SpIBinder) -> binder::Result<()> { self.0.r#TakesAnIBinder(_arg_input) }
+ fn r#TakesANullableIBinder(&self, _arg_input: Option<&binder::SpIBinder>) -> binder::Result<()> { self.0.r#TakesANullableIBinder(_arg_input) }
+ fn r#TakesAnIBinderList(&self, _arg_input: &[binder::SpIBinder]) -> binder::Result<()> { self.0.r#TakesAnIBinderList(_arg_input) }
+ fn r#TakesANullableIBinderList(&self, _arg_input: Option<&[Option<binder::SpIBinder>]>) -> binder::Result<()> { self.0.r#TakesANullableIBinderList(_arg_input) }
+ fn r#RepeatUtf8CppString(&self, _arg_token: &str) -> binder::Result<String> { self.0.r#RepeatUtf8CppString(_arg_token) }
+ fn r#RepeatNullableUtf8CppString(&self, _arg_token: Option<&str>) -> binder::Result<Option<String>> { self.0.r#RepeatNullableUtf8CppString(_arg_token) }
+ fn r#ReverseUtf8CppString(&self, _arg_input: &[String], _arg_repeated: &mut Vec<String>) -> binder::Result<Vec<String>> { self.0.r#ReverseUtf8CppString(_arg_input, _arg_repeated) }
+ fn r#ReverseNullableUtf8CppString(&self, _arg_input: Option<&[Option<String>]>, _arg_repeated: &mut Option<Vec<Option<String>>>) -> binder::Result<Option<Vec<Option<String>>>> { self.0.r#ReverseNullableUtf8CppString(_arg_input, _arg_repeated) }
+ fn r#ReverseUtf8CppStringList(&self, _arg_input: Option<&[Option<String>]>, _arg_repeated: &mut Option<Vec<Option<String>>>) -> binder::Result<Option<Vec<Option<String>>>> { self.0.r#ReverseUtf8CppStringList(_arg_input, _arg_repeated) }
+ fn r#GetCallback(&self, _arg_return_null: bool) -> binder::Result<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>> { self.0.r#GetCallback(_arg_return_null) }
+ fn r#FillOutStructuredParcelable(&self, _arg_parcel: &mut crate::mangled::_7_android_4_aidl_5_tests_20_StructuredParcelable) -> binder::Result<()> { self.0.r#FillOutStructuredParcelable(_arg_parcel) }
+ fn r#RepeatExtendableParcelable(&self, _arg_ep: &crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable, _arg_ep2: &mut crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable) -> binder::Result<()> { self.0.r#RepeatExtendableParcelable(_arg_ep, _arg_ep2) }
+ fn r#ReverseList(&self, _arg_list: &crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList> { self.0.r#ReverseList(_arg_list) }
+ fn r#ReverseIBinderArray(&self, _arg_input: &[binder::SpIBinder], _arg_repeated: &mut Vec<Option<binder::SpIBinder>>) -> binder::Result<Vec<binder::SpIBinder>> { self.0.r#ReverseIBinderArray(_arg_input, _arg_repeated) }
+ fn r#ReverseNullableIBinderArray(&self, _arg_input: Option<&[Option<binder::SpIBinder>]>, _arg_repeated: &mut Option<Vec<Option<binder::SpIBinder>>>) -> binder::Result<Option<Vec<Option<binder::SpIBinder>>>> { self.0.r#ReverseNullableIBinderArray(_arg_input, _arg_repeated) }
+ fn r#GetOldNameInterface(&self) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_IOldName>> { self.0.r#GetOldNameInterface() }
+ fn r#GetNewNameInterface(&self) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_8_INewName>> { self.0.r#GetNewNameInterface() }
+ fn r#GetUnionTags(&self, _arg_input: &[crate::mangled::_7_android_4_aidl_5_tests_5_Union]) -> binder::Result<Vec<crate::mangled::_7_android_4_aidl_5_tests_5_Union_3_Tag>> { self.0.r#GetUnionTags(_arg_input) }
+ fn r#GetCppJavaTests(&self) -> binder::Result<Option<binder::SpIBinder>> { self.0.r#GetCppJavaTests() }
+ fn r#getBackendType(&self) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_11_BackendType> { self.0.r#getBackendType() }
+ fn r#GetCircular(&self, _arg_cp: &mut crate::mangled::_7_android_4_aidl_5_tests_18_CircularParcelable) -> binder::Result<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_9_ICircular>> { self.0.r#GetCircular(_arg_cp) }
}
fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl::TransactionCode, _aidl_data: &binder::binder_impl::BorrowedParcel<'_>, _aidl_reply: &mut binder::binder_impl::BorrowedParcel<'_>) -> std::result::Result<(), binder::StatusCode> {
match _aidl_code {
- transactions::UnimplementedMethod => {
+ transactions::r#UnimplementedMethod => {
let _arg_arg: i32 = _aidl_data.read()?;
- let _aidl_return = _aidl_service.UnimplementedMethod(_arg_arg);
+ let _aidl_return = _aidl_service.r#UnimplementedMethod(_arg_arg);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3281,8 +3392,8 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::Deprecated => {
- let _aidl_return = _aidl_service.Deprecated();
+ transactions::r#Deprecated => {
+ let _aidl_return = _aidl_service.r#Deprecated();
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3291,13 +3402,13 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::TestOneway => {
- let _aidl_return = _aidl_service.TestOneway();
+ transactions::r#TestOneway => {
+ let _aidl_return = _aidl_service.r#TestOneway();
Ok(())
}
- transactions::RepeatBoolean => {
+ transactions::r#RepeatBoolean => {
let _arg_token: bool = _aidl_data.read()?;
- let _aidl_return = _aidl_service.RepeatBoolean(_arg_token);
+ let _aidl_return = _aidl_service.r#RepeatBoolean(_arg_token);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3307,9 +3418,9 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::RepeatByte => {
+ transactions::r#RepeatByte => {
let _arg_token: i8 = _aidl_data.read()?;
- let _aidl_return = _aidl_service.RepeatByte(_arg_token);
+ let _aidl_return = _aidl_service.r#RepeatByte(_arg_token);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3319,9 +3430,9 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::RepeatChar => {
+ transactions::r#RepeatChar => {
let _arg_token: u16 = _aidl_data.read()?;
- let _aidl_return = _aidl_service.RepeatChar(_arg_token);
+ let _aidl_return = _aidl_service.r#RepeatChar(_arg_token);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3331,9 +3442,9 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::RepeatInt => {
+ transactions::r#RepeatInt => {
let _arg_token: i32 = _aidl_data.read()?;
- let _aidl_return = _aidl_service.RepeatInt(_arg_token);
+ let _aidl_return = _aidl_service.r#RepeatInt(_arg_token);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3343,9 +3454,9 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::RepeatLong => {
+ transactions::r#RepeatLong => {
let _arg_token: i64 = _aidl_data.read()?;
- let _aidl_return = _aidl_service.RepeatLong(_arg_token);
+ let _aidl_return = _aidl_service.r#RepeatLong(_arg_token);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3355,9 +3466,9 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::RepeatFloat => {
+ transactions::r#RepeatFloat => {
let _arg_token: f32 = _aidl_data.read()?;
- let _aidl_return = _aidl_service.RepeatFloat(_arg_token);
+ let _aidl_return = _aidl_service.r#RepeatFloat(_arg_token);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3367,9 +3478,9 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::RepeatDouble => {
+ transactions::r#RepeatDouble => {
let _arg_token: f64 = _aidl_data.read()?;
- let _aidl_return = _aidl_service.RepeatDouble(_arg_token);
+ let _aidl_return = _aidl_service.r#RepeatDouble(_arg_token);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3379,9 +3490,9 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::RepeatString => {
+ transactions::r#RepeatString => {
let _arg_token: String = _aidl_data.read()?;
- let _aidl_return = _aidl_service.RepeatString(&_arg_token);
+ let _aidl_return = _aidl_service.r#RepeatString(&_arg_token);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3391,9 +3502,9 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::RepeatByteEnum => {
+ transactions::r#RepeatByteEnum => {
let _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum = _aidl_data.read()?;
- let _aidl_return = _aidl_service.RepeatByteEnum(_arg_token);
+ let _aidl_return = _aidl_service.r#RepeatByteEnum(_arg_token);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3403,9 +3514,9 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::RepeatIntEnum => {
+ transactions::r#RepeatIntEnum => {
let _arg_token: crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum = _aidl_data.read()?;
- let _aidl_return = _aidl_service.RepeatIntEnum(_arg_token);
+ let _aidl_return = _aidl_service.r#RepeatIntEnum(_arg_token);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3415,9 +3526,9 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::RepeatLongEnum => {
+ transactions::r#RepeatLongEnum => {
let _arg_token: crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum = _aidl_data.read()?;
- let _aidl_return = _aidl_service.RepeatLongEnum(_arg_token);
+ let _aidl_return = _aidl_service.r#RepeatLongEnum(_arg_token);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3427,11 +3538,11 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::ReverseBoolean => {
+ transactions::r#ReverseBoolean => {
let _arg_input: Vec<bool> = _aidl_data.read()?;
let mut _arg_repeated: Vec<bool> = Default::default();
_aidl_data.resize_out_vec(&mut _arg_repeated)?;
- let _aidl_return = _aidl_service.ReverseBoolean(&_arg_input, &mut _arg_repeated);
+ let _aidl_return = _aidl_service.r#ReverseBoolean(&_arg_input, &mut _arg_repeated);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3442,11 +3553,11 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::ReverseByte => {
+ transactions::r#ReverseByte => {
let _arg_input: Vec<u8> = _aidl_data.read()?;
let mut _arg_repeated: Vec<u8> = Default::default();
_aidl_data.resize_out_vec(&mut _arg_repeated)?;
- let _aidl_return = _aidl_service.ReverseByte(&_arg_input, &mut _arg_repeated);
+ let _aidl_return = _aidl_service.r#ReverseByte(&_arg_input, &mut _arg_repeated);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3457,11 +3568,11 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::ReverseChar => {
+ transactions::r#ReverseChar => {
let _arg_input: Vec<u16> = _aidl_data.read()?;
let mut _arg_repeated: Vec<u16> = Default::default();
_aidl_data.resize_out_vec(&mut _arg_repeated)?;
- let _aidl_return = _aidl_service.ReverseChar(&_arg_input, &mut _arg_repeated);
+ let _aidl_return = _aidl_service.r#ReverseChar(&_arg_input, &mut _arg_repeated);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3472,11 +3583,11 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::ReverseInt => {
+ transactions::r#ReverseInt => {
let _arg_input: Vec<i32> = _aidl_data.read()?;
let mut _arg_repeated: Vec<i32> = Default::default();
_aidl_data.resize_out_vec(&mut _arg_repeated)?;
- let _aidl_return = _aidl_service.ReverseInt(&_arg_input, &mut _arg_repeated);
+ let _aidl_return = _aidl_service.r#ReverseInt(&_arg_input, &mut _arg_repeated);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3487,11 +3598,11 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::ReverseLong => {
+ transactions::r#ReverseLong => {
let _arg_input: Vec<i64> = _aidl_data.read()?;
let mut _arg_repeated: Vec<i64> = Default::default();
_aidl_data.resize_out_vec(&mut _arg_repeated)?;
- let _aidl_return = _aidl_service.ReverseLong(&_arg_input, &mut _arg_repeated);
+ let _aidl_return = _aidl_service.r#ReverseLong(&_arg_input, &mut _arg_repeated);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3502,11 +3613,11 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::ReverseFloat => {
+ transactions::r#ReverseFloat => {
let _arg_input: Vec<f32> = _aidl_data.read()?;
let mut _arg_repeated: Vec<f32> = Default::default();
_aidl_data.resize_out_vec(&mut _arg_repeated)?;
- let _aidl_return = _aidl_service.ReverseFloat(&_arg_input, &mut _arg_repeated);
+ let _aidl_return = _aidl_service.r#ReverseFloat(&_arg_input, &mut _arg_repeated);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3517,11 +3628,11 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::ReverseDouble => {
+ transactions::r#ReverseDouble => {
let _arg_input: Vec<f64> = _aidl_data.read()?;
let mut _arg_repeated: Vec<f64> = Default::default();
_aidl_data.resize_out_vec(&mut _arg_repeated)?;
- let _aidl_return = _aidl_service.ReverseDouble(&_arg_input, &mut _arg_repeated);
+ let _aidl_return = _aidl_service.r#ReverseDouble(&_arg_input, &mut _arg_repeated);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3532,11 +3643,11 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::ReverseString => {
+ transactions::r#ReverseString => {
let _arg_input: Vec<String> = _aidl_data.read()?;
let mut _arg_repeated: Vec<String> = Default::default();
_aidl_data.resize_out_vec(&mut _arg_repeated)?;
- let _aidl_return = _aidl_service.ReverseString(&_arg_input, &mut _arg_repeated);
+ let _aidl_return = _aidl_service.r#ReverseString(&_arg_input, &mut _arg_repeated);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3547,11 +3658,11 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::ReverseByteEnum => {
+ transactions::r#ReverseByteEnum => {
let _arg_input: Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum> = _aidl_data.read()?;
let mut _arg_repeated: Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum> = Default::default();
_aidl_data.resize_out_vec(&mut _arg_repeated)?;
- let _aidl_return = _aidl_service.ReverseByteEnum(&_arg_input, &mut _arg_repeated);
+ let _aidl_return = _aidl_service.r#ReverseByteEnum(&_arg_input, &mut _arg_repeated);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3562,11 +3673,11 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::ReverseIntEnum => {
+ transactions::r#ReverseIntEnum => {
let _arg_input: Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum> = _aidl_data.read()?;
let mut _arg_repeated: Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum> = Default::default();
_aidl_data.resize_out_vec(&mut _arg_repeated)?;
- let _aidl_return = _aidl_service.ReverseIntEnum(&_arg_input, &mut _arg_repeated);
+ let _aidl_return = _aidl_service.r#ReverseIntEnum(&_arg_input, &mut _arg_repeated);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3577,11 +3688,11 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::ReverseLongEnum => {
+ transactions::r#ReverseLongEnum => {
let _arg_input: Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum> = _aidl_data.read()?;
let mut _arg_repeated: Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum> = Default::default();
_aidl_data.resize_out_vec(&mut _arg_repeated)?;
- let _aidl_return = _aidl_service.ReverseLongEnum(&_arg_input, &mut _arg_repeated);
+ let _aidl_return = _aidl_service.r#ReverseLongEnum(&_arg_input, &mut _arg_repeated);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3592,9 +3703,22 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::GetOtherTestService => {
+ transactions::r#GetOtherTestService => {
+ let _arg_name: String = _aidl_data.read()?;
+ let _aidl_return = _aidl_service.r#GetOtherTestService(&_arg_name);
+ match &_aidl_return {
+ Ok(_aidl_return) => {
+ _aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
+ _aidl_reply.write(_aidl_return)?;
+ }
+ Err(_aidl_status) => _aidl_reply.write(_aidl_status)?
+ }
+ Ok(())
+ }
+ transactions::r#SetOtherTestService => {
let _arg_name: String = _aidl_data.read()?;
- let _aidl_return = _aidl_service.GetOtherTestService(&_arg_name);
+ let _arg_service: binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback> = _aidl_data.read()?;
+ let _aidl_return = _aidl_service.r#SetOtherTestService(&_arg_name, &_arg_service);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3604,10 +3728,10 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::VerifyName => {
+ transactions::r#VerifyName => {
let _arg_service: binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback> = _aidl_data.read()?;
let _arg_name: String = _aidl_data.read()?;
- let _aidl_return = _aidl_service.VerifyName(&_arg_service, &_arg_name);
+ let _aidl_return = _aidl_service.r#VerifyName(&_arg_service, &_arg_name);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3617,9 +3741,9 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::GetInterfaceArray => {
+ transactions::r#GetInterfaceArray => {
let _arg_names: Vec<String> = _aidl_data.read()?;
- let _aidl_return = _aidl_service.GetInterfaceArray(&_arg_names);
+ let _aidl_return = _aidl_service.r#GetInterfaceArray(&_arg_names);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3629,10 +3753,10 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::VerifyNamesWithInterfaceArray => {
+ transactions::r#VerifyNamesWithInterfaceArray => {
let _arg_services: Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>> = _aidl_data.read()?;
let _arg_names: Vec<String> = _aidl_data.read()?;
- let _aidl_return = _aidl_service.VerifyNamesWithInterfaceArray(&_arg_services, &_arg_names);
+ let _aidl_return = _aidl_service.r#VerifyNamesWithInterfaceArray(&_arg_services, &_arg_names);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3642,9 +3766,9 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::GetNullableInterfaceArray => {
+ transactions::r#GetNullableInterfaceArray => {
let _arg_names: Option<Vec<Option<String>>> = _aidl_data.read()?;
- let _aidl_return = _aidl_service.GetNullableInterfaceArray(_arg_names.as_deref());
+ let _aidl_return = _aidl_service.r#GetNullableInterfaceArray(_arg_names.as_deref());
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3654,10 +3778,10 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::VerifyNamesWithNullableInterfaceArray => {
+ transactions::r#VerifyNamesWithNullableInterfaceArray => {
let _arg_services: Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>> = _aidl_data.read()?;
let _arg_names: Option<Vec<Option<String>>> = _aidl_data.read()?;
- let _aidl_return = _aidl_service.VerifyNamesWithNullableInterfaceArray(_arg_services.as_deref(), _arg_names.as_deref());
+ let _aidl_return = _aidl_service.r#VerifyNamesWithNullableInterfaceArray(_arg_services.as_deref(), _arg_names.as_deref());
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3667,9 +3791,9 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::GetInterfaceList => {
+ transactions::r#GetInterfaceList => {
let _arg_names: Option<Vec<Option<String>>> = _aidl_data.read()?;
- let _aidl_return = _aidl_service.GetInterfaceList(_arg_names.as_deref());
+ let _aidl_return = _aidl_service.r#GetInterfaceList(_arg_names.as_deref());
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3679,10 +3803,10 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::VerifyNamesWithInterfaceList => {
+ transactions::r#VerifyNamesWithInterfaceList => {
let _arg_services: Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_14_INamedCallback>>>> = _aidl_data.read()?;
let _arg_names: Option<Vec<Option<String>>> = _aidl_data.read()?;
- let _aidl_return = _aidl_service.VerifyNamesWithInterfaceList(_arg_services.as_deref(), _arg_names.as_deref());
+ let _aidl_return = _aidl_service.r#VerifyNamesWithInterfaceList(_arg_services.as_deref(), _arg_names.as_deref());
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3692,10 +3816,10 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::ReverseStringList => {
+ transactions::r#ReverseStringList => {
let _arg_input: Vec<String> = _aidl_data.read()?;
let mut _arg_repeated: Vec<String> = Default::default();
- let _aidl_return = _aidl_service.ReverseStringList(&_arg_input, &mut _arg_repeated);
+ let _aidl_return = _aidl_service.r#ReverseStringList(&_arg_input, &mut _arg_repeated);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3706,9 +3830,9 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::RepeatParcelFileDescriptor => {
+ transactions::r#RepeatParcelFileDescriptor => {
let _arg_read: binder::ParcelFileDescriptor = _aidl_data.read()?;
- let _aidl_return = _aidl_service.RepeatParcelFileDescriptor(&_arg_read);
+ let _aidl_return = _aidl_service.r#RepeatParcelFileDescriptor(&_arg_read);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3718,11 +3842,11 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::ReverseParcelFileDescriptorArray => {
+ transactions::r#ReverseParcelFileDescriptorArray => {
let _arg_input: Vec<binder::ParcelFileDescriptor> = _aidl_data.read()?;
let mut _arg_repeated: Vec<Option<binder::ParcelFileDescriptor>> = Default::default();
_aidl_data.resize_out_vec(&mut _arg_repeated)?;
- let _aidl_return = _aidl_service.ReverseParcelFileDescriptorArray(&_arg_input, &mut _arg_repeated);
+ let _aidl_return = _aidl_service.r#ReverseParcelFileDescriptorArray(&_arg_input, &mut _arg_repeated);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3734,9 +3858,9 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::ThrowServiceException => {
+ transactions::r#ThrowServiceException => {
let _arg_code: i32 = _aidl_data.read()?;
- let _aidl_return = _aidl_service.ThrowServiceException(_arg_code);
+ let _aidl_return = _aidl_service.r#ThrowServiceException(_arg_code);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3745,9 +3869,9 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::RepeatNullableIntArray => {
+ transactions::r#RepeatNullableIntArray => {
let _arg_input: Option<Vec<i32>> = _aidl_data.read()?;
- let _aidl_return = _aidl_service.RepeatNullableIntArray(_arg_input.as_deref());
+ let _aidl_return = _aidl_service.r#RepeatNullableIntArray(_arg_input.as_deref());
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3757,9 +3881,9 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::RepeatNullableByteEnumArray => {
+ transactions::r#RepeatNullableByteEnumArray => {
let _arg_input: Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>> = _aidl_data.read()?;
- let _aidl_return = _aidl_service.RepeatNullableByteEnumArray(_arg_input.as_deref());
+ let _aidl_return = _aidl_service.r#RepeatNullableByteEnumArray(_arg_input.as_deref());
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3769,9 +3893,9 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::RepeatNullableIntEnumArray => {
+ transactions::r#RepeatNullableIntEnumArray => {
let _arg_input: Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>> = _aidl_data.read()?;
- let _aidl_return = _aidl_service.RepeatNullableIntEnumArray(_arg_input.as_deref());
+ let _aidl_return = _aidl_service.r#RepeatNullableIntEnumArray(_arg_input.as_deref());
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3781,9 +3905,9 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::RepeatNullableLongEnumArray => {
+ transactions::r#RepeatNullableLongEnumArray => {
let _arg_input: Option<Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>> = _aidl_data.read()?;
- let _aidl_return = _aidl_service.RepeatNullableLongEnumArray(_arg_input.as_deref());
+ let _aidl_return = _aidl_service.r#RepeatNullableLongEnumArray(_arg_input.as_deref());
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3793,9 +3917,9 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::RepeatNullableString => {
+ transactions::r#RepeatNullableString => {
let _arg_input: Option<String> = _aidl_data.read()?;
- let _aidl_return = _aidl_service.RepeatNullableString(_arg_input.as_deref());
+ let _aidl_return = _aidl_service.r#RepeatNullableString(_arg_input.as_deref());
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3805,9 +3929,9 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::RepeatNullableStringList => {
+ transactions::r#RepeatNullableStringList => {
let _arg_input: Option<Vec<Option<String>>> = _aidl_data.read()?;
- let _aidl_return = _aidl_service.RepeatNullableStringList(_arg_input.as_deref());
+ let _aidl_return = _aidl_service.r#RepeatNullableStringList(_arg_input.as_deref());
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3817,9 +3941,9 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::RepeatNullableParcelable => {
+ transactions::r#RepeatNullableParcelable => {
let _arg_input: Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty> = _aidl_data.read()?;
- let _aidl_return = _aidl_service.RepeatNullableParcelable(_arg_input.as_ref());
+ let _aidl_return = _aidl_service.r#RepeatNullableParcelable(_arg_input.as_ref());
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3829,9 +3953,9 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::RepeatNullableParcelableArray => {
+ transactions::r#RepeatNullableParcelableArray => {
let _arg_input: Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>> = _aidl_data.read()?;
- let _aidl_return = _aidl_service.RepeatNullableParcelableArray(_arg_input.as_deref());
+ let _aidl_return = _aidl_service.r#RepeatNullableParcelableArray(_arg_input.as_deref());
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3841,9 +3965,9 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::RepeatNullableParcelableList => {
+ transactions::r#RepeatNullableParcelableList => {
let _arg_input: Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>> = _aidl_data.read()?;
- let _aidl_return = _aidl_service.RepeatNullableParcelableList(_arg_input.as_deref());
+ let _aidl_return = _aidl_service.r#RepeatNullableParcelableList(_arg_input.as_deref());
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3853,9 +3977,9 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::TakesAnIBinder => {
+ transactions::r#TakesAnIBinder => {
let _arg_input: binder::SpIBinder = _aidl_data.read()?;
- let _aidl_return = _aidl_service.TakesAnIBinder(&_arg_input);
+ let _aidl_return = _aidl_service.r#TakesAnIBinder(&_arg_input);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3864,9 +3988,9 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::TakesANullableIBinder => {
+ transactions::r#TakesANullableIBinder => {
let _arg_input: Option<binder::SpIBinder> = _aidl_data.read()?;
- let _aidl_return = _aidl_service.TakesANullableIBinder(_arg_input.as_ref());
+ let _aidl_return = _aidl_service.r#TakesANullableIBinder(_arg_input.as_ref());
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3875,9 +3999,9 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::TakesAnIBinderList => {
+ transactions::r#TakesAnIBinderList => {
let _arg_input: Vec<binder::SpIBinder> = _aidl_data.read()?;
- let _aidl_return = _aidl_service.TakesAnIBinderList(&_arg_input);
+ let _aidl_return = _aidl_service.r#TakesAnIBinderList(&_arg_input);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3886,9 +4010,9 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::TakesANullableIBinderList => {
+ transactions::r#TakesANullableIBinderList => {
let _arg_input: Option<Vec<Option<binder::SpIBinder>>> = _aidl_data.read()?;
- let _aidl_return = _aidl_service.TakesANullableIBinderList(_arg_input.as_deref());
+ let _aidl_return = _aidl_service.r#TakesANullableIBinderList(_arg_input.as_deref());
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3897,9 +4021,9 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::RepeatUtf8CppString => {
+ transactions::r#RepeatUtf8CppString => {
let _arg_token: String = _aidl_data.read()?;
- let _aidl_return = _aidl_service.RepeatUtf8CppString(&_arg_token);
+ let _aidl_return = _aidl_service.r#RepeatUtf8CppString(&_arg_token);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3909,9 +4033,9 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::RepeatNullableUtf8CppString => {
+ transactions::r#RepeatNullableUtf8CppString => {
let _arg_token: Option<String> = _aidl_data.read()?;
- let _aidl_return = _aidl_service.RepeatNullableUtf8CppString(_arg_token.as_deref());
+ let _aidl_return = _aidl_service.r#RepeatNullableUtf8CppString(_arg_token.as_deref());
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3921,11 +4045,11 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::ReverseUtf8CppString => {
+ transactions::r#ReverseUtf8CppString => {
let _arg_input: Vec<String> = _aidl_data.read()?;
let mut _arg_repeated: Vec<String> = Default::default();
_aidl_data.resize_out_vec(&mut _arg_repeated)?;
- let _aidl_return = _aidl_service.ReverseUtf8CppString(&_arg_input, &mut _arg_repeated);
+ let _aidl_return = _aidl_service.r#ReverseUtf8CppString(&_arg_input, &mut _arg_repeated);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3936,11 +4060,11 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::ReverseNullableUtf8CppString => {
+ transactions::r#ReverseNullableUtf8CppString => {
let _arg_input: Option<Vec<Option<String>>> = _aidl_data.read()?;
let mut _arg_repeated: Option<Vec<Option<String>>> = Default::default();
_aidl_data.resize_nullable_out_vec(&mut _arg_repeated)?;
- let _aidl_return = _aidl_service.ReverseNullableUtf8CppString(_arg_input.as_deref(), &mut _arg_repeated);
+ let _aidl_return = _aidl_service.r#ReverseNullableUtf8CppString(_arg_input.as_deref(), &mut _arg_repeated);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3951,10 +4075,10 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::ReverseUtf8CppStringList => {
+ transactions::r#ReverseUtf8CppStringList => {
let _arg_input: Option<Vec<Option<String>>> = _aidl_data.read()?;
let mut _arg_repeated: Option<Vec<Option<String>>> = Default::default();
- let _aidl_return = _aidl_service.ReverseUtf8CppStringList(_arg_input.as_deref(), &mut _arg_repeated);
+ let _aidl_return = _aidl_service.r#ReverseUtf8CppStringList(_arg_input.as_deref(), &mut _arg_repeated);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3965,9 +4089,9 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::GetCallback => {
+ transactions::r#GetCallback => {
let _arg_return_null: bool = _aidl_data.read()?;
- let _aidl_return = _aidl_service.GetCallback(_arg_return_null);
+ let _aidl_return = _aidl_service.r#GetCallback(_arg_return_null);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3977,9 +4101,9 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::FillOutStructuredParcelable => {
+ transactions::r#FillOutStructuredParcelable => {
let mut _arg_parcel: crate::mangled::_7_android_4_aidl_5_tests_20_StructuredParcelable = _aidl_data.read()?;
- let _aidl_return = _aidl_service.FillOutStructuredParcelable(&mut _arg_parcel);
+ let _aidl_return = _aidl_service.r#FillOutStructuredParcelable(&mut _arg_parcel);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -3989,10 +4113,10 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::RepeatExtendableParcelable => {
+ transactions::r#RepeatExtendableParcelable => {
let _arg_ep: crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable = _aidl_data.read()?;
let mut _arg_ep2: crate::mangled::_7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable = Default::default();
- let _aidl_return = _aidl_service.RepeatExtendableParcelable(&_arg_ep, &mut _arg_ep2);
+ let _aidl_return = _aidl_service.r#RepeatExtendableParcelable(&_arg_ep, &mut _arg_ep2);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -4002,9 +4126,9 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::ReverseList => {
+ transactions::r#ReverseList => {
let _arg_list: crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList = _aidl_data.read()?;
- let _aidl_return = _aidl_service.ReverseList(&_arg_list);
+ let _aidl_return = _aidl_service.r#ReverseList(&_arg_list);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -4014,11 +4138,11 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::ReverseIBinderArray => {
+ transactions::r#ReverseIBinderArray => {
let _arg_input: Vec<binder::SpIBinder> = _aidl_data.read()?;
let mut _arg_repeated: Vec<Option<binder::SpIBinder>> = Default::default();
_aidl_data.resize_out_vec(&mut _arg_repeated)?;
- let _aidl_return = _aidl_service.ReverseIBinderArray(&_arg_input, &mut _arg_repeated);
+ let _aidl_return = _aidl_service.r#ReverseIBinderArray(&_arg_input, &mut _arg_repeated);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -4029,11 +4153,11 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::ReverseNullableIBinderArray => {
+ transactions::r#ReverseNullableIBinderArray => {
let _arg_input: Option<Vec<Option<binder::SpIBinder>>> = _aidl_data.read()?;
let mut _arg_repeated: Option<Vec<Option<binder::SpIBinder>>> = Default::default();
_aidl_data.resize_nullable_out_vec(&mut _arg_repeated)?;
- let _aidl_return = _aidl_service.ReverseNullableIBinderArray(_arg_input.as_deref(), &mut _arg_repeated);
+ let _aidl_return = _aidl_service.r#ReverseNullableIBinderArray(_arg_input.as_deref(), &mut _arg_repeated);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -4044,8 +4168,8 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::GetOldNameInterface => {
- let _aidl_return = _aidl_service.GetOldNameInterface();
+ transactions::r#GetOldNameInterface => {
+ let _aidl_return = _aidl_service.r#GetOldNameInterface();
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -4055,8 +4179,8 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::GetNewNameInterface => {
- let _aidl_return = _aidl_service.GetNewNameInterface();
+ transactions::r#GetNewNameInterface => {
+ let _aidl_return = _aidl_service.r#GetNewNameInterface();
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -4066,9 +4190,9 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::GetUnionTags => {
+ transactions::r#GetUnionTags => {
let _arg_input: Vec<crate::mangled::_7_android_4_aidl_5_tests_5_Union> = _aidl_data.read()?;
- let _aidl_return = _aidl_service.GetUnionTags(&_arg_input);
+ let _aidl_return = _aidl_service.r#GetUnionTags(&_arg_input);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -4078,8 +4202,8 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::GetCppJavaTests => {
- let _aidl_return = _aidl_service.GetCppJavaTests();
+ transactions::r#GetCppJavaTests => {
+ let _aidl_return = _aidl_service.r#GetCppJavaTests();
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -4089,8 +4213,8 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
- transactions::getBackendType => {
- let _aidl_return = _aidl_service.getBackendType();
+ transactions::r#getBackendType => {
+ let _aidl_return = _aidl_service.r#getBackendType();
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -4100,20 +4224,33 @@ fn on_transact(_aidl_service: &dyn ITestService, _aidl_code: binder::binder_impl
}
Ok(())
}
+ transactions::r#GetCircular => {
+ let mut _arg_cp: crate::mangled::_7_android_4_aidl_5_tests_18_CircularParcelable = Default::default();
+ let _aidl_return = _aidl_service.r#GetCircular(&mut _arg_cp);
+ match &_aidl_return {
+ Ok(_aidl_return) => {
+ _aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
+ _aidl_reply.write(_aidl_return)?;
+ _aidl_reply.write(&_arg_cp)?;
+ }
+ Err(_aidl_status) => _aidl_reply.write(_aidl_status)?
+ }
+ Ok(())
+ }
_ => Err(binder::StatusCode::UNKNOWN_TRANSACTION)
}
}
-pub mod Empty {
+pub mod r#Empty {
#[derive(Debug, Clone, PartialEq)]
- pub struct Empty {
+ pub struct r#Empty {
}
- impl Default for Empty {
+ impl Default for r#Empty {
fn default() -> Self {
Self {
}
}
}
- impl binder::Parcelable for Empty {
+ impl binder::Parcelable for r#Empty {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_write(|subparcel| {
Ok(())
@@ -4125,152 +4262,327 @@ pub mod Empty {
})
}
}
- binder::impl_serialize_for_parcelable!(Empty);
- binder::impl_deserialize_for_parcelable!(Empty);
- impl binder::binder_impl::ParcelableMetadata for Empty {
+ binder::impl_serialize_for_parcelable!(r#Empty);
+ binder::impl_deserialize_for_parcelable!(r#Empty);
+ impl binder::binder_impl::ParcelableMetadata for r#Empty {
fn get_descriptor() -> &'static str { "android.aidl.tests.ITestService.Empty" }
}
}
-pub mod CompilerChecks {
+pub mod r#CompilerChecks {
#[derive(Debug)]
- pub struct CompilerChecks {
- pub binder: Option<binder::SpIBinder>,
- pub nullable_binder: Option<binder::SpIBinder>,
- pub binder_array: Vec<binder::SpIBinder>,
- pub nullable_binder_array: Option<Vec<Option<binder::SpIBinder>>>,
- pub binder_list: Vec<binder::SpIBinder>,
- pub nullable_binder_list: Option<Vec<Option<binder::SpIBinder>>>,
- pub pfd: Option<binder::ParcelFileDescriptor>,
- pub nullable_pfd: Option<binder::ParcelFileDescriptor>,
- pub pfd_array: Vec<binder::ParcelFileDescriptor>,
- pub nullable_pfd_array: Option<Vec<Option<binder::ParcelFileDescriptor>>>,
- pub pfd_list: Vec<binder::ParcelFileDescriptor>,
- pub nullable_pfd_list: Option<Vec<Option<binder::ParcelFileDescriptor>>>,
- pub parcel: crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty,
- pub nullable_parcel: Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>,
- pub parcel_array: Vec<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>,
- pub nullable_parcel_array: Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>,
- pub parcel_list: Vec<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>,
- pub nullable_parcel_list: Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>,
- }
- impl Default for CompilerChecks {
+ pub struct r#CompilerChecks {
+ pub r#binder: Option<binder::SpIBinder>,
+ pub r#nullable_binder: Option<binder::SpIBinder>,
+ pub r#binder_array: Vec<binder::SpIBinder>,
+ pub r#nullable_binder_array: Option<Vec<Option<binder::SpIBinder>>>,
+ pub r#binder_list: Vec<binder::SpIBinder>,
+ pub r#nullable_binder_list: Option<Vec<Option<binder::SpIBinder>>>,
+ pub r#pfd: Option<binder::ParcelFileDescriptor>,
+ pub r#nullable_pfd: Option<binder::ParcelFileDescriptor>,
+ pub r#pfd_array: Vec<binder::ParcelFileDescriptor>,
+ pub r#nullable_pfd_array: Option<Vec<Option<binder::ParcelFileDescriptor>>>,
+ pub r#pfd_list: Vec<binder::ParcelFileDescriptor>,
+ pub r#nullable_pfd_list: Option<Vec<Option<binder::ParcelFileDescriptor>>>,
+ pub r#parcel: crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty,
+ pub r#nullable_parcel: Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>,
+ pub r#parcel_array: Vec<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>,
+ pub r#nullable_parcel_array: Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>,
+ pub r#parcel_list: Vec<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>,
+ pub r#nullable_parcel_list: Option<Vec<Option<crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_5_Empty>>>,
+ }
+ impl Default for r#CompilerChecks {
fn default() -> Self {
Self {
- binder: Default::default(),
- nullable_binder: Default::default(),
- binder_array: Default::default(),
- nullable_binder_array: Default::default(),
- binder_list: Default::default(),
- nullable_binder_list: Default::default(),
- pfd: Default::default(),
- nullable_pfd: Default::default(),
- pfd_array: Default::default(),
- nullable_pfd_array: Default::default(),
- pfd_list: Default::default(),
- nullable_pfd_list: Default::default(),
- parcel: Default::default(),
- nullable_parcel: Default::default(),
- parcel_array: Default::default(),
- nullable_parcel_array: Default::default(),
- parcel_list: Default::default(),
- nullable_parcel_list: Default::default(),
- }
- }
- }
- impl binder::Parcelable for CompilerChecks {
+ r#binder: Default::default(),
+ r#nullable_binder: Default::default(),
+ r#binder_array: Default::default(),
+ r#nullable_binder_array: Default::default(),
+ r#binder_list: Default::default(),
+ r#nullable_binder_list: Default::default(),
+ r#pfd: Default::default(),
+ r#nullable_pfd: Default::default(),
+ r#pfd_array: Default::default(),
+ r#nullable_pfd_array: Default::default(),
+ r#pfd_list: Default::default(),
+ r#nullable_pfd_list: Default::default(),
+ r#parcel: Default::default(),
+ r#nullable_parcel: Default::default(),
+ r#parcel_array: Default::default(),
+ r#nullable_parcel_array: Default::default(),
+ r#parcel_list: Default::default(),
+ r#nullable_parcel_list: Default::default(),
+ }
+ }
+ }
+ impl binder::Parcelable for r#CompilerChecks {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_write(|subparcel| {
- let __field_ref = self.binder.as_ref().ok_or(binder::StatusCode::UNEXPECTED_NULL)?;
+ let __field_ref = self.r#binder.as_ref().ok_or(binder::StatusCode::UNEXPECTED_NULL)?;
subparcel.write(__field_ref)?;
- subparcel.write(&self.nullable_binder)?;
- subparcel.write(&self.binder_array)?;
- subparcel.write(&self.nullable_binder_array)?;
- subparcel.write(&self.binder_list)?;
- subparcel.write(&self.nullable_binder_list)?;
- let __field_ref = self.pfd.as_ref().ok_or(binder::StatusCode::UNEXPECTED_NULL)?;
+ subparcel.write(&self.r#nullable_binder)?;
+ subparcel.write(&self.r#binder_array)?;
+ subparcel.write(&self.r#nullable_binder_array)?;
+ subparcel.write(&self.r#binder_list)?;
+ subparcel.write(&self.r#nullable_binder_list)?;
+ let __field_ref = self.r#pfd.as_ref().ok_or(binder::StatusCode::UNEXPECTED_NULL)?;
subparcel.write(__field_ref)?;
- subparcel.write(&self.nullable_pfd)?;
- subparcel.write(&self.pfd_array)?;
- subparcel.write(&self.nullable_pfd_array)?;
- subparcel.write(&self.pfd_list)?;
- subparcel.write(&self.nullable_pfd_list)?;
- subparcel.write(&self.parcel)?;
- subparcel.write(&self.nullable_parcel)?;
- subparcel.write(&self.parcel_array)?;
- subparcel.write(&self.nullable_parcel_array)?;
- subparcel.write(&self.parcel_list)?;
- subparcel.write(&self.nullable_parcel_list)?;
+ subparcel.write(&self.r#nullable_pfd)?;
+ subparcel.write(&self.r#pfd_array)?;
+ subparcel.write(&self.r#nullable_pfd_array)?;
+ subparcel.write(&self.r#pfd_list)?;
+ subparcel.write(&self.r#nullable_pfd_list)?;
+ subparcel.write(&self.r#parcel)?;
+ subparcel.write(&self.r#nullable_parcel)?;
+ subparcel.write(&self.r#parcel_array)?;
+ subparcel.write(&self.r#nullable_parcel_array)?;
+ subparcel.write(&self.r#parcel_list)?;
+ subparcel.write(&self.r#nullable_parcel_list)?;
Ok(())
})
}
fn read_from_parcel(&mut self, parcel: &binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_read(|subparcel| {
if subparcel.has_more_data() {
- self.binder = Some(subparcel.read()?);
+ self.r#binder = Some(subparcel.read()?);
}
if subparcel.has_more_data() {
- self.nullable_binder = subparcel.read()?;
+ self.r#nullable_binder = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.binder_array = subparcel.read()?;
+ self.r#binder_array = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.nullable_binder_array = subparcel.read()?;
+ self.r#nullable_binder_array = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.binder_list = subparcel.read()?;
+ self.r#binder_list = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.nullable_binder_list = subparcel.read()?;
+ self.r#nullable_binder_list = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.pfd = Some(subparcel.read()?);
+ self.r#pfd = Some(subparcel.read()?);
}
if subparcel.has_more_data() {
- self.nullable_pfd = subparcel.read()?;
+ self.r#nullable_pfd = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.pfd_array = subparcel.read()?;
+ self.r#pfd_array = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.nullable_pfd_array = subparcel.read()?;
+ self.r#nullable_pfd_array = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.pfd_list = subparcel.read()?;
+ self.r#pfd_list = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.nullable_pfd_list = subparcel.read()?;
+ self.r#nullable_pfd_list = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.parcel = subparcel.read()?;
+ self.r#parcel = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.nullable_parcel = subparcel.read()?;
+ self.r#nullable_parcel = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.parcel_array = subparcel.read()?;
+ self.r#parcel_array = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.nullable_parcel_array = subparcel.read()?;
+ self.r#nullable_parcel_array = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.parcel_list = subparcel.read()?;
+ self.r#parcel_list = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.nullable_parcel_list = subparcel.read()?;
+ self.r#nullable_parcel_list = subparcel.read()?;
}
Ok(())
})
}
}
- binder::impl_serialize_for_parcelable!(CompilerChecks);
- binder::impl_deserialize_for_parcelable!(CompilerChecks);
- impl binder::binder_impl::ParcelableMetadata for CompilerChecks {
+ binder::impl_serialize_for_parcelable!(r#CompilerChecks);
+ binder::impl_deserialize_for_parcelable!(r#CompilerChecks);
+ impl binder::binder_impl::ParcelableMetadata for r#CompilerChecks {
fn get_descriptor() -> &'static str { "android.aidl.tests.ITestService.CompilerChecks" }
}
+ pub mod r#Foo {
+ #![allow(non_upper_case_globals)]
+ #![allow(non_snake_case)]
+ #[allow(unused_imports)] use binder::binder_impl::IBinderInternal;
+ use binder::declare_binder_interface;
+ declare_binder_interface! {
+ IFoo["android.aidl.tests.ITestService.CompilerChecks.Foo"] {
+ native: BnFoo(on_transact),
+ proxy: BpFoo {
+ },
+ async: IFooAsync,
+ }
+ }
+ pub trait IFoo: binder::Interface + Send {
+ fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.ITestService.CompilerChecks.Foo" }
+ fn getDefaultImpl() -> IFooDefaultRef where Self: Sized {
+ DEFAULT_IMPL.lock().unwrap().clone()
+ }
+ fn setDefaultImpl(d: IFooDefaultRef) -> IFooDefaultRef where Self: Sized {
+ std::mem::replace(&mut *DEFAULT_IMPL.lock().unwrap(), d)
+ }
+ }
+ pub trait IFooAsync<P>: binder::Interface + Send {
+ fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.ITestService.CompilerChecks.Foo" }
+ }
+ #[::async_trait::async_trait]
+ pub trait IFooAsyncServer: binder::Interface + Send {
+ fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.ITestService.CompilerChecks.Foo" }
+ }
+ impl BnFoo {
+ /// Create a new async binder service.
+ pub fn new_async_binder<T, R>(inner: T, rt: R, features: binder::BinderFeatures) -> binder::Strong<dyn IFoo>
+ where
+ T: IFooAsyncServer + binder::Interface + Send + Sync + 'static,
+ R: binder::binder_impl::BinderAsyncRuntime + Send + Sync + 'static,
+ {
+ struct Wrapper<T, R> {
+ _inner: T,
+ _rt: R,
+ }
+ impl<T, R> binder::Interface for Wrapper<T, R> where T: binder::Interface, R: Send + Sync {
+ fn as_binder(&self) -> binder::SpIBinder { self._inner.as_binder() }
+ fn dump(&self, _file: &std::fs::File, _args: &[&std::ffi::CStr]) -> std::result::Result<(), binder::StatusCode> { self._inner.dump(_file, _args) }
+ }
+ impl<T, R> IFoo for Wrapper<T, R>
+ where
+ T: IFooAsyncServer + Send + Sync + 'static,
+ R: binder::binder_impl::BinderAsyncRuntime + Send + Sync + 'static,
+ {
+ }
+ let wrapped = Wrapper { _inner: inner, _rt: rt };
+ Self::new_binder(wrapped, features)
+ }
+ }
+ pub trait IFooDefault: Send + Sync {
+ }
+ pub mod transactions {
+ }
+ pub type IFooDefaultRef = Option<std::sync::Arc<dyn IFooDefault>>;
+ use lazy_static::lazy_static;
+ lazy_static! {
+ static ref DEFAULT_IMPL: std::sync::Mutex<IFooDefaultRef> = std::sync::Mutex::new(None);
+ }
+ impl BpFoo {
+ }
+ impl IFoo for BpFoo {
+ }
+ impl<P: binder::BinderAsyncPool> IFooAsync<P> for BpFoo {
+ }
+ impl IFoo for binder::binder_impl::Binder<BnFoo> {
+ }
+ fn on_transact(_aidl_service: &dyn IFoo, _aidl_code: binder::binder_impl::TransactionCode, _aidl_data: &binder::binder_impl::BorrowedParcel<'_>, _aidl_reply: &mut binder::binder_impl::BorrowedParcel<'_>) -> std::result::Result<(), binder::StatusCode> {
+ match _aidl_code {
+ _ => Err(binder::StatusCode::UNKNOWN_TRANSACTION)
+ }
+ }
+ }
+ pub mod r#HasDeprecated {
+ #[derive(Debug)]
+ pub struct r#HasDeprecated {
+ #[deprecated = "field"]
+ pub r#deprecated: i32,
+ }
+ impl Default for r#HasDeprecated {
+ fn default() -> Self {
+ Self {
+ r#deprecated: 0,
+ }
+ }
+ }
+ impl binder::Parcelable for r#HasDeprecated {
+ fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
+ parcel.sized_write(|subparcel| {
+ subparcel.write(&self.r#deprecated)?;
+ Ok(())
+ })
+ }
+ fn read_from_parcel(&mut self, parcel: &binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
+ parcel.sized_read(|subparcel| {
+ if subparcel.has_more_data() {
+ self.r#deprecated = subparcel.read()?;
+ }
+ Ok(())
+ })
+ }
+ }
+ binder::impl_serialize_for_parcelable!(r#HasDeprecated);
+ binder::impl_deserialize_for_parcelable!(r#HasDeprecated);
+ impl binder::binder_impl::ParcelableMetadata for r#HasDeprecated {
+ fn get_descriptor() -> &'static str { "android.aidl.tests.ITestService.CompilerChecks.HasDeprecated" }
+ }
+ }
+ pub mod r#UsingHasDeprecated {
+ #[derive(Debug)]
+ pub enum r#UsingHasDeprecated {
+ N(i32),
+ M(crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_14_CompilerChecks_13_HasDeprecated),
+ }
+ impl Default for r#UsingHasDeprecated {
+ fn default() -> Self {
+ Self::N(0)
+ }
+ }
+ impl binder::Parcelable for r#UsingHasDeprecated {
+ fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
+ match self {
+ Self::N(v) => {
+ parcel.write(&0i32)?;
+ parcel.write(v)
+ }
+ Self::M(v) => {
+ parcel.write(&1i32)?;
+ parcel.write(v)
+ }
+ }
+ }
+ fn read_from_parcel(&mut self, parcel: &binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
+ let tag: i32 = parcel.read()?;
+ match tag {
+ 0 => {
+ let value: i32 = parcel.read()?;
+ *self = Self::N(value);
+ Ok(())
+ }
+ 1 => {
+ let value: crate::mangled::_7_android_4_aidl_5_tests_12_ITestService_14_CompilerChecks_13_HasDeprecated = parcel.read()?;
+ *self = Self::M(value);
+ Ok(())
+ }
+ _ => {
+ Err(binder::StatusCode::BAD_VALUE)
+ }
+ }
+ }
+ }
+ binder::impl_serialize_for_parcelable!(r#UsingHasDeprecated);
+ binder::impl_deserialize_for_parcelable!(r#UsingHasDeprecated);
+ impl binder::binder_impl::ParcelableMetadata for r#UsingHasDeprecated {
+ fn get_descriptor() -> &'static str { "android.aidl.tests.ITestService.CompilerChecks.UsingHasDeprecated" }
+ }
+ pub mod r#Tag {
+ #![allow(non_upper_case_globals)]
+ use binder::declare_binder_enum;
+ declare_binder_enum! {
+ r#Tag : [i32; 2] {
+ r#n = 0,
+ r#m = 1,
+ }
+ }
+ }
+ }
}
pub(crate) mod mangled {
- pub use super::ITestService as _7_android_4_aidl_5_tests_12_ITestService;
- pub use super::Empty::Empty as _7_android_4_aidl_5_tests_12_ITestService_5_Empty;
- pub use super::CompilerChecks::CompilerChecks as _7_android_4_aidl_5_tests_12_ITestService_14_CompilerChecks;
+ pub use super::r#ITestService as _7_android_4_aidl_5_tests_12_ITestService;
+ pub use super::r#Empty::r#Empty as _7_android_4_aidl_5_tests_12_ITestService_5_Empty;
+ pub use super::r#CompilerChecks::r#CompilerChecks as _7_android_4_aidl_5_tests_12_ITestService_14_CompilerChecks;
+ pub use super::r#CompilerChecks::r#Foo::r#IFoo as _7_android_4_aidl_5_tests_12_ITestService_14_CompilerChecks_3_Foo;
+ pub use super::r#CompilerChecks::r#HasDeprecated::r#HasDeprecated as _7_android_4_aidl_5_tests_12_ITestService_14_CompilerChecks_13_HasDeprecated;
+ pub use super::r#CompilerChecks::r#UsingHasDeprecated::r#UsingHasDeprecated as _7_android_4_aidl_5_tests_12_ITestService_14_CompilerChecks_18_UsingHasDeprecated;
+ pub use super::r#CompilerChecks::r#UsingHasDeprecated::r#Tag::r#Tag as _7_android_4_aidl_5_tests_12_ITestService_14_CompilerChecks_18_UsingHasDeprecated_3_Tag;
}
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ITestService.rs.d b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ITestService.rs.d
index 9786dc12..80d694b3 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ITestService.rs.d
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ITestService.rs.d
@@ -2,6 +2,8 @@ out/soong/.intermediates/system/tools/aidl/aidl-test-interface-rust-source/gen/a
system/tools/aidl/tests/android/aidl/tests/ITestService.aidl \
system/tools/aidl/tests/android/aidl/tests/BackendType.aidl \
system/tools/aidl/tests/android/aidl/tests/ByteEnum.aidl \
+ system/tools/aidl/tests/android/aidl/tests/CircularParcelable.aidl \
+ system/tools/aidl/tests/android/aidl/tests/ICircular.aidl \
system/tools/aidl/tests/android/aidl/tests/INamedCallback.aidl \
system/tools/aidl/tests/android/aidl/tests/INewName.aidl \
system/tools/aidl/tests/android/aidl/tests/IOldName.aidl \
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/IntEnum.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/IntEnum.rs
index 70e71dde..a2bf3cc7 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/IntEnum.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/IntEnum.rs
@@ -3,14 +3,14 @@
#![allow(non_upper_case_globals)]
use binder::declare_binder_enum;
declare_binder_enum! {
- IntEnum : [i32; 4] {
- FOO = 1000,
- BAR = 2000,
- BAZ = 2001,
+ r#IntEnum : [i32; 4] {
+ r#FOO = 1000,
+ r#BAR = 2000,
+ r#BAZ = 2001,
#[deprecated = "do not use this"]
- QUX = 2002,
+ r#QUX = 2002,
}
}
pub(crate) mod mangled {
- pub use super::IntEnum as _7_android_4_aidl_5_tests_7_IntEnum;
+ pub use super::r#IntEnum as _7_android_4_aidl_5_tests_7_IntEnum;
}
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ListOfInterfaces.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ListOfInterfaces.rs
index 4f5d5c6c..7f426ce4 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ListOfInterfaces.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ListOfInterfaces.rs
@@ -1,15 +1,15 @@
#![forbid(unsafe_code)]
#![rustfmt::skip]
#[derive(Debug)]
-pub struct ListOfInterfaces {
+pub struct r#ListOfInterfaces {
}
-impl Default for ListOfInterfaces {
+impl Default for r#ListOfInterfaces {
fn default() -> Self {
Self {
}
}
}
-impl binder::Parcelable for ListOfInterfaces {
+impl binder::Parcelable for r#ListOfInterfaces {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_write(|subparcel| {
Ok(())
@@ -21,12 +21,12 @@ impl binder::Parcelable for ListOfInterfaces {
})
}
}
-binder::impl_serialize_for_parcelable!(ListOfInterfaces);
-binder::impl_deserialize_for_parcelable!(ListOfInterfaces);
-impl binder::binder_impl::ParcelableMetadata for ListOfInterfaces {
+binder::impl_serialize_for_parcelable!(r#ListOfInterfaces);
+binder::impl_deserialize_for_parcelable!(r#ListOfInterfaces);
+impl binder::binder_impl::ParcelableMetadata for r#ListOfInterfaces {
fn get_descriptor() -> &'static str { "android.aidl.tests.ListOfInterfaces" }
}
-pub mod IEmptyInterface {
+pub mod r#IEmptyInterface {
#![allow(non_upper_case_globals)]
#![allow(non_snake_case)]
#[allow(unused_imports)] use binder::binder_impl::IBinderInternal;
@@ -103,7 +103,7 @@ pub mod IEmptyInterface {
}
}
}
-pub mod IMyInterface {
+pub mod r#IMyInterface {
#![allow(non_upper_case_globals)]
#![allow(non_snake_case)]
#[allow(unused_imports)] use binder::binder_impl::IBinderInternal;
@@ -118,7 +118,7 @@ pub mod IMyInterface {
}
pub trait IMyInterface: binder::Interface + Send {
fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.ListOfInterfaces.IMyInterface" }
- fn methodWithInterfaces(&self, _arg_iface: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>, _arg_nullable_iface: Option<&binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>, _arg_iface_list_in: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>], _arg_iface_list_out: &mut Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>, _arg_iface_list_inout: &mut Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>, _arg_nullable_iface_list_in: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>]>, _arg_nullable_iface_list_out: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>, _arg_nullable_iface_list_inout: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>>;
+ fn r#methodWithInterfaces(&self, _arg_iface: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>, _arg_nullable_iface: Option<&binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>, _arg_iface_list_in: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>], _arg_iface_list_out: &mut Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>, _arg_iface_list_inout: &mut Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>, _arg_nullable_iface_list_in: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>]>, _arg_nullable_iface_list_out: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>, _arg_nullable_iface_list_inout: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>>;
fn getDefaultImpl() -> IMyInterfaceDefaultRef where Self: Sized {
DEFAULT_IMPL.lock().unwrap().clone()
}
@@ -128,12 +128,12 @@ pub mod IMyInterface {
}
pub trait IMyInterfaceAsync<P>: binder::Interface + Send {
fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.ListOfInterfaces.IMyInterface" }
- fn methodWithInterfaces<'a>(&'a self, _arg_iface: &'a binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>, _arg_nullable_iface: Option<&'a binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>, _arg_iface_list_in: &'a [binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>], _arg_iface_list_out: &'a mut Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>, _arg_iface_list_inout: &'a mut Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>, _arg_nullable_iface_list_in: Option<&'a [Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>]>, _arg_nullable_iface_list_out: &'a mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>, _arg_nullable_iface_list_inout: &'a mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>>>;
+ fn r#methodWithInterfaces<'a>(&'a self, _arg_iface: &'a binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>, _arg_nullable_iface: Option<&'a binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>, _arg_iface_list_in: &'a [binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>], _arg_iface_list_out: &'a mut Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>, _arg_iface_list_inout: &'a mut Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>, _arg_nullable_iface_list_in: Option<&'a [Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>]>, _arg_nullable_iface_list_out: &'a mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>, _arg_nullable_iface_list_inout: &'a mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>>>;
}
#[::async_trait::async_trait]
pub trait IMyInterfaceAsyncServer: binder::Interface + Send {
fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.ListOfInterfaces.IMyInterface" }
- async fn methodWithInterfaces(&self, _arg_iface: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>, _arg_nullable_iface: Option<&binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>, _arg_iface_list_in: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>], _arg_iface_list_out: &mut Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>, _arg_iface_list_inout: &mut Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>, _arg_nullable_iface_list_in: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>]>, _arg_nullable_iface_list_out: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>, _arg_nullable_iface_list_inout: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>>;
+ async fn r#methodWithInterfaces(&self, _arg_iface: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>, _arg_nullable_iface: Option<&binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>, _arg_iface_list_in: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>], _arg_iface_list_out: &mut Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>, _arg_iface_list_inout: &mut Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>, _arg_nullable_iface_list_in: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>]>, _arg_nullable_iface_list_out: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>, _arg_nullable_iface_list_inout: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>>;
}
impl BnMyInterface {
/// Create a new async binder service.
@@ -155,8 +155,8 @@ pub mod IMyInterface {
T: IMyInterfaceAsyncServer + Send + Sync + 'static,
R: binder::binder_impl::BinderAsyncRuntime + Send + Sync + 'static,
{
- fn methodWithInterfaces(&self, _arg_iface: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>, _arg_nullable_iface: Option<&binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>, _arg_iface_list_in: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>], _arg_iface_list_out: &mut Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>, _arg_iface_list_inout: &mut Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>, _arg_nullable_iface_list_in: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>]>, _arg_nullable_iface_list_out: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>, _arg_nullable_iface_list_inout: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>> {
- self._rt.block_on(self._inner.methodWithInterfaces(_arg_iface, _arg_nullable_iface, _arg_iface_list_in, _arg_iface_list_out, _arg_iface_list_inout, _arg_nullable_iface_list_in, _arg_nullable_iface_list_out, _arg_nullable_iface_list_inout))
+ fn r#methodWithInterfaces(&self, _arg_iface: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>, _arg_nullable_iface: Option<&binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>, _arg_iface_list_in: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>], _arg_iface_list_out: &mut Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>, _arg_iface_list_inout: &mut Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>, _arg_nullable_iface_list_in: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>]>, _arg_nullable_iface_list_out: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>, _arg_nullable_iface_list_inout: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>> {
+ self._rt.block_on(self._inner.r#methodWithInterfaces(_arg_iface, _arg_nullable_iface, _arg_iface_list_in, _arg_iface_list_out, _arg_iface_list_inout, _arg_nullable_iface_list_in, _arg_nullable_iface_list_out, _arg_nullable_iface_list_inout))
}
}
let wrapped = Wrapper { _inner: inner, _rt: rt };
@@ -164,12 +164,12 @@ pub mod IMyInterface {
}
}
pub trait IMyInterfaceDefault: Send + Sync {
- fn methodWithInterfaces(&self, _arg_iface: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>, _arg_nullable_iface: Option<&binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>, _arg_iface_list_in: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>], _arg_iface_list_out: &mut Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>, _arg_iface_list_inout: &mut Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>, _arg_nullable_iface_list_in: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>]>, _arg_nullable_iface_list_out: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>, _arg_nullable_iface_list_inout: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>> {
+ fn r#methodWithInterfaces(&self, _arg_iface: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>, _arg_nullable_iface: Option<&binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>, _arg_iface_list_in: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>], _arg_iface_list_out: &mut Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>, _arg_iface_list_inout: &mut Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>, _arg_nullable_iface_list_in: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>]>, _arg_nullable_iface_list_out: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>, _arg_nullable_iface_list_inout: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
}
pub mod transactions {
- pub const methodWithInterfaces: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 0;
+ pub const r#methodWithInterfaces: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 0;
}
pub type IMyInterfaceDefaultRef = Option<std::sync::Arc<dyn IMyInterfaceDefault>>;
use lazy_static::lazy_static;
@@ -190,7 +190,7 @@ pub mod IMyInterface {
fn read_response_methodWithInterfaces(&self, _arg_iface: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>, _arg_nullable_iface: Option<&binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>, _arg_iface_list_in: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>], _arg_iface_list_out: &mut Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>, _arg_iface_list_inout: &mut Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>, _arg_nullable_iface_list_in: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>]>, _arg_nullable_iface_list_out: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>, _arg_nullable_iface_list_inout: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as IMyInterface>::getDefaultImpl() {
- return _aidl_default_impl.methodWithInterfaces(_arg_iface, _arg_nullable_iface, _arg_iface_list_in, _arg_iface_list_out, _arg_iface_list_inout, _arg_nullable_iface_list_in, _arg_nullable_iface_list_out, _arg_nullable_iface_list_inout);
+ return _aidl_default_impl.r#methodWithInterfaces(_arg_iface, _arg_nullable_iface, _arg_iface_list_in, _arg_iface_list_out, _arg_iface_list_inout, _arg_nullable_iface_list_in, _arg_nullable_iface_list_out, _arg_nullable_iface_list_inout);
}
}
let _aidl_reply = _aidl_reply?;
@@ -205,21 +205,21 @@ pub mod IMyInterface {
}
}
impl IMyInterface for BpMyInterface {
- fn methodWithInterfaces(&self, _arg_iface: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>, _arg_nullable_iface: Option<&binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>, _arg_iface_list_in: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>], _arg_iface_list_out: &mut Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>, _arg_iface_list_inout: &mut Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>, _arg_nullable_iface_list_in: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>]>, _arg_nullable_iface_list_out: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>, _arg_nullable_iface_list_inout: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>> {
+ fn r#methodWithInterfaces(&self, _arg_iface: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>, _arg_nullable_iface: Option<&binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>, _arg_iface_list_in: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>], _arg_iface_list_out: &mut Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>, _arg_iface_list_inout: &mut Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>, _arg_nullable_iface_list_in: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>]>, _arg_nullable_iface_list_out: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>, _arg_nullable_iface_list_inout: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>> {
let _aidl_data = self.build_parcel_methodWithInterfaces(_arg_iface, _arg_nullable_iface, _arg_iface_list_in, _arg_iface_list_out, _arg_iface_list_inout, _arg_nullable_iface_list_in, _arg_nullable_iface_list_out, _arg_nullable_iface_list_inout)?;
- let _aidl_reply = self.binder.submit_transact(transactions::methodWithInterfaces, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#methodWithInterfaces, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_methodWithInterfaces(_arg_iface, _arg_nullable_iface, _arg_iface_list_in, _arg_iface_list_out, _arg_iface_list_inout, _arg_nullable_iface_list_in, _arg_nullable_iface_list_out, _arg_nullable_iface_list_inout, _aidl_reply)
}
}
impl<P: binder::BinderAsyncPool> IMyInterfaceAsync<P> for BpMyInterface {
- fn methodWithInterfaces<'a>(&'a self, _arg_iface: &'a binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>, _arg_nullable_iface: Option<&'a binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>, _arg_iface_list_in: &'a [binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>], _arg_iface_list_out: &'a mut Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>, _arg_iface_list_inout: &'a mut Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>, _arg_nullable_iface_list_in: Option<&'a [Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>]>, _arg_nullable_iface_list_out: &'a mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>, _arg_nullable_iface_list_inout: &'a mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>>> {
+ fn r#methodWithInterfaces<'a>(&'a self, _arg_iface: &'a binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>, _arg_nullable_iface: Option<&'a binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>, _arg_iface_list_in: &'a [binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>], _arg_iface_list_out: &'a mut Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>, _arg_iface_list_inout: &'a mut Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>, _arg_nullable_iface_list_in: Option<&'a [Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>]>, _arg_nullable_iface_list_out: &'a mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>, _arg_nullable_iface_list_inout: &'a mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>) -> binder::BoxFuture<'a, binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>>> {
let _aidl_data = match self.build_parcel_methodWithInterfaces(_arg_iface, _arg_nullable_iface, _arg_iface_list_in, _arg_iface_list_out, _arg_iface_list_inout, _arg_nullable_iface_list_in, _arg_nullable_iface_list_out, _arg_nullable_iface_list_inout) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::methodWithInterfaces, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#methodWithInterfaces, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_methodWithInterfaces(_arg_iface, _arg_nullable_iface, _arg_iface_list_in, _arg_iface_list_out, _arg_iface_list_inout, _arg_nullable_iface_list_in, _arg_nullable_iface_list_out, _arg_nullable_iface_list_inout, _aidl_reply)
}
@@ -227,11 +227,11 @@ pub mod IMyInterface {
}
}
impl IMyInterface for binder::binder_impl::Binder<BnMyInterface> {
- fn methodWithInterfaces(&self, _arg_iface: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>, _arg_nullable_iface: Option<&binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>, _arg_iface_list_in: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>], _arg_iface_list_out: &mut Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>, _arg_iface_list_inout: &mut Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>, _arg_nullable_iface_list_in: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>]>, _arg_nullable_iface_list_out: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>, _arg_nullable_iface_list_inout: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>> { self.0.methodWithInterfaces(_arg_iface, _arg_nullable_iface, _arg_iface_list_in, _arg_iface_list_out, _arg_iface_list_inout, _arg_nullable_iface_list_in, _arg_nullable_iface_list_out, _arg_nullable_iface_list_inout) }
+ fn r#methodWithInterfaces(&self, _arg_iface: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>, _arg_nullable_iface: Option<&binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>, _arg_iface_list_in: &[binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>], _arg_iface_list_out: &mut Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>, _arg_iface_list_inout: &mut Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>, _arg_nullable_iface_list_in: Option<&[Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>]>, _arg_nullable_iface_list_out: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>, _arg_nullable_iface_list_inout: &mut Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>) -> binder::Result<Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>> { self.0.r#methodWithInterfaces(_arg_iface, _arg_nullable_iface, _arg_iface_list_in, _arg_iface_list_out, _arg_iface_list_inout, _arg_nullable_iface_list_in, _arg_nullable_iface_list_out, _arg_nullable_iface_list_inout) }
}
fn on_transact(_aidl_service: &dyn IMyInterface, _aidl_code: binder::binder_impl::TransactionCode, _aidl_data: &binder::binder_impl::BorrowedParcel<'_>, _aidl_reply: &mut binder::binder_impl::BorrowedParcel<'_>) -> std::result::Result<(), binder::StatusCode> {
match _aidl_code {
- transactions::methodWithInterfaces => {
+ transactions::r#methodWithInterfaces => {
let _arg_iface: binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface> = _aidl_data.read()?;
let _arg_nullable_iface: Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>> = _aidl_data.read()?;
let _arg_iface_list_in: Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>> = _aidl_data.read()?;
@@ -240,7 +240,7 @@ pub mod IMyInterface {
let _arg_nullable_iface_list_in: Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>> = _aidl_data.read()?;
let mut _arg_nullable_iface_list_out: Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>> = Default::default();
let mut _arg_nullable_iface_list_inout: Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>> = _aidl_data.read()?;
- let _aidl_return = _aidl_service.methodWithInterfaces(&_arg_iface, _arg_nullable_iface.as_ref(), &_arg_iface_list_in, &mut _arg_iface_list_out, &mut _arg_iface_list_inout, _arg_nullable_iface_list_in.as_deref(), &mut _arg_nullable_iface_list_out, &mut _arg_nullable_iface_list_inout);
+ let _aidl_return = _aidl_service.r#methodWithInterfaces(&_arg_iface, _arg_nullable_iface.as_ref(), &_arg_iface_list_in, &mut _arg_iface_list_out, &mut _arg_iface_list_inout, _arg_nullable_iface_list_in.as_deref(), &mut _arg_nullable_iface_list_out, &mut _arg_nullable_iface_list_inout);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -258,73 +258,73 @@ pub mod IMyInterface {
}
}
}
-pub mod MyParcelable {
+pub mod r#MyParcelable {
#[derive(Debug)]
- pub struct MyParcelable {
- pub iface: Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>,
- pub nullable_iface: Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>,
- pub iface_list: Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>,
- pub nullable_iface_list: Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>,
+ pub struct r#MyParcelable {
+ pub r#iface: Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>,
+ pub r#nullable_iface: Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>,
+ pub r#iface_list: Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>,
+ pub r#nullable_iface_list: Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>,
}
- impl Default for MyParcelable {
+ impl Default for r#MyParcelable {
fn default() -> Self {
Self {
- iface: Default::default(),
- nullable_iface: Default::default(),
- iface_list: Default::default(),
- nullable_iface_list: Default::default(),
+ r#iface: Default::default(),
+ r#nullable_iface: Default::default(),
+ r#iface_list: Default::default(),
+ r#nullable_iface_list: Default::default(),
}
}
}
- impl binder::Parcelable for MyParcelable {
+ impl binder::Parcelable for r#MyParcelable {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_write(|subparcel| {
- let __field_ref = self.iface.as_ref().ok_or(binder::StatusCode::UNEXPECTED_NULL)?;
+ let __field_ref = self.r#iface.as_ref().ok_or(binder::StatusCode::UNEXPECTED_NULL)?;
subparcel.write(__field_ref)?;
- subparcel.write(&self.nullable_iface)?;
- subparcel.write(&self.iface_list)?;
- subparcel.write(&self.nullable_iface_list)?;
+ subparcel.write(&self.r#nullable_iface)?;
+ subparcel.write(&self.r#iface_list)?;
+ subparcel.write(&self.r#nullable_iface_list)?;
Ok(())
})
}
fn read_from_parcel(&mut self, parcel: &binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_read(|subparcel| {
if subparcel.has_more_data() {
- self.iface = Some(subparcel.read()?);
+ self.r#iface = Some(subparcel.read()?);
}
if subparcel.has_more_data() {
- self.nullable_iface = subparcel.read()?;
+ self.r#nullable_iface = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.iface_list = subparcel.read()?;
+ self.r#iface_list = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.nullable_iface_list = subparcel.read()?;
+ self.r#nullable_iface_list = subparcel.read()?;
}
Ok(())
})
}
}
- binder::impl_serialize_for_parcelable!(MyParcelable);
- binder::impl_deserialize_for_parcelable!(MyParcelable);
- impl binder::binder_impl::ParcelableMetadata for MyParcelable {
+ binder::impl_serialize_for_parcelable!(r#MyParcelable);
+ binder::impl_deserialize_for_parcelable!(r#MyParcelable);
+ impl binder::binder_impl::ParcelableMetadata for r#MyParcelable {
fn get_descriptor() -> &'static str { "android.aidl.tests.ListOfInterfaces.MyParcelable" }
}
}
-pub mod MyUnion {
+pub mod r#MyUnion {
#[derive(Debug)]
- pub enum MyUnion {
+ pub enum r#MyUnion {
Iface(Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>),
Nullable_iface(Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>),
Iface_list(Vec<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>),
Nullable_iface_list(Option<Vec<Option<binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface>>>>),
}
- impl Default for MyUnion {
+ impl Default for r#MyUnion {
fn default() -> Self {
Self::Iface(Default::default())
}
}
- impl binder::Parcelable for MyUnion {
+ impl binder::Parcelable for r#MyUnion {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
match self {
Self::Iface(v) => {
@@ -375,29 +375,29 @@ pub mod MyUnion {
}
}
}
- binder::impl_serialize_for_parcelable!(MyUnion);
- binder::impl_deserialize_for_parcelable!(MyUnion);
- impl binder::binder_impl::ParcelableMetadata for MyUnion {
+ binder::impl_serialize_for_parcelable!(r#MyUnion);
+ binder::impl_deserialize_for_parcelable!(r#MyUnion);
+ impl binder::binder_impl::ParcelableMetadata for r#MyUnion {
fn get_descriptor() -> &'static str { "android.aidl.tests.ListOfInterfaces.MyUnion" }
}
- pub mod Tag {
+ pub mod r#Tag {
#![allow(non_upper_case_globals)]
use binder::declare_binder_enum;
declare_binder_enum! {
- Tag : [i32; 4] {
- iface = 0,
- nullable_iface = 1,
- iface_list = 2,
- nullable_iface_list = 3,
+ r#Tag : [i32; 4] {
+ r#iface = 0,
+ r#nullable_iface = 1,
+ r#iface_list = 2,
+ r#nullable_iface_list = 3,
}
}
}
}
pub(crate) mod mangled {
- pub use super::ListOfInterfaces as _7_android_4_aidl_5_tests_16_ListOfInterfaces;
- pub use super::IEmptyInterface::IEmptyInterface as _7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface;
- pub use super::IMyInterface::IMyInterface as _7_android_4_aidl_5_tests_16_ListOfInterfaces_12_IMyInterface;
- pub use super::MyParcelable::MyParcelable as _7_android_4_aidl_5_tests_16_ListOfInterfaces_12_MyParcelable;
- pub use super::MyUnion::MyUnion as _7_android_4_aidl_5_tests_16_ListOfInterfaces_7_MyUnion;
- pub use super::MyUnion::Tag::Tag as _7_android_4_aidl_5_tests_16_ListOfInterfaces_7_MyUnion_3_Tag;
+ pub use super::r#ListOfInterfaces as _7_android_4_aidl_5_tests_16_ListOfInterfaces;
+ pub use super::r#IEmptyInterface::r#IEmptyInterface as _7_android_4_aidl_5_tests_16_ListOfInterfaces_15_IEmptyInterface;
+ pub use super::r#IMyInterface::r#IMyInterface as _7_android_4_aidl_5_tests_16_ListOfInterfaces_12_IMyInterface;
+ pub use super::r#MyParcelable::r#MyParcelable as _7_android_4_aidl_5_tests_16_ListOfInterfaces_12_MyParcelable;
+ pub use super::r#MyUnion::r#MyUnion as _7_android_4_aidl_5_tests_16_ListOfInterfaces_7_MyUnion;
+ pub use super::r#MyUnion::r#Tag::r#Tag as _7_android_4_aidl_5_tests_16_ListOfInterfaces_7_MyUnion_3_Tag;
}
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/LongEnum.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/LongEnum.rs
index ae93821c..75084a41 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/LongEnum.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/LongEnum.rs
@@ -3,12 +3,12 @@
#![allow(non_upper_case_globals)]
use binder::declare_binder_enum;
declare_binder_enum! {
- LongEnum : [i64; 3] {
- FOO = 100000000000,
- BAR = 200000000000,
- BAZ = 200000000001,
+ r#LongEnum : [i64; 3] {
+ r#FOO = 100000000000,
+ r#BAR = 200000000000,
+ r#BAZ = 200000000001,
}
}
pub(crate) mod mangled {
- pub use super::LongEnum as _7_android_4_aidl_5_tests_8_LongEnum;
+ pub use super::r#LongEnum as _7_android_4_aidl_5_tests_8_LongEnum;
}
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/OtherParcelableForToString.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/OtherParcelableForToString.rs
index 0facb4b2..6b415e01 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/OtherParcelableForToString.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/OtherParcelableForToString.rs
@@ -1,37 +1,37 @@
#![forbid(unsafe_code)]
#![rustfmt::skip]
#[derive(Debug)]
-pub struct OtherParcelableForToString {
- pub field: String,
+pub struct r#OtherParcelableForToString {
+ pub r#field: String,
}
-impl Default for OtherParcelableForToString {
+impl Default for r#OtherParcelableForToString {
fn default() -> Self {
Self {
- field: Default::default(),
+ r#field: Default::default(),
}
}
}
-impl binder::Parcelable for OtherParcelableForToString {
+impl binder::Parcelable for r#OtherParcelableForToString {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_write(|subparcel| {
- subparcel.write(&self.field)?;
+ subparcel.write(&self.r#field)?;
Ok(())
})
}
fn read_from_parcel(&mut self, parcel: &binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_read(|subparcel| {
if subparcel.has_more_data() {
- self.field = subparcel.read()?;
+ self.r#field = subparcel.read()?;
}
Ok(())
})
}
}
-binder::impl_serialize_for_parcelable!(OtherParcelableForToString);
-binder::impl_deserialize_for_parcelable!(OtherParcelableForToString);
-impl binder::binder_impl::ParcelableMetadata for OtherParcelableForToString {
+binder::impl_serialize_for_parcelable!(r#OtherParcelableForToString);
+binder::impl_deserialize_for_parcelable!(r#OtherParcelableForToString);
+impl binder::binder_impl::ParcelableMetadata for r#OtherParcelableForToString {
fn get_descriptor() -> &'static str { "android.aidl.tests.OtherParcelableForToString" }
}
pub(crate) mod mangled {
- pub use super::OtherParcelableForToString as _7_android_4_aidl_5_tests_26_OtherParcelableForToString;
+ pub use super::r#OtherParcelableForToString as _7_android_4_aidl_5_tests_26_OtherParcelableForToString;
}
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ParcelableForToString.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ParcelableForToString.rs
index 753ba366..9dec2a4e 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ParcelableForToString.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/ParcelableForToString.rs
@@ -1,169 +1,169 @@
#![forbid(unsafe_code)]
#![rustfmt::skip]
#[derive(Debug)]
-pub struct ParcelableForToString {
- pub intValue: i32,
- pub intArray: Vec<i32>,
- pub longValue: i64,
- pub longArray: Vec<i64>,
- pub doubleValue: f64,
- pub doubleArray: Vec<f64>,
- pub floatValue: f32,
- pub floatArray: Vec<f32>,
- pub byteValue: i8,
- pub byteArray: Vec<u8>,
- pub booleanValue: bool,
- pub booleanArray: Vec<bool>,
- pub stringValue: String,
- pub stringArray: Vec<String>,
- pub stringList: Vec<String>,
- pub parcelableValue: crate::mangled::_7_android_4_aidl_5_tests_26_OtherParcelableForToString,
- pub parcelableArray: Vec<crate::mangled::_7_android_4_aidl_5_tests_26_OtherParcelableForToString>,
- pub enumValue: crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum,
- pub enumArray: Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>,
- pub nullArray: Vec<String>,
- pub nullList: Vec<String>,
- pub parcelableGeneric: i32,
- pub unionValue: crate::mangled::_7_android_4_aidl_5_tests_5_Union,
+pub struct r#ParcelableForToString {
+ pub r#intValue: i32,
+ pub r#intArray: Vec<i32>,
+ pub r#longValue: i64,
+ pub r#longArray: Vec<i64>,
+ pub r#doubleValue: f64,
+ pub r#doubleArray: Vec<f64>,
+ pub r#floatValue: f32,
+ pub r#floatArray: Vec<f32>,
+ pub r#byteValue: i8,
+ pub r#byteArray: Vec<u8>,
+ pub r#booleanValue: bool,
+ pub r#booleanArray: Vec<bool>,
+ pub r#stringValue: String,
+ pub r#stringArray: Vec<String>,
+ pub r#stringList: Vec<String>,
+ pub r#parcelableValue: crate::mangled::_7_android_4_aidl_5_tests_26_OtherParcelableForToString,
+ pub r#parcelableArray: Vec<crate::mangled::_7_android_4_aidl_5_tests_26_OtherParcelableForToString>,
+ pub r#enumValue: crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum,
+ pub r#enumArray: Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>,
+ pub r#nullArray: Vec<String>,
+ pub r#nullList: Vec<String>,
+ pub r#parcelableGeneric: crate::mangled::_7_android_4_aidl_5_tests_27_GenericStructuredParcelable<i32,crate::mangled::_7_android_4_aidl_5_tests_20_StructuredParcelable,crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum,>,
+ pub r#unionValue: crate::mangled::_7_android_4_aidl_5_tests_5_Union,
}
-impl Default for ParcelableForToString {
+impl Default for r#ParcelableForToString {
fn default() -> Self {
Self {
- intValue: 0,
- intArray: Default::default(),
- longValue: 0,
- longArray: Default::default(),
- doubleValue: 0.000000f64,
- doubleArray: Default::default(),
- floatValue: 0.000000f32,
- floatArray: Default::default(),
- byteValue: 0,
- byteArray: Default::default(),
- booleanValue: false,
- booleanArray: Default::default(),
- stringValue: Default::default(),
- stringArray: Default::default(),
- stringList: Default::default(),
- parcelableValue: Default::default(),
- parcelableArray: Default::default(),
- enumValue: crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum::FOO,
- enumArray: Default::default(),
- nullArray: Default::default(),
- nullList: Default::default(),
- parcelableGeneric: Default::default(),
- unionValue: Default::default(),
+ r#intValue: 0,
+ r#intArray: Default::default(),
+ r#longValue: 0,
+ r#longArray: Default::default(),
+ r#doubleValue: 0.000000f64,
+ r#doubleArray: Default::default(),
+ r#floatValue: 0.000000f32,
+ r#floatArray: Default::default(),
+ r#byteValue: 0,
+ r#byteArray: Default::default(),
+ r#booleanValue: false,
+ r#booleanArray: Default::default(),
+ r#stringValue: Default::default(),
+ r#stringArray: Default::default(),
+ r#stringList: Default::default(),
+ r#parcelableValue: Default::default(),
+ r#parcelableArray: Default::default(),
+ r#enumValue: crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum::FOO,
+ r#enumArray: Default::default(),
+ r#nullArray: Default::default(),
+ r#nullList: Default::default(),
+ r#parcelableGeneric: Default::default(),
+ r#unionValue: Default::default(),
}
}
}
-impl binder::Parcelable for ParcelableForToString {
+impl binder::Parcelable for r#ParcelableForToString {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_write(|subparcel| {
- subparcel.write(&self.intValue)?;
- subparcel.write(&self.intArray)?;
- subparcel.write(&self.longValue)?;
- subparcel.write(&self.longArray)?;
- subparcel.write(&self.doubleValue)?;
- subparcel.write(&self.doubleArray)?;
- subparcel.write(&self.floatValue)?;
- subparcel.write(&self.floatArray)?;
- subparcel.write(&self.byteValue)?;
- subparcel.write(&self.byteArray)?;
- subparcel.write(&self.booleanValue)?;
- subparcel.write(&self.booleanArray)?;
- subparcel.write(&self.stringValue)?;
- subparcel.write(&self.stringArray)?;
- subparcel.write(&self.stringList)?;
- subparcel.write(&self.parcelableValue)?;
- subparcel.write(&self.parcelableArray)?;
- subparcel.write(&self.enumValue)?;
- subparcel.write(&self.enumArray)?;
- subparcel.write(&self.nullArray)?;
- subparcel.write(&self.nullList)?;
- subparcel.write(&self.parcelableGeneric)?;
- subparcel.write(&self.unionValue)?;
+ subparcel.write(&self.r#intValue)?;
+ subparcel.write(&self.r#intArray)?;
+ subparcel.write(&self.r#longValue)?;
+ subparcel.write(&self.r#longArray)?;
+ subparcel.write(&self.r#doubleValue)?;
+ subparcel.write(&self.r#doubleArray)?;
+ subparcel.write(&self.r#floatValue)?;
+ subparcel.write(&self.r#floatArray)?;
+ subparcel.write(&self.r#byteValue)?;
+ subparcel.write(&self.r#byteArray)?;
+ subparcel.write(&self.r#booleanValue)?;
+ subparcel.write(&self.r#booleanArray)?;
+ subparcel.write(&self.r#stringValue)?;
+ subparcel.write(&self.r#stringArray)?;
+ subparcel.write(&self.r#stringList)?;
+ subparcel.write(&self.r#parcelableValue)?;
+ subparcel.write(&self.r#parcelableArray)?;
+ subparcel.write(&self.r#enumValue)?;
+ subparcel.write(&self.r#enumArray)?;
+ subparcel.write(&self.r#nullArray)?;
+ subparcel.write(&self.r#nullList)?;
+ subparcel.write(&self.r#parcelableGeneric)?;
+ subparcel.write(&self.r#unionValue)?;
Ok(())
})
}
fn read_from_parcel(&mut self, parcel: &binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_read(|subparcel| {
if subparcel.has_more_data() {
- self.intValue = subparcel.read()?;
+ self.r#intValue = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.intArray = subparcel.read()?;
+ self.r#intArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.longValue = subparcel.read()?;
+ self.r#longValue = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.longArray = subparcel.read()?;
+ self.r#longArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.doubleValue = subparcel.read()?;
+ self.r#doubleValue = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.doubleArray = subparcel.read()?;
+ self.r#doubleArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.floatValue = subparcel.read()?;
+ self.r#floatValue = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.floatArray = subparcel.read()?;
+ self.r#floatArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.byteValue = subparcel.read()?;
+ self.r#byteValue = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.byteArray = subparcel.read()?;
+ self.r#byteArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.booleanValue = subparcel.read()?;
+ self.r#booleanValue = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.booleanArray = subparcel.read()?;
+ self.r#booleanArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.stringValue = subparcel.read()?;
+ self.r#stringValue = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.stringArray = subparcel.read()?;
+ self.r#stringArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.stringList = subparcel.read()?;
+ self.r#stringList = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.parcelableValue = subparcel.read()?;
+ self.r#parcelableValue = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.parcelableArray = subparcel.read()?;
+ self.r#parcelableArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.enumValue = subparcel.read()?;
+ self.r#enumValue = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.enumArray = subparcel.read()?;
+ self.r#enumArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.nullArray = subparcel.read()?;
+ self.r#nullArray = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.nullList = subparcel.read()?;
+ self.r#nullList = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.parcelableGeneric = subparcel.read()?;
+ self.r#parcelableGeneric = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.unionValue = subparcel.read()?;
+ self.r#unionValue = subparcel.read()?;
}
Ok(())
})
}
}
-binder::impl_serialize_for_parcelable!(ParcelableForToString);
-binder::impl_deserialize_for_parcelable!(ParcelableForToString);
-impl binder::binder_impl::ParcelableMetadata for ParcelableForToString {
+binder::impl_serialize_for_parcelable!(r#ParcelableForToString);
+binder::impl_deserialize_for_parcelable!(r#ParcelableForToString);
+impl binder::binder_impl::ParcelableMetadata for r#ParcelableForToString {
fn get_descriptor() -> &'static str { "android.aidl.tests.ParcelableForToString" }
}
pub(crate) mod mangled {
- pub use super::ParcelableForToString as _7_android_4_aidl_5_tests_21_ParcelableForToString;
+ pub use super::r#ParcelableForToString as _7_android_4_aidl_5_tests_21_ParcelableForToString;
}
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/RecursiveList.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/RecursiveList.rs
index d03f48e6..f439d5f5 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/RecursiveList.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/RecursiveList.rs
@@ -1,43 +1,43 @@
#![forbid(unsafe_code)]
#![rustfmt::skip]
#[derive(Debug)]
-pub struct RecursiveList {
- pub value: i32,
- pub next: Option<Box<crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList>>,
+pub struct r#RecursiveList {
+ pub r#value: i32,
+ pub r#next: Option<Box<crate::mangled::_7_android_4_aidl_5_tests_13_RecursiveList>>,
}
-impl Default for RecursiveList {
+impl Default for r#RecursiveList {
fn default() -> Self {
Self {
- value: 0,
- next: Default::default(),
+ r#value: 0,
+ r#next: Default::default(),
}
}
}
-impl binder::Parcelable for RecursiveList {
+impl binder::Parcelable for r#RecursiveList {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_write(|subparcel| {
- subparcel.write(&self.value)?;
- subparcel.write(&self.next)?;
+ subparcel.write(&self.r#value)?;
+ subparcel.write(&self.r#next)?;
Ok(())
})
}
fn read_from_parcel(&mut self, parcel: &binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_read(|subparcel| {
if subparcel.has_more_data() {
- self.value = subparcel.read()?;
+ self.r#value = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.next = subparcel.read()?;
+ self.r#next = subparcel.read()?;
}
Ok(())
})
}
}
-binder::impl_serialize_for_parcelable!(RecursiveList);
-binder::impl_deserialize_for_parcelable!(RecursiveList);
-impl binder::binder_impl::ParcelableMetadata for RecursiveList {
+binder::impl_serialize_for_parcelable!(r#RecursiveList);
+binder::impl_deserialize_for_parcelable!(r#RecursiveList);
+impl binder::binder_impl::ParcelableMetadata for r#RecursiveList {
fn get_descriptor() -> &'static str { "android.aidl.tests.RecursiveList" }
}
pub(crate) mod mangled {
- pub use super::RecursiveList as _7_android_4_aidl_5_tests_13_RecursiveList;
+ pub use super::r#RecursiveList as _7_android_4_aidl_5_tests_13_RecursiveList;
}
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/StructuredParcelable.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/StructuredParcelable.rs
index df666b3a..1c7c016d 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/StructuredParcelable.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/StructuredParcelable.rs
@@ -1,375 +1,375 @@
#![forbid(unsafe_code)]
#![rustfmt::skip]
#[derive(Debug, Clone, PartialEq)]
-pub struct StructuredParcelable {
- pub shouldContainThreeFs: Vec<i32>,
- pub f: i32,
- pub shouldBeJerry: String,
- pub shouldBeByteBar: crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum,
- pub shouldBeIntBar: crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum,
- pub shouldBeLongBar: crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum,
- pub shouldContainTwoByteFoos: Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>,
- pub shouldContainTwoIntFoos: Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>,
- pub shouldContainTwoLongFoos: Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>,
- pub stringDefaultsToFoo: String,
- pub byteDefaultsToFour: i8,
- pub intDefaultsToFive: i32,
- pub longDefaultsToNegativeSeven: i64,
- pub booleanDefaultsToTrue: bool,
- pub charDefaultsToC: u16,
- pub floatDefaultsToPi: f32,
- pub doubleWithDefault: f64,
- pub arrayDefaultsTo123: Vec<i32>,
- pub arrayDefaultsToEmpty: Vec<i32>,
- pub boolDefault: bool,
- pub byteDefault: i8,
- pub intDefault: i32,
- pub longDefault: i64,
- pub floatDefault: f32,
- pub doubleDefault: f64,
- pub checkDoubleFromFloat: f64,
- pub checkStringArray1: Vec<String>,
- pub checkStringArray2: Vec<String>,
- pub int32_min: i32,
- pub int32_max: i32,
- pub int64_max: i64,
- pub hexInt32_neg_1: i32,
- pub ibinder: Option<binder::SpIBinder>,
- pub empty: crate::mangled::_7_android_4_aidl_5_tests_20_StructuredParcelable_5_Empty,
- pub int8_1: Vec<u8>,
- pub int32_1: Vec<i32>,
- pub int64_1: Vec<i64>,
- pub hexInt32_pos_1: i32,
- pub hexInt64_pos_1: i32,
- pub const_exprs_1: crate::mangled::_7_android_4_aidl_5_tests_22_ConstantExpressionEnum,
- pub const_exprs_2: crate::mangled::_7_android_4_aidl_5_tests_22_ConstantExpressionEnum,
- pub const_exprs_3: crate::mangled::_7_android_4_aidl_5_tests_22_ConstantExpressionEnum,
- pub const_exprs_4: crate::mangled::_7_android_4_aidl_5_tests_22_ConstantExpressionEnum,
- pub const_exprs_5: crate::mangled::_7_android_4_aidl_5_tests_22_ConstantExpressionEnum,
- pub const_exprs_6: crate::mangled::_7_android_4_aidl_5_tests_22_ConstantExpressionEnum,
- pub const_exprs_7: crate::mangled::_7_android_4_aidl_5_tests_22_ConstantExpressionEnum,
- pub const_exprs_8: crate::mangled::_7_android_4_aidl_5_tests_22_ConstantExpressionEnum,
- pub const_exprs_9: crate::mangled::_7_android_4_aidl_5_tests_22_ConstantExpressionEnum,
- pub const_exprs_10: crate::mangled::_7_android_4_aidl_5_tests_22_ConstantExpressionEnum,
- pub addString1: String,
- pub addString2: String,
- pub shouldSetBit0AndBit2: i32,
- pub u: Option<crate::mangled::_7_android_4_aidl_5_tests_5_Union>,
- pub shouldBeConstS1: Option<crate::mangled::_7_android_4_aidl_5_tests_5_Union>,
- pub defaultWithFoo: crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum,
+pub struct r#StructuredParcelable {
+ pub r#shouldContainThreeFs: Vec<i32>,
+ pub r#f: i32,
+ pub r#shouldBeJerry: String,
+ pub r#shouldBeByteBar: crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum,
+ pub r#shouldBeIntBar: crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum,
+ pub r#shouldBeLongBar: crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum,
+ pub r#shouldContainTwoByteFoos: Vec<crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum>,
+ pub r#shouldContainTwoIntFoos: Vec<crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum>,
+ pub r#shouldContainTwoLongFoos: Vec<crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum>,
+ pub r#stringDefaultsToFoo: String,
+ pub r#byteDefaultsToFour: i8,
+ pub r#intDefaultsToFive: i32,
+ pub r#longDefaultsToNegativeSeven: i64,
+ pub r#booleanDefaultsToTrue: bool,
+ pub r#charDefaultsToC: u16,
+ pub r#floatDefaultsToPi: f32,
+ pub r#doubleWithDefault: f64,
+ pub r#arrayDefaultsTo123: Vec<i32>,
+ pub r#arrayDefaultsToEmpty: Vec<i32>,
+ pub r#boolDefault: bool,
+ pub r#byteDefault: i8,
+ pub r#intDefault: i32,
+ pub r#longDefault: i64,
+ pub r#floatDefault: f32,
+ pub r#doubleDefault: f64,
+ pub r#checkDoubleFromFloat: f64,
+ pub r#checkStringArray1: Vec<String>,
+ pub r#checkStringArray2: Vec<String>,
+ pub r#int32_min: i32,
+ pub r#int32_max: i32,
+ pub r#int64_max: i64,
+ pub r#hexInt32_neg_1: i32,
+ pub r#ibinder: Option<binder::SpIBinder>,
+ pub r#empty: crate::mangled::_7_android_4_aidl_5_tests_20_StructuredParcelable_5_Empty,
+ pub r#int8_1: Vec<u8>,
+ pub r#int32_1: Vec<i32>,
+ pub r#int64_1: Vec<i64>,
+ pub r#hexInt32_pos_1: i32,
+ pub r#hexInt64_pos_1: i32,
+ pub r#const_exprs_1: crate::mangled::_7_android_4_aidl_5_tests_22_ConstantExpressionEnum,
+ pub r#const_exprs_2: crate::mangled::_7_android_4_aidl_5_tests_22_ConstantExpressionEnum,
+ pub r#const_exprs_3: crate::mangled::_7_android_4_aidl_5_tests_22_ConstantExpressionEnum,
+ pub r#const_exprs_4: crate::mangled::_7_android_4_aidl_5_tests_22_ConstantExpressionEnum,
+ pub r#const_exprs_5: crate::mangled::_7_android_4_aidl_5_tests_22_ConstantExpressionEnum,
+ pub r#const_exprs_6: crate::mangled::_7_android_4_aidl_5_tests_22_ConstantExpressionEnum,
+ pub r#const_exprs_7: crate::mangled::_7_android_4_aidl_5_tests_22_ConstantExpressionEnum,
+ pub r#const_exprs_8: crate::mangled::_7_android_4_aidl_5_tests_22_ConstantExpressionEnum,
+ pub r#const_exprs_9: crate::mangled::_7_android_4_aidl_5_tests_22_ConstantExpressionEnum,
+ pub r#const_exprs_10: crate::mangled::_7_android_4_aidl_5_tests_22_ConstantExpressionEnum,
+ pub r#addString1: String,
+ pub r#addString2: String,
+ pub r#shouldSetBit0AndBit2: i32,
+ pub r#u: Option<crate::mangled::_7_android_4_aidl_5_tests_5_Union>,
+ pub r#shouldBeConstS1: Option<crate::mangled::_7_android_4_aidl_5_tests_5_Union>,
+ pub r#defaultWithFoo: crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum,
}
-pub const BIT0: i32 = 1;
-pub const BIT1: i32 = 2;
-pub const BIT2: i32 = 4;
-impl Default for StructuredParcelable {
+pub const r#BIT0: i32 = 1;
+pub const r#BIT1: i32 = 2;
+pub const r#BIT2: i32 = 4;
+impl Default for r#StructuredParcelable {
fn default() -> Self {
Self {
- shouldContainThreeFs: Default::default(),
- f: 0,
- shouldBeJerry: Default::default(),
- shouldBeByteBar: Default::default(),
- shouldBeIntBar: Default::default(),
- shouldBeLongBar: Default::default(),
- shouldContainTwoByteFoos: Default::default(),
- shouldContainTwoIntFoos: Default::default(),
- shouldContainTwoLongFoos: Default::default(),
- stringDefaultsToFoo: "foo".into(),
- byteDefaultsToFour: 4,
- intDefaultsToFive: 5,
- longDefaultsToNegativeSeven: -7,
- booleanDefaultsToTrue: true,
- charDefaultsToC: 'C' as u16,
- floatDefaultsToPi: 3.140000f32,
- doubleWithDefault: -314000000000000000.000000f64,
- arrayDefaultsTo123: vec![1, 2, 3],
- arrayDefaultsToEmpty: vec![],
- boolDefault: false,
- byteDefault: 0,
- intDefault: 0,
- longDefault: 0,
- floatDefault: 0.000000f32,
- doubleDefault: 0.000000f64,
- checkDoubleFromFloat: 3.140000f64,
- checkStringArray1: vec!["a".into(), "b".into()],
- checkStringArray2: vec!["a".into(), "b".into()],
- int32_min: -2147483648,
- int32_max: 2147483647,
- int64_max: 9223372036854775807,
- hexInt32_neg_1: -1,
- ibinder: Default::default(),
- empty: Default::default(),
- int8_1: vec![1, 1, 1, 1, 1],
- int32_1: vec![1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
- int64_1: vec![1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
- hexInt32_pos_1: 1,
- hexInt64_pos_1: 1,
- const_exprs_1: Default::default(),
- const_exprs_2: Default::default(),
- const_exprs_3: Default::default(),
- const_exprs_4: Default::default(),
- const_exprs_5: Default::default(),
- const_exprs_6: Default::default(),
- const_exprs_7: Default::default(),
- const_exprs_8: Default::default(),
- const_exprs_9: Default::default(),
- const_exprs_10: Default::default(),
- addString1: "hello world!".into(),
- addString2: "The quick brown fox jumps over the lazy dog.".into(),
- shouldSetBit0AndBit2: 0,
- u: Default::default(),
- shouldBeConstS1: Default::default(),
- defaultWithFoo: crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum::FOO,
+ r#shouldContainThreeFs: Default::default(),
+ r#f: 0,
+ r#shouldBeJerry: Default::default(),
+ r#shouldBeByteBar: Default::default(),
+ r#shouldBeIntBar: Default::default(),
+ r#shouldBeLongBar: Default::default(),
+ r#shouldContainTwoByteFoos: Default::default(),
+ r#shouldContainTwoIntFoos: Default::default(),
+ r#shouldContainTwoLongFoos: Default::default(),
+ r#stringDefaultsToFoo: "foo".into(),
+ r#byteDefaultsToFour: 4,
+ r#intDefaultsToFive: 5,
+ r#longDefaultsToNegativeSeven: -7,
+ r#booleanDefaultsToTrue: true,
+ r#charDefaultsToC: 'C' as u16,
+ r#floatDefaultsToPi: 3.140000f32,
+ r#doubleWithDefault: -314000000000000000.000000f64,
+ r#arrayDefaultsTo123: vec![1, 2, 3],
+ r#arrayDefaultsToEmpty: vec![],
+ r#boolDefault: false,
+ r#byteDefault: 0,
+ r#intDefault: 0,
+ r#longDefault: 0,
+ r#floatDefault: 0.000000f32,
+ r#doubleDefault: 0.000000f64,
+ r#checkDoubleFromFloat: 3.140000f64,
+ r#checkStringArray1: vec!["a".into(), "b".into()],
+ r#checkStringArray2: vec!["a".into(), "b".into()],
+ r#int32_min: -2147483648,
+ r#int32_max: 2147483647,
+ r#int64_max: 9223372036854775807,
+ r#hexInt32_neg_1: -1,
+ r#ibinder: Default::default(),
+ r#empty: Default::default(),
+ r#int8_1: vec![1, 1, 1, 1, 1],
+ r#int32_1: vec![1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
+ r#int64_1: vec![1, 1, 1, 1, 1, 1, 1, 1, 1, 1],
+ r#hexInt32_pos_1: 1,
+ r#hexInt64_pos_1: 1,
+ r#const_exprs_1: Default::default(),
+ r#const_exprs_2: Default::default(),
+ r#const_exprs_3: Default::default(),
+ r#const_exprs_4: Default::default(),
+ r#const_exprs_5: Default::default(),
+ r#const_exprs_6: Default::default(),
+ r#const_exprs_7: Default::default(),
+ r#const_exprs_8: Default::default(),
+ r#const_exprs_9: Default::default(),
+ r#const_exprs_10: Default::default(),
+ r#addString1: "hello world!".into(),
+ r#addString2: "The quick brown fox jumps over the lazy dog.".into(),
+ r#shouldSetBit0AndBit2: 0,
+ r#u: Default::default(),
+ r#shouldBeConstS1: Default::default(),
+ r#defaultWithFoo: crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum::FOO,
}
}
}
-impl binder::Parcelable for StructuredParcelable {
+impl binder::Parcelable for r#StructuredParcelable {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_write(|subparcel| {
- subparcel.write(&self.shouldContainThreeFs)?;
- subparcel.write(&self.f)?;
- subparcel.write(&self.shouldBeJerry)?;
- subparcel.write(&self.shouldBeByteBar)?;
- subparcel.write(&self.shouldBeIntBar)?;
- subparcel.write(&self.shouldBeLongBar)?;
- subparcel.write(&self.shouldContainTwoByteFoos)?;
- subparcel.write(&self.shouldContainTwoIntFoos)?;
- subparcel.write(&self.shouldContainTwoLongFoos)?;
- subparcel.write(&self.stringDefaultsToFoo)?;
- subparcel.write(&self.byteDefaultsToFour)?;
- subparcel.write(&self.intDefaultsToFive)?;
- subparcel.write(&self.longDefaultsToNegativeSeven)?;
- subparcel.write(&self.booleanDefaultsToTrue)?;
- subparcel.write(&self.charDefaultsToC)?;
- subparcel.write(&self.floatDefaultsToPi)?;
- subparcel.write(&self.doubleWithDefault)?;
- subparcel.write(&self.arrayDefaultsTo123)?;
- subparcel.write(&self.arrayDefaultsToEmpty)?;
- subparcel.write(&self.boolDefault)?;
- subparcel.write(&self.byteDefault)?;
- subparcel.write(&self.intDefault)?;
- subparcel.write(&self.longDefault)?;
- subparcel.write(&self.floatDefault)?;
- subparcel.write(&self.doubleDefault)?;
- subparcel.write(&self.checkDoubleFromFloat)?;
- subparcel.write(&self.checkStringArray1)?;
- subparcel.write(&self.checkStringArray2)?;
- subparcel.write(&self.int32_min)?;
- subparcel.write(&self.int32_max)?;
- subparcel.write(&self.int64_max)?;
- subparcel.write(&self.hexInt32_neg_1)?;
- subparcel.write(&self.ibinder)?;
- subparcel.write(&self.empty)?;
- subparcel.write(&self.int8_1)?;
- subparcel.write(&self.int32_1)?;
- subparcel.write(&self.int64_1)?;
- subparcel.write(&self.hexInt32_pos_1)?;
- subparcel.write(&self.hexInt64_pos_1)?;
- subparcel.write(&self.const_exprs_1)?;
- subparcel.write(&self.const_exprs_2)?;
- subparcel.write(&self.const_exprs_3)?;
- subparcel.write(&self.const_exprs_4)?;
- subparcel.write(&self.const_exprs_5)?;
- subparcel.write(&self.const_exprs_6)?;
- subparcel.write(&self.const_exprs_7)?;
- subparcel.write(&self.const_exprs_8)?;
- subparcel.write(&self.const_exprs_9)?;
- subparcel.write(&self.const_exprs_10)?;
- subparcel.write(&self.addString1)?;
- subparcel.write(&self.addString2)?;
- subparcel.write(&self.shouldSetBit0AndBit2)?;
- subparcel.write(&self.u)?;
- subparcel.write(&self.shouldBeConstS1)?;
- subparcel.write(&self.defaultWithFoo)?;
+ subparcel.write(&self.r#shouldContainThreeFs)?;
+ subparcel.write(&self.r#f)?;
+ subparcel.write(&self.r#shouldBeJerry)?;
+ subparcel.write(&self.r#shouldBeByteBar)?;
+ subparcel.write(&self.r#shouldBeIntBar)?;
+ subparcel.write(&self.r#shouldBeLongBar)?;
+ subparcel.write(&self.r#shouldContainTwoByteFoos)?;
+ subparcel.write(&self.r#shouldContainTwoIntFoos)?;
+ subparcel.write(&self.r#shouldContainTwoLongFoos)?;
+ subparcel.write(&self.r#stringDefaultsToFoo)?;
+ subparcel.write(&self.r#byteDefaultsToFour)?;
+ subparcel.write(&self.r#intDefaultsToFive)?;
+ subparcel.write(&self.r#longDefaultsToNegativeSeven)?;
+ subparcel.write(&self.r#booleanDefaultsToTrue)?;
+ subparcel.write(&self.r#charDefaultsToC)?;
+ subparcel.write(&self.r#floatDefaultsToPi)?;
+ subparcel.write(&self.r#doubleWithDefault)?;
+ subparcel.write(&self.r#arrayDefaultsTo123)?;
+ subparcel.write(&self.r#arrayDefaultsToEmpty)?;
+ subparcel.write(&self.r#boolDefault)?;
+ subparcel.write(&self.r#byteDefault)?;
+ subparcel.write(&self.r#intDefault)?;
+ subparcel.write(&self.r#longDefault)?;
+ subparcel.write(&self.r#floatDefault)?;
+ subparcel.write(&self.r#doubleDefault)?;
+ subparcel.write(&self.r#checkDoubleFromFloat)?;
+ subparcel.write(&self.r#checkStringArray1)?;
+ subparcel.write(&self.r#checkStringArray2)?;
+ subparcel.write(&self.r#int32_min)?;
+ subparcel.write(&self.r#int32_max)?;
+ subparcel.write(&self.r#int64_max)?;
+ subparcel.write(&self.r#hexInt32_neg_1)?;
+ subparcel.write(&self.r#ibinder)?;
+ subparcel.write(&self.r#empty)?;
+ subparcel.write(&self.r#int8_1)?;
+ subparcel.write(&self.r#int32_1)?;
+ subparcel.write(&self.r#int64_1)?;
+ subparcel.write(&self.r#hexInt32_pos_1)?;
+ subparcel.write(&self.r#hexInt64_pos_1)?;
+ subparcel.write(&self.r#const_exprs_1)?;
+ subparcel.write(&self.r#const_exprs_2)?;
+ subparcel.write(&self.r#const_exprs_3)?;
+ subparcel.write(&self.r#const_exprs_4)?;
+ subparcel.write(&self.r#const_exprs_5)?;
+ subparcel.write(&self.r#const_exprs_6)?;
+ subparcel.write(&self.r#const_exprs_7)?;
+ subparcel.write(&self.r#const_exprs_8)?;
+ subparcel.write(&self.r#const_exprs_9)?;
+ subparcel.write(&self.r#const_exprs_10)?;
+ subparcel.write(&self.r#addString1)?;
+ subparcel.write(&self.r#addString2)?;
+ subparcel.write(&self.r#shouldSetBit0AndBit2)?;
+ subparcel.write(&self.r#u)?;
+ subparcel.write(&self.r#shouldBeConstS1)?;
+ subparcel.write(&self.r#defaultWithFoo)?;
Ok(())
})
}
fn read_from_parcel(&mut self, parcel: &binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_read(|subparcel| {
if subparcel.has_more_data() {
- self.shouldContainThreeFs = subparcel.read()?;
+ self.r#shouldContainThreeFs = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.f = subparcel.read()?;
+ self.r#f = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.shouldBeJerry = subparcel.read()?;
+ self.r#shouldBeJerry = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.shouldBeByteBar = subparcel.read()?;
+ self.r#shouldBeByteBar = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.shouldBeIntBar = subparcel.read()?;
+ self.r#shouldBeIntBar = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.shouldBeLongBar = subparcel.read()?;
+ self.r#shouldBeLongBar = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.shouldContainTwoByteFoos = subparcel.read()?;
+ self.r#shouldContainTwoByteFoos = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.shouldContainTwoIntFoos = subparcel.read()?;
+ self.r#shouldContainTwoIntFoos = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.shouldContainTwoLongFoos = subparcel.read()?;
+ self.r#shouldContainTwoLongFoos = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.stringDefaultsToFoo = subparcel.read()?;
+ self.r#stringDefaultsToFoo = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.byteDefaultsToFour = subparcel.read()?;
+ self.r#byteDefaultsToFour = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.intDefaultsToFive = subparcel.read()?;
+ self.r#intDefaultsToFive = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.longDefaultsToNegativeSeven = subparcel.read()?;
+ self.r#longDefaultsToNegativeSeven = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.booleanDefaultsToTrue = subparcel.read()?;
+ self.r#booleanDefaultsToTrue = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.charDefaultsToC = subparcel.read()?;
+ self.r#charDefaultsToC = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.floatDefaultsToPi = subparcel.read()?;
+ self.r#floatDefaultsToPi = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.doubleWithDefault = subparcel.read()?;
+ self.r#doubleWithDefault = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.arrayDefaultsTo123 = subparcel.read()?;
+ self.r#arrayDefaultsTo123 = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.arrayDefaultsToEmpty = subparcel.read()?;
+ self.r#arrayDefaultsToEmpty = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.boolDefault = subparcel.read()?;
+ self.r#boolDefault = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.byteDefault = subparcel.read()?;
+ self.r#byteDefault = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.intDefault = subparcel.read()?;
+ self.r#intDefault = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.longDefault = subparcel.read()?;
+ self.r#longDefault = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.floatDefault = subparcel.read()?;
+ self.r#floatDefault = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.doubleDefault = subparcel.read()?;
+ self.r#doubleDefault = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.checkDoubleFromFloat = subparcel.read()?;
+ self.r#checkDoubleFromFloat = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.checkStringArray1 = subparcel.read()?;
+ self.r#checkStringArray1 = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.checkStringArray2 = subparcel.read()?;
+ self.r#checkStringArray2 = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.int32_min = subparcel.read()?;
+ self.r#int32_min = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.int32_max = subparcel.read()?;
+ self.r#int32_max = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.int64_max = subparcel.read()?;
+ self.r#int64_max = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.hexInt32_neg_1 = subparcel.read()?;
+ self.r#hexInt32_neg_1 = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.ibinder = subparcel.read()?;
+ self.r#ibinder = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.empty = subparcel.read()?;
+ self.r#empty = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.int8_1 = subparcel.read()?;
+ self.r#int8_1 = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.int32_1 = subparcel.read()?;
+ self.r#int32_1 = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.int64_1 = subparcel.read()?;
+ self.r#int64_1 = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.hexInt32_pos_1 = subparcel.read()?;
+ self.r#hexInt32_pos_1 = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.hexInt64_pos_1 = subparcel.read()?;
+ self.r#hexInt64_pos_1 = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.const_exprs_1 = subparcel.read()?;
+ self.r#const_exprs_1 = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.const_exprs_2 = subparcel.read()?;
+ self.r#const_exprs_2 = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.const_exprs_3 = subparcel.read()?;
+ self.r#const_exprs_3 = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.const_exprs_4 = subparcel.read()?;
+ self.r#const_exprs_4 = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.const_exprs_5 = subparcel.read()?;
+ self.r#const_exprs_5 = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.const_exprs_6 = subparcel.read()?;
+ self.r#const_exprs_6 = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.const_exprs_7 = subparcel.read()?;
+ self.r#const_exprs_7 = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.const_exprs_8 = subparcel.read()?;
+ self.r#const_exprs_8 = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.const_exprs_9 = subparcel.read()?;
+ self.r#const_exprs_9 = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.const_exprs_10 = subparcel.read()?;
+ self.r#const_exprs_10 = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.addString1 = subparcel.read()?;
+ self.r#addString1 = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.addString2 = subparcel.read()?;
+ self.r#addString2 = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.shouldSetBit0AndBit2 = subparcel.read()?;
+ self.r#shouldSetBit0AndBit2 = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.u = subparcel.read()?;
+ self.r#u = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.shouldBeConstS1 = subparcel.read()?;
+ self.r#shouldBeConstS1 = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.defaultWithFoo = subparcel.read()?;
+ self.r#defaultWithFoo = subparcel.read()?;
}
Ok(())
})
}
}
-binder::impl_serialize_for_parcelable!(StructuredParcelable);
-binder::impl_deserialize_for_parcelable!(StructuredParcelable);
-impl binder::binder_impl::ParcelableMetadata for StructuredParcelable {
+binder::impl_serialize_for_parcelable!(r#StructuredParcelable);
+binder::impl_deserialize_for_parcelable!(r#StructuredParcelable);
+impl binder::binder_impl::ParcelableMetadata for r#StructuredParcelable {
fn get_descriptor() -> &'static str { "android.aidl.tests.StructuredParcelable" }
}
-pub mod Empty {
+pub mod r#Empty {
#[derive(Debug, Clone, PartialEq)]
- pub struct Empty {
+ pub struct r#Empty {
}
- impl Default for Empty {
+ impl Default for r#Empty {
fn default() -> Self {
Self {
}
}
}
- impl binder::Parcelable for Empty {
+ impl binder::Parcelable for r#Empty {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_write(|subparcel| {
Ok(())
@@ -381,13 +381,13 @@ pub mod Empty {
})
}
}
- binder::impl_serialize_for_parcelable!(Empty);
- binder::impl_deserialize_for_parcelable!(Empty);
- impl binder::binder_impl::ParcelableMetadata for Empty {
+ binder::impl_serialize_for_parcelable!(r#Empty);
+ binder::impl_deserialize_for_parcelable!(r#Empty);
+ impl binder::binder_impl::ParcelableMetadata for r#Empty {
fn get_descriptor() -> &'static str { "android.aidl.tests.StructuredParcelable.Empty" }
}
}
pub(crate) mod mangled {
- pub use super::StructuredParcelable as _7_android_4_aidl_5_tests_20_StructuredParcelable;
- pub use super::Empty::Empty as _7_android_4_aidl_5_tests_20_StructuredParcelable_5_Empty;
+ pub use super::r#StructuredParcelable as _7_android_4_aidl_5_tests_20_StructuredParcelable;
+ pub use super::r#Empty::r#Empty as _7_android_4_aidl_5_tests_20_StructuredParcelable_5_Empty;
}
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/Union.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/Union.rs
index a2f9295c..ab574644 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/Union.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/Union.rs
@@ -1,7 +1,7 @@
#![forbid(unsafe_code)]
#![rustfmt::skip]
#[derive(Debug, Clone, PartialEq)]
-pub enum Union {
+pub enum r#Union {
Ns(Vec<i32>),
N(i32),
M(i32),
@@ -10,13 +10,13 @@ pub enum Union {
Ss(Vec<String>),
Be(crate::mangled::_7_android_4_aidl_5_tests_8_ByteEnum),
}
-pub const S1: &str = "a string constant in union";
-impl Default for Union {
+pub const r#S1: &str = "a string constant in union";
+impl Default for r#Union {
fn default() -> Self {
Self::Ns(vec![])
}
}
-impl binder::Parcelable for Union {
+impl binder::Parcelable for r#Union {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
match self {
Self::Ns(v) => {
@@ -93,27 +93,27 @@ impl binder::Parcelable for Union {
}
}
}
-binder::impl_serialize_for_parcelable!(Union);
-binder::impl_deserialize_for_parcelable!(Union);
-impl binder::binder_impl::ParcelableMetadata for Union {
+binder::impl_serialize_for_parcelable!(r#Union);
+binder::impl_deserialize_for_parcelable!(r#Union);
+impl binder::binder_impl::ParcelableMetadata for r#Union {
fn get_descriptor() -> &'static str { "android.aidl.tests.Union" }
}
-pub mod Tag {
+pub mod r#Tag {
#![allow(non_upper_case_globals)]
use binder::declare_binder_enum;
declare_binder_enum! {
- Tag : [i32; 7] {
- ns = 0,
- n = 1,
- m = 2,
- s = 3,
- ibinder = 4,
- ss = 5,
- be = 6,
+ r#Tag : [i32; 7] {
+ r#ns = 0,
+ r#n = 1,
+ r#m = 2,
+ r#s = 3,
+ r#ibinder = 4,
+ r#ss = 5,
+ r#be = 6,
}
}
}
pub(crate) mod mangled {
- pub use super::Union as _7_android_4_aidl_5_tests_5_Union;
- pub use super::Tag::Tag as _7_android_4_aidl_5_tests_5_Union_3_Tag;
+ pub use super::r#Union as _7_android_4_aidl_5_tests_5_Union;
+ pub use super::r#Tag::r#Tag as _7_android_4_aidl_5_tests_5_Union_3_Tag;
}
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/UnionWithFd.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/UnionWithFd.rs
index 49f9f16f..bce4d546 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/UnionWithFd.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/UnionWithFd.rs
@@ -1,16 +1,16 @@
#![forbid(unsafe_code)]
#![rustfmt::skip]
#[derive(Debug)]
-pub enum UnionWithFd {
+pub enum r#UnionWithFd {
Num(i32),
Pfd(Option<binder::ParcelFileDescriptor>),
}
-impl Default for UnionWithFd {
+impl Default for r#UnionWithFd {
fn default() -> Self {
Self::Num(0)
}
}
-impl binder::Parcelable for UnionWithFd {
+impl binder::Parcelable for r#UnionWithFd {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
match self {
Self::Num(v) => {
@@ -43,22 +43,22 @@ impl binder::Parcelable for UnionWithFd {
}
}
}
-binder::impl_serialize_for_parcelable!(UnionWithFd);
-binder::impl_deserialize_for_parcelable!(UnionWithFd);
-impl binder::binder_impl::ParcelableMetadata for UnionWithFd {
+binder::impl_serialize_for_parcelable!(r#UnionWithFd);
+binder::impl_deserialize_for_parcelable!(r#UnionWithFd);
+impl binder::binder_impl::ParcelableMetadata for r#UnionWithFd {
fn get_descriptor() -> &'static str { "android.aidl.tests.UnionWithFd" }
}
-pub mod Tag {
+pub mod r#Tag {
#![allow(non_upper_case_globals)]
use binder::declare_binder_enum;
declare_binder_enum! {
- Tag : [i32; 2] {
- num = 0,
- pfd = 1,
+ r#Tag : [i32; 2] {
+ r#num = 0,
+ r#pfd = 1,
}
}
}
pub(crate) mod mangled {
- pub use super::UnionWithFd as _7_android_4_aidl_5_tests_11_UnionWithFd;
- pub use super::Tag::Tag as _7_android_4_aidl_5_tests_11_UnionWithFd_3_Tag;
+ pub use super::r#UnionWithFd as _7_android_4_aidl_5_tests_11_UnionWithFd;
+ pub use super::r#Tag::r#Tag as _7_android_4_aidl_5_tests_11_UnionWithFd_3_Tag;
}
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/extension/ExtendableParcelable.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/extension/ExtendableParcelable.rs
index d91ea320..f99c361e 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/extension/ExtendableParcelable.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/extension/ExtendableParcelable.rs
@@ -1,61 +1,61 @@
#![forbid(unsafe_code)]
#![rustfmt::skip]
#[derive(Debug)]
-pub struct ExtendableParcelable {
- pub a: i32,
- pub b: String,
- pub ext: binder::ParcelableHolder,
- pub c: i64,
- pub ext2: binder::ParcelableHolder,
+pub struct r#ExtendableParcelable {
+ pub r#a: i32,
+ pub r#b: String,
+ pub r#ext: binder::ParcelableHolder,
+ pub r#c: i64,
+ pub r#ext2: binder::ParcelableHolder,
}
-impl Default for ExtendableParcelable {
+impl Default for r#ExtendableParcelable {
fn default() -> Self {
Self {
- a: 0,
- b: Default::default(),
- ext: binder::ParcelableHolder::new(binder::binder_impl::Stability::Local),
- c: 0,
- ext2: binder::ParcelableHolder::new(binder::binder_impl::Stability::Local),
+ r#a: 0,
+ r#b: Default::default(),
+ r#ext: binder::ParcelableHolder::new(binder::binder_impl::Stability::Local),
+ r#c: 0,
+ r#ext2: binder::ParcelableHolder::new(binder::binder_impl::Stability::Local),
}
}
}
-impl binder::Parcelable for ExtendableParcelable {
+impl binder::Parcelable for r#ExtendableParcelable {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_write(|subparcel| {
- subparcel.write(&self.a)?;
- subparcel.write(&self.b)?;
- subparcel.write(&self.ext)?;
- subparcel.write(&self.c)?;
- subparcel.write(&self.ext2)?;
+ subparcel.write(&self.r#a)?;
+ subparcel.write(&self.r#b)?;
+ subparcel.write(&self.r#ext)?;
+ subparcel.write(&self.r#c)?;
+ subparcel.write(&self.r#ext2)?;
Ok(())
})
}
fn read_from_parcel(&mut self, parcel: &binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_read(|subparcel| {
if subparcel.has_more_data() {
- self.a = subparcel.read()?;
+ self.r#a = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.b = subparcel.read()?;
+ self.r#b = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.ext = subparcel.read()?;
+ self.r#ext = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.c = subparcel.read()?;
+ self.r#c = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.ext2 = subparcel.read()?;
+ self.r#ext2 = subparcel.read()?;
}
Ok(())
})
}
}
-binder::impl_serialize_for_parcelable!(ExtendableParcelable);
-binder::impl_deserialize_for_parcelable!(ExtendableParcelable);
-impl binder::binder_impl::ParcelableMetadata for ExtendableParcelable {
+binder::impl_serialize_for_parcelable!(r#ExtendableParcelable);
+binder::impl_deserialize_for_parcelable!(r#ExtendableParcelable);
+impl binder::binder_impl::ParcelableMetadata for r#ExtendableParcelable {
fn get_descriptor() -> &'static str { "android.aidl.tests.extension.ExtendableParcelable" }
}
pub(crate) mod mangled {
- pub use super::ExtendableParcelable as _7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable;
+ pub use super::r#ExtendableParcelable as _7_android_4_aidl_5_tests_9_extension_20_ExtendableParcelable;
}
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/extension/MyExt.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/extension/MyExt.rs
index 939c95d3..8a5dd8e5 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/extension/MyExt.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/extension/MyExt.rs
@@ -1,43 +1,43 @@
#![forbid(unsafe_code)]
#![rustfmt::skip]
#[derive(Debug)]
-pub struct MyExt {
- pub a: i32,
- pub b: String,
+pub struct r#MyExt {
+ pub r#a: i32,
+ pub r#b: String,
}
-impl Default for MyExt {
+impl Default for r#MyExt {
fn default() -> Self {
Self {
- a: 0,
- b: Default::default(),
+ r#a: 0,
+ r#b: Default::default(),
}
}
}
-impl binder::Parcelable for MyExt {
+impl binder::Parcelable for r#MyExt {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_write(|subparcel| {
- subparcel.write(&self.a)?;
- subparcel.write(&self.b)?;
+ subparcel.write(&self.r#a)?;
+ subparcel.write(&self.r#b)?;
Ok(())
})
}
fn read_from_parcel(&mut self, parcel: &binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_read(|subparcel| {
if subparcel.has_more_data() {
- self.a = subparcel.read()?;
+ self.r#a = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.b = subparcel.read()?;
+ self.r#b = subparcel.read()?;
}
Ok(())
})
}
}
-binder::impl_serialize_for_parcelable!(MyExt);
-binder::impl_deserialize_for_parcelable!(MyExt);
-impl binder::binder_impl::ParcelableMetadata for MyExt {
+binder::impl_serialize_for_parcelable!(r#MyExt);
+binder::impl_deserialize_for_parcelable!(r#MyExt);
+impl binder::binder_impl::ParcelableMetadata for r#MyExt {
fn get_descriptor() -> &'static str { "android.aidl.tests.extension.MyExt" }
}
pub(crate) mod mangled {
- pub use super::MyExt as _7_android_4_aidl_5_tests_9_extension_5_MyExt;
+ pub use super::r#MyExt as _7_android_4_aidl_5_tests_9_extension_5_MyExt;
}
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/extension/MyExt2.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/extension/MyExt2.rs
index 27017b97..7b3a7374 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/extension/MyExt2.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/extension/MyExt2.rs
@@ -1,49 +1,49 @@
#![forbid(unsafe_code)]
#![rustfmt::skip]
#[derive(Debug)]
-pub struct MyExt2 {
- pub a: i32,
- pub b: crate::mangled::_7_android_4_aidl_5_tests_9_extension_5_MyExt,
- pub c: String,
+pub struct r#MyExt2 {
+ pub r#a: i32,
+ pub r#b: crate::mangled::_7_android_4_aidl_5_tests_9_extension_5_MyExt,
+ pub r#c: String,
}
-impl Default for MyExt2 {
+impl Default for r#MyExt2 {
fn default() -> Self {
Self {
- a: 0,
- b: Default::default(),
- c: Default::default(),
+ r#a: 0,
+ r#b: Default::default(),
+ r#c: Default::default(),
}
}
}
-impl binder::Parcelable for MyExt2 {
+impl binder::Parcelable for r#MyExt2 {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_write(|subparcel| {
- subparcel.write(&self.a)?;
- subparcel.write(&self.b)?;
- subparcel.write(&self.c)?;
+ subparcel.write(&self.r#a)?;
+ subparcel.write(&self.r#b)?;
+ subparcel.write(&self.r#c)?;
Ok(())
})
}
fn read_from_parcel(&mut self, parcel: &binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_read(|subparcel| {
if subparcel.has_more_data() {
- self.a = subparcel.read()?;
+ self.r#a = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.b = subparcel.read()?;
+ self.r#b = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.c = subparcel.read()?;
+ self.r#c = subparcel.read()?;
}
Ok(())
})
}
}
-binder::impl_serialize_for_parcelable!(MyExt2);
-binder::impl_deserialize_for_parcelable!(MyExt2);
-impl binder::binder_impl::ParcelableMetadata for MyExt2 {
+binder::impl_serialize_for_parcelable!(r#MyExt2);
+binder::impl_deserialize_for_parcelable!(r#MyExt2);
+impl binder::binder_impl::ParcelableMetadata for r#MyExt2 {
fn get_descriptor() -> &'static str { "android.aidl.tests.extension.MyExt2" }
}
pub(crate) mod mangled {
- pub use super::MyExt2 as _7_android_4_aidl_5_tests_9_extension_6_MyExt2;
+ pub use super::r#MyExt2 as _7_android_4_aidl_5_tests_9_extension_6_MyExt2;
}
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/extension/MyExtLike.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/extension/MyExtLike.rs
index c698aa3b..1abcc721 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/extension/MyExtLike.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/extension/MyExtLike.rs
@@ -1,43 +1,43 @@
#![forbid(unsafe_code)]
#![rustfmt::skip]
#[derive(Debug)]
-pub struct MyExtLike {
- pub a: i32,
- pub b: String,
+pub struct r#MyExtLike {
+ pub r#a: i32,
+ pub r#b: String,
}
-impl Default for MyExtLike {
+impl Default for r#MyExtLike {
fn default() -> Self {
Self {
- a: 0,
- b: Default::default(),
+ r#a: 0,
+ r#b: Default::default(),
}
}
}
-impl binder::Parcelable for MyExtLike {
+impl binder::Parcelable for r#MyExtLike {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_write(|subparcel| {
- subparcel.write(&self.a)?;
- subparcel.write(&self.b)?;
+ subparcel.write(&self.r#a)?;
+ subparcel.write(&self.r#b)?;
Ok(())
})
}
fn read_from_parcel(&mut self, parcel: &binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_read(|subparcel| {
if subparcel.has_more_data() {
- self.a = subparcel.read()?;
+ self.r#a = subparcel.read()?;
}
if subparcel.has_more_data() {
- self.b = subparcel.read()?;
+ self.r#b = subparcel.read()?;
}
Ok(())
})
}
}
-binder::impl_serialize_for_parcelable!(MyExtLike);
-binder::impl_deserialize_for_parcelable!(MyExtLike);
-impl binder::binder_impl::ParcelableMetadata for MyExtLike {
+binder::impl_serialize_for_parcelable!(r#MyExtLike);
+binder::impl_deserialize_for_parcelable!(r#MyExtLike);
+impl binder::binder_impl::ParcelableMetadata for r#MyExtLike {
fn get_descriptor() -> &'static str { "android.aidl.tests.extension.MyExtLike" }
}
pub(crate) mod mangled {
- pub use super::MyExtLike as _7_android_4_aidl_5_tests_9_extension_9_MyExtLike;
+ pub use super::r#MyExtLike as _7_android_4_aidl_5_tests_9_extension_9_MyExtLike;
}
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/nested/DeeplyNested.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/nested/DeeplyNested.rs
index 547ac18e..adcd6825 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/nested/DeeplyNested.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/nested/DeeplyNested.rs
@@ -1,15 +1,15 @@
#![forbid(unsafe_code)]
#![rustfmt::skip]
#[derive(Debug)]
-pub struct DeeplyNested {
+pub struct r#DeeplyNested {
}
-impl Default for DeeplyNested {
+impl Default for r#DeeplyNested {
fn default() -> Self {
Self {
}
}
}
-impl binder::Parcelable for DeeplyNested {
+impl binder::Parcelable for r#DeeplyNested {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_write(|subparcel| {
Ok(())
@@ -21,56 +21,56 @@ impl binder::Parcelable for DeeplyNested {
})
}
}
-binder::impl_serialize_for_parcelable!(DeeplyNested);
-binder::impl_deserialize_for_parcelable!(DeeplyNested);
-impl binder::binder_impl::ParcelableMetadata for DeeplyNested {
+binder::impl_serialize_for_parcelable!(r#DeeplyNested);
+binder::impl_deserialize_for_parcelable!(r#DeeplyNested);
+impl binder::binder_impl::ParcelableMetadata for r#DeeplyNested {
fn get_descriptor() -> &'static str { "android.aidl.tests.nested.DeeplyNested" }
}
-pub mod A {
+pub mod r#A {
#[derive(Debug)]
- pub struct A {
- pub e: crate::mangled::_7_android_4_aidl_5_tests_6_nested_12_DeeplyNested_1_B_1_C_1_D_1_E,
+ pub struct r#A {
+ pub r#e: crate::mangled::_7_android_4_aidl_5_tests_6_nested_12_DeeplyNested_1_B_1_C_1_D_1_E,
}
- impl Default for A {
+ impl Default for r#A {
fn default() -> Self {
Self {
- e: crate::mangled::_7_android_4_aidl_5_tests_6_nested_12_DeeplyNested_1_B_1_C_1_D_1_E::OK,
+ r#e: crate::mangled::_7_android_4_aidl_5_tests_6_nested_12_DeeplyNested_1_B_1_C_1_D_1_E::OK,
}
}
}
- impl binder::Parcelable for A {
+ impl binder::Parcelable for r#A {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_write(|subparcel| {
- subparcel.write(&self.e)?;
+ subparcel.write(&self.r#e)?;
Ok(())
})
}
fn read_from_parcel(&mut self, parcel: &binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_read(|subparcel| {
if subparcel.has_more_data() {
- self.e = subparcel.read()?;
+ self.r#e = subparcel.read()?;
}
Ok(())
})
}
}
- binder::impl_serialize_for_parcelable!(A);
- binder::impl_deserialize_for_parcelable!(A);
- impl binder::binder_impl::ParcelableMetadata for A {
+ binder::impl_serialize_for_parcelable!(r#A);
+ binder::impl_deserialize_for_parcelable!(r#A);
+ impl binder::binder_impl::ParcelableMetadata for r#A {
fn get_descriptor() -> &'static str { "android.aidl.tests.nested.DeeplyNested.A" }
}
}
-pub mod B {
+pub mod r#B {
#[derive(Debug)]
- pub struct B {
+ pub struct r#B {
}
- impl Default for B {
+ impl Default for r#B {
fn default() -> Self {
Self {
}
}
}
- impl binder::Parcelable for B {
+ impl binder::Parcelable for r#B {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_write(|subparcel| {
Ok(())
@@ -82,22 +82,22 @@ pub mod B {
})
}
}
- binder::impl_serialize_for_parcelable!(B);
- binder::impl_deserialize_for_parcelable!(B);
- impl binder::binder_impl::ParcelableMetadata for B {
+ binder::impl_serialize_for_parcelable!(r#B);
+ binder::impl_deserialize_for_parcelable!(r#B);
+ impl binder::binder_impl::ParcelableMetadata for r#B {
fn get_descriptor() -> &'static str { "android.aidl.tests.nested.DeeplyNested.B" }
}
- pub mod C {
+ pub mod r#C {
#[derive(Debug)]
- pub struct C {
+ pub struct r#C {
}
- impl Default for C {
+ impl Default for r#C {
fn default() -> Self {
Self {
}
}
}
- impl binder::Parcelable for C {
+ impl binder::Parcelable for r#C {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_write(|subparcel| {
Ok(())
@@ -109,22 +109,22 @@ pub mod B {
})
}
}
- binder::impl_serialize_for_parcelable!(C);
- binder::impl_deserialize_for_parcelable!(C);
- impl binder::binder_impl::ParcelableMetadata for C {
+ binder::impl_serialize_for_parcelable!(r#C);
+ binder::impl_deserialize_for_parcelable!(r#C);
+ impl binder::binder_impl::ParcelableMetadata for r#C {
fn get_descriptor() -> &'static str { "android.aidl.tests.nested.DeeplyNested.B.C" }
}
- pub mod D {
+ pub mod r#D {
#[derive(Debug)]
- pub struct D {
+ pub struct r#D {
}
- impl Default for D {
+ impl Default for r#D {
fn default() -> Self {
Self {
}
}
}
- impl binder::Parcelable for D {
+ impl binder::Parcelable for r#D {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_write(|subparcel| {
Ok(())
@@ -136,17 +136,17 @@ pub mod B {
})
}
}
- binder::impl_serialize_for_parcelable!(D);
- binder::impl_deserialize_for_parcelable!(D);
- impl binder::binder_impl::ParcelableMetadata for D {
+ binder::impl_serialize_for_parcelable!(r#D);
+ binder::impl_deserialize_for_parcelable!(r#D);
+ impl binder::binder_impl::ParcelableMetadata for r#D {
fn get_descriptor() -> &'static str { "android.aidl.tests.nested.DeeplyNested.B.C.D" }
}
- pub mod E {
+ pub mod r#E {
#![allow(non_upper_case_globals)]
use binder::declare_binder_enum;
declare_binder_enum! {
- E : [i8; 1] {
- OK = 0,
+ r#E : [i8; 1] {
+ r#OK = 0,
}
}
}
@@ -154,10 +154,10 @@ pub mod B {
}
}
pub(crate) mod mangled {
- pub use super::DeeplyNested as _7_android_4_aidl_5_tests_6_nested_12_DeeplyNested;
- pub use super::A::A as _7_android_4_aidl_5_tests_6_nested_12_DeeplyNested_1_A;
- pub use super::B::B as _7_android_4_aidl_5_tests_6_nested_12_DeeplyNested_1_B;
- pub use super::B::C::C as _7_android_4_aidl_5_tests_6_nested_12_DeeplyNested_1_B_1_C;
- pub use super::B::C::D::D as _7_android_4_aidl_5_tests_6_nested_12_DeeplyNested_1_B_1_C_1_D;
- pub use super::B::C::D::E::E as _7_android_4_aidl_5_tests_6_nested_12_DeeplyNested_1_B_1_C_1_D_1_E;
+ pub use super::r#DeeplyNested as _7_android_4_aidl_5_tests_6_nested_12_DeeplyNested;
+ pub use super::r#A::r#A as _7_android_4_aidl_5_tests_6_nested_12_DeeplyNested_1_A;
+ pub use super::r#B::r#B as _7_android_4_aidl_5_tests_6_nested_12_DeeplyNested_1_B;
+ pub use super::r#B::r#C::r#C as _7_android_4_aidl_5_tests_6_nested_12_DeeplyNested_1_B_1_C;
+ pub use super::r#B::r#C::r#D::r#D as _7_android_4_aidl_5_tests_6_nested_12_DeeplyNested_1_B_1_C_1_D;
+ pub use super::r#B::r#C::r#D::r#E::r#E as _7_android_4_aidl_5_tests_6_nested_12_DeeplyNested_1_B_1_C_1_D_1_E;
}
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/nested/INestedService.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/nested/INestedService.rs
index 45b76b35..aa747dbe 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/nested/INestedService.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/nested/INestedService.rs
@@ -14,8 +14,8 @@ declare_binder_interface! {
}
pub trait INestedService: binder::Interface + Send {
fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.nested.INestedService" }
- fn flipStatus(&self, _arg_p: &crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_6_Result>;
- fn flipStatusWithCallback(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status, _arg_cb: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_9_ICallback>) -> binder::Result<()>;
+ fn r#flipStatus(&self, _arg_p: &crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_6_Result>;
+ fn r#flipStatusWithCallback(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status, _arg_cb: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_9_ICallback>) -> binder::Result<()>;
fn getDefaultImpl() -> INestedServiceDefaultRef where Self: Sized {
DEFAULT_IMPL.lock().unwrap().clone()
}
@@ -25,14 +25,14 @@ pub trait INestedService: binder::Interface + Send {
}
pub trait INestedServiceAsync<P>: binder::Interface + Send {
fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.nested.INestedService" }
- fn flipStatus<'a>(&'a self, _arg_p: &'a crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested) -> binder::BoxFuture<'a, binder::Result<crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_6_Result>>;
- fn flipStatusWithCallback<'a>(&'a self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status, _arg_cb: &'a binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_9_ICallback>) -> binder::BoxFuture<'a, binder::Result<()>>;
+ fn r#flipStatus<'a>(&'a self, _arg_p: &'a crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested) -> binder::BoxFuture<'a, binder::Result<crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_6_Result>>;
+ fn r#flipStatusWithCallback<'a>(&'a self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status, _arg_cb: &'a binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_9_ICallback>) -> binder::BoxFuture<'a, binder::Result<()>>;
}
#[::async_trait::async_trait]
pub trait INestedServiceAsyncServer: binder::Interface + Send {
fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.nested.INestedService" }
- async fn flipStatus(&self, _arg_p: &crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_6_Result>;
- async fn flipStatusWithCallback(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status, _arg_cb: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_9_ICallback>) -> binder::Result<()>;
+ async fn r#flipStatus(&self, _arg_p: &crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_6_Result>;
+ async fn r#flipStatusWithCallback(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status, _arg_cb: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_9_ICallback>) -> binder::Result<()>;
}
impl BnNestedService {
/// Create a new async binder service.
@@ -54,11 +54,11 @@ impl BnNestedService {
T: INestedServiceAsyncServer + Send + Sync + 'static,
R: binder::binder_impl::BinderAsyncRuntime + Send + Sync + 'static,
{
- fn flipStatus(&self, _arg_p: &crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_6_Result> {
- self._rt.block_on(self._inner.flipStatus(_arg_p))
+ fn r#flipStatus(&self, _arg_p: &crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_6_Result> {
+ self._rt.block_on(self._inner.r#flipStatus(_arg_p))
}
- fn flipStatusWithCallback(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status, _arg_cb: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_9_ICallback>) -> binder::Result<()> {
- self._rt.block_on(self._inner.flipStatusWithCallback(_arg_status, _arg_cb))
+ fn r#flipStatusWithCallback(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status, _arg_cb: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_9_ICallback>) -> binder::Result<()> {
+ self._rt.block_on(self._inner.r#flipStatusWithCallback(_arg_status, _arg_cb))
}
}
let wrapped = Wrapper { _inner: inner, _rt: rt };
@@ -66,16 +66,16 @@ impl BnNestedService {
}
}
pub trait INestedServiceDefault: Send + Sync {
- fn flipStatus(&self, _arg_p: &crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_6_Result> {
+ fn r#flipStatus(&self, _arg_p: &crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_6_Result> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn flipStatusWithCallback(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status, _arg_cb: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_9_ICallback>) -> binder::Result<()> {
+ fn r#flipStatusWithCallback(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status, _arg_cb: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_9_ICallback>) -> binder::Result<()> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
}
pub mod transactions {
- pub const flipStatus: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 0;
- pub const flipStatusWithCallback: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 1;
+ pub const r#flipStatus: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 0;
+ pub const r#flipStatusWithCallback: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 1;
}
pub type INestedServiceDefaultRef = Option<std::sync::Arc<dyn INestedServiceDefault>>;
use lazy_static::lazy_static;
@@ -91,7 +91,7 @@ impl BpNestedService {
fn read_response_flipStatus(&self, _arg_p: &crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_6_Result> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as INestedService>::getDefaultImpl() {
- return _aidl_default_impl.flipStatus(_arg_p);
+ return _aidl_default_impl.r#flipStatus(_arg_p);
}
}
let _aidl_reply = _aidl_reply?;
@@ -109,7 +109,7 @@ impl BpNestedService {
fn read_response_flipStatusWithCallback(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status, _arg_cb: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_9_ICallback>, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<()> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as INestedService>::getDefaultImpl() {
- return _aidl_default_impl.flipStatusWithCallback(_arg_status, _arg_cb);
+ return _aidl_default_impl.r#flipStatusWithCallback(_arg_status, _arg_cb);
}
}
let _aidl_reply = _aidl_reply?;
@@ -119,39 +119,39 @@ impl BpNestedService {
}
}
impl INestedService for BpNestedService {
- fn flipStatus(&self, _arg_p: &crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_6_Result> {
+ fn r#flipStatus(&self, _arg_p: &crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_6_Result> {
let _aidl_data = self.build_parcel_flipStatus(_arg_p)?;
- let _aidl_reply = self.binder.submit_transact(transactions::flipStatus, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#flipStatus, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_flipStatus(_arg_p, _aidl_reply)
}
- fn flipStatusWithCallback(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status, _arg_cb: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_9_ICallback>) -> binder::Result<()> {
+ fn r#flipStatusWithCallback(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status, _arg_cb: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_9_ICallback>) -> binder::Result<()> {
let _aidl_data = self.build_parcel_flipStatusWithCallback(_arg_status, _arg_cb)?;
- let _aidl_reply = self.binder.submit_transact(transactions::flipStatusWithCallback, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#flipStatusWithCallback, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_flipStatusWithCallback(_arg_status, _arg_cb, _aidl_reply)
}
}
impl<P: binder::BinderAsyncPool> INestedServiceAsync<P> for BpNestedService {
- fn flipStatus<'a>(&'a self, _arg_p: &'a crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested) -> binder::BoxFuture<'a, binder::Result<crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_6_Result>> {
+ fn r#flipStatus<'a>(&'a self, _arg_p: &'a crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested) -> binder::BoxFuture<'a, binder::Result<crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_6_Result>> {
let _aidl_data = match self.build_parcel_flipStatus(_arg_p) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::flipStatus, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#flipStatus, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_flipStatus(_arg_p, _aidl_reply)
}
)
}
- fn flipStatusWithCallback<'a>(&'a self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status, _arg_cb: &'a binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_9_ICallback>) -> binder::BoxFuture<'a, binder::Result<()>> {
+ fn r#flipStatusWithCallback<'a>(&'a self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status, _arg_cb: &'a binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_9_ICallback>) -> binder::BoxFuture<'a, binder::Result<()>> {
let _aidl_data = match self.build_parcel_flipStatusWithCallback(_arg_status, _arg_cb) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::flipStatusWithCallback, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#flipStatusWithCallback, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_flipStatusWithCallback(_arg_status, _arg_cb, _aidl_reply)
}
@@ -159,14 +159,14 @@ impl<P: binder::BinderAsyncPool> INestedServiceAsync<P> for BpNestedService {
}
}
impl INestedService for binder::binder_impl::Binder<BnNestedService> {
- fn flipStatus(&self, _arg_p: &crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_6_Result> { self.0.flipStatus(_arg_p) }
- fn flipStatusWithCallback(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status, _arg_cb: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_9_ICallback>) -> binder::Result<()> { self.0.flipStatusWithCallback(_arg_status, _arg_cb) }
+ fn r#flipStatus(&self, _arg_p: &crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested) -> binder::Result<crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_6_Result> { self.0.r#flipStatus(_arg_p) }
+ fn r#flipStatusWithCallback(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status, _arg_cb: &binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_9_ICallback>) -> binder::Result<()> { self.0.r#flipStatusWithCallback(_arg_status, _arg_cb) }
}
fn on_transact(_aidl_service: &dyn INestedService, _aidl_code: binder::binder_impl::TransactionCode, _aidl_data: &binder::binder_impl::BorrowedParcel<'_>, _aidl_reply: &mut binder::binder_impl::BorrowedParcel<'_>) -> std::result::Result<(), binder::StatusCode> {
match _aidl_code {
- transactions::flipStatus => {
+ transactions::r#flipStatus => {
let _arg_p: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested = _aidl_data.read()?;
- let _aidl_return = _aidl_service.flipStatus(&_arg_p);
+ let _aidl_return = _aidl_service.r#flipStatus(&_arg_p);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -176,10 +176,10 @@ fn on_transact(_aidl_service: &dyn INestedService, _aidl_code: binder::binder_im
}
Ok(())
}
- transactions::flipStatusWithCallback => {
+ transactions::r#flipStatusWithCallback => {
let _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status = _aidl_data.read()?;
let _arg_cb: binder::Strong<dyn crate::mangled::_7_android_4_aidl_5_tests_6_nested_14_INestedService_9_ICallback> = _aidl_data.read()?;
- let _aidl_return = _aidl_service.flipStatusWithCallback(_arg_status, &_arg_cb);
+ let _aidl_return = _aidl_service.r#flipStatusWithCallback(_arg_status, &_arg_cb);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -191,41 +191,41 @@ fn on_transact(_aidl_service: &dyn INestedService, _aidl_code: binder::binder_im
_ => Err(binder::StatusCode::UNKNOWN_TRANSACTION)
}
}
-pub mod Result {
+pub mod r#Result {
#[derive(Debug, PartialEq)]
- pub struct Result {
- pub status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status,
+ pub struct r#Result {
+ pub r#status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status,
}
- impl Default for Result {
+ impl Default for r#Result {
fn default() -> Self {
Self {
- status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status::OK,
+ r#status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status::OK,
}
}
}
- impl binder::Parcelable for Result {
+ impl binder::Parcelable for r#Result {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_write(|subparcel| {
- subparcel.write(&self.status)?;
+ subparcel.write(&self.r#status)?;
Ok(())
})
}
fn read_from_parcel(&mut self, parcel: &binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_read(|subparcel| {
if subparcel.has_more_data() {
- self.status = subparcel.read()?;
+ self.r#status = subparcel.read()?;
}
Ok(())
})
}
}
- binder::impl_serialize_for_parcelable!(Result);
- binder::impl_deserialize_for_parcelable!(Result);
- impl binder::binder_impl::ParcelableMetadata for Result {
+ binder::impl_serialize_for_parcelable!(r#Result);
+ binder::impl_deserialize_for_parcelable!(r#Result);
+ impl binder::binder_impl::ParcelableMetadata for r#Result {
fn get_descriptor() -> &'static str { "android.aidl.tests.nested.INestedService.Result" }
}
}
-pub mod ICallback {
+pub mod r#ICallback {
#![allow(non_upper_case_globals)]
#![allow(non_snake_case)]
#[allow(unused_imports)] use binder::binder_impl::IBinderInternal;
@@ -240,7 +240,7 @@ pub mod ICallback {
}
pub trait ICallback: binder::Interface + Send {
fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.nested.INestedService.ICallback" }
- fn done(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status) -> binder::Result<()>;
+ fn r#done(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status) -> binder::Result<()>;
fn getDefaultImpl() -> ICallbackDefaultRef where Self: Sized {
DEFAULT_IMPL.lock().unwrap().clone()
}
@@ -250,12 +250,12 @@ pub mod ICallback {
}
pub trait ICallbackAsync<P>: binder::Interface + Send {
fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.nested.INestedService.ICallback" }
- fn done<'a>(&'a self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status) -> binder::BoxFuture<'a, binder::Result<()>>;
+ fn r#done<'a>(&'a self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status) -> binder::BoxFuture<'a, binder::Result<()>>;
}
#[::async_trait::async_trait]
pub trait ICallbackAsyncServer: binder::Interface + Send {
fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.tests.nested.INestedService.ICallback" }
- async fn done(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status) -> binder::Result<()>;
+ async fn r#done(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status) -> binder::Result<()>;
}
impl BnCallback {
/// Create a new async binder service.
@@ -277,8 +277,8 @@ pub mod ICallback {
T: ICallbackAsyncServer + Send + Sync + 'static,
R: binder::binder_impl::BinderAsyncRuntime + Send + Sync + 'static,
{
- fn done(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status) -> binder::Result<()> {
- self._rt.block_on(self._inner.done(_arg_status))
+ fn r#done(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status) -> binder::Result<()> {
+ self._rt.block_on(self._inner.r#done(_arg_status))
}
}
let wrapped = Wrapper { _inner: inner, _rt: rt };
@@ -286,12 +286,12 @@ pub mod ICallback {
}
}
pub trait ICallbackDefault: Send + Sync {
- fn done(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status) -> binder::Result<()> {
+ fn r#done(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status) -> binder::Result<()> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
}
pub mod transactions {
- pub const done: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 0;
+ pub const r#done: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 0;
}
pub type ICallbackDefaultRef = Option<std::sync::Arc<dyn ICallbackDefault>>;
use lazy_static::lazy_static;
@@ -307,7 +307,7 @@ pub mod ICallback {
fn read_response_done(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<()> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as ICallback>::getDefaultImpl() {
- return _aidl_default_impl.done(_arg_status);
+ return _aidl_default_impl.r#done(_arg_status);
}
}
let _aidl_reply = _aidl_reply?;
@@ -317,21 +317,21 @@ pub mod ICallback {
}
}
impl ICallback for BpCallback {
- fn done(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status) -> binder::Result<()> {
+ fn r#done(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status) -> binder::Result<()> {
let _aidl_data = self.build_parcel_done(_arg_status)?;
- let _aidl_reply = self.binder.submit_transact(transactions::done, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#done, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_done(_arg_status, _aidl_reply)
}
}
impl<P: binder::BinderAsyncPool> ICallbackAsync<P> for BpCallback {
- fn done<'a>(&'a self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status) -> binder::BoxFuture<'a, binder::Result<()>> {
+ fn r#done<'a>(&'a self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status) -> binder::BoxFuture<'a, binder::Result<()>> {
let _aidl_data = match self.build_parcel_done(_arg_status) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::done, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#done, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_done(_arg_status, _aidl_reply)
}
@@ -339,13 +339,13 @@ pub mod ICallback {
}
}
impl ICallback for binder::binder_impl::Binder<BnCallback> {
- fn done(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status) -> binder::Result<()> { self.0.done(_arg_status) }
+ fn r#done(&self, _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status) -> binder::Result<()> { self.0.r#done(_arg_status) }
}
fn on_transact(_aidl_service: &dyn ICallback, _aidl_code: binder::binder_impl::TransactionCode, _aidl_data: &binder::binder_impl::BorrowedParcel<'_>, _aidl_reply: &mut binder::binder_impl::BorrowedParcel<'_>) -> std::result::Result<(), binder::StatusCode> {
match _aidl_code {
- transactions::done => {
+ transactions::r#done => {
let _arg_status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status = _aidl_data.read()?;
- let _aidl_return = _aidl_service.done(_arg_status);
+ let _aidl_return = _aidl_service.r#done(_arg_status);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -359,7 +359,7 @@ pub mod ICallback {
}
}
pub(crate) mod mangled {
- pub use super::INestedService as _7_android_4_aidl_5_tests_6_nested_14_INestedService;
- pub use super::Result::Result as _7_android_4_aidl_5_tests_6_nested_14_INestedService_6_Result;
- pub use super::ICallback::ICallback as _7_android_4_aidl_5_tests_6_nested_14_INestedService_9_ICallback;
+ pub use super::r#INestedService as _7_android_4_aidl_5_tests_6_nested_14_INestedService;
+ pub use super::r#Result::r#Result as _7_android_4_aidl_5_tests_6_nested_14_INestedService_6_Result;
+ pub use super::r#ICallback::r#ICallback as _7_android_4_aidl_5_tests_6_nested_14_INestedService_9_ICallback;
}
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/nested/ParcelableWithNested.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/nested/ParcelableWithNested.rs
index d160d8b3..4cff721c 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/nested/ParcelableWithNested.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/nested/ParcelableWithNested.rs
@@ -1,48 +1,48 @@
#![forbid(unsafe_code)]
#![rustfmt::skip]
#[derive(Debug)]
-pub struct ParcelableWithNested {
- pub status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status,
+pub struct r#ParcelableWithNested {
+ pub r#status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status,
}
-impl Default for ParcelableWithNested {
+impl Default for r#ParcelableWithNested {
fn default() -> Self {
Self {
- status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status::OK,
+ r#status: crate::mangled::_7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status::OK,
}
}
}
-impl binder::Parcelable for ParcelableWithNested {
+impl binder::Parcelable for r#ParcelableWithNested {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_write(|subparcel| {
- subparcel.write(&self.status)?;
+ subparcel.write(&self.r#status)?;
Ok(())
})
}
fn read_from_parcel(&mut self, parcel: &binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_read(|subparcel| {
if subparcel.has_more_data() {
- self.status = subparcel.read()?;
+ self.r#status = subparcel.read()?;
}
Ok(())
})
}
}
-binder::impl_serialize_for_parcelable!(ParcelableWithNested);
-binder::impl_deserialize_for_parcelable!(ParcelableWithNested);
-impl binder::binder_impl::ParcelableMetadata for ParcelableWithNested {
+binder::impl_serialize_for_parcelable!(r#ParcelableWithNested);
+binder::impl_deserialize_for_parcelable!(r#ParcelableWithNested);
+impl binder::binder_impl::ParcelableMetadata for r#ParcelableWithNested {
fn get_descriptor() -> &'static str { "android.aidl.tests.nested.ParcelableWithNested" }
}
-pub mod Status {
+pub mod r#Status {
#![allow(non_upper_case_globals)]
use binder::declare_binder_enum;
declare_binder_enum! {
- Status : [i8; 2] {
- OK = 0,
- NOT_OK = 1,
+ r#Status : [i8; 2] {
+ r#OK = 0,
+ r#NOT_OK = 1,
}
}
}
pub(crate) mod mangled {
- pub use super::ParcelableWithNested as _7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested;
- pub use super::Status::Status as _7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status;
+ pub use super::r#ParcelableWithNested as _7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested;
+ pub use super::r#Status::r#Status as _7_android_4_aidl_5_tests_6_nested_20_ParcelableWithNested_6_Status;
}
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/unions/EnumUnion.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/unions/EnumUnion.rs
index 6f26dcc9..dbec3386 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/unions/EnumUnion.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/unions/EnumUnion.rs
@@ -1,18 +1,18 @@
#![forbid(unsafe_code)]
#![rustfmt::skip]
#[derive(Debug, Clone, PartialEq)]
-pub enum EnumUnion {
+pub enum r#EnumUnion {
IntEnum(crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum),
LongEnum(crate::mangled::_7_android_4_aidl_5_tests_8_LongEnum),
#[deprecated = "do not use this"]
DeprecatedField(i32),
}
-impl Default for EnumUnion {
+impl Default for r#EnumUnion {
fn default() -> Self {
Self::IntEnum(crate::mangled::_7_android_4_aidl_5_tests_7_IntEnum::FOO)
}
}
-impl binder::Parcelable for EnumUnion {
+impl binder::Parcelable for r#EnumUnion {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
match self {
Self::IntEnum(v) => {
@@ -53,24 +53,24 @@ impl binder::Parcelable for EnumUnion {
}
}
}
-binder::impl_serialize_for_parcelable!(EnumUnion);
-binder::impl_deserialize_for_parcelable!(EnumUnion);
-impl binder::binder_impl::ParcelableMetadata for EnumUnion {
+binder::impl_serialize_for_parcelable!(r#EnumUnion);
+binder::impl_deserialize_for_parcelable!(r#EnumUnion);
+impl binder::binder_impl::ParcelableMetadata for r#EnumUnion {
fn get_descriptor() -> &'static str { "android.aidl.tests.unions.EnumUnion" }
}
-pub mod Tag {
+pub mod r#Tag {
#![allow(non_upper_case_globals)]
use binder::declare_binder_enum;
declare_binder_enum! {
- Tag : [i32; 3] {
- intEnum = 0,
- longEnum = 1,
+ r#Tag : [i32; 3] {
+ r#intEnum = 0,
+ r#longEnum = 1,
#[deprecated = "do not use this"]
- deprecatedField = 2,
+ r#deprecatedField = 2,
}
}
}
pub(crate) mod mangled {
- pub use super::EnumUnion as _7_android_4_aidl_5_tests_6_unions_9_EnumUnion;
- pub use super::Tag::Tag as _7_android_4_aidl_5_tests_6_unions_9_EnumUnion_3_Tag;
+ pub use super::r#EnumUnion as _7_android_4_aidl_5_tests_6_unions_9_EnumUnion;
+ pub use super::r#Tag::r#Tag as _7_android_4_aidl_5_tests_6_unions_9_EnumUnion_3_Tag;
}
diff --git a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/unions/UnionInUnion.rs b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/unions/UnionInUnion.rs
index 511f44cf..cfc7372d 100644
--- a/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/unions/UnionInUnion.rs
+++ b/tests/golden_output/aidl-test-interface-rust-source/gen/android/aidl/tests/unions/UnionInUnion.rs
@@ -1,16 +1,16 @@
#![forbid(unsafe_code)]
#![rustfmt::skip]
#[derive(Debug, Clone, PartialEq)]
-pub enum UnionInUnion {
+pub enum r#UnionInUnion {
First(crate::mangled::_7_android_4_aidl_5_tests_6_unions_9_EnumUnion),
Second(i32),
}
-impl Default for UnionInUnion {
+impl Default for r#UnionInUnion {
fn default() -> Self {
Self::First(Default::default())
}
}
-impl binder::Parcelable for UnionInUnion {
+impl binder::Parcelable for r#UnionInUnion {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
match self {
Self::First(v) => {
@@ -42,22 +42,22 @@ impl binder::Parcelable for UnionInUnion {
}
}
}
-binder::impl_serialize_for_parcelable!(UnionInUnion);
-binder::impl_deserialize_for_parcelable!(UnionInUnion);
-impl binder::binder_impl::ParcelableMetadata for UnionInUnion {
+binder::impl_serialize_for_parcelable!(r#UnionInUnion);
+binder::impl_deserialize_for_parcelable!(r#UnionInUnion);
+impl binder::binder_impl::ParcelableMetadata for r#UnionInUnion {
fn get_descriptor() -> &'static str { "android.aidl.tests.unions.UnionInUnion" }
}
-pub mod Tag {
+pub mod r#Tag {
#![allow(non_upper_case_globals)]
use binder::declare_binder_enum;
declare_binder_enum! {
- Tag : [i32; 2] {
- first = 0,
- second = 1,
+ r#Tag : [i32; 2] {
+ r#first = 0,
+ r#second = 1,
}
}
}
pub(crate) mod mangled {
- pub use super::UnionInUnion as _7_android_4_aidl_5_tests_6_unions_12_UnionInUnion;
- pub use super::Tag::Tag as _7_android_4_aidl_5_tests_6_unions_12_UnionInUnion_3_Tag;
+ pub use super::r#UnionInUnion as _7_android_4_aidl_5_tests_6_unions_12_UnionInUnion;
+ pub use super::r#Tag::r#Tag as _7_android_4_aidl_5_tests_6_unions_12_UnionInUnion_3_Tag;
}
diff --git a/tests/golden_output/aidl-test-versioned-interface-V1-cpp-source/gen/android/aidl/versioned/tests/Foo.cpp b/tests/golden_output/aidl-test-versioned-interface-V1-cpp-source/gen/android/aidl/versioned/tests/Foo.cpp
index 6b93e9f7..b2646eca 100644
--- a/tests/golden_output/aidl-test-versioned-interface-V1-cpp-source/gen/android/aidl/versioned/tests/Foo.cpp
+++ b/tests/golden_output/aidl-test-versioned-interface-V1-cpp-source/gen/android/aidl/versioned/tests/Foo.cpp
@@ -14,7 +14,7 @@ namespace tests {
}
if (_aidl_parcelable_raw_size < 4) return ::android::BAD_VALUE;
size_t _aidl_parcelable_size = static_cast<size_t>(_aidl_parcelable_raw_size);
- if (_aidl_start_pos > SIZE_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
+ if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
_aidl_parcel->setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
return _aidl_ret_status;
}
diff --git a/tests/golden_output/aidl-test-versioned-interface-V1-cpp-source/gen/android/aidl/versioned/tests/IFooInterface.cpp b/tests/golden_output/aidl-test-versioned-interface-V1-cpp-source/gen/android/aidl/versioned/tests/IFooInterface.cpp
index a3aea73b..b53f6b58 100644
--- a/tests/golden_output/aidl-test-versioned-interface-V1-cpp-source/gen/android/aidl/versioned/tests/IFooInterface.cpp
+++ b/tests/golden_output/aidl-test-versioned-interface-V1-cpp-source/gen/android/aidl/versioned/tests/IFooInterface.cpp
@@ -29,6 +29,7 @@ BpFooInterface::BpFooInterface(const ::android::sp<::android::IBinder>& _aidl_im
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::IFooInterface::originalApi::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -58,6 +59,7 @@ BpFooInterface::BpFooInterface(const ::android::sp<::android::IBinder>& _aidl_im
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::IFooInterface::acceptUnionAndReturnString::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -95,6 +97,7 @@ BpFooInterface::BpFooInterface(const ::android::sp<::android::IBinder>& _aidl_im
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::IFooInterface::ignoreParcelablesAndRepeatInt::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -148,6 +151,7 @@ BpFooInterface::BpFooInterface(const ::android::sp<::android::IBinder>& _aidl_im
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::IFooInterface::returnsLengthOfFooArray::cppClient");
_aidl_ret_status = _aidl_data.writeInterfaceToken(getInterfaceDescriptor());
if (((_aidl_ret_status) != (::android::OK))) {
goto _aidl_error;
@@ -242,6 +246,7 @@ BnFooInterface::BnFooInterface()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::IFooInterface::originalApi::cppServer");
::android::binder::Status _aidl_status(originalApi());
_aidl_ret_status = _aidl_status.writeToParcel(_aidl_reply);
if (((_aidl_ret_status) != (::android::OK))) {
@@ -260,6 +265,7 @@ BnFooInterface::BnFooInterface()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::IFooInterface::acceptUnionAndReturnString::cppServer");
_aidl_ret_status = _aidl_data.readParcelable(&in_u);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -293,6 +299,7 @@ BnFooInterface::BnFooInterface()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::IFooInterface::ignoreParcelablesAndRepeatInt::cppServer");
_aidl_ret_status = _aidl_data.readParcelable(&in_inFoo);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -339,6 +346,7 @@ BnFooInterface::BnFooInterface()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::IFooInterface::returnsLengthOfFooArray::cppServer");
_aidl_ret_status = _aidl_data.readParcelableVector(&in_foos);
if (((_aidl_ret_status) != (::android::OK))) {
break;
diff --git a/tests/golden_output/aidl-test-versioned-interface-V1-cpp-source/gen/include/android/aidl/versioned/tests/BazUnion.h b/tests/golden_output/aidl-test-versioned-interface-V1-cpp-source/gen/include/android/aidl/versioned/tests/BazUnion.h
index 25e0d16b..6d14f9cc 100644
--- a/tests/golden_output/aidl-test-versioned-interface-V1-cpp-source/gen/include/android/aidl/versioned/tests/BazUnion.h
+++ b/tests/golden_output/aidl-test-versioned-interface-V1-cpp-source/gen/include/android/aidl/versioned/tests/BazUnion.h
@@ -96,8 +96,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.versioned.tests.BazUnion");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.versioned.tests.BazUnion");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
diff --git a/tests/golden_output/aidl-test-versioned-interface-V1-cpp-source/gen/include/android/aidl/versioned/tests/BnFooInterface.h b/tests/golden_output/aidl-test-versioned-interface-V1-cpp-source/gen/include/android/aidl/versioned/tests/BnFooInterface.h
index 2fc55940..606866ba 100644
--- a/tests/golden_output/aidl-test-versioned-interface-V1-cpp-source/gen/include/android/aidl/versioned/tests/BnFooInterface.h
+++ b/tests/golden_output/aidl-test-versioned-interface-V1-cpp-source/gen/include/android/aidl/versioned/tests/BnFooInterface.h
@@ -2,6 +2,9 @@
#include <binder/IInterface.h>
#include <android/aidl/versioned/tests/IFooInterface.h>
+#include <android/aidl/versioned/tests/BnFooInterface.h>
+#include <binder/Delegate.h>
+
namespace android {
namespace aidl {
@@ -23,8 +26,9 @@ public:
class IFooInterfaceDelegator : public BnFooInterface {
public:
- explicit IFooInterfaceDelegator(::android::sp<IFooInterface> &impl) : _aidl_delegate(impl) {}
+ explicit IFooInterfaceDelegator(const ::android::sp<IFooInterface> &impl) : _aidl_delegate(impl) {}
+ ::android::sp<IFooInterface> getImpl() { return _aidl_delegate; }
::android::binder::Status originalApi() override {
return _aidl_delegate->originalApi();
}
diff --git a/tests/golden_output/aidl-test-versioned-interface-V1-cpp-source/gen/include/android/aidl/versioned/tests/Foo.h b/tests/golden_output/aidl-test-versioned-interface-V1-cpp-source/gen/include/android/aidl/versioned/tests/Foo.h
index 951277eb..983dd7fe 100644
--- a/tests/golden_output/aidl-test-versioned-interface-V1-cpp-source/gen/include/android/aidl/versioned/tests/Foo.h
+++ b/tests/golden_output/aidl-test-versioned-interface-V1-cpp-source/gen/include/android/aidl/versioned/tests/Foo.h
@@ -34,8 +34,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.versioned.tests.Foo");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.versioned.tests.Foo");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
diff --git a/tests/golden_output/aidl-test-versioned-interface-V1-cpp-source/gen/include/android/aidl/versioned/tests/IFooInterface.h b/tests/golden_output/aidl-test-versioned-interface-V1-cpp-source/gen/include/android/aidl/versioned/tests/IFooInterface.h
index ea7e3443..0ed26cb9 100644
--- a/tests/golden_output/aidl-test-versioned-interface-V1-cpp-source/gen/include/android/aidl/versioned/tests/IFooInterface.h
+++ b/tests/golden_output/aidl-test-versioned-interface-V1-cpp-source/gen/include/android/aidl/versioned/tests/IFooInterface.h
@@ -5,18 +5,25 @@
#include <binder/IBinder.h>
#include <binder/IInterface.h>
#include <binder/Status.h>
+#include <binder/Trace.h>
#include <cstdint>
#include <string>
#include <utils/String16.h>
#include <utils/StrongPointer.h>
#include <vector>
+namespace android::aidl::versioned::tests {
+class Foo;
+} // namespace android::aidl::versioned::tests
namespace android {
namespace aidl {
namespace versioned {
namespace tests {
+class IFooInterfaceDelegator;
+
class IFooInterface : public ::android::IInterface {
public:
+ typedef IFooInterfaceDelegator DefaultDelegator;
DECLARE_META_INTERFACE(FooInterface)
const int32_t VERSION = 1;
const std::string HASH = "9e7be1859820c59d9d55dd133e71a3687b5d2e5b";
diff --git a/tests/golden_output/aidl-test-versioned-interface-V1-ndk-source/gen/include/aidl/android/aidl/versioned/tests/IFooInterface.h b/tests/golden_output/aidl-test-versioned-interface-V1-ndk-source/gen/include/aidl/android/aidl/versioned/tests/IFooInterface.h
index 82c80b97..6e426884 100644
--- a/tests/golden_output/aidl-test-versioned-interface-V1-ndk-source/gen/include/aidl/android/aidl/versioned/tests/IFooInterface.h
+++ b/tests/golden_output/aidl-test-versioned-interface-V1-ndk-source/gen/include/aidl/android/aidl/versioned/tests/IFooInterface.h
@@ -12,13 +12,19 @@
#include <android/binder_stability.h>
#endif // BINDER_STABILITY_SUPPORT
+namespace aidl::android::aidl::versioned::tests {
+class Foo;
+} // namespace aidl::android::aidl::versioned::tests
namespace aidl {
namespace android {
namespace aidl {
namespace versioned {
namespace tests {
+class IFooInterfaceDelegator;
+
class IFooInterface : public ::ndk::ICInterface {
public:
+ typedef IFooInterfaceDelegator DefaultDelegator;
static const char* descriptor;
IFooInterface();
virtual ~IFooInterface();
diff --git a/tests/golden_output/aidl-test-versioned-interface-V1-rust-source/gen/android/aidl/versioned/tests/BazUnion.rs b/tests/golden_output/aidl-test-versioned-interface-V1-rust-source/gen/android/aidl/versioned/tests/BazUnion.rs
index b60ff889..267922b4 100644
--- a/tests/golden_output/aidl-test-versioned-interface-V1-rust-source/gen/android/aidl/versioned/tests/BazUnion.rs
+++ b/tests/golden_output/aidl-test-versioned-interface-V1-rust-source/gen/android/aidl/versioned/tests/BazUnion.rs
@@ -1,15 +1,15 @@
#![forbid(unsafe_code)]
#![rustfmt::skip]
#[derive(Debug)]
-pub enum BazUnion {
+pub enum r#BazUnion {
IntNum(i32),
}
-impl Default for BazUnion {
+impl Default for r#BazUnion {
fn default() -> Self {
Self::IntNum(0)
}
}
-impl binder::Parcelable for BazUnion {
+impl binder::Parcelable for r#BazUnion {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
match self {
Self::IntNum(v) => {
@@ -32,21 +32,21 @@ impl binder::Parcelable for BazUnion {
}
}
}
-binder::impl_serialize_for_parcelable!(BazUnion);
-binder::impl_deserialize_for_parcelable!(BazUnion);
-impl binder::binder_impl::ParcelableMetadata for BazUnion {
+binder::impl_serialize_for_parcelable!(r#BazUnion);
+binder::impl_deserialize_for_parcelable!(r#BazUnion);
+impl binder::binder_impl::ParcelableMetadata for r#BazUnion {
fn get_descriptor() -> &'static str { "android.aidl.versioned.tests.BazUnion" }
}
-pub mod Tag {
+pub mod r#Tag {
#![allow(non_upper_case_globals)]
use binder::declare_binder_enum;
declare_binder_enum! {
- Tag : [i32; 1] {
- intNum = 0,
+ r#Tag : [i32; 1] {
+ r#intNum = 0,
}
}
}
pub(crate) mod mangled {
- pub use super::BazUnion as _7_android_4_aidl_9_versioned_5_tests_8_BazUnion;
- pub use super::Tag::Tag as _7_android_4_aidl_9_versioned_5_tests_8_BazUnion_3_Tag;
+ pub use super::r#BazUnion as _7_android_4_aidl_9_versioned_5_tests_8_BazUnion;
+ pub use super::r#Tag::r#Tag as _7_android_4_aidl_9_versioned_5_tests_8_BazUnion_3_Tag;
}
diff --git a/tests/golden_output/aidl-test-versioned-interface-V1-rust-source/gen/android/aidl/versioned/tests/Foo.rs b/tests/golden_output/aidl-test-versioned-interface-V1-rust-source/gen/android/aidl/versioned/tests/Foo.rs
index 30926b7c..4c5e4933 100644
--- a/tests/golden_output/aidl-test-versioned-interface-V1-rust-source/gen/android/aidl/versioned/tests/Foo.rs
+++ b/tests/golden_output/aidl-test-versioned-interface-V1-rust-source/gen/android/aidl/versioned/tests/Foo.rs
@@ -1,15 +1,15 @@
#![forbid(unsafe_code)]
#![rustfmt::skip]
#[derive(Debug)]
-pub struct Foo {
+pub struct r#Foo {
}
-impl Default for Foo {
+impl Default for r#Foo {
fn default() -> Self {
Self {
}
}
}
-impl binder::Parcelable for Foo {
+impl binder::Parcelable for r#Foo {
fn write_to_parcel(&self, parcel: &mut binder::binder_impl::BorrowedParcel) -> std::result::Result<(), binder::StatusCode> {
parcel.sized_write(|subparcel| {
Ok(())
@@ -21,11 +21,11 @@ impl binder::Parcelable for Foo {
})
}
}
-binder::impl_serialize_for_parcelable!(Foo);
-binder::impl_deserialize_for_parcelable!(Foo);
-impl binder::binder_impl::ParcelableMetadata for Foo {
+binder::impl_serialize_for_parcelable!(r#Foo);
+binder::impl_deserialize_for_parcelable!(r#Foo);
+impl binder::binder_impl::ParcelableMetadata for r#Foo {
fn get_descriptor() -> &'static str { "android.aidl.versioned.tests.Foo" }
}
pub(crate) mod mangled {
- pub use super::Foo as _7_android_4_aidl_9_versioned_5_tests_3_Foo;
+ pub use super::r#Foo as _7_android_4_aidl_9_versioned_5_tests_3_Foo;
}
diff --git a/tests/golden_output/aidl-test-versioned-interface-V1-rust-source/gen/android/aidl/versioned/tests/IFooInterface.rs b/tests/golden_output/aidl-test-versioned-interface-V1-rust-source/gen/android/aidl/versioned/tests/IFooInterface.rs
index 9898f1e0..1395a779 100644
--- a/tests/golden_output/aidl-test-versioned-interface-V1-rust-source/gen/android/aidl/versioned/tests/IFooInterface.rs
+++ b/tests/golden_output/aidl-test-versioned-interface-V1-rust-source/gen/android/aidl/versioned/tests/IFooInterface.rs
@@ -16,14 +16,14 @@ declare_binder_interface! {
}
pub trait IFooInterface: binder::Interface + Send {
fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.versioned.tests.IFooInterface" }
- fn originalApi(&self) -> binder::Result<()>;
- fn acceptUnionAndReturnString(&self, _arg_u: &crate::mangled::_7_android_4_aidl_9_versioned_5_tests_8_BazUnion) -> binder::Result<String>;
- fn ignoreParcelablesAndRepeatInt(&self, _arg_inFoo: &crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_inoutFoo: &mut crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_outFoo: &mut crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_value: i32) -> binder::Result<i32>;
- fn returnsLengthOfFooArray(&self, _arg_foos: &[crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo]) -> binder::Result<i32>;
- fn getInterfaceVersion(&self) -> binder::Result<i32> {
+ fn r#originalApi(&self) -> binder::Result<()>;
+ fn r#acceptUnionAndReturnString(&self, _arg_u: &crate::mangled::_7_android_4_aidl_9_versioned_5_tests_8_BazUnion) -> binder::Result<String>;
+ fn r#ignoreParcelablesAndRepeatInt(&self, _arg_inFoo: &crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_inoutFoo: &mut crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_outFoo: &mut crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_value: i32) -> binder::Result<i32>;
+ fn r#returnsLengthOfFooArray(&self, _arg_foos: &[crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo]) -> binder::Result<i32>;
+ fn r#getInterfaceVersion(&self) -> binder::Result<i32> {
Ok(VERSION)
}
- fn getInterfaceHash(&self) -> binder::Result<String> {
+ fn r#getInterfaceHash(&self) -> binder::Result<String> {
Ok(HASH.into())
}
fn getDefaultImpl() -> IFooInterfaceDefaultRef where Self: Sized {
@@ -35,24 +35,24 @@ pub trait IFooInterface: binder::Interface + Send {
}
pub trait IFooInterfaceAsync<P>: binder::Interface + Send {
fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.versioned.tests.IFooInterface" }
- fn originalApi<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<()>>;
- fn acceptUnionAndReturnString<'a>(&'a self, _arg_u: &'a crate::mangled::_7_android_4_aidl_9_versioned_5_tests_8_BazUnion) -> binder::BoxFuture<'a, binder::Result<String>>;
- fn ignoreParcelablesAndRepeatInt<'a>(&'a self, _arg_inFoo: &'a crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_inoutFoo: &'a mut crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_outFoo: &'a mut crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_value: i32) -> binder::BoxFuture<'a, binder::Result<i32>>;
- fn returnsLengthOfFooArray<'a>(&'a self, _arg_foos: &'a [crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo]) -> binder::BoxFuture<'a, binder::Result<i32>>;
- fn getInterfaceVersion<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<i32>> {
+ fn r#originalApi<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<()>>;
+ fn r#acceptUnionAndReturnString<'a>(&'a self, _arg_u: &'a crate::mangled::_7_android_4_aidl_9_versioned_5_tests_8_BazUnion) -> binder::BoxFuture<'a, binder::Result<String>>;
+ fn r#ignoreParcelablesAndRepeatInt<'a>(&'a self, _arg_inFoo: &'a crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_inoutFoo: &'a mut crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_outFoo: &'a mut crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_value: i32) -> binder::BoxFuture<'a, binder::Result<i32>>;
+ fn r#returnsLengthOfFooArray<'a>(&'a self, _arg_foos: &'a [crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo]) -> binder::BoxFuture<'a, binder::Result<i32>>;
+ fn r#getInterfaceVersion<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<i32>> {
Box::pin(async move { Ok(VERSION) })
}
- fn getInterfaceHash<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<String>> {
+ fn r#getInterfaceHash<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<String>> {
Box::pin(async move { Ok(HASH.into()) })
}
}
#[::async_trait::async_trait]
pub trait IFooInterfaceAsyncServer: binder::Interface + Send {
fn get_descriptor() -> &'static str where Self: Sized { "android.aidl.versioned.tests.IFooInterface" }
- async fn originalApi(&self) -> binder::Result<()>;
- async fn acceptUnionAndReturnString(&self, _arg_u: &crate::mangled::_7_android_4_aidl_9_versioned_5_tests_8_BazUnion) -> binder::Result<String>;
- async fn ignoreParcelablesAndRepeatInt(&self, _arg_inFoo: &crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_inoutFoo: &mut crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_outFoo: &mut crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_value: i32) -> binder::Result<i32>;
- async fn returnsLengthOfFooArray(&self, _arg_foos: &[crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo]) -> binder::Result<i32>;
+ async fn r#originalApi(&self) -> binder::Result<()>;
+ async fn r#acceptUnionAndReturnString(&self, _arg_u: &crate::mangled::_7_android_4_aidl_9_versioned_5_tests_8_BazUnion) -> binder::Result<String>;
+ async fn r#ignoreParcelablesAndRepeatInt(&self, _arg_inFoo: &crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_inoutFoo: &mut crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_outFoo: &mut crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_value: i32) -> binder::Result<i32>;
+ async fn r#returnsLengthOfFooArray(&self, _arg_foos: &[crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo]) -> binder::Result<i32>;
}
impl BnFooInterface {
/// Create a new async binder service.
@@ -74,17 +74,17 @@ impl BnFooInterface {
T: IFooInterfaceAsyncServer + Send + Sync + 'static,
R: binder::binder_impl::BinderAsyncRuntime + Send + Sync + 'static,
{
- fn originalApi(&self) -> binder::Result<()> {
- self._rt.block_on(self._inner.originalApi())
+ fn r#originalApi(&self) -> binder::Result<()> {
+ self._rt.block_on(self._inner.r#originalApi())
}
- fn acceptUnionAndReturnString(&self, _arg_u: &crate::mangled::_7_android_4_aidl_9_versioned_5_tests_8_BazUnion) -> binder::Result<String> {
- self._rt.block_on(self._inner.acceptUnionAndReturnString(_arg_u))
+ fn r#acceptUnionAndReturnString(&self, _arg_u: &crate::mangled::_7_android_4_aidl_9_versioned_5_tests_8_BazUnion) -> binder::Result<String> {
+ self._rt.block_on(self._inner.r#acceptUnionAndReturnString(_arg_u))
}
- fn ignoreParcelablesAndRepeatInt(&self, _arg_inFoo: &crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_inoutFoo: &mut crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_outFoo: &mut crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_value: i32) -> binder::Result<i32> {
- self._rt.block_on(self._inner.ignoreParcelablesAndRepeatInt(_arg_inFoo, _arg_inoutFoo, _arg_outFoo, _arg_value))
+ fn r#ignoreParcelablesAndRepeatInt(&self, _arg_inFoo: &crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_inoutFoo: &mut crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_outFoo: &mut crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_value: i32) -> binder::Result<i32> {
+ self._rt.block_on(self._inner.r#ignoreParcelablesAndRepeatInt(_arg_inFoo, _arg_inoutFoo, _arg_outFoo, _arg_value))
}
- fn returnsLengthOfFooArray(&self, _arg_foos: &[crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo]) -> binder::Result<i32> {
- self._rt.block_on(self._inner.returnsLengthOfFooArray(_arg_foos))
+ fn r#returnsLengthOfFooArray(&self, _arg_foos: &[crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo]) -> binder::Result<i32> {
+ self._rt.block_on(self._inner.r#returnsLengthOfFooArray(_arg_foos))
}
}
let wrapped = Wrapper { _inner: inner, _rt: rt };
@@ -92,26 +92,26 @@ impl BnFooInterface {
}
}
pub trait IFooInterfaceDefault: Send + Sync {
- fn originalApi(&self) -> binder::Result<()> {
+ fn r#originalApi(&self) -> binder::Result<()> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn acceptUnionAndReturnString(&self, _arg_u: &crate::mangled::_7_android_4_aidl_9_versioned_5_tests_8_BazUnion) -> binder::Result<String> {
+ fn r#acceptUnionAndReturnString(&self, _arg_u: &crate::mangled::_7_android_4_aidl_9_versioned_5_tests_8_BazUnion) -> binder::Result<String> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn ignoreParcelablesAndRepeatInt(&self, _arg_inFoo: &crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_inoutFoo: &mut crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_outFoo: &mut crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_value: i32) -> binder::Result<i32> {
+ fn r#ignoreParcelablesAndRepeatInt(&self, _arg_inFoo: &crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_inoutFoo: &mut crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_outFoo: &mut crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_value: i32) -> binder::Result<i32> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
- fn returnsLengthOfFooArray(&self, _arg_foos: &[crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo]) -> binder::Result<i32> {
+ fn r#returnsLengthOfFooArray(&self, _arg_foos: &[crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo]) -> binder::Result<i32> {
Err(binder::StatusCode::UNKNOWN_TRANSACTION.into())
}
}
pub mod transactions {
- pub const originalApi: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 0;
- pub const acceptUnionAndReturnString: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 1;
- pub const ignoreParcelablesAndRepeatInt: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 2;
- pub const returnsLengthOfFooArray: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 3;
- pub const getInterfaceVersion: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 16777214;
- pub const getInterfaceHash: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 16777213;
+ pub const r#originalApi: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 0;
+ pub const r#acceptUnionAndReturnString: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 1;
+ pub const r#ignoreParcelablesAndRepeatInt: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 2;
+ pub const r#returnsLengthOfFooArray: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 3;
+ pub const r#getInterfaceVersion: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 16777214;
+ pub const r#getInterfaceHash: binder::binder_impl::TransactionCode = binder::binder_impl::FIRST_CALL_TRANSACTION + 16777213;
}
pub type IFooInterfaceDefaultRef = Option<std::sync::Arc<dyn IFooInterfaceDefault>>;
use lazy_static::lazy_static;
@@ -128,7 +128,7 @@ impl BpFooInterface {
fn read_response_originalApi(&self, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<()> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as IFooInterface>::getDefaultImpl() {
- return _aidl_default_impl.originalApi();
+ return _aidl_default_impl.r#originalApi();
}
}
let _aidl_reply = _aidl_reply?;
@@ -144,7 +144,7 @@ impl BpFooInterface {
fn read_response_acceptUnionAndReturnString(&self, _arg_u: &crate::mangled::_7_android_4_aidl_9_versioned_5_tests_8_BazUnion, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<String> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as IFooInterface>::getDefaultImpl() {
- return _aidl_default_impl.acceptUnionAndReturnString(_arg_u);
+ return _aidl_default_impl.r#acceptUnionAndReturnString(_arg_u);
}
}
let _aidl_reply = _aidl_reply?;
@@ -163,7 +163,7 @@ impl BpFooInterface {
fn read_response_ignoreParcelablesAndRepeatInt(&self, _arg_inFoo: &crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_inoutFoo: &mut crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_outFoo: &mut crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_value: i32, _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<i32> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as IFooInterface>::getDefaultImpl() {
- return _aidl_default_impl.ignoreParcelablesAndRepeatInt(_arg_inFoo, _arg_inoutFoo, _arg_outFoo, _arg_value);
+ return _aidl_default_impl.r#ignoreParcelablesAndRepeatInt(_arg_inFoo, _arg_inoutFoo, _arg_outFoo, _arg_value);
}
}
let _aidl_reply = _aidl_reply?;
@@ -182,7 +182,7 @@ impl BpFooInterface {
fn read_response_returnsLengthOfFooArray(&self, _arg_foos: &[crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo], _aidl_reply: std::result::Result<binder::binder_impl::Parcel, binder::StatusCode>) -> binder::Result<i32> {
if let Err(binder::StatusCode::UNKNOWN_TRANSACTION) = _aidl_reply {
if let Some(_aidl_default_impl) = <Self as IFooInterface>::getDefaultImpl() {
- return _aidl_default_impl.returnsLengthOfFooArray(_arg_foos);
+ return _aidl_default_impl.r#returnsLengthOfFooArray(_arg_foos);
}
}
let _aidl_reply = _aidl_reply?;
@@ -217,34 +217,34 @@ impl BpFooInterface {
}
}
impl IFooInterface for BpFooInterface {
- fn originalApi(&self) -> binder::Result<()> {
+ fn r#originalApi(&self) -> binder::Result<()> {
let _aidl_data = self.build_parcel_originalApi()?;
- let _aidl_reply = self.binder.submit_transact(transactions::originalApi, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#originalApi, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_originalApi(_aidl_reply)
}
- fn acceptUnionAndReturnString(&self, _arg_u: &crate::mangled::_7_android_4_aidl_9_versioned_5_tests_8_BazUnion) -> binder::Result<String> {
+ fn r#acceptUnionAndReturnString(&self, _arg_u: &crate::mangled::_7_android_4_aidl_9_versioned_5_tests_8_BazUnion) -> binder::Result<String> {
let _aidl_data = self.build_parcel_acceptUnionAndReturnString(_arg_u)?;
- let _aidl_reply = self.binder.submit_transact(transactions::acceptUnionAndReturnString, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#acceptUnionAndReturnString, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_acceptUnionAndReturnString(_arg_u, _aidl_reply)
}
- fn ignoreParcelablesAndRepeatInt(&self, _arg_inFoo: &crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_inoutFoo: &mut crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_outFoo: &mut crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_value: i32) -> binder::Result<i32> {
+ fn r#ignoreParcelablesAndRepeatInt(&self, _arg_inFoo: &crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_inoutFoo: &mut crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_outFoo: &mut crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_value: i32) -> binder::Result<i32> {
let _aidl_data = self.build_parcel_ignoreParcelablesAndRepeatInt(_arg_inFoo, _arg_inoutFoo, _arg_outFoo, _arg_value)?;
- let _aidl_reply = self.binder.submit_transact(transactions::ignoreParcelablesAndRepeatInt, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#ignoreParcelablesAndRepeatInt, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_ignoreParcelablesAndRepeatInt(_arg_inFoo, _arg_inoutFoo, _arg_outFoo, _arg_value, _aidl_reply)
}
- fn returnsLengthOfFooArray(&self, _arg_foos: &[crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo]) -> binder::Result<i32> {
+ fn r#returnsLengthOfFooArray(&self, _arg_foos: &[crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo]) -> binder::Result<i32> {
let _aidl_data = self.build_parcel_returnsLengthOfFooArray(_arg_foos)?;
- let _aidl_reply = self.binder.submit_transact(transactions::returnsLengthOfFooArray, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#returnsLengthOfFooArray, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_returnsLengthOfFooArray(_arg_foos, _aidl_reply)
}
- fn getInterfaceVersion(&self) -> binder::Result<i32> {
+ fn r#getInterfaceVersion(&self) -> binder::Result<i32> {
let _aidl_version = self.cached_version.load(std::sync::atomic::Ordering::Relaxed);
if _aidl_version != -1 { return Ok(_aidl_version); }
let _aidl_data = self.build_parcel_getInterfaceVersion()?;
- let _aidl_reply = self.binder.submit_transact(transactions::getInterfaceVersion, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#getInterfaceVersion, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_getInterfaceVersion(_aidl_reply)
}
- fn getInterfaceHash(&self) -> binder::Result<String> {
+ fn r#getInterfaceHash(&self) -> binder::Result<String> {
{
let _aidl_hash_lock = self.cached_hash.lock().unwrap();
if let Some(ref _aidl_hash) = *_aidl_hash_lock {
@@ -252,64 +252,64 @@ impl IFooInterface for BpFooInterface {
}
}
let _aidl_data = self.build_parcel_getInterfaceHash()?;
- let _aidl_reply = self.binder.submit_transact(transactions::getInterfaceHash, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
+ let _aidl_reply = self.binder.submit_transact(transactions::r#getInterfaceHash, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL);
self.read_response_getInterfaceHash(_aidl_reply)
}
}
impl<P: binder::BinderAsyncPool> IFooInterfaceAsync<P> for BpFooInterface {
- fn originalApi<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<()>> {
+ fn r#originalApi<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<()>> {
let _aidl_data = match self.build_parcel_originalApi() {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::originalApi, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#originalApi, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_originalApi(_aidl_reply)
}
)
}
- fn acceptUnionAndReturnString<'a>(&'a self, _arg_u: &'a crate::mangled::_7_android_4_aidl_9_versioned_5_tests_8_BazUnion) -> binder::BoxFuture<'a, binder::Result<String>> {
+ fn r#acceptUnionAndReturnString<'a>(&'a self, _arg_u: &'a crate::mangled::_7_android_4_aidl_9_versioned_5_tests_8_BazUnion) -> binder::BoxFuture<'a, binder::Result<String>> {
let _aidl_data = match self.build_parcel_acceptUnionAndReturnString(_arg_u) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::acceptUnionAndReturnString, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#acceptUnionAndReturnString, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_acceptUnionAndReturnString(_arg_u, _aidl_reply)
}
)
}
- fn ignoreParcelablesAndRepeatInt<'a>(&'a self, _arg_inFoo: &'a crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_inoutFoo: &'a mut crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_outFoo: &'a mut crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_value: i32) -> binder::BoxFuture<'a, binder::Result<i32>> {
+ fn r#ignoreParcelablesAndRepeatInt<'a>(&'a self, _arg_inFoo: &'a crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_inoutFoo: &'a mut crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_outFoo: &'a mut crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_value: i32) -> binder::BoxFuture<'a, binder::Result<i32>> {
let _aidl_data = match self.build_parcel_ignoreParcelablesAndRepeatInt(_arg_inFoo, _arg_inoutFoo, _arg_outFoo, _arg_value) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::ignoreParcelablesAndRepeatInt, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#ignoreParcelablesAndRepeatInt, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_ignoreParcelablesAndRepeatInt(_arg_inFoo, _arg_inoutFoo, _arg_outFoo, _arg_value, _aidl_reply)
}
)
}
- fn returnsLengthOfFooArray<'a>(&'a self, _arg_foos: &'a [crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo]) -> binder::BoxFuture<'a, binder::Result<i32>> {
+ fn r#returnsLengthOfFooArray<'a>(&'a self, _arg_foos: &'a [crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo]) -> binder::BoxFuture<'a, binder::Result<i32>> {
let _aidl_data = match self.build_parcel_returnsLengthOfFooArray(_arg_foos) {
Ok(_aidl_data) => _aidl_data,
Err(err) => return Box::pin(std::future::ready(Err(err))),
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::returnsLengthOfFooArray, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#returnsLengthOfFooArray, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_returnsLengthOfFooArray(_arg_foos, _aidl_reply)
}
)
}
- fn getInterfaceVersion<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<i32>> {
+ fn r#getInterfaceVersion<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<i32>> {
let _aidl_version = self.cached_version.load(std::sync::atomic::Ordering::Relaxed);
if _aidl_version != -1 { return Box::pin(std::future::ready(Ok(_aidl_version))); }
let _aidl_data = match self.build_parcel_getInterfaceVersion() {
@@ -318,13 +318,13 @@ impl<P: binder::BinderAsyncPool> IFooInterfaceAsync<P> for BpFooInterface {
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::getInterfaceVersion, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#getInterfaceVersion, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_getInterfaceVersion(_aidl_reply)
}
)
}
- fn getInterfaceHash<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<String>> {
+ fn r#getInterfaceHash<'a>(&'a self) -> binder::BoxFuture<'a, binder::Result<String>> {
{
let _aidl_hash_lock = self.cached_hash.lock().unwrap();
if let Some(ref _aidl_hash) = *_aidl_hash_lock {
@@ -337,7 +337,7 @@ impl<P: binder::BinderAsyncPool> IFooInterfaceAsync<P> for BpFooInterface {
};
let binder = self.binder.clone();
P::spawn(
- move || binder.submit_transact(transactions::getInterfaceHash, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
+ move || binder.submit_transact(transactions::r#getInterfaceHash, _aidl_data, binder::binder_impl::FLAG_PRIVATE_LOCAL),
move |_aidl_reply| async move {
self.read_response_getInterfaceHash(_aidl_reply)
}
@@ -345,17 +345,17 @@ impl<P: binder::BinderAsyncPool> IFooInterfaceAsync<P> for BpFooInterface {
}
}
impl IFooInterface for binder::binder_impl::Binder<BnFooInterface> {
- fn originalApi(&self) -> binder::Result<()> { self.0.originalApi() }
- fn acceptUnionAndReturnString(&self, _arg_u: &crate::mangled::_7_android_4_aidl_9_versioned_5_tests_8_BazUnion) -> binder::Result<String> { self.0.acceptUnionAndReturnString(_arg_u) }
- fn ignoreParcelablesAndRepeatInt(&self, _arg_inFoo: &crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_inoutFoo: &mut crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_outFoo: &mut crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_value: i32) -> binder::Result<i32> { self.0.ignoreParcelablesAndRepeatInt(_arg_inFoo, _arg_inoutFoo, _arg_outFoo, _arg_value) }
- fn returnsLengthOfFooArray(&self, _arg_foos: &[crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo]) -> binder::Result<i32> { self.0.returnsLengthOfFooArray(_arg_foos) }
- fn getInterfaceVersion(&self) -> binder::Result<i32> { self.0.getInterfaceVersion() }
- fn getInterfaceHash(&self) -> binder::Result<String> { self.0.getInterfaceHash() }
+ fn r#originalApi(&self) -> binder::Result<()> { self.0.r#originalApi() }
+ fn r#acceptUnionAndReturnString(&self, _arg_u: &crate::mangled::_7_android_4_aidl_9_versioned_5_tests_8_BazUnion) -> binder::Result<String> { self.0.r#acceptUnionAndReturnString(_arg_u) }
+ fn r#ignoreParcelablesAndRepeatInt(&self, _arg_inFoo: &crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_inoutFoo: &mut crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_outFoo: &mut crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo, _arg_value: i32) -> binder::Result<i32> { self.0.r#ignoreParcelablesAndRepeatInt(_arg_inFoo, _arg_inoutFoo, _arg_outFoo, _arg_value) }
+ fn r#returnsLengthOfFooArray(&self, _arg_foos: &[crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo]) -> binder::Result<i32> { self.0.r#returnsLengthOfFooArray(_arg_foos) }
+ fn r#getInterfaceVersion(&self) -> binder::Result<i32> { self.0.r#getInterfaceVersion() }
+ fn r#getInterfaceHash(&self) -> binder::Result<String> { self.0.r#getInterfaceHash() }
}
fn on_transact(_aidl_service: &dyn IFooInterface, _aidl_code: binder::binder_impl::TransactionCode, _aidl_data: &binder::binder_impl::BorrowedParcel<'_>, _aidl_reply: &mut binder::binder_impl::BorrowedParcel<'_>) -> std::result::Result<(), binder::StatusCode> {
match _aidl_code {
- transactions::originalApi => {
- let _aidl_return = _aidl_service.originalApi();
+ transactions::r#originalApi => {
+ let _aidl_return = _aidl_service.r#originalApi();
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -364,9 +364,9 @@ fn on_transact(_aidl_service: &dyn IFooInterface, _aidl_code: binder::binder_imp
}
Ok(())
}
- transactions::acceptUnionAndReturnString => {
+ transactions::r#acceptUnionAndReturnString => {
let _arg_u: crate::mangled::_7_android_4_aidl_9_versioned_5_tests_8_BazUnion = _aidl_data.read()?;
- let _aidl_return = _aidl_service.acceptUnionAndReturnString(&_arg_u);
+ let _aidl_return = _aidl_service.r#acceptUnionAndReturnString(&_arg_u);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -376,12 +376,12 @@ fn on_transact(_aidl_service: &dyn IFooInterface, _aidl_code: binder::binder_imp
}
Ok(())
}
- transactions::ignoreParcelablesAndRepeatInt => {
+ transactions::r#ignoreParcelablesAndRepeatInt => {
let _arg_inFoo: crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo = _aidl_data.read()?;
let mut _arg_inoutFoo: crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo = _aidl_data.read()?;
let mut _arg_outFoo: crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo = Default::default();
let _arg_value: i32 = _aidl_data.read()?;
- let _aidl_return = _aidl_service.ignoreParcelablesAndRepeatInt(&_arg_inFoo, &mut _arg_inoutFoo, &mut _arg_outFoo, _arg_value);
+ let _aidl_return = _aidl_service.r#ignoreParcelablesAndRepeatInt(&_arg_inFoo, &mut _arg_inoutFoo, &mut _arg_outFoo, _arg_value);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -393,9 +393,9 @@ fn on_transact(_aidl_service: &dyn IFooInterface, _aidl_code: binder::binder_imp
}
Ok(())
}
- transactions::returnsLengthOfFooArray => {
+ transactions::r#returnsLengthOfFooArray => {
let _arg_foos: Vec<crate::mangled::_7_android_4_aidl_9_versioned_5_tests_3_Foo> = _aidl_data.read()?;
- let _aidl_return = _aidl_service.returnsLengthOfFooArray(&_arg_foos);
+ let _aidl_return = _aidl_service.r#returnsLengthOfFooArray(&_arg_foos);
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -405,8 +405,8 @@ fn on_transact(_aidl_service: &dyn IFooInterface, _aidl_code: binder::binder_imp
}
Ok(())
}
- transactions::getInterfaceVersion => {
- let _aidl_return = _aidl_service.getInterfaceVersion();
+ transactions::r#getInterfaceVersion => {
+ let _aidl_return = _aidl_service.r#getInterfaceVersion();
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -416,8 +416,8 @@ fn on_transact(_aidl_service: &dyn IFooInterface, _aidl_code: binder::binder_imp
}
Ok(())
}
- transactions::getInterfaceHash => {
- let _aidl_return = _aidl_service.getInterfaceHash();
+ transactions::r#getInterfaceHash => {
+ let _aidl_return = _aidl_service.r#getInterfaceHash();
match &_aidl_return {
Ok(_aidl_return) => {
_aidl_reply.write(&binder::Status::from(binder::StatusCode::OK))?;
@@ -431,5 +431,5 @@ fn on_transact(_aidl_service: &dyn IFooInterface, _aidl_code: binder::binder_imp
}
}
pub(crate) mod mangled {
- pub use super::IFooInterface as _7_android_4_aidl_9_versioned_5_tests_13_IFooInterface;
+ pub use super::r#IFooInterface as _7_android_4_aidl_9_versioned_5_tests_13_IFooInterface;
}
diff --git a/tests/golden_output/aidl_test_loggable_interface-cpp-source/gen/android/aidl/loggable/Data.cpp b/tests/golden_output/aidl_test_loggable_interface-cpp-source/gen/android/aidl/loggable/Data.cpp
index 5910ede0..108bcba1 100644
--- a/tests/golden_output/aidl_test_loggable_interface-cpp-source/gen/android/aidl/loggable/Data.cpp
+++ b/tests/golden_output/aidl_test_loggable_interface-cpp-source/gen/android/aidl/loggable/Data.cpp
@@ -13,7 +13,7 @@ namespace loggable {
}
if (_aidl_parcelable_raw_size < 4) return ::android::BAD_VALUE;
size_t _aidl_parcelable_size = static_cast<size_t>(_aidl_parcelable_raw_size);
- if (_aidl_start_pos > SIZE_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
+ if (_aidl_start_pos > INT32_MAX - _aidl_parcelable_size) return ::android::BAD_VALUE;
if (_aidl_parcel->dataPosition() - _aidl_start_pos >= _aidl_parcelable_size) {
_aidl_parcel->setDataPosition(_aidl_start_pos + _aidl_parcelable_size);
return _aidl_ret_status;
diff --git a/tests/golden_output/aidl_test_loggable_interface-cpp-source/gen/android/aidl/loggable/ILoggableInterface.cpp b/tests/golden_output/aidl_test_loggable_interface-cpp-source/gen/android/aidl/loggable/ILoggableInterface.cpp
index 676d78a9..01113bf7 100644
--- a/tests/golden_output/aidl_test_loggable_interface-cpp-source/gen/android/aidl/loggable/ILoggableInterface.cpp
+++ b/tests/golden_output/aidl_test_loggable_interface-cpp-source/gen/android/aidl/loggable/ILoggableInterface.cpp
@@ -30,7 +30,7 @@ std::function<void(const BpLoggableInterface::TransactionLog&)> BpLoggableInterf
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
- ::android::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ILoggableInterface::LogThis::cppClient");
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ILoggableInterface::LogThis::cppClient");
BpLoggableInterface::TransactionLog _transaction_log;
if (BpLoggableInterface::logFunc != nullptr) {
_transaction_log.input_args.emplace_back("boolValue", ::android::internal::ToString(boolValue));
@@ -285,7 +285,7 @@ BnLoggableInterface::BnLoggableInterface()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
- ::android::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ILoggableInterface::LogThis::cppServer");
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ILoggableInterface::LogThis::cppServer");
_aidl_ret_status = _aidl_data.readBool(&in_boolValue);
if (((_aidl_ret_status) != (::android::OK))) {
break;
@@ -530,7 +530,7 @@ std::function<void(const ILoggableInterface::BpSub::TransactionLog&)> ILoggableI
::android::Parcel _aidl_reply;
::android::status_t _aidl_ret_status = ::android::OK;
::android::binder::Status _aidl_status;
- ::android::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ISub::Log::cppClient");
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ISub::Log::cppClient");
ILoggableInterface::BpSub::TransactionLog _transaction_log;
if (ILoggableInterface::BpSub::logFunc != nullptr) {
_transaction_log.input_args.emplace_back("value", ::android::internal::ToString(value));
@@ -604,7 +604,7 @@ ILoggableInterface::BnSub::BnSub()
_aidl_ret_status = ::android::BAD_TYPE;
break;
}
- ::android::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ISub::Log::cppServer");
+ ::android::binder::ScopedTrace _aidl_trace(ATRACE_TAG_AIDL, "AIDL::cpp::ISub::Log::cppServer");
_aidl_ret_status = _aidl_data.readInt32(&in_value);
if (((_aidl_ret_status) != (::android::OK))) {
break;
diff --git a/tests/golden_output/aidl_test_loggable_interface-cpp-source/gen/include/android/aidl/loggable/BnLoggableInterface.h b/tests/golden_output/aidl_test_loggable_interface-cpp-source/gen/include/android/aidl/loggable/BnLoggableInterface.h
index 475068e5..46df0810 100644
--- a/tests/golden_output/aidl_test_loggable_interface-cpp-source/gen/include/android/aidl/loggable/BnLoggableInterface.h
+++ b/tests/golden_output/aidl_test_loggable_interface-cpp-source/gen/include/android/aidl/loggable/BnLoggableInterface.h
@@ -4,6 +4,10 @@
#include <android/aidl/loggable/ILoggableInterface.h>
#include <functional>
#include <android/binder_to_string.h>
+#include <android/aidl/loggable/BnLoggableInterface.h>
+#include <android/aidl/loggable/ILoggableInterface.h>
+#include <binder/Delegate.h>
+
namespace android {
namespace aidl {
@@ -32,8 +36,9 @@ public:
class ILoggableInterfaceDelegator : public BnLoggableInterface {
public:
- explicit ILoggableInterfaceDelegator(::android::sp<ILoggableInterface> &impl) : _aidl_delegate(impl) {}
+ explicit ILoggableInterfaceDelegator(const ::android::sp<ILoggableInterface> &impl) : _aidl_delegate(impl) {}
+ ::android::sp<ILoggableInterface> getImpl() { return _aidl_delegate; }
::android::binder::Status LogThis(bool boolValue, ::std::vector<bool>* boolArray, int8_t byteValue, ::std::vector<uint8_t>* byteArray, char16_t charValue, ::std::vector<char16_t>* charArray, int32_t intValue, ::std::vector<int32_t>* intArray, int64_t longValue, ::std::vector<int64_t>* longArray, float floatValue, ::std::vector<float>* floatArray, double doubleValue, ::std::vector<double>* doubleArray, const ::android::String16& stringValue, ::std::vector<::android::String16>* stringArray, ::std::vector<::android::String16>* listValue, const ::android::aidl::loggable::Data& dataValue, const ::android::sp<::android::IBinder>& binderValue, ::std::optional<::android::os::ParcelFileDescriptor>* pfdValue, ::std::vector<::android::os::ParcelFileDescriptor>* pfdArray, ::std::vector<::android::String16>* _aidl_return) override {
return _aidl_delegate->LogThis(boolValue, boolArray, byteValue, byteArray, charValue, charArray, intValue, intArray, longValue, longArray, floatValue, floatArray, doubleValue, doubleArray, stringValue, stringArray, listValue, dataValue, binderValue, pfdValue, pfdArray, _aidl_return);
}
diff --git a/tests/golden_output/aidl_test_loggable_interface-cpp-source/gen/include/android/aidl/loggable/Data.h b/tests/golden_output/aidl_test_loggable_interface-cpp-source/gen/include/android/aidl/loggable/Data.h
index 61b590e3..61d71e0b 100644
--- a/tests/golden_output/aidl_test_loggable_interface-cpp-source/gen/include/android/aidl/loggable/Data.h
+++ b/tests/golden_output/aidl_test_loggable_interface-cpp-source/gen/include/android/aidl/loggable/Data.h
@@ -41,8 +41,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.loggable.Data");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.loggable.Data");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
diff --git a/tests/golden_output/aidl_test_loggable_interface-cpp-source/gen/include/android/aidl/loggable/ILoggableInterface.h b/tests/golden_output/aidl_test_loggable_interface-cpp-source/gen/include/android/aidl/loggable/ILoggableInterface.h
index 2c2cfb93..98527e5a 100644
--- a/tests/golden_output/aidl_test_loggable_interface-cpp-source/gen/include/android/aidl/loggable/ILoggableInterface.h
+++ b/tests/golden_output/aidl_test_loggable_interface-cpp-source/gen/include/android/aidl/loggable/ILoggableInterface.h
@@ -2,26 +2,36 @@
#include <android/aidl/loggable/Data.h>
#include <android/binder_to_string.h>
+#include <binder/Delegate.h>
#include <binder/IBinder.h>
#include <binder/IInterface.h>
#include <binder/ParcelFileDescriptor.h>
#include <binder/Status.h>
+#include <binder/Trace.h>
#include <cstdint>
#include <functional>
#include <optional>
#include <utils/String16.h>
#include <utils/StrongPointer.h>
-#include <utils/Trace.h>
#include <vector>
+namespace android::aidl::loggable {
+class Data;
+} // namespace android::aidl::loggable
namespace android {
namespace aidl {
namespace loggable {
+class ILoggableInterfaceDelegator;
+
class ILoggableInterface : public ::android::IInterface {
public:
+ typedef ILoggableInterfaceDelegator DefaultDelegator;
DECLARE_META_INTERFACE(LoggableInterface)
+ class ISubDelegator;
+
class ISub : public ::android::IInterface {
public:
+ typedef ISubDelegator DefaultDelegator;
DECLARE_META_INTERFACE(Sub)
virtual ::android::binder::Status Log(int32_t value) = 0;
}; // class ISub
@@ -80,8 +90,9 @@ public:
class ISubDelegator : public BnSub {
public:
- explicit ISubDelegator(::android::sp<ISub> &impl) : _aidl_delegate(impl) {}
+ explicit ISubDelegator(const ::android::sp<ISub> &impl) : _aidl_delegate(impl) {}
+ ::android::sp<ISub> getImpl() { return _aidl_delegate; }
::android::binder::Status Log(int32_t value) override {
return _aidl_delegate->Log(value);
}
diff --git a/tests/golden_output/aidl_test_loggable_interface-cpp-source/gen/include/android/aidl/loggable/Union.h b/tests/golden_output/aidl_test_loggable_interface-cpp-source/gen/include/android/aidl/loggable/Union.h
index 9b67e566..903dfb49 100644
--- a/tests/golden_output/aidl_test_loggable_interface-cpp-source/gen/include/android/aidl/loggable/Union.h
+++ b/tests/golden_output/aidl_test_loggable_interface-cpp-source/gen/include/android/aidl/loggable/Union.h
@@ -97,8 +97,8 @@ public:
::android::status_t readFromParcel(const ::android::Parcel* _aidl_parcel) final;
::android::status_t writeToParcel(::android::Parcel* _aidl_parcel) const final;
static const ::android::String16& getParcelableDescriptor() {
- static const ::android::StaticString16 DESCIPTOR (u"android.aidl.loggable.Union");
- return DESCIPTOR;
+ static const ::android::StaticString16 DESCRIPTOR (u"android.aidl.loggable.Union");
+ return DESCRIPTOR;
}
inline std::string toString() const {
std::ostringstream os;
diff --git a/tests/golden_output/aidl_test_loggable_interface-java-source/gen/android/aidl/loggable/ILoggableInterface.java b/tests/golden_output/aidl_test_loggable_interface-java-source/gen/android/aidl/loggable/ILoggableInterface.java
index ee02a617..c8ab851f 100644
--- a/tests/golden_output/aidl_test_loggable_interface-java-source/gen/android/aidl/loggable/ILoggableInterface.java
+++ b/tests/golden_output/aidl_test_loggable_interface-java-source/gen/android/aidl/loggable/ILoggableInterface.java
@@ -43,6 +43,26 @@ public interface ILoggableInterface extends android.os.IInterface
{
return this;
}
+ /** @hide */
+ public static java.lang.String getDefaultTransactionName(int transactionCode)
+ {
+ switch (transactionCode)
+ {
+ case TRANSACTION_LogThis:
+ {
+ return "LogThis";
+ }
+ default:
+ {
+ return null;
+ }
+ }
+ }
+ /** @hide */
+ public java.lang.String getTransactionName(int transactionCode)
+ {
+ return this.getDefaultTransactionName(transactionCode);
+ }
@Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException
{
java.lang.String descriptor = DESCRIPTOR;
@@ -61,69 +81,63 @@ public interface ILoggableInterface extends android.os.IInterface
{
case TRANSACTION_LogThis:
{
- try {
- android.os.Trace.traceBegin(android.os.Trace.TRACE_TAG_AIDL, "AIDL::java::ILoggableInterface::LogThis::server");
- boolean _arg0;
- _arg0 = data.readBoolean();
- boolean[] _arg1;
- _arg1 = data.createBooleanArray();
- byte _arg2;
- _arg2 = data.readByte();
- byte[] _arg3;
- _arg3 = data.createByteArray();
- char _arg4;
- _arg4 = (char)data.readInt();
- char[] _arg5;
- _arg5 = data.createCharArray();
- int _arg6;
- _arg6 = data.readInt();
- int[] _arg7;
- _arg7 = data.createIntArray();
- long _arg8;
- _arg8 = data.readLong();
- long[] _arg9;
- _arg9 = data.createLongArray();
- float _arg10;
- _arg10 = data.readFloat();
- float[] _arg11;
- _arg11 = data.createFloatArray();
- double _arg12;
- _arg12 = data.readDouble();
- double[] _arg13;
- _arg13 = data.createDoubleArray();
- java.lang.String _arg14;
- _arg14 = data.readString();
- java.lang.String[] _arg15;
- _arg15 = data.createStringArray();
- java.util.List<java.lang.String> _arg16;
- _arg16 = data.createStringArrayList();
- android.aidl.loggable.Data _arg17;
- _arg17 = data.readTypedObject(android.aidl.loggable.Data.CREATOR);
- android.os.IBinder _arg18;
- _arg18 = data.readStrongBinder();
- android.os.ParcelFileDescriptor _arg19;
- _arg19 = data.readTypedObject(android.os.ParcelFileDescriptor.CREATOR);
- android.os.ParcelFileDescriptor[] _arg20;
- _arg20 = data.createTypedArray(android.os.ParcelFileDescriptor.CREATOR);
- data.enforceNoDataAvail();
- java.lang.String[] _result = this.LogThis(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11, _arg12, _arg13, _arg14, _arg15, _arg16, _arg17, _arg18, _arg19, _arg20);
- reply.writeNoException();
- reply.writeStringArray(_result);
- reply.writeBooleanArray(_arg1);
- reply.writeByteArray(_arg3);
- reply.writeCharArray(_arg5);
- reply.writeIntArray(_arg7);
- reply.writeLongArray(_arg9);
- reply.writeFloatArray(_arg11);
- reply.writeDoubleArray(_arg13);
- reply.writeStringArray(_arg15);
- reply.writeStringList(_arg16);
- reply.writeTypedObject(_arg19, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
- reply.writeTypedArray(_arg20, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
- }
- finally {
- android.os.Trace.traceEnd(android.os.Trace.TRACE_TAG_AIDL);
- }
+ boolean _arg0;
+ _arg0 = data.readBoolean();
+ boolean[] _arg1;
+ _arg1 = data.createBooleanArray();
+ byte _arg2;
+ _arg2 = data.readByte();
+ byte[] _arg3;
+ _arg3 = data.createByteArray();
+ char _arg4;
+ _arg4 = (char)data.readInt();
+ char[] _arg5;
+ _arg5 = data.createCharArray();
+ int _arg6;
+ _arg6 = data.readInt();
+ int[] _arg7;
+ _arg7 = data.createIntArray();
+ long _arg8;
+ _arg8 = data.readLong();
+ long[] _arg9;
+ _arg9 = data.createLongArray();
+ float _arg10;
+ _arg10 = data.readFloat();
+ float[] _arg11;
+ _arg11 = data.createFloatArray();
+ double _arg12;
+ _arg12 = data.readDouble();
+ double[] _arg13;
+ _arg13 = data.createDoubleArray();
+ java.lang.String _arg14;
+ _arg14 = data.readString();
+ java.lang.String[] _arg15;
+ _arg15 = data.createStringArray();
+ java.util.List<java.lang.String> _arg16;
+ _arg16 = data.createStringArrayList();
+ android.aidl.loggable.Data _arg17;
+ _arg17 = data.readTypedObject(android.aidl.loggable.Data.CREATOR);
+ android.os.IBinder _arg18;
+ _arg18 = data.readStrongBinder();
+ android.os.ParcelFileDescriptor _arg19;
+ _arg19 = data.readTypedObject(android.os.ParcelFileDescriptor.CREATOR);
+ android.os.ParcelFileDescriptor[] _arg20;
+ _arg20 = data.createTypedArray(android.os.ParcelFileDescriptor.CREATOR);
+ data.enforceNoDataAvail();
+ java.lang.String[] _result = this.LogThis(_arg0, _arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9, _arg10, _arg11, _arg12, _arg13, _arg14, _arg15, _arg16, _arg17, _arg18, _arg19, _arg20);
+ reply.writeNoException();
+ reply.writeStringArray(_result);
+ reply.writeBooleanArray(_arg1);
+ reply.writeByteArray(_arg3);
+ reply.writeCharArray(_arg5);
+ reply.writeIntArray(_arg7);
+ reply.writeLongArray(_arg9);
+ reply.writeFloatArray(_arg11);
+ reply.writeDoubleArray(_arg13);
+ reply.writeStringArray(_arg15);
+ reply.writeStringList(_arg16);
+ reply.writeTypedObject(_arg19, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
+ reply.writeTypedArray(_arg20, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE);
break;
}
default:
@@ -150,11 +164,10 @@ public interface ILoggableInterface extends android.os.IInterface
}
@Override public java.lang.String[] LogThis(boolean boolValue, boolean[] boolArray, byte byteValue, byte[] byteArray, char charValue, char[] charArray, int intValue, int[] intArray, long longValue, long[] longArray, float floatValue, float[] floatArray, double doubleValue, double[] doubleArray, java.lang.String stringValue, java.lang.String[] stringArray, java.util.List<java.lang.String> listValue, android.aidl.loggable.Data dataValue, android.os.IBinder binderValue, android.os.ParcelFileDescriptor pfdValue, android.os.ParcelFileDescriptor[] pfdArray) throws android.os.RemoteException
{
- android.os.Parcel _data = android.os.Parcel.obtain();
+ android.os.Parcel _data = android.os.Parcel.obtain(asBinder());
android.os.Parcel _reply = android.os.Parcel.obtain();
java.lang.String[] _result;
try {
- android.os.Trace.traceBegin(android.os.Trace.TRACE_TAG_AIDL, "AIDL::java::ILoggableInterface::LogThis::client");
_data.writeInterfaceToken(DESCRIPTOR);
_data.writeBoolean(boolValue);
_data.writeBooleanArray(boolArray);
@@ -197,12 +210,16 @@ public interface ILoggableInterface extends android.os.IInterface
finally {
_reply.recycle();
_data.recycle();
- android.os.Trace.traceEnd(android.os.Trace.TRACE_TAG_AIDL);
}
return _result;
}
}
static final int TRANSACTION_LogThis = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0);
+ /** @hide */
+ public int getMaxTransactionId()
+ {
+ return 0;
+ }
}
public static final java.lang.String DESCRIPTOR = "android$aidl$loggable$ILoggableInterface".replace('$', '.');
public java.lang.String[] LogThis(boolean boolValue, boolean[] boolArray, byte byteValue, byte[] byteArray, char charValue, char[] charArray, int intValue, int[] intArray, long longValue, long[] longArray, float floatValue, float[] floatArray, double doubleValue, double[] doubleArray, java.lang.String stringValue, java.lang.String[] stringArray, java.util.List<java.lang.String> listValue, android.aidl.loggable.Data dataValue, android.os.IBinder binderValue, android.os.ParcelFileDescriptor pfdValue, android.os.ParcelFileDescriptor[] pfdArray) throws android.os.RemoteException;
@@ -246,6 +263,26 @@ public interface ILoggableInterface extends android.os.IInterface
{
return this;
}
+ /** @hide */
+ public static java.lang.String getDefaultTransactionName(int transactionCode)
+ {
+ switch (transactionCode)
+ {
+ case TRANSACTION_Log:
+ {
+ return "Log";
+ }
+ default:
+ {
+ return null;
+ }
+ }
+ }
+ /** @hide */
+ public java.lang.String getTransactionName(int transactionCode)
+ {
+ return this.getDefaultTransactionName(transactionCode);
+ }
@Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException
{
java.lang.String descriptor = DESCRIPTOR;
@@ -264,17 +301,11 @@ public interface ILoggableInterface extends android.os.IInterface
{
case TRANSACTION_Log:
{
- try {
- android.os.Trace.traceBegin(android.os.Trace.TRACE_TAG_AIDL, "AIDL::java::ISub::Log::server");
- int _arg0;
- _arg0 = data.readInt();
- data.enforceNoDataAvail();
- this.Log(_arg0);
- reply.writeNoException();
- }
- finally {
- android.os.Trace.traceEnd(android.os.Trace.TRACE_TAG_AIDL);
- }
+ int _arg0;
+ _arg0 = data.readInt();
+ data.enforceNoDataAvail();
+ this.Log(_arg0);
+ reply.writeNoException();
break;
}
default:
@@ -301,10 +332,9 @@ public interface ILoggableInterface extends android.os.IInterface
}
@Override public void Log(int value) throws android.os.RemoteException
{
- android.os.Parcel _data = android.os.Parcel.obtain();
+ android.os.Parcel _data = android.os.Parcel.obtain(asBinder());
android.os.Parcel _reply = android.os.Parcel.obtain();
try {
- android.os.Trace.traceBegin(android.os.Trace.TRACE_TAG_AIDL, "AIDL::java::ISub::Log::client");
_data.writeInterfaceToken(DESCRIPTOR);
_data.writeInt(value);
boolean _status = mRemote.transact(Stub.TRANSACTION_Log, _data, _reply, 0);
@@ -313,11 +343,15 @@ public interface ILoggableInterface extends android.os.IInterface
finally {
_reply.recycle();
_data.recycle();
- android.os.Trace.traceEnd(android.os.Trace.TRACE_TAG_AIDL);
}
}
}
static final int TRANSACTION_Log = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0);
+ /** @hide */
+ public int getMaxTransactionId()
+ {
+ return 0;
+ }
}
public static final java.lang.String DESCRIPTOR = "android$aidl$loggable$ILoggableInterface$ISub".replace('$', '.');
public void Log(int value) throws android.os.RemoteException;
diff --git a/tests/golden_output/aidl_test_loggable_interface-ndk-source/gen/include/aidl/android/aidl/loggable/ILoggableInterface.h b/tests/golden_output/aidl_test_loggable_interface-ndk-source/gen/include/aidl/android/aidl/loggable/ILoggableInterface.h
index 9ab02483..e533317a 100644
--- a/tests/golden_output/aidl_test_loggable_interface-ndk-source/gen/include/aidl/android/aidl/loggable/ILoggableInterface.h
+++ b/tests/golden_output/aidl_test_loggable_interface-ndk-source/gen/include/aidl/android/aidl/loggable/ILoggableInterface.h
@@ -16,18 +16,27 @@
#include <android/binder_stability.h>
#endif // BINDER_STABILITY_SUPPORT
+namespace aidl::android::aidl::loggable {
+class Data;
+} // namespace aidl::android::aidl::loggable
namespace aidl {
namespace android {
namespace aidl {
namespace loggable {
+class ILoggableInterfaceDelegator;
+
class ILoggableInterface : public ::ndk::ICInterface {
public:
+ typedef ILoggableInterfaceDelegator DefaultDelegator;
static const char* descriptor;
ILoggableInterface();
virtual ~ILoggableInterface();
+ class ISubDelegator;
+
class ISub : public ::ndk::ICInterface {
public:
+ typedef ISubDelegator DefaultDelegator;
static const char* descriptor;
ISub();
virtual ~ISub();
diff --git a/tests/golden_test.sh b/tests/golden_test.sh
index 86a5d1a4..32f54040 100755
--- a/tests/golden_test.sh
+++ b/tests/golden_test.sh
@@ -53,6 +53,7 @@ function _golden_test() {
"aidl-test-fixedsizearray-java-source"
"aidl-test-fixedsizearray-ndk-source"
"aidl-test-fixedsizearray-rust-source"
+ "aidl-test-interface-cpp-analyzer-source"
)
local root="."
@@ -77,7 +78,7 @@ function _golden_test() {
mkdir -p "$golden"
cp -r "$built/gen" "$golden"
else
- diff -r "$built/gen" "$golden/gen" || e=1
+ diff -rN "$built/gen" "$golden/gen" || e=1
fi
done
diff --git a/tests/java/src/android/aidl/permission/service/FakePermissionEnforcer.java b/tests/java/src/android/aidl/permission/service/FakePermissionEnforcer.java
new file mode 100644
index 00000000..f7b694a5
--- /dev/null
+++ b/tests/java/src/android/aidl/permission/service/FakePermissionEnforcer.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2022 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.aidl.permission.service;
+
+import static android.permission.PermissionManager.PERMISSION_GRANTED;
+import static android.permission.PermissionManager.PERMISSION_HARD_DENIED;
+
+import android.annotation.NonNull;
+import android.content.AttributionSource;
+import java.util.List;
+
+/* Fake for android.os.PermissionEnforcer
+ */
+public class FakePermissionEnforcer extends android.os.PermissionEnforcer {
+ private List<String> mGranted;
+
+ public void setGranted(List<String> granted) { mGranted = granted; }
+
+ @Override
+ protected int checkPermission(@NonNull String permission, int pid, int uid) {
+ if (mGranted != null && mGranted.contains(permission)) {
+ return PERMISSION_GRANTED;
+ }
+ return PERMISSION_HARD_DENIED;
+ }
+
+ @Override
+ protected int checkPermission(@NonNull String permission, @NonNull AttributionSource source) {
+ if (mGranted != null && mGranted.contains(permission)) {
+ return PERMISSION_GRANTED;
+ }
+ return PERMISSION_HARD_DENIED;
+ }
+}
diff --git a/tests/java/src/android/aidl/permission/service/PermissionTestService.java b/tests/java/src/android/aidl/permission/service/PermissionTestService.java
new file mode 100644
index 00000000..b65b5dff
--- /dev/null
+++ b/tests/java/src/android/aidl/permission/service/PermissionTestService.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2022, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.aidl.permission.service;
+
+import android.aidl.tests.permission.IProtected;
+import android.annotation.EnforcePermission;
+import android.os.Binder;
+import android.os.ServiceManager;
+import java.util.List;
+
+public class PermissionTestService extends IProtected.Stub {
+ private FakePermissionEnforcer mPermissionEnforcer;
+
+ public static void main(String[] args) {
+ PermissionTestService myServer = new PermissionTestService(new FakePermissionEnforcer());
+ ServiceManager.addService(IProtected.class.getName(), myServer);
+
+ Binder.joinThreadPool();
+ }
+
+ public PermissionTestService(FakePermissionEnforcer permissionEnforcer) {
+ super(permissionEnforcer);
+ mPermissionEnforcer = permissionEnforcer;
+ }
+
+ @Override
+ @EnforcePermission("READ_PHONE_STATE")
+ public void PermissionProtected() {
+ PermissionProtected_enforcePermission();
+ }
+
+ @Override
+ @EnforcePermission(allOf = {"INTERNET", "VIBRATE"})
+ public void MultiplePermissionsAll() {
+ MultiplePermissionsAll_enforcePermission();
+ }
+
+ @Override
+ @EnforcePermission(anyOf = {"INTERNET", "VIBRATE"})
+ public void MultiplePermissionsAny() {
+ MultiplePermissionsAny_enforcePermission();
+ }
+
+ @Override
+ @EnforcePermission("android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK")
+ public void NonManifestPermission() {
+ NonManifestPermission_enforcePermission();
+ }
+
+ @Override
+ public void SetGranted(List<String> permissions) {
+ mPermissionEnforcer.setGranted(permissions);
+ }
+}
diff --git a/tests/java/src/android/aidl/permission/tests/PermissionTests.java b/tests/java/src/android/aidl/permission/tests/PermissionTests.java
new file mode 100644
index 00000000..91a9f420
--- /dev/null
+++ b/tests/java/src/android/aidl/permission/tests/PermissionTests.java
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2022, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.aidl.permission.tests;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertThrows;
+
+import android.aidl.tests.permission.IProtected;
+import android.os.IBinder;
+import android.os.RemoteException;
+import android.os.ServiceManager;
+import java.util.List;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.internal.TextListener;
+import org.junit.runner.JUnitCore;
+import org.junit.runner.Result;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+
+@RunWith(JUnit4.class)
+public abstract class PermissionTests {
+ protected IProtected service;
+
+ @Test
+ public void testProtected() throws Exception {
+ // Requires READ_PHONE_STATE.
+ service.SetGranted(List.of());
+ assertThrows(SecurityException.class, () -> service.PermissionProtected());
+ service.SetGranted(List.of("android.permission.READ_PHONE_STATE"));
+ service.PermissionProtected();
+ }
+
+ @Test
+ public void testMultiplePermissionsAll() throws Exception {
+ // Requires INTERNET and VIBRATE.
+ service.SetGranted(List.of());
+ assertThrows(SecurityException.class, () -> service.MultiplePermissionsAll());
+ service.SetGranted(List.of("android.permission.INTERNET"));
+ assertThrows(SecurityException.class, () -> service.MultiplePermissionsAll());
+ service.SetGranted(List.of("android.permission.VIBRATE"));
+ assertThrows(SecurityException.class, () -> service.MultiplePermissionsAll());
+ service.SetGranted(List.of("android.permission.INTERNET", "android.permission.VIBRATE"));
+ service.MultiplePermissionsAll();
+ }
+
+ @Test
+ public void testMultiplePermissionsAny() throws Exception {
+ // Requires INTERNET or VIBRATE.
+ service.SetGranted(List.of());
+ assertThrows(SecurityException.class, () -> service.MultiplePermissionsAny());
+ service.SetGranted(List.of("android.permission.INTERNET"));
+ service.MultiplePermissionsAny();
+ service.SetGranted(List.of("android.permission.VIBRATE"));
+ service.MultiplePermissionsAny();
+ }
+
+ @Test
+ public void testNonManifestPermission() throws Exception {
+ // Requires android.net.NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK
+ service.SetGranted(List.of());
+ assertThrows(SecurityException.class, () -> service.NonManifestPermission());
+ service.SetGranted(List.of("android.permission.MAINLINE_NETWORK_STACK"));
+ service.NonManifestPermission();
+ }
+
+ public static void main(String[] args) {
+ JUnitCore junit = new JUnitCore();
+ junit.addListener(new TextListener(System.out));
+ Result result = junit.run(PermissionTestsRemote.class, PermissionTestsLocal.class);
+ System.out.println(result.wasSuccessful() ? "TEST SUCCESS" : "TEST FAILURE");
+ }
+}
diff --git a/tests/java/src/android/aidl/permission/tests/PermissionTestsLocal.java b/tests/java/src/android/aidl/permission/tests/PermissionTestsLocal.java
new file mode 100644
index 00000000..3e3146e3
--- /dev/null
+++ b/tests/java/src/android/aidl/permission/tests/PermissionTestsLocal.java
@@ -0,0 +1,38 @@
+
+/*
+ * Copyright (C) 2022, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.aidl.permission.tests;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertThrows;
+
+import android.aidl.permission.service.FakePermissionEnforcer;
+import android.aidl.permission.service.PermissionTestService;
+import android.aidl.tests.permission.IProtected;
+import android.os.RemoteException;
+import org.junit.Before;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+
+@RunWith(JUnit4.class)
+public class PermissionTestsLocal extends PermissionTests {
+ @Before
+ public void setUp() throws RemoteException {
+ service = new PermissionTestService(new FakePermissionEnforcer());
+ assertNotNull(service);
+ }
+}
diff --git a/tests/java/src/android/aidl/permission/tests/PermissionTestsRemote.java b/tests/java/src/android/aidl/permission/tests/PermissionTestsRemote.java
new file mode 100644
index 00000000..5602fe83
--- /dev/null
+++ b/tests/java/src/android/aidl/permission/tests/PermissionTestsRemote.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2022, The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.aidl.permission.tests;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertThrows;
+
+import android.aidl.tests.permission.IProtected;
+import android.os.IBinder;
+import android.os.RemoteException;
+import android.os.ServiceManager;
+import org.junit.Before;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+
+@RunWith(JUnit4.class)
+public class PermissionTestsRemote extends PermissionTests {
+ @Before
+ public void setUp() throws RemoteException {
+ IBinder binder = ServiceManager.waitForService(IProtected.class.getName());
+ assertNotNull(binder);
+ service = IProtected.Stub.asInterface(binder);
+ assertNotNull(service);
+ }
+}
diff --git a/tests/java/src/android/aidl/sdkversion/ITestService.aidl b/tests/java/src/android/aidl/sdkversion/ITestService.aidl
index afefddef..b3302ada 100644
--- a/tests/java/src/android/aidl/sdkversion/ITestService.aidl
+++ b/tests/java/src/android/aidl/sdkversion/ITestService.aidl
@@ -19,10 +19,15 @@ interface ITestService {
// Since sdk = 29, we have write/readBoolean
boolean RepeatBoolean(boolean token);
- // Since sdk = 23, we have write/readTypedObject
@JavaDerive(toString=true, equals=true)
parcelable TypedObject {
boolean b;
}
+
+ // Since sdk = 23, we have write/readTypedObject
@nullable TypedObject RepeatTypedObject(in @nullable TypedObject token);
+
+ // Since sdk = 33, we have write/readTypedList (with parcelableFlags)
+ @nullable List<TypedObject> RepeatTypedList(
+ in @nullable List<TypedObject> tokens);
}
diff --git a/tests/java/src/android/aidl/sdkversion/service/AidlJavaVersionTestService.java b/tests/java/src/android/aidl/sdkversion/service/AidlJavaVersionTestService.java
index ca108c87..91d1024f 100644
--- a/tests/java/src/android/aidl/sdkversion/service/AidlJavaVersionTestService.java
+++ b/tests/java/src/android/aidl/sdkversion/service/AidlJavaVersionTestService.java
@@ -20,6 +20,7 @@ import android.aidl.sdkversion.ITestService;
import android.aidl.sdkversion.ITestService.TypedObject;
import android.os.Binder;
import android.os.ServiceManager;
+import java.util.List;
public class AidlJavaVersionTestService {
static class TestServiceServer extends ITestService.Stub {
@@ -32,6 +33,11 @@ public class AidlJavaVersionTestService {
public TypedObject RepeatTypedObject(TypedObject token) {
return token;
}
+
+ @Override
+ public List<TypedObject> RepeatTypedList(List<TypedObject> token) {
+ return token;
+ }
}
public static void main(String[] args) {
diff --git a/tests/java/src/android/aidl/sdkversion/tests/AidlJavaVersionTests.java b/tests/java/src/android/aidl/sdkversion/tests/AidlJavaVersionTests.java
index 7239ad7c..27b4208f 100644
--- a/tests/java/src/android/aidl/sdkversion/tests/AidlJavaVersionTests.java
+++ b/tests/java/src/android/aidl/sdkversion/tests/AidlJavaVersionTests.java
@@ -27,6 +27,8 @@ import android.aidl.sdkversion.ITestService.TypedObject;
import android.os.IBinder;
import android.os.RemoteException;
import android.os.ServiceManager;
+import java.util.ArrayList;
+import java.util.List;
import org.junit.Before;
import org.junit.Test;
import org.junit.internal.TextListener;
@@ -65,5 +67,8 @@ public class AidlJavaVersionTests {
TypedObject token = new TypedObject();
assertEquals(mService.RepeatTypedObject(token), token);
assertNull(mService.RepeatTypedObject(null));
+ List<TypedObject> list = new ArrayList<>();
+ list.add(token);
+ assertEquals(mService.RepeatTypedList(list), list);
}
}
diff --git a/tests/java/src/android/aidl/service/TestServiceServer.java b/tests/java/src/android/aidl/service/TestServiceServer.java
index 51a75205..7843d9ce 100644
--- a/tests/java/src/android/aidl/service/TestServiceServer.java
+++ b/tests/java/src/android/aidl/service/TestServiceServer.java
@@ -21,8 +21,10 @@ import android.aidl.fixedsizearray.FixedSizeArrayExample.IntParcelable;
import android.aidl.tests.BackendType;
import android.aidl.tests.BadParcelable;
import android.aidl.tests.ByteEnum;
+import android.aidl.tests.CircularParcelable;
import android.aidl.tests.ConstantExpressionEnum;
import android.aidl.tests.GenericStructuredParcelable;
+import android.aidl.tests.ICircular;
import android.aidl.tests.ICppJavaTests;
import android.aidl.tests.INamedCallback;
import android.aidl.tests.INewName;
@@ -59,6 +61,13 @@ import java.util.List;
public class TestServiceServer extends ITestService.Stub {
public static void main(String[] args) {
+ // b/235006086: test with debug stack trace parceling feature
+ // which has been broken in the past. This does mean that we
+ // lose Java coverage for when this is false, but we do have
+ // other tests which cover this including CtsNdkBinderTestCases
+ // and other language-specific exception/Status unit tests.
+ Parcel.setStackTraceParceling(true);
+
TestServiceServer myServer = new TestServiceServer();
ServiceManager.addService(ITestService.class.getName(), myServer);
@@ -94,11 +103,11 @@ public class TestServiceServer extends ITestService.Stub {
}
@Override
public final int getInterfaceVersion() {
- return IFooInterface.VERSION;
+ return super.VERSION;
}
@Override
public final String getInterfaceHash() {
- return IFooInterface.HASH;
+ return super.HASH;
}
}
@@ -298,10 +307,27 @@ public class TestServiceServer extends ITestService.Stub {
@Override
public INamedCallback GetOtherTestService(String name) throws RemoteException {
- if (!mNamedCallbacks.containsKey(name)) {
- mNamedCallbacks.put(name, new MyNamedCallback(name));
+ synchronized (mNamedCallbacks) {
+ if (!mNamedCallbacks.containsKey(name)) {
+ mNamedCallbacks.put(name, new MyNamedCallback(name));
+ }
+ return mNamedCallbacks.get(name);
+ }
+ }
+ @Override
+ public boolean SetOtherTestService(String name, INamedCallback service) throws RemoteException {
+ synchronized (mNamedCallbacks) {
+ if (mNamedCallbacks.containsKey(name) && mNamedCallbacks.get(name) == service) {
+ return true;
+ }
+ try {
+ // This restricts the client to only setting services that it gets from this server.
+ mNamedCallbacks.put(name, (MyNamedCallback) service);
+ } catch (Exception e) {
+ Log.i("TestServiceServer", "Failed to cast service");
+ }
+ return false;
}
- return mNamedCallbacks.get(name);
}
@Override
public boolean VerifyName(INamedCallback service, String name) throws RemoteException {
@@ -758,4 +784,21 @@ public class TestServiceServer extends ITestService.Stub {
public byte getBackendType() throws RemoteException {
return BackendType.JAVA;
}
+
+ private static class MyCircular extends ICircular.Stub {
+ private ITestService mSrv;
+
+ MyCircular(ITestService srv) { mSrv = srv; }
+
+ @Override
+ public ITestService GetTestService() {
+ return mSrv;
+ }
+ }
+
+ @Override
+ public ICircular GetCircular(CircularParcelable cp) throws RemoteException {
+ cp.testService = this;
+ return new MyCircular(this);
+ }
}
diff --git a/tests/java/src/android/aidl/tests/TestServiceClient.java b/tests/java/src/android/aidl/tests/TestServiceClient.java
index 098ad209..6f298864 100644
--- a/tests/java/src/android/aidl/tests/TestServiceClient.java
+++ b/tests/java/src/android/aidl/tests/TestServiceClient.java
@@ -134,6 +134,28 @@ public class TestServiceClient {
}
@Test
+ public void testConstFloatRepeat() throws RemoteException {
+ float query[] = {ITestService.FLOAT_TEST_CONSTANT, ITestService.FLOAT_TEST_CONSTANT2,
+ ITestService.FLOAT_TEST_CONSTANT3, ITestService.FLOAT_TEST_CONSTANT4,
+ ITestService.FLOAT_TEST_CONSTANT5, ITestService.FLOAT_TEST_CONSTANT6,
+ ITestService.FLOAT_TEST_CONSTANT7};
+ for (int i = 0; i < query.length; i++) {
+ assertThat(service.RepeatFloat(query[i]), is(query[i]));
+ }
+ }
+
+ @Test
+ public void testConstDoubleRepeat() throws RemoteException {
+ double query[] = {ITestService.DOUBLE_TEST_CONSTANT, ITestService.DOUBLE_TEST_CONSTANT2,
+ ITestService.DOUBLE_TEST_CONSTANT3, ITestService.DOUBLE_TEST_CONSTANT4,
+ ITestService.DOUBLE_TEST_CONSTANT5, ITestService.DOUBLE_TEST_CONSTANT6,
+ ITestService.DOUBLE_TEST_CONSTANT7};
+ for (int i = 0; i < query.length; i++) {
+ assertThat(service.RepeatDouble(query[i]), is(query[i]));
+ }
+ }
+
+ @Test
public void testLongRepeat() throws RemoteException {
long query = 1L << 60;
assertThat(service.RepeatLong(query), is(query));
@@ -646,6 +668,14 @@ public class TestServiceClient {
}
}
+ @Test
+ public void testOutArrayWithNull() throws RemoteException {
+ // In Java out-array parameter can't be null. The proxy code always throws NPE.
+ assertThrows(NullPointerException.class, () -> service.ReverseUtf8CppString(null, null));
+ assertThrows(NullPointerException.class,
+ () -> service.ReverseNullableUtf8CppString(null, null));
+ }
+
private void shouldBeTheSame(StructuredParcelable a, StructuredParcelable b) {
assertTrue(a.equals(b));
assertTrue(b.equals(a));
diff --git a/tests/lazy_test/main.cpp b/tests/lazy_test/main.cpp
index 0a8393ff..222d8092 100644
--- a/tests/lazy_test/main.cpp
+++ b/tests/lazy_test/main.cpp
@@ -42,8 +42,8 @@ using ::android::base::unique_fd;
using ::android::os::ParcelFileDescriptor;
std::vector<String16> gServiceNames;
-static constexpr size_t SHUTDOWN_WAIT_TIME = 10;
-static constexpr size_t CALLBACK_SHUTDOWN_WAIT_TIME = 5;
+static constexpr size_t SHUTDOWN_WAIT_MS = 10000;
+static constexpr size_t CALLBACK_SHUTDOWN_WAIT_MS = 5000;
sp<IBinder> waitForService(const String16& name) {
sp<IServiceManager> manager;
@@ -78,10 +78,10 @@ class AidlLazyTest : public ::testing::Test {
}
void TearDown() override {
- std::cout << "Waiting " << SHUTDOWN_WAIT_TIME << " seconds before checking that the "
+ std::cout << "Waiting " << SHUTDOWN_WAIT_MS << " milliseconds before checking that the "
<< "service has shut down." << std::endl;
IPCThreadState::self()->flushCommands();
- sleep(SHUTDOWN_WAIT_TIME);
+ usleep(SHUTDOWN_WAIT_MS * 1000);
for (size_t i = 0; i < gServiceNames.size(); i++) {
ASSERT_FALSE(isServiceRunning(gServiceNames.at(i))) << "Service failed to shut down.";
}
@@ -100,7 +100,7 @@ TEST_F(AidlLazyTest, GetRelease) {
}
}
-static std::vector<size_t> waitTimes(size_t numTimes, size_t maxWait) {
+static std::vector<size_t> waitMs(size_t numTimes, size_t maxWait) {
std::vector<size_t> times(numTimes);
for (size_t i = 0; i < numTimes; i++) {
times.at(i) = (size_t)(rand() % (maxWait + 1));
@@ -108,21 +108,20 @@ static std::vector<size_t> waitTimes(size_t numTimes, size_t maxWait) {
return times;
}
-static void testWithTimes(const std::vector<size_t>& waitTimes, bool beforeGet) {
+static void testWithTimes(const std::vector<size_t>& waitMs, bool beforeGet) {
size_t nServices = gServiceNames.size();
- for (size_t i = 0; i < waitTimes.size(); i++) {
+ for (size_t i = 0; i < waitMs.size(); i++) {
IPCThreadState::self()->flushCommands();
if (beforeGet) {
- std::cout << "Thread waiting " << waitTimes.at(i) << " while not holding service."
- << std::endl;
- sleep(waitTimes.at(i));
+ std::cout << "Thread waiting " << waitMs.at(i) << " while not holding service." << std::endl;
+ usleep(waitMs.at(i) * 1000);
}
sp<IBinder> service = waitForService(gServiceNames.at(i % nServices));
if (!beforeGet) {
- std::cout << "Thread waiting " << waitTimes.at(i) << " while holding service." << std::endl;
- sleep(waitTimes.at(i));
+ std::cout << "Thread waiting " << waitMs.at(i) << " while holding service." << std::endl;
+ usleep(waitMs.at(i) * 1000);
}
ASSERT_NE(service.get(), nullptr);
@@ -131,18 +130,19 @@ static void testWithTimes(const std::vector<size_t>& waitTimes, bool beforeGet)
}
static constexpr size_t NUM_TIMES_GET_RELEASE = 5;
-static constexpr size_t MAX_WAITING_DURATION = 10;
+static constexpr size_t MAX_WAITING_DURATION_MS = 10000;
static constexpr size_t NUM_CONCURRENT_THREADS = 3;
static void testConcurrentThreadsWithDelays(bool delayBeforeGet) {
size_t nServices = gServiceNames.size();
std::vector<std::vector<size_t>> threadWaitTimes(NUM_CONCURRENT_THREADS);
int maxWait = 0;
for (size_t i = 0; i < threadWaitTimes.size(); i++) {
- threadWaitTimes.at(i) = waitTimes(NUM_TIMES_GET_RELEASE * nServices, MAX_WAITING_DURATION);
+ threadWaitTimes.at(i) = waitMs(NUM_TIMES_GET_RELEASE * nServices, MAX_WAITING_DURATION_MS);
int totalWait = std::accumulate(threadWaitTimes.at(i).begin(), threadWaitTimes.at(i).end(), 0);
maxWait = std::max(maxWait, totalWait);
}
- std::cout << "Additional runtime expected from sleeps: " << maxWait << " second(s)." << std::endl;
+ std::cout << "Additional runtime expected from sleeps: " << maxWait << " millisecond(s)."
+ << std::endl;
std::vector<std::thread> threads(NUM_CONCURRENT_THREADS);
for (size_t i = 0; i < threads.size(); i++) {
@@ -186,10 +186,10 @@ TEST_F(AidlLazyRegistrarTest, ForcedPersistenceTest) {
EXPECT_TRUE(service->forcePersist(i == 0).isOk());
service = nullptr;
- std::cout << "Waiting " << SHUTDOWN_WAIT_TIME << " seconds before checking whether the "
+ std::cout << "Waiting " << SHUTDOWN_WAIT_MS << " milliseconds before checking whether the "
<< "service is still running." << std::endl;
IPCThreadState::self()->flushCommands();
- sleep(SHUTDOWN_WAIT_TIME);
+ usleep(SHUTDOWN_WAIT_MS * 1000);
if (i == 0) {
ASSERT_TRUE(isServiceRunning(serviceName)) << "Service shut down when it shouldn't have.";
@@ -215,7 +215,7 @@ TEST_F(AidlLazyRegistrarTest, ActiveServicesCountCallbackTest) {
IPCThreadState::self()->flushCommands();
- std::cout << "Waiting " << SHUTDOWN_WAIT_TIME << " seconds for callback completion "
+ std::cout << "Waiting " << SHUTDOWN_WAIT_MS << " milliseconds for callback completion "
<< "notification." << std::endl;
int epollFd = epoll_create1(EPOLL_CLOEXEC);
@@ -230,7 +230,7 @@ TEST_F(AidlLazyRegistrarTest, ActiveServicesCountCallbackTest) {
int rc = epoll_ctl(epollFd, EPOLL_CTL_ADD, efd, &event);
ASSERT_GE(rc, 0) << "Failed to add fd to epoll";
- rc = TEMP_FAILURE_RETRY(epoll_wait(epollFd, events, EPOLL_MAX_EVENTS, SHUTDOWN_WAIT_TIME * 1000));
+ rc = TEMP_FAILURE_RETRY(epoll_wait(epollFd, events, EPOLL_MAX_EVENTS, SHUTDOWN_WAIT_MS));
ASSERT_NE(rc, 0) << "Service shutdown timeout";
ASSERT_GT(rc, 0) << "Error waiting for service shutdown notification";
@@ -239,10 +239,11 @@ TEST_F(AidlLazyRegistrarTest, ActiveServicesCountCallbackTest) {
ASSERT_GE(rc, 0) << "Failed to get callback completion notification from service";
ASSERT_EQ(counter, 1);
- std::cout << "Waiting " << CALLBACK_SHUTDOWN_WAIT_TIME << " seconds before checking whether the "
+ std::cout << "Waiting " << CALLBACK_SHUTDOWN_WAIT_MS
+ << " milliseconds before checking whether the "
<< "service is still running." << std::endl;
- sleep(CALLBACK_SHUTDOWN_WAIT_TIME);
+ usleep(CALLBACK_SHUTDOWN_WAIT_MS * 1000);
ASSERT_FALSE(isServiceRunning(serviceName)) << "Service failed to shut down.";
}
diff --git a/tests/rust/test_client.rs b/tests/rust/test_client.rs
index 81315c9b..cd24eaea 100644
--- a/tests/rust/test_client.rs
+++ b/tests/rust/test_client.rs
@@ -121,6 +121,10 @@ fn test_constants() {
assert_eq!(ITestService::A55, 1);
assert_eq!(ITestService::A56, 1);
assert_eq!(ITestService::A57, 1);
+ assert_eq!(ITestService::FLOAT_TEST_CONSTANT4, 2.2_f32);
+ assert_eq!(ITestService::FLOAT_TEST_CONSTANT5, -2.2_f32);
+ assert_eq!(ITestService::DOUBLE_TEST_CONSTANT4, 2.2_f64);
+ assert_eq!(ITestService::DOUBLE_TEST_CONSTANT5, -2.2_f64);
}
#[test]
@@ -165,6 +169,20 @@ test_primitive! {test_primitive_long_constant, RepeatLong, ITestService::LONG_TE
test_primitive! {test_primitive_byte_enum, RepeatByteEnum, ByteEnum::FOO}
test_primitive! {test_primitive_int_enum, RepeatIntEnum, IntEnum::BAR}
test_primitive! {test_primitive_long_enum, RepeatLongEnum, LongEnum::FOO}
+test_primitive! {test_primitive_float_constant, RepeatFloat, ITestService::FLOAT_TEST_CONSTANT}
+test_primitive! {test_primitive_float_constant2, RepeatFloat, ITestService::FLOAT_TEST_CONSTANT2}
+test_primitive! {test_primitive_float_constant3, RepeatFloat, ITestService::FLOAT_TEST_CONSTANT3}
+test_primitive! {test_primitive_float_constant4, RepeatFloat, ITestService::FLOAT_TEST_CONSTANT4}
+test_primitive! {test_primitive_float_constant5, RepeatFloat, ITestService::FLOAT_TEST_CONSTANT5}
+test_primitive! {test_primitive_float_constant6, RepeatFloat, ITestService::FLOAT_TEST_CONSTANT6}
+test_primitive! {test_primitive_float_constant7, RepeatFloat, ITestService::FLOAT_TEST_CONSTANT7}
+test_primitive! {test_primitive_double_constant, RepeatDouble, ITestService::DOUBLE_TEST_CONSTANT}
+test_primitive! {test_primitive_double_constant2, RepeatDouble, ITestService::DOUBLE_TEST_CONSTANT2}
+test_primitive! {test_primitive_double_constant3, RepeatDouble, ITestService::DOUBLE_TEST_CONSTANT3}
+test_primitive! {test_primitive_double_constant4, RepeatDouble, ITestService::DOUBLE_TEST_CONSTANT4}
+test_primitive! {test_primitive_double_constant5, RepeatDouble, ITestService::DOUBLE_TEST_CONSTANT5}
+test_primitive! {test_primitive_double_constant6, RepeatDouble, ITestService::DOUBLE_TEST_CONSTANT6}
+test_primitive! {test_primitive_double_constant7, RepeatDouble, ITestService::DOUBLE_TEST_CONSTANT7}
#[test]
fn test_repeat_string() {
@@ -935,6 +953,17 @@ fn test_read_data_correctly_after_parcelable_with_new_field() {
assert_eq!(out_foo.intDefault42, 0);
}
+#[test]
+fn test_calling_v2_api_triggers_error() {
+ let service: binder::Strong<dyn IFooInterface::IFooInterface> =
+ binder::get_interface(<BpFooInterface as IFooInterface::IFooInterface>::get_descriptor())
+ .expect("did not get binder service");
+
+ let ret = service.newApi();
+
+ assert_eq!(ret.unwrap_err().transaction_error(), binder::StatusCode::UNKNOWN_TRANSACTION);
+}
+
fn test_renamed_interface<F>(f: F)
where
F: FnOnce(binder::Strong<dyn IOldName::IOldName>, binder::Strong<dyn INewName::INewName>),
diff --git a/tests/rust/test_service.rs b/tests/rust/test_service.rs
index 3a5c09c7..3cff4f8e 100644
--- a/tests/rust/test_service.rs
+++ b/tests/rust/test_service.rs
@@ -27,9 +27,10 @@ use aidl_test_interface::aidl::android::aidl::tests::ITestService::{
};
use aidl_test_interface::aidl::android::aidl::tests::{
extension::ExtendableParcelable::ExtendableParcelable, extension::MyExt::MyExt,
- BackendType::BackendType, ByteEnum::ByteEnum, ConstantExpressionEnum::ConstantExpressionEnum,
- INamedCallback, INewName, IOldName, IntEnum::IntEnum, LongEnum::LongEnum,
- RecursiveList::RecursiveList, StructuredParcelable, Union,
+ BackendType::BackendType, ByteEnum::ByteEnum, CircularParcelable::CircularParcelable,
+ ConstantExpressionEnum::ConstantExpressionEnum, ICircular, INamedCallback, INewName, IOldName,
+ IntEnum::IntEnum, LongEnum::LongEnum, RecursiveList::RecursiveList, StructuredParcelable,
+ Union,
};
use aidl_test_interface::binder::{
self, BinderFeatures, Interface, ParcelFileDescriptor, SpIBinder,
@@ -76,6 +77,19 @@ impl INewName::INewName for NewName {
}
}
+#[derive(Debug, Default)]
+struct Circular;
+
+impl Interface for Circular {}
+
+impl ICircular::ICircular for Circular {
+ fn GetTestService(
+ &self,
+ ) -> binder::Result<Option<binder::Strong<dyn ITestService::ITestService>>> {
+ Ok(None)
+ }
+}
+
#[derive(Default)]
struct TestService {
service_map: Mutex<HashMap<String, binder::Strong<dyn INamedCallback::INamedCallback>>>,
@@ -173,6 +187,21 @@ impl ITestService::ITestService for TestService {
Ok(other_service.to_owned())
}
+ fn SetOtherTestService(
+ &self,
+ name: &str,
+ service: &binder::Strong<dyn INamedCallback::INamedCallback>,
+ ) -> binder::Result<bool> {
+ let mut service_map = self.service_map.lock().unwrap();
+ if let Some(existing_service) = service_map.get(name) {
+ if existing_service == service {
+ return Ok(true);
+ }
+ }
+ service_map.insert(name.into(), service.clone());
+ Ok(false)
+ }
+
fn VerifyName(
&self,
service: &binder::Strong<dyn INamedCallback::INamedCallback>,
@@ -463,6 +492,13 @@ impl ITestService::ITestService for TestService {
fn getBackendType(&self) -> binder::Result<BackendType> {
Ok(BackendType::RUST)
}
+
+ fn GetCircular(
+ &self,
+ _: &mut CircularParcelable,
+ ) -> binder::Result<binder::Strong<dyn ICircular::ICircular>> {
+ Ok(ICircular::BnCircular::new_binder(Circular, BinderFeatures::default()))
+ }
}
struct FooInterface;
diff --git a/tests/rust/test_service_async.rs b/tests/rust/test_service_async.rs
index cfc0f285..8ae3906c 100644
--- a/tests/rust/test_service_async.rs
+++ b/tests/rust/test_service_async.rs
@@ -24,9 +24,10 @@ use aidl_test_interface::aidl::android::aidl::tests::ITestService::{
};
use aidl_test_interface::aidl::android::aidl::tests::{
extension::ExtendableParcelable::ExtendableParcelable, extension::MyExt::MyExt,
- BackendType::BackendType, ByteEnum::ByteEnum, ConstantExpressionEnum::ConstantExpressionEnum,
- INamedCallback, INewName, IOldName, IntEnum::IntEnum, LongEnum::LongEnum,
- RecursiveList::RecursiveList, StructuredParcelable, Union,
+ BackendType::BackendType, ByteEnum::ByteEnum, CircularParcelable::CircularParcelable,
+ ConstantExpressionEnum::ConstantExpressionEnum, ICircular, INamedCallback, INewName, IOldName,
+ IntEnum::IntEnum, LongEnum::LongEnum, RecursiveList::RecursiveList, StructuredParcelable,
+ Union,
};
use aidl_test_interface::binder::{
self, BinderFeatures, Interface, ParcelFileDescriptor, SpIBinder,
@@ -78,6 +79,20 @@ impl INewName::INewNameAsyncServer for NewName {
}
}
+#[derive(Debug, Default)]
+struct Circular;
+
+impl Interface for Circular {}
+
+#[async_trait]
+impl ICircular::ICircularAsyncServer for Circular {
+ async fn GetTestService(
+ &self,
+ ) -> binder::Result<Option<binder::Strong<dyn ITestService::ITestService>>> {
+ Ok(None)
+ }
+}
+
#[derive(Default)]
struct TestService {
service_map: Mutex<HashMap<String, binder::Strong<dyn INamedCallback::INamedCallback>>>,
@@ -202,6 +217,21 @@ impl ITestService::ITestServiceAsyncServer for TestService {
Ok(other_service.to_owned())
}
+ async fn SetOtherTestService(
+ &self,
+ name: &str,
+ service: &binder::Strong<dyn INamedCallback::INamedCallback>,
+ ) -> binder::Result<bool> {
+ let mut service_map = self.service_map.lock().unwrap();
+ if let Some(existing_service) = service_map.get(name) {
+ if existing_service == service {
+ return Ok(true);
+ }
+ }
+ service_map.insert(name.into(), service.clone());
+ Ok(false)
+ }
+
async fn VerifyName(
&self,
service: &binder::Strong<dyn INamedCallback::INamedCallback>,
@@ -505,6 +535,13 @@ impl ITestService::ITestServiceAsyncServer for TestService {
async fn getBackendType(&self) -> binder::Result<BackendType> {
Ok(BackendType::RUST)
}
+
+ async fn GetCircular(
+ &self,
+ _: &mut CircularParcelable,
+ ) -> binder::Result<binder::Strong<dyn ICircular::ICircular>> {
+ Ok(ICircular::BnCircular::new_async_binder(Circular, rt(), BinderFeatures::default()))
+ }
}
struct FooInterface;