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

Commit 77ebd08d authored by Colin Cross's avatar Colin Cross
Browse files

Use sdkparcelables to generate framework.aidl

Use sdkparcelables to extract public parcelables from the
public, test, and system stubs jars, and combine them into
framework.aidl.

Bug: 70046217
Test: m checkbuild
Change-Id: I9de0ffe9dffbd80c8cb785b0624959c52c3200a1
parent 149008d8
Loading
Loading
Loading
Loading
+19 −14
Original line number Original line Diff line number Diff line
@@ -244,12 +244,26 @@ aidl_files := \
	system/netd/server/binder/android/net/UidRange.aidl \
	system/netd/server/binder/android/net/UidRange.aidl \
	frameworks/base/telephony/java/android/telephony/PcoData.aidl \
	frameworks/base/telephony/java/android/telephony/PcoData.aidl \


aidl_parcelables :=
define stubs-to-aidl-parcelables
  gen := $(TARGET_OUT_COMMON_INTERMEDIATES)/$1.aidl
  aidl_parcelables += $$(gen)
  $$(gen): $(call java-lib-header-files,$1) | $(HOST_OUT_EXECUTABLES)/sdkparcelables
	@echo Extract SDK parcelables: $$@
	rm -f $$@
	$(HOST_OUT_EXECUTABLES)/sdkparcelables $$< $$@
endef

$(foreach stubs,android_stubs_current android_test_stubs_current android_system_stubs_current,\
  $(eval $(call stubs-to-aidl-parcelables,$(stubs))))

gen := $(TARGET_OUT_COMMON_INTERMEDIATES)/framework.aidl
gen := $(TARGET_OUT_COMMON_INTERMEDIATES)/framework.aidl
$(gen): PRIVATE_SRC_FILES := $(aidl_files)
.KATI_RESTAT: $(gen)
ALL_SDK_FILES += $(gen)
$(gen): $(aidl_parcelables)
$(gen): $(aidl_files) | $(AIDL)
	@echo Combining SDK parcelables: $@
		@echo Aidl Preprocess: $@
	rm -f $@.tmp
		$(hide) $(AIDL) --preprocess $@ $(PRIVATE_SRC_FILES)
	cat $^ | sort -u > $@.tmp
	$(call commit-change-for-toc,$@)


# the documentation
# the documentation
# ============================================================
# ============================================================
@@ -487,8 +501,6 @@ LOCAL_UNINSTALLABLE_MODULE := true


include $(BUILD_DROIDDOC)
include $(BUILD_DROIDDOC)


# $(gen), i.e. framework.aidl, is also needed while building against the current stub.
$(full_target): $(gen)
$(INTERNAL_PLATFORM_API_FILE): $(full_target)
$(INTERNAL_PLATFORM_API_FILE): $(full_target)
$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_API_FILE))
$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_API_FILE))


@@ -524,8 +536,6 @@ LOCAL_UNINSTALLABLE_MODULE := true


include $(BUILD_DROIDDOC)
include $(BUILD_DROIDDOC)


# $(gen), i.e. framework.aidl, is also needed while building against the current stub.
$(full_target): $(gen)
$(INTERNAL_PLATFORM_SYSTEM_API_FILE): $(full_target)
$(INTERNAL_PLATFORM_SYSTEM_API_FILE): $(full_target)
$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_SYSTEM_API_FILE))
$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_SYSTEM_API_FILE))


@@ -562,8 +572,6 @@ LOCAL_UNINSTALLABLE_MODULE := true


include $(BUILD_DROIDDOC)
include $(BUILD_DROIDDOC)


# $(gen), i.e. framework.aidl, is also needed while building against the current stub.
$(full_target): $(gen)
$(INTERNAL_PLATFORM_TEST_API_FILE): $(full_target)
$(INTERNAL_PLATFORM_TEST_API_FILE): $(full_target)
$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_TEST_API_FILE))
$(call dist-for-goals,sdk,$(INTERNAL_PLATFORM_TEST_API_FILE))


@@ -593,9 +601,6 @@ LOCAL_UNINSTALLABLE_MODULE := true


include $(BUILD_DROIDDOC)
include $(BUILD_DROIDDOC)


# $(gen), i.e. framework.aidl, is also needed while building against the current stub.
$(full_target): $(gen)

# Run this for checkbuild
# Run this for checkbuild
checkbuild: doc-comment-check-docs
checkbuild: doc-comment-check-docs
# Check comment when you are updating the API
# Check comment when you are updating the API