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

Commit e0a23a40 authored by Makoto Onuki's avatar Makoto Onuki
Browse files

[HostStubGen] preserve policy reason in generated jar

Now all the HostStubGen annotations has a "reason" field
which contains the "filter reason".

Also, store inline comments in the policy file in the "filter reason" too.

This means we can access information like "no-pta" in the policy file
at runtime, which would help analyze method call log.

Size impact:
Before:
    33986606 Jul  8 17:00 100-framework-minus-apex.ravenwood.jar
After:
    35639586 Jul 14 13:28 100-framework-minus-apex.ravenwood.jar

  -> ~5% increase
Before:
    231389156 Jul  8 14:56 SystemUiRavenTests.jar
After:
    234817831 Jul 14 14:43 SystemUiRavenTests.jar

  -> ~1% increase

Bug: 292141694
Flag: TEST_ONLY
Test: $ANDROID_BUILD_TOP/frameworks/base/ravenwood/scripts/run-ravenwood-tests.sh -s
Change-Id: Ifa2c253f28714c193119357744d56cdfb4daee67
parent b255f09d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -29,4 +29,6 @@ import java.lang.annotation.Target;
public @interface HostStubGenProcessedAsIgnore {
    String CLASS_INTERNAL_NAME = HostTestUtils.getInternalName(HostStubGenProcessedAsIgnore.class);
    String CLASS_DESCRIPTOR = "L" + CLASS_INTERNAL_NAME + ";";

    String reason() default "";
}
+2 −0
Original line number Diff line number Diff line
@@ -32,4 +32,6 @@ import java.lang.annotation.Target;
public @interface HostStubGenProcessedAsKeep {
    String CLASS_INTERNAL_NAME = HostTestUtils.getInternalName(HostStubGenProcessedAsKeep.class);
    String CLASS_DESCRIPTOR = "L" + CLASS_INTERNAL_NAME + ";";

    String reason() default "";
}
+2 −0
Original line number Diff line number Diff line
@@ -33,4 +33,6 @@ public @interface HostStubGenProcessedAsSubstitute {
    String CLASS_INTERNAL_NAME = HostTestUtils.getInternalName(
            HostStubGenProcessedAsSubstitute.class);
    String CLASS_DESCRIPTOR = "L" + CLASS_INTERNAL_NAME + ";";

    String reason() default "";
}
+2 −0
Original line number Diff line number Diff line
@@ -29,4 +29,6 @@ import java.lang.annotation.Target;
public @interface HostStubGenProcessedAsThrow {
    String CLASS_INTERNAL_NAME = HostTestUtils.getInternalName(HostStubGenProcessedAsThrow.class);
    String CLASS_DESCRIPTOR = "L" + CLASS_INTERNAL_NAME + ";";

    String reason() default "";
}
+2 −0
Original line number Diff line number Diff line
@@ -33,4 +33,6 @@ public @interface HostStubGenProcessedAsThrowButSupported {
    String CLASS_INTERNAL_NAME = HostTestUtils.getInternalName(
            HostStubGenProcessedAsThrowButSupported.class);
    String CLASS_DESCRIPTOR = "L" + CLASS_INTERNAL_NAME + ";";

    String reason() default "";
}
Loading