diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-07-15 02:04:58 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-07-15 02:04:58 +0000 |
commit | 665a54ce3b4d63015280912ecca85efac1dfe8fe (patch) | |
tree | 4c2b542d5283f19d3e6c7a88eff7ab34998b7d06 | |
parent | 538755cb0ce23c18a6b5489e18e9b017aa6214b9 (diff) | |
parent | c1b29e8ac09260fde4df42b611fea78c351dda91 (diff) | |
download | protobuf-android12-mainline-resolv-release.tar.gz |
Snap for 7550930 from c1b29e8ac09260fde4df42b611fea78c351dda91 to mainline-resolv-releaseandroid-mainline-12.0.0_r94android-mainline-12.0.0_r80android-mainline-12.0.0_r65android-mainline-12.0.0_r52android-mainline-12.0.0_r35android-mainline-12.0.0_r16android-mainline-12.0.0_r124android-mainline-12.0.0_r108android12-mainline-resolv-release
Change-Id: Idba2e6d17267cbbc5fbd7599329219a5fad266e7
-rw-r--r-- | Android.bp | 50 | ||||
-rw-r--r-- | METADATA | 5 | ||||
l--------- | NOTICE | 1 | ||||
-rw-r--r-- | build.gradle | 51 | ||||
-rw-r--r-- | src/google/protobuf/util/internal/protostream_objectsource.cc | 5 |
5 files changed, 106 insertions, 6 deletions
diff --git a/Android.bp b/Android.bp index ed0e49a08..79cafd429 100644 --- a/Android.bp +++ b/Android.bp @@ -14,6 +14,39 @@ // // +package { + default_applicable_licenses: ["external_protobuf_license"], +} + +// Added automatically by a large-scale-change that took the approach of +// 'apply every license found to every target'. While this makes sure we respect +// every license restriction, it may not be entirely correct. +// +// e.g. GPL in an MIT project might only apply to the contrib/ directory. +// +// Please consider splitting the single license below into multiple licenses, +// taking care not to lose any license_kind information, and overriding the +// default license using the 'licenses: [...]' property on targets as needed. +// +// For unused files, consider creating a 'fileGroup' with "//visibility:private" +// to attach the license to, and including a comment whether the files may be +// used in the current project. +// See: http://go/android-license-faq +license { + name: "external_protobuf_license", + visibility: [":__subpackages__"], + license_kinds: [ + "SPDX-license-identifier-Apache-2.0", + "SPDX-license-identifier-BSD", + "SPDX-license-identifier-GPL-2.0", + "SPDX-license-identifier-MIT", + "legacy_unencumbered", + ], + license_text: [ + "LICENSE", + ], +} + cc_defaults { name: "protobuf-cflags-defaults", clang_cflags: [ @@ -79,8 +112,13 @@ cc_defaults { android: { shared_libs: ["liblog"], }, + + // This suffix for vendor and product must be updated + // when a new version is imported. vendor: { - // This suffix must be updated when a new version is imported. + suffix: "-3.9.1", + }, + product: { suffix: "-3.9.1", }, }, @@ -104,6 +142,8 @@ cc_library { host_supported: true, recovery_available: true, vendor_available: true, + vendor_ramdisk_available: true, + product_available: true, double_loadable: true, defaults: ["libprotobuf-cpp-lite-defaults"], @@ -211,6 +251,7 @@ cc_library { defaults: ["libprotobuf-cpp-full-defaults"], host_supported: true, vendor_available: true, + product_available: true, // TODO(b/153609531): remove when no longer needed. native_bridge_supported: true, target: { @@ -223,6 +264,11 @@ cc_library { enabled: true, }, }, + apex_available: [ + "//apex_available:platform", + "com.android.appsearch", + "com.android.virt", + ], } // Compiler library for the host @@ -415,6 +461,7 @@ java_library_static { apex_available: [ "//apex_available:platform", // TODO(b/151068271) switch this to //apex_available:anyapex + "com.android.tethering", "com.android.wifi", ], } @@ -564,6 +611,7 @@ java_library_static { "com.android.bluetooth.updatable", "com.android.tethering", "com.android.wifi", + "com.android.extservices", ], } @@ -11,8 +11,9 @@ third_party { type: GIT value: "https://github.com/protocolbuffers/protobuf" } - // Also update the suffix in Android.bp when updating the version. + # Also update the suffix in Android.bp when updating the version. version: "v3.9.1" last_upgrade_date { year: 2019 month: 8 day: 23 } - license_type: PERMISSIVE + # would be NOTICE save for GPL in java/core/src/stubs/sun/misc/Unsafe.java + license_type: RESTRICTED } diff --git a/NOTICE b/NOTICE deleted file mode 120000 index 7a694c969..000000000 --- a/NOTICE +++ /dev/null @@ -1 +0,0 @@ -LICENSE
\ No newline at end of file diff --git a/build.gradle b/build.gradle index 273f6a40e..0161140ce 100644 --- a/build.gradle +++ b/build.gradle @@ -37,42 +37,89 @@ sourceSets { include 'com/google/protobuf/AbstractMessageLite.java' include 'com/google/protobuf/AbstractParser.java' include 'com/google/protobuf/AbstractProtobufList.java' + include 'com/google/protobuf/AllocatedBuffer.java' + include 'com/google/protobuf/Android.java' + include 'com/google/protobuf/ArrayDecoders.java' + include 'com/google/protobuf/BinaryReader.java' + include 'com/google/protobuf/BinaryWriter.java' + include 'com/google/protobuf/BooleanArrayList.java' + include 'com/google/protobuf/BufferAllocator.java' + include 'com/google/protobuf/ByteBufferWriter.java' include 'com/google/protobuf/ByteOutput.java' include 'com/google/protobuf/ByteString.java' - include 'com/google/protobuf/BooleanArrayList.java' include 'com/google/protobuf/CodedInputStream.java' + include 'com/google/protobuf/CodedInputStreamReader.java' include 'com/google/protobuf/CodedOutputStream.java' + include 'com/google/protobuf/CodedOutputStreamWriter.java' include 'com/google/protobuf/DoubleArrayList.java' include 'com/google/protobuf/ExperimentalApi.java' include 'com/google/protobuf/ExtensionLite.java' + include 'com/google/protobuf/ExtensionRegistryFactory.java' include 'com/google/protobuf/ExtensionRegistryLite.java' + include 'com/google/protobuf/ExtensionSchema.java' + include 'com/google/protobuf/ExtensionSchemaLite.java' + include 'com/google/protobuf/ExtensionSchemas.java' + include 'com/google/protobuf/FieldInfo.java' include 'com/google/protobuf/FieldSet.java' + include 'com/google/protobuf/FieldType.java' include 'com/google/protobuf/FloatArrayList.java' + include 'com/google/protobuf/GeneratedMessageInfoFactory.java' include 'com/google/protobuf/GeneratedMessageLite.java' include 'com/google/protobuf/IntArrayList.java' include 'com/google/protobuf/Internal.java' include 'com/google/protobuf/InvalidProtocolBufferException.java' + include 'com/google/protobuf/IterableByteBufferInputStream.java' + include 'com/google/protobuf/JavaType.java' include 'com/google/protobuf/LazyField.java' include 'com/google/protobuf/LazyFieldLite.java' include 'com/google/protobuf/LazyStringArrayList.java' include 'com/google/protobuf/LazyStringList.java' + include 'com/google/protobuf/ListFieldSchema.java' include 'com/google/protobuf/LongArrayList.java' + include 'com/google/protobuf/ManifestSchemaFactory.java' + include 'com/google/protobuf/MapEntryLite.java' include 'com/google/protobuf/MapFieldLite.java' + include 'com/google/protobuf/MapFieldSchema.java' + include 'com/google/protobuf/MapFieldSchemaLite.java' + include 'com/google/protobuf/MapFieldSchemas.java' + include 'com/google/protobuf/MessageInfo.java' + include 'com/google/protobuf/MessageInfoFactory.java' include 'com/google/protobuf/MessageLite.java' - include 'com/google/protobuf/MessageLiteToString.java' include 'com/google/protobuf/MessageLiteOrBuilder.java' + include 'com/google/protobuf/MessageLiteToString.java' + include 'com/google/protobuf/MessageSchema.java' + include 'com/google/protobuf/MessageSetSchema.java' include 'com/google/protobuf/MutabilityOracle.java' + include 'com/google/protobuf/NewInstanceSchema.java' + include 'com/google/protobuf/NewInstanceSchemaLite.java' + include 'com/google/protobuf/NewInstanceSchemas.java' + include 'com/google/protobuf/NioByteString.java' + include 'com/google/protobuf/OneofInfo.java' include 'com/google/protobuf/Parser.java' + include 'com/google/protobuf/PrimitiveNonBoxingCollection.java' + include 'com/google/protobuf/ProtoSyntax.java' + include 'com/google/protobuf/Protobuf.java' include 'com/google/protobuf/ProtobufArrayList.java' + include 'com/google/protobuf/ProtobufLists.java' include 'com/google/protobuf/ProtocolStringList.java' + include 'com/google/protobuf/RawMessageInfo.java' + include 'com/google/protobuf/Reader.java' include 'com/google/protobuf/RopeByteString.java' + include 'com/google/protobuf/Schema.java' + include 'com/google/protobuf/SchemaFactory.java' + include 'com/google/protobuf/SchemaUtil.java' include 'com/google/protobuf/SmallSortedMap.java' + include 'com/google/protobuf/StructuralMessageInfo.java' include 'com/google/protobuf/TextFormatEscaper.java' include 'com/google/protobuf/UninitializedMessageException.java' + include 'com/google/protobuf/UnknownFieldSchema.java' include 'com/google/protobuf/UnknownFieldSetLite.java' + include 'com/google/protobuf/UnknownFieldSetLiteSchema.java' include 'com/google/protobuf/UnmodifiableLazyStringList.java' + include 'com/google/protobuf/UnsafeUtil.java' include 'com/google/protobuf/Utf8.java' include 'com/google/protobuf/WireFormat.java' + include 'com/google/protobuf/Writer.java' } } diff --git a/src/google/protobuf/util/internal/protostream_objectsource.cc b/src/google/protobuf/util/internal/protostream_objectsource.cc index 252184df0..f632064cc 100644 --- a/src/google/protobuf/util/internal/protostream_objectsource.cc +++ b/src/google/protobuf/util/internal/protostream_objectsource.cc @@ -539,6 +539,11 @@ Status ProtoStreamObjectSource::RenderStruct(const ProtoStreamObjectSource* os, ow->StartObject(field_name); while (tag != 0) { field = os->FindAndVerifyField(type, tag); + if (field == nullptr) { + WireFormat::SkipField(os->stream_, tag, nullptr); + tag = os->stream_->ReadTag(); + continue; + } // google.protobuf.Struct has only one field that is a map. Hence we use // RenderMap to render that field. if (os->IsMap(*field)) { |