Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b44381ad authored by David Brazdil's avatar David Brazdil Committed by android-build-merger
Browse files

Merge "Add serialization methods to hidden API light greylist" into pi-dev am: 02175b78

am: 3f3487d6

Change-Id: I90919d19dbb929af5702169e8ba399bb8b4a74d7
parents 44c06a9a 3f3487d6
Loading
Loading
Loading
Loading
+18 −2
Original line number Diff line number Diff line
@@ -764,11 +764,27 @@ include $(BUILD_STATIC_JAVA_LIBRARY)
$(eval $(call copy-one-file,frameworks/base/config/hiddenapi-blacklist.txt,\
                            $(INTERNAL_PLATFORM_HIDDENAPI_BLACKLIST)))

# Automatically add all methods which match the following signatures.
# These need to be greylisted in order to allow applications to write their
# own serializers.
$(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST): REGEX_SERIALIZATION := \
    "readObject\(Ljava/io/ObjectInputStream;\)V" \
    "readObjectNoData\(\)V" \
    "readResolve\(\)Ljava/lang/Object;" \
    "serialVersionUID:J" \
    "serialPersistentFields:\[Ljava/io/ObjectStreamField;" \
    "writeObject\(Ljava/io/ObjectOutputStream;\)V" \
    "writeReplace\(\)Ljava/lang/Object;"
$(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST): PRIVATE_API := $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE)
# Temporarily merge light greylist from two files. Vendor list will become dark
# grey once we remove the UI toast.
$(INTERNAL_PLATFORM_HIDDENAPI_LIGHT_GREYLIST): frameworks/base/config/hiddenapi-light-greylist.txt \
                                               frameworks/base/config/hiddenapi-vendor-list.txt
	sort $^ > $@
                                               frameworks/base/config/hiddenapi-vendor-list.txt \
                                               $(INTERNAL_PLATFORM_PRIVATE_DEX_API_FILE)
	sort frameworks/base/config/hiddenapi-light-greylist.txt \
	     frameworks/base/config/hiddenapi-vendor-list.txt \
	     <(grep -E "\->("$(subst $(space),"|",$(REGEX_SERIALIZATION))")$$" $(PRIVATE_API)) \
	> $@

# Generate dark greylist as private API minus (blacklist plus light greylist).

+0 −208

File changed.

Preview size limit exceeded, changes collapsed.