Merge "Merge 24Q3 to AOSP main" into main

This commit is contained in:
Xin Li
2024-09-07 01:12:23 +00:00
committed by Gerrit Code Review
28 changed files with 245 additions and 121 deletions

View File

@@ -1207,6 +1207,11 @@ RSCOMPAT_NO_USAGEIO_API_LEVELS := 8 9 10 11 12 13
APPS_DEFAULT_VERSION_NAME := $(PLATFORM_VERSION)
# Add BUILD_NUMBER to apps if PRODUCT_BUILD_APPS_WITH_BUILD_NUMBER is defined.
ifeq ($(PRODUCT_BUILD_APPS_WITH_BUILD_NUMBER),true)
APPS_DEFAULT_VERSION_NAME := $(PLATFORM_VERSION)-$(BUILD_NUMBER_FROM_FILE)
endif
# ANDROID_WARNING_ALLOWED_PROJECTS is generated by build/soong.
define find_warning_allowed_projects
$(filter $(ANDROID_WARNING_ALLOWED_PROJECTS),$(1)/)

View File

@@ -493,6 +493,9 @@ _product_single_value_vars += PRODUCT_16K_DEVELOPER_OPTION
# by this flag.
_product_single_value_vars += PRODUCT_NOT_DEBUGGABLE_IN_USERDEBUG
# If set, the default value of the versionName of apps will include the build number.
_product_single_value_vars += PRODUCT_BUILD_APPS_WITH_BUILD_NUMBER
# If set, build would generate system image from Soong-defined module.
_product_single_value_vars += PRODUCT_SOONG_DEFINED_SYSTEM_IMAGE

View File

@@ -29,7 +29,9 @@
special_mts_test_suites :=
special_mts_test_suites += mcts
special_mts_test_suites += $(mts_modules)
ifneq ($(filter $(special_mts_test_suites),$(subst -, ,$(test_suite_name))),)
ifneq ($(filter $(special_mts_test_suites),$(patsubst mcts-%,%,$(test_suite_name))),)
test_suite_subdir := android-mts
else ifneq ($(filter $(special_mts_test_suites),$(patsubst mts-%,%,$(test_suite_name))),)
test_suite_subdir := android-mts
else
test_suite_subdir := android-$(test_suite_name)

View File

@@ -83,7 +83,6 @@ PRODUCT_PACKAGES += \
CtsShimPrivPrebuilt \
debuggerd\
device_config \
DeviceDiagnostics \
dmctl \
dnsmasq \
dmesgd \
@@ -533,3 +532,4 @@ $(call inherit-product,$(SRC_TARGET_DIR)/product/updatable_apex.mk)
$(call soong_config_set, bionic, large_system_property_node, $(RELEASE_LARGE_SYSTEM_PROPERTY_NODE))
$(call soong_config_set, Aconfig, read_from_new_storage, $(RELEASE_READ_FROM_NEW_STORAGE))
$(call soong_config_set, SettingsLib, legacy_avatar_picker_app_enabled, $(if $(RELEASE_AVATAR_PICKER_APP),,true))

View File

@@ -17,7 +17,8 @@
# Inherit common Android Go defaults.
$(call inherit-product, build/make/target/product/go_defaults_common.mk)
PRODUCT_RELEASE_CONFIG_MAPS += $(wildcard vendor/google_shared/build/release/go_devices/release_config_map.textproto)
# Product config map to toggle between sources and prebuilts of required mainline modules
PRODUCT_RELEASE_CONFIG_MAPS += $(wildcard vendor/google_shared/build/release/gms_mainline_go/required/release_config_map.textproto)
# Add the system properties.
TARGET_SYSTEM_PROP += \

View File

@@ -46,6 +46,7 @@ PRODUCT_PACKAGES += \
CertInstaller \
CredentialManager \
DeviceAsWebcam \
DeviceDiagnostics \
DocumentsUI \
DownloadProviderUi \
EasterEgg \

View File

