Files
android_frameworks_base/ravenwood/texts/ravenwood-common-policies.txt
John Wu 0a8f7f56c6 [Ravenwood] Make FileInput/OutputStream behave like libcore
Introduce a new ClassVisitor JdkPatchVisitor in HSG to handle all
bytecode patches required to workaround JRE v.s. ART libcore behavior
differences.

Along with the change is the introduction of a new feature "class
remapping". Unlike jarjar or ClassRemapper in the ASM library, this
class remapping only does the following:

1. Change the super class of all direct subclasses of the target class
   to the remapped class.
2. Change all NEW operand of the target class to the remapped class.
3. Redirect all INVOKESPECIAL <init> of the target class to the remapped
   class.

By doing so, we basically force an additional layer of subclass to all
usages of the target class we want to patch. This gives us the ability
to change or add new behavior to classes in places where we cannot
directly modify, e.g. the standard JRE classes like FIS/FOS.

Bug: 397498134
Flag: EXEMPT host side change only
Test: f/b/r/scripts/run-ravenwood-tests.sh
Change-Id: I2c536e36c6954e30f0c5e1a1cbcdca0d7520c60b
2025-04-18 16:53:23 +00:00

17 lines
428 B
Plaintext

# Ravenwood "policy" that should apply to all code.
# The "no-pta" marker is used to exclude the lines from "ravenhelper pta",
# which tries to convert policies to annotations.
# Keep all AIDL interfaces
class :aidl keepclass
# Keep all feature flag implementations
class :feature_flags keepclass
# Keep all sysprops generated code implementations
class :sysprops keepclass
# Keep all resource R classes
class :r keepclass