@@ -23,3 +23,6 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/base_system_ext.mk)
# /system_ext packages
PRODUCT_PACKAGES += \
vndk_apex_snapshot_package \
# Window Extensions
$(call inherit-product, $(SRC_TARGET_DIR)/product/window_extensions_base.mk)

View File

@@ -14,11 +14,14 @@
# limitations under the License.
#
# /system_ext packages
PRODUCT_PACKAGES += \
androidx.window.extensions \
androidx.window.sidecar
# properties
# Extension of window_extensions_base.mk to enable the activity embedding
# feature for all apps by default. All large screen devices must inherit
# this in build. Optional for other form factors.
#
# Indicated whether the Activity Embedding feature should be guarded by
# Android 15 to avoid app compat impact.
# If true (or not set), the feature is only enabled for apps with target
# SDK of Android 15 or above.
# If false, the feature is enabled for all apps.
PRODUCT_PRODUCT_PROPERTIES += \
persist.wm.extensions.enabled=true
persist.wm.extensions.activity_embedding_guard_with_android_15=false

View File

@@ -0,0 +1,33 @@
#
# Copyright (C) 2024 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.
#
# The base version of window_extensions.mk to be included on all non-wearable
# devices. Devices that don't support multi-window can choose to drop this.
#
# Note: by default the Activity Embedding feature is guarded by app's
# targetSDK on Android 15 to avoid app compat impact.
#
# Large screen devices must inherit window_extensions.mk to enable the
# Activity Embedding feature for all apps.
# /system_ext packages
PRODUCT_PACKAGES += \
androidx.window.extensions \
androidx.window.sidecar
# properties
PRODUCT_PRODUCT_PROPERTIES += \
persist.wm.extensions.enabled=true

View File

@@ -24,4 +24,4 @@ python_binary_host {
prebuilt_etc_host {
name: "system_image_diff_allowlist",
src: "allowlist",
}
}

View File

@@ -34,4 +34,16 @@ init.environ.rc
# Known diffs only in the Soong system image
lib/libhidcommand_jni.so
lib/libuinputcommand_jni.so
lib/libuinputcommand_jni.so
# Known diffs in internal source
bin/uprobestats
etc/aconfig/flag.map
etc/aconfig/flag.val
etc/aconfig/package.map
etc/bpf/uprobestats/BitmapAllocation.o
etc/bpf/uprobestats/GenericInstrumentation.o
etc/init/UprobeStats.rc
lib/libuprobestats_client.so
lib64/libuprobestats_client.so
priv-app/DeviceDiagnostics/DeviceDiagnostics.apk

View File

@@ -19,3 +19,8 @@ Performed in build targets in Finalization branches.
## Utility:
[Full cleanup](./cleanup.sh). Remove all local changes and switch each project into head-less state. This is the best state to sync/rebase/finalize the branch.
## Dry run:
[Full cleanup](./dryrun-cleanup.sh). Remove all local changes and switch each project into head-less state. Also removes "DryRun" branches.
[SDK](./dryrun-step-1.sh). Perform SDK finalization and upload the CLs to Gerrit.
[SDK and REL](./dryrun-step-1-and-2.sh). Perform SDK finalization, plus all necessary changes to switch configuration to REL, and upload the CLs to Gerrit.

View File

@@ -9,10 +9,9 @@ function finalize_main_step1_and_m() {
local m="$top/build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"
# This command tests:
# The release state for AIDL.
# ABI difference between user and userdebug builds.
# Resource/SDK finalization.
AIDL_FROZEN_REL=true $m
$m
}
finalize_main_step1_and_m

View File

@@ -14,8 +14,8 @@ function finalize_revert_local_changes_main() {
repo forall -c '\
git checkout . ; git revert --abort ; git clean -fdx ;\
git checkout @ ; git branch fina-step1 -D ; git reset --hard; \
repo start fina-step1 ; git checkout @ ; git b fina-step1 -D ;'
git checkout @ --detach ; git branch fina-step1 -D ; git reset --hard; \
repo start fina-step1 ; git checkout @ --detach ; git b fina-step1 -D ;'
}
finalize_revert_local_changes_main

View File

@@ -0,0 +1,8 @@
ARGV=$(getopt --options '' --long dry-run -- "$@")
eval set -- "$ARGV"
while true; do
case "$1" in
--dry-run) repo_upload_dry_run_arg="--dry-run"; repo_branch="finalization-dry-run"; shift ;;
*) break
esac
done

View File

@@ -0,0 +1,25 @@
#!/bin/bash
# Brings local repository to a remote head state. Also removes all dryrun branches.
# set -ex
function finalize_revert_local_changes_main() {
local top="$(dirname "$0")"/../../../..
source $top/build/make/tools/finalization/environment.sh
local m="$top/build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"
# remove the out folder
$m clobber
repo selfupdate
repo forall -c '\
git checkout . ; git revert --abort ; git clean -fdx ;\
git checkout @ --detach ; git branch fina-step1 -D ; git reset --hard; \
repo start fina-step1 ; git checkout @ --detach ; git b fina-step1 -D ; \
git b $FINAL_PLATFORM_CODENAME-SDK-Finalization-DryRun -D; \
git b $FINAL_PLATFORM_CODENAME-SDK-Finalization-DryRun-Rel -D; '
}
finalize_revert_local_changes_main

View File

@@ -0,0 +1,39 @@
#!/bin/bash
# Script to perform 1st and 2nd step of Android Finalization, create CLs and upload to Gerrit.
function commit_step_2_changes() {
repo forall -c '\
if [[ $(git status --short) ]]; then
repo start "$FINAL_PLATFORM_CODENAME-SDK-Finalization-DryRun-Rel" ;
git add -A . ;
git commit -m "$FINAL_PLATFORM_CODENAME/$FINAL_PLATFORM_SDK_VERSION is now REL" \
-m "Ignore-AOSP-First: $FINAL_PLATFORM_CODENAME Finalization
Bug: $FINAL_BUG_ID
Test: build";
repo upload --cbr --no-verify -o nokeycheck -t -y . ;
fi'
}
function finalize_step_2_main() {
local top="$(dirname "$0")"/../../../..
source $top/build/make/tools/finalization/environment.sh
source $top/build/make/tools/finalization/finalize-sdk-resources.sh
source $top/build/make/tools/finalization/localonly-steps.sh
source $top/build/make/tools/finalization/finalize-sdk-rel.sh
# move all changes to finalization branch/topic and upload to gerrit
commit_step_2_changes
# build to confirm everything is OK
local m_next="$top/build/soong/soong_ui.bash --make-mode TARGET_RELEASE=next TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"
$m_next
local m_fina="$top/build/soong/soong_ui.bash --make-mode TARGET_RELEASE=fina_2 TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"
$m_fina
}
finalize_step_2_main

View File

@@ -0,0 +1,35 @@
#!/bin/bash
# Script to perform a dry run of step 1 of Android Finalization, create CLs and upload to Gerrit.
function commit_step_1_changes() {
repo forall -c '\
if [[ $(git status --short) ]]; then
repo start "$FINAL_PLATFORM_CODENAME-SDK-Finalization-DryRun" ;
git add -A . ;
git commit -m "$FINAL_PLATFORM_CODENAME is now $FINAL_PLATFORM_SDK_VERSION" \
-m "Ignore-AOSP-First: $FINAL_PLATFORM_CODENAME Finalization
Bug: $FINAL_BUG_ID
Test: build";
repo upload --cbr --no-verify -o nokeycheck -t -y . ;
fi'
}
function finalize_step_1_main() {
local top="$(dirname "$0")"/../../../..
source $top/build/make/tools/finalization/environment.sh
source $top/build/make/tools/finalization/finalize-sdk-resources.sh
# move all changes to finalization branch/topic and upload to gerrit
commit_step_1_changes
# build to confirm everything is OK
local m_next="$top/build/soong/soong_ui.bash --make-mode TARGET_RELEASE=next TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"
$m_next
local m_fina="$top/build/soong/soong_ui.bash --make-mode TARGET_RELEASE=fina_1 TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"
$m_fina
}
finalize_step_1_main

View File

@@ -15,14 +15,14 @@ export FINAL_PLATFORM_VERSION='15'
# We might or might not fix this in future, but for now let's keep it +1.
export FINAL_PLATFORM_SDK_VERSION='35'
# Feel free to randomize once in a while to detect buggy version detection code.
export FINAL_MAINLINE_EXTENSION='58'
export FINAL_MAINLINE_EXTENSION='13'
# Options:
# 'unfinalized' - branch is in development state,
# 'vintf' - VINTF is finalized
# 'sdk' - VINTF and SDK/API are finalized
# 'rel' - branch is finalized, switched to REL
export FINAL_STATE='vintf'
export FINAL_STATE='rel'
export BUILD_FROM_SOURCE_STUB=true

View File

@@ -8,12 +8,6 @@ function revert_droidstubs_hack() {
fi
}
function revert_resources_sdk_int_fix() {
if grep -q 'public static final int RESOURCES_SDK_INT = SDK_INT;' "$top/frameworks/base/core/java/android/os/Build.java" ; then
patch --strip=1 --no-backup-if-mismatch --directory="$top/frameworks/base" --input=../../build/make/tools/finalization/frameworks_base.revert_resource_sdk_int.diff
fi
}
function apply_prerelease_sdk_hack() {
if ! grep -q 'STOPSHIP: hack for the pre-release SDK' "$top/frameworks/base/core/java/android/content/pm/parsing/FrameworkParsingPackageUtils.java" ; then
patch --strip=1 --no-backup-if-mismatch --directory="$top/frameworks/base" --input=../../build/make/tools/finalization/frameworks_base.apply_hack.diff
@@ -30,25 +24,18 @@ function finalize_sdk_rel() {
# let the apps built with pre-release SDK parse
apply_prerelease_sdk_hack
# in REL mode, resources would correctly set the resources_sdk_int, no fix required
revert_resources_sdk_int_fix
# cts
echo "$FINAL_PLATFORM_VERSION" > "$top/cts/tests/tests/os/assets/platform_versions.txt"
if ! grep -q "${FINAL_PLATFORM_VERSION}" "$top/cts/tests/tests/os/assets/platform_versions.txt" ; then
echo ${FINAL_PLATFORM_VERSION} >> "$top/cts/tests/tests/os/assets/platform_versions.txt"
fi
if [ "$FINAL_PLATFORM_CODENAME" != "$CURRENT_PLATFORM_CODENAME" ]; then
echo "$CURRENT_PLATFORM_CODENAME" >> "./cts/tests/tests/os/assets/platform_versions.txt"
fi
git -C "$top/cts" mv hostsidetests/theme/assets/${FINAL_PLATFORM_CODENAME} hostsidetests/theme/assets/${FINAL_PLATFORM_SDK_VERSION}
# prebuilts/abi-dumps/platform
mkdir -p "$top/prebuilts/abi-dumps/platform/$FINAL_PLATFORM_SDK_VERSION"
cp -r "$top/prebuilts/abi-dumps/platform/current/64/" "$top/prebuilts/abi-dumps/platform/$FINAL_PLATFORM_SDK_VERSION/"
# TODO(b/309880485)
# uncomment and update
# prebuilts/abi-dumps/ndk
#mkdir -p "$top/prebuilts/abi-dumps/ndk/$FINAL_PLATFORM_SDK_VERSION"
#cp -r "$top/prebuilts/abi-dumps/ndk/current/64/" "$top/prebuilts/abi-dumps/ndk/$FINAL_PLATFORM_SDK_VERSION/"
"$top/build/soong/soong_ui.bash" --make-mode TARGET_RELEASE=next TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug create_reference_dumps
ANDROID_BUILD_TOP="$top" "$top/out/host/linux-x86/bin/create_reference_dumps" -release next --build-variant userdebug --lib-variant APEX
}
finalize_sdk_rel

View File

@@ -9,13 +9,6 @@ function apply_droidstubs_hack() {
fi
}
function apply_resources_sdk_int_fix() {
if ! grep -q 'public static final int RESOURCES_SDK_INT = SDK_INT;' "$top/frameworks/base/core/java/android/os/Build.java" ; then
local base_git_root="$(readlink -f $top/frameworks/base)"
patch --strip=1 --no-backup-if-mismatch --directory="$base_git_root" --input=../../build/make/tools/finalization/frameworks_base.apply_resource_sdk_int.diff
fi
}
function finalize_bionic_ndk() {
# Adding __ANDROID_API_<>__.
# If this hasn't done then it's not used and not really needed. Still, let's check and add this.
@@ -41,7 +34,8 @@ function finalize_modules_utils() {
echo " /** Checks if the device is running on a release version of Android $FINAL_PLATFORM_CODENAME or newer */
@ChecksSdkIntAtLeast(api = $FINAL_PLATFORM_SDK_VERSION /* BUILD_VERSION_CODES.$FINAL_PLATFORM_CODENAME */)
public static boolean isAtLeast${FINAL_PLATFORM_CODENAME:0:1}() {
return SDK_INT >= $FINAL_PLATFORM_SDK_VERSION;
return SDK_INT >= $FINAL_PLATFORM_SDK_VERSION ||
(SDK_INT == $(($FINAL_PLATFORM_SDK_VERSION - 1)) && isAtLeastPreReleaseCodename(\"$FINAL_PLATFORM_CODENAME\"));
}" > "$tmpfile"
local javaFuncRegex='\/\*\*[^{]*isAtLeast'"${shortCodename}"'() {[^{}]*}'
@@ -55,7 +49,11 @@ function finalize_modules_utils() {
d}' $javaSdkLevel
echo "// Checks if the device is running on release version of Android ${FINAL_PLATFORM_CODENAME:0:1} or newer.
inline bool IsAtLeast${FINAL_PLATFORM_CODENAME:0:1}() { return android_get_device_api_level() >= $FINAL_PLATFORM_SDK_VERSION; }" > "$tmpfile"
inline bool IsAtLeast${FINAL_PLATFORM_CODENAME:0:1}() {
return android_get_device_api_level() >= $FINAL_PLATFORM_SDK_VERSION ||
(android_get_device_api_level() == $(($FINAL_PLATFORM_SDK_VERSION - 1)) &&
detail::IsAtLeastPreReleaseCodename(\"$FINAL_PLATFORM_CODENAME\"));
}" > "$tmpfile"
local cppFuncRegex='\/\/[^{]*IsAtLeast'"${shortCodename}"'() {[^{}]*}'
local cppFuncReplace="N;N;N;N;N;N; s/$cppFuncRegex/$methodPlaceholder/; /$cppFuncRegex/!{P;D};"
@@ -123,14 +121,18 @@ function finalize_sdk_resources() {
sed -i -e 's/Pkg\.Revision.*/Pkg\.Revision=${PLATFORM_SDK_VERSION}.0.0/g' $build_tools_source
# build/soong
local codename_version="\"${FINAL_PLATFORM_CODENAME}\": ${FINAL_PLATFORM_SDK_VERSION}"
local codename_version="\"${FINAL_PLATFORM_CODENAME}\": ${FINAL_PLATFORM_SDK_VERSION}"
if ! grep -q "$codename_version" "$top/build/soong/android/api_levels.go" ; then
sed -i -e "/:.*$((${FINAL_PLATFORM_SDK_VERSION}-1)),/a \\\t\t$codename_version," "$top/build/soong/android/api_levels.go"
fi
# cts
echo ${FINAL_PLATFORM_VERSION} > "$top/cts/tests/tests/os/assets/platform_releases.txt"
sed -i -e "s/EXPECTED_SDK = $((${FINAL_PLATFORM_SDK_VERSION}-1))/EXPECTED_SDK = ${FINAL_PLATFORM_SDK_VERSION}/g" "$top/cts/tests/tests/os/src/android/os/cts/BuildVersionTest.java"
if ! grep -q "${FINAL_PLATFORM_VERSION}" "$top/cts/tests/tests/os/assets/platform_releases.txt" ; then
echo ${FINAL_PLATFORM_VERSION} >> "$top/cts/tests/tests/os/assets/platform_releases.txt"
fi
if ! grep -q "$((${FINAL_PLATFORM_SDK_VERSION}-1)), ${FINAL_PLATFORM_VERSION}" "$top/cts/tests/tests/os/src/android/os/cts/BuildVersionTest.java" ; then
sed -i -e "s/.*EXPECTED_SDKS = List.of(.*$((${FINAL_PLATFORM_SDK_VERSION}-1))/&, $FINAL_PLATFORM_SDK_VERSION/" "$top/cts/tests/tests/os/src/android/os/cts/BuildVersionTest.java"
fi
# libcore
sed -i "s%$SDK_CODENAME%$SDK_VERSION%g" "$top/libcore/dalvik/src/main/java/dalvik/annotation/compat/VersionCodes.java"
@@ -153,7 +155,6 @@ function finalize_sdk_resources() {
# frameworks/base
sed -i "s%$SDK_CODENAME%$SDK_VERSION%g" "$top/frameworks/base/core/java/android/os/Build.java"
apply_resources_sdk_int_fix
sed -i -e "/=.*$((${FINAL_PLATFORM_SDK_VERSION}-1)),/a \\ SDK_${FINAL_PLATFORM_CODENAME_JAVA} = ${FINAL_PLATFORM_SDK_VERSION}," "$top/frameworks/base/tools/aapt/SdkConstants.h"
sed -i -e "/=.*$((${FINAL_PLATFORM_SDK_VERSION}-1)),/a \\ SDK_${FINAL_PLATFORM_CODENAME_JAVA} = ${FINAL_PLATFORM_SDK_VERSION}," "$top/frameworks/base/tools/aapt2/SdkConstants.h"

View File

@@ -16,8 +16,6 @@ function finalize_vintf_resources() {
export TARGET_RELEASE=fina_0
export TARGET_PRODUCT=aosp_arm64
# TODO(b/314010764): finalize LL_NDK
# system/sepolicy
"$top/system/sepolicy/tools/finalize-vintf-resources.sh" "$top" "$FINAL_BOARD_API_LEVEL"
@@ -25,7 +23,11 @@ function finalize_vintf_resources() {
# pre-finalization build target (trunk)
local aidl_m="$top/build/soong/soong_ui.bash --make-mode"
AIDL_TRANSITIVE_FREEZE=true $aidl_m aidl-freeze-api
AIDL_TRANSITIVE_FREEZE=true $aidl_m aidl-freeze-api create_reference_dumps
# Generate LLNDK ABI dumps
# This command depends on ANDROID_BUILD_TOP
"$ANDROID_HOST_OUT/bin/create_reference_dumps" -release "$TARGET_RELEASE" --build-variant "$TARGET_BUILD_VARIANT" --lib-variant LLNDK
}
function create_new_compat_matrix_and_kernel_configs() {

View File

@@ -1,24 +0,0 @@
From cdb47fc90b8d6860ec1dc5efada1f9ccd471618b Mon Sep 17 00:00:00 2001
From: Alex Buynytskyy <alexbuy@google.com>
Date: Tue, 11 Apr 2023 22:12:44 +0000
Subject: [PATCH] Don't force +1 for resource resolution.
Bug: 277674088
Fixes: 277674088
Test: boots, no crashes
Change-Id: I17e743a0f1cf6f98fddd40c358dea5a8b9cc7723
---
diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java
index eb47170..4d3e92b 100755
--- a/core/java/android/os/Build.java
+++ b/core/java/android/os/Build.java
@@ -493,7 +493,7 @@
* @hide
*/
@TestApi
- public static final int RESOURCES_SDK_INT = SDK_INT + ACTIVE_CODENAMES.length;
+ public static final int RESOURCES_SDK_INT = SDK_INT;
/**
* The current lowest supported value of app target SDK. Applications targeting

View File

@@ -1,27 +0,0 @@
From c7e460bb19071d867cd7ca04282ce42694f4f358 Mon Sep 17 00:00:00 2001
From: Alex Buynytskyy <alexbuy@google.com>
Date: Wed, 12 Apr 2023 01:06:26 +0000
Subject: [PATCH] Revert "Don't force +1 for resource resolution."
It's not required for master.
This reverts commit f1cb683988f81579a76ddbf9993848a4a06dd28c.
Bug: 277674088
Test: boots, no crashes
Change-Id: Ia1692548f26496fdc6f1e4f0557213c7996d6823
---
diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java
index 4d3e92b..eb47170 100755
--- a/core/java/android/os/Build.java
+++ b/core/java/android/os/Build.java
@@ -493,7 +493,7 @@
* @hide
*/
@TestApi
- public static final int RESOURCES_SDK_INT = SDK_INT;
+ public static final int RESOURCES_SDK_INT = SDK_INT + ACTIVE_CODENAMES.length;
/**
* The current lowest supported value of app target SDK. Applications targeting

View File

@@ -10,14 +10,15 @@ function finalize_locally() {
local m="$top/build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_arm64 TARGET_RELEASE=fina_1 TARGET_BUILD_VARIANT=userdebug DIST_DIR=out/dist"
# adb keys
$m adb
LOGNAME=android-eng HOSTNAME=google.com "$top/out/host/linux-x86/bin/adb" keygen "$top/vendor/google/security/adb/${FINAL_PLATFORM_VERSION}.adb_key"
# The keys are already generated for Android 15. Keeping the command (commented out) for future reference.
# $m adb
# LOGNAME=android-eng HOSTNAME=google.com "$top/out/host/linux-x86/bin/adb" keygen "$top/vendor/google/security/adb/${FINAL_PLATFORM_VERSION}.adb_key"
# Build Platform SDKs.
$top/build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=sdk TARGET_RELEASE=fina_1 TARGET_BUILD_VARIANT=userdebug sdk dist sdk_repo DIST_DIR=out/dist
# Build Modules SDKs.
TARGET_RELEASE=fina_1 TARGET_BUILD_VARIANT=userdebug UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true DIST_DIR=out/dist "$top/vendor/google/build/mainline_modules_sdks.sh" --build-release=latest
TARGET_RELEASE=fina_1 TARGET_BUILD_VARIANT=userdebug UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true DIST_DIR=out/dist "$top/vendor/google/build/mainline_modules_sdks.sh" --build-release=next
# Update prebuilts.
"$top/prebuilts/build-tools/path/linux-x86/python3" -W ignore::DeprecationWarning "$top/prebuilts/sdk/update_prebuilts.py" --local_mode -f ${FINAL_PLATFORM_SDK_VERSION} -e ${FINAL_MAINLINE_EXTENSION} --bug 1 1

View File

@@ -9,19 +9,21 @@ function commit_step_0_changes() {
set +e
repo forall -c '\
if [[ $(git status --short) ]]; then
repo start "VINTF-$FINAL_BOARD_API_LEVEL-Finalization" ;
repo start "'$repo_branch'" ;
git add -A . ;
git commit -m "Vendor API level $FINAL_BOARD_API_LEVEL is now frozen" \
-m "Ignore-AOSP-First: VINTF $FINAL_BOARD_API_LEVEL Finalization
Bug: $FINAL_BUG_ID
Test: build";
repo upload --cbr --no-verify -o nokeycheck -t -y . ;
repo upload '"$repo_upload_dry_run_arg"' --cbr --no-verify -o nokeycheck -t -y . ;
fi'
}
function finalize_step_0_main() {
local top="$(dirname "$0")"/../../../..
source $top/build/make/tools/finalization/environment.sh
local repo_branch="VINTF-$FINAL_BOARD_API_LEVEL-Finalization"
source $top/build/make/tools/finalization/command-line-options.sh
local m="$top/build/soong/soong_ui.bash --make-mode TARGET_RELEASE=next TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"
@@ -34,4 +36,4 @@ function finalize_step_0_main() {
AIDL_FROZEN_REL=true $m
}
finalize_step_0_main
finalize_step_0_main $@

View File

@@ -7,21 +7,21 @@ function commit_step_1_changes() {
set +e
repo forall -c '\
if [[ $(git status --short) ]]; then
repo start "$FINAL_PLATFORM_CODENAME-SDK-Finalization" ;
repo start "'$repo_branch'" ;
git add -A . ;
git commit -m "$FINAL_PLATFORM_CODENAME is now $FINAL_PLATFORM_SDK_VERSION and extension version $FINAL_MAINLINE_EXTENSION" \
-m "Ignore-AOSP-First: $FINAL_PLATFORM_CODENAME Finalization
Bug: $FINAL_BUG_ID
Test: build";
repo upload --cbr --no-verify -o nokeycheck -t -y . ;
repo upload '"$repo_upload_dry_run_arg"' --cbr --no-verify -o nokeycheck -t -y . ;
fi'
}
function finalize_step_1_main() {
local top="$(dirname "$0")"/../../../..
source $top/build/make/tools/finalization/environment.sh
local m="$top/build/soong/soong_ui.bash --make-mode TARGET_RELEASE=next TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"
local repo_branch="$FINAL_PLATFORM_CODENAME-SDK-Finalization"
source $top/build/make/tools/finalization/command-line-options.sh
source $top/build/make/tools/finalization/finalize-sdk-resources.sh
@@ -29,7 +29,11 @@ function finalize_step_1_main() {
commit_step_1_changes
# build to confirm everything is OK
AIDL_FROZEN_REL=true $m
local m_next="$top/build/soong/soong_ui.bash --make-mode TARGET_RELEASE=next TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"
$m_next
local m_fina="$top/build/soong/soong_ui.bash --make-mode TARGET_RELEASE=fina_1 TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"
$m_fina
}
finalize_step_1_main
finalize_step_1_main $@

View File

@@ -4,22 +4,22 @@
function commit_step_2_changes() {
repo forall -c '\
if [[ $(git status --short) ]]; then
repo start "$FINAL_PLATFORM_CODENAME-SDK-Finalization-Rel" ;
repo start "'$repo_branch'" ;
git add -A . ;
git commit -m "$FINAL_PLATFORM_CODENAME/$FINAL_PLATFORM_SDK_VERSION is now REL" \
-m "Ignore-AOSP-First: $FINAL_PLATFORM_CODENAME Finalization
Bug: $FINAL_BUG_ID
Test: build";
repo upload --cbr --no-verify -o nokeycheck -t -y . ;
repo upload '"$repo_upload_dry_run_arg"' --cbr --no-verify -o nokeycheck -t -y . ;
fi'
}
function finalize_step_2_main() {
local top="$(dirname "$0")"/../../../..
source $top/build/make/tools/finalization/environment.sh
local m="$top/build/soong/soong_ui.bash --make-mode TARGET_RELEASE=next TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"
local repo_branch="$FINAL_PLATFORM_CODENAME-SDK-Finalization-Rel"
source $top/build/make/tools/finalization/command-line-options.sh
# prebuilts etc
source $top/build/make/tools/finalization/finalize-sdk-rel.sh
@@ -28,7 +28,11 @@ function finalize_step_2_main() {
commit_step_2_changes
# build to confirm everything is OK
AIDL_FROZEN_REL=true $m
local m_next="$top/build/soong/soong_ui.bash --make-mode TARGET_RELEASE=next TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"
$m_next
local m_fina="$top/build/soong/soong_ui.bash --make-mode TARGET_RELEASE=fina_2 TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"
$m_fina
}
finalize_step_2_main
finalize_step_2_main $@