Skip to content
Snippets Groups Projects
  1. May 21, 2024
  2. May 15, 2024
  3. May 07, 2024
    • Ryan Prichard's avatar
      aapt2: fix dangling reference to diag · cbcff740
      Ryan Prichard authored
      The lambdas that ManifestFixer::BuildRules attach to XmlActionExecutor
      outlive ManifestFixer::BuildRules, so they need to capture diag
      by-value instead of by-reference.
      
      Bug: 339119172
      Test: aapt2_tests
      Change-Id: I6b9b6a8733875247a5be12111413b45b99727e1f
      cbcff740
  4. Apr 29, 2024
    • Mark Punzalan's avatar
      [aapt2] Add --non-updatable-system flag · cc694e55
      Mark Punzalan authored
      This adds `updatableSystem="false"` to the root <manifest> tag if no
      versionCode is specified (either explicitly or through --version-code).
      This attribute makes the APK not updatable (see b/266131956).
      
      Bug: 328302305
      Test: atest aapt2_tests
      Test: Manually ran `aapt2 link --non-updatable-system` and verified the
      resulting APK.
      
      Change-Id: I51cdbcdac7c03de10aac9bc22f5081e12fa142ab
      cc694e55
  5. Apr 26, 2024
    • Dario Freni's avatar
      Remove aapt2_results. · f4d8b9c2
      Dario Freni authored
      This rule was introduced in 2017 as a way to run unit tests in a continuous build target. We have better ways to achieve the same today.
      
      Bug: 337281646
      Bug: 332609042
      Test: presubmit
      Change-Id: Iba9934f39df2ebb883ded941d438b3528b3f29c2
      f4d8b9c2
    • Dario Freni's avatar
      Fix typo in aapt2_results genrule. · 3577d5d0
      Dario Freni authored
      Test: presubmit
      Change-Id: Ie32c7af67c17e4ffee8d5ce1fc74aa184925b755
      3577d5d0
  6. Apr 24, 2024
    • Jeff DeCew's avatar
      Support new generated CustomFeatureFlags · c2556685
      Jeff DeCew authored
      * Broaden jarjar Flags rules for NFC.  Note that this brings the NFC rules in line with other packages
      * Opt classes named CustomFeatureFlags into Ravenwood
      
      Flag: none
      Bug: 336768870
      Test: presubmit
      Change-Id: Ib1e76ebd04915554f464ec9a3d101b07925e18be
      c2556685
  7. Apr 18, 2024
    • Kean Mariotti's avatar
      Avoid outer/inner class name clashes · 804f0134
      Kean Mariotti authored
      In some cases, protoc-gen-javastream could emit outer classes
      and inner classes with the same name, which is invalid java.
      
      This commit extends protoc-gen-javastream to append an "OuterClass"
      suffix, if the outer class name clashes with any message.
      This behavior is consistent with the standard protoc.
      
      Bug: 276433199
      Test: presubmit
      Change-Id: I4e92d70c10c4d92d103b00f15b159acc08dffff2
      804f0134
    • Kean Mariotti's avatar
      Emit extension fields · 2163c8ae
      Kean Mariotti authored
      Extend protoc-gen-javastream to emit a message's extension fields
      (in addition to the current enums, nested types and regular fields).
      
      Bug: 276433199
      Test: presubmit
      Change-Id: Ibf25ff58796abcd59aa242bdf4295ba3ff2baf67
      2163c8ae
    • Kean Mariotti's avatar
      cleanup messages allow list · 18a165ea
      Kean Mariotti authored
      - Pass around container by reference instead of value
        (avoid unneeded deep-copies)
      - Use std::unordered_set instead of std::set (no need to be sorted)
      - Rename variable "messages_to_compile" to "messages_allowlist"
        to reduce confusion with other message lists in the code
      - Remove raw pointer
      
      Bug: 321668269
      Test: presubmit
      Change-Id: I43eaf5c1db3d15b066a95f34373211aadf6417b4
      18a165ea
  8. Mar 08, 2024
    • Sorin Basca's avatar
      Update the golden image after building with JDK 21 · 833fa691
      Sorin Basca authored
      This was generated by running:
      
      m droid && $ANDROID_BUILD_TOP/frameworks/base/tools/hoststubgen/hoststubgen/test-tiny-framework/diff-and-update-golden.sh -u
      
      Bug: 313924276
      Fixes: 328674570
      Test: TH
      Merged-In: Ia238ca246c4607984beaaa229ec21f2181f6f6a8
      Change-Id: Ia238ca246c4607984beaaa229ec21f2181f6f6a8
      833fa691
  9. Mar 05, 2024
    • Pablo Gamito's avatar
      Add option to only compile certain Proto messages · 6ca20ea9
      Pablo Gamito authored
      Used to save space in the framework.jar which isn't r8 optimized to
      remove unused constants.
      
      Bug: 321668269
      Test: abtd running v2/android-crystalball-eng/health/microbench/bootup/idle/aosp/system-processes-memory and checking pinner_system_/system/framework/framework.jar_bytes metric value
      Change-Id: I32d16f80364e3446799498318e40844bc8adfc5a
      6ca20ea9
  10. Feb 28, 2024
    • Makoto Onuki's avatar
      Fix typo, etc · f96aa34f
      Makoto Onuki authored
      Bug: 292141694
      Test: TH
      
      Change-Id: I96c5999679e52cb6db8a47c029291702ed4832a8
      f96aa34f
    • Makoto Onuki's avatar
      Temporarily disable test_compare_to_golden · 2fef277d
      Makoto Onuki authored
      Bug: 326897452
      Test: atest tiny-framework-dump-test # make sure the test won't run
      Change-Id: I8d674d0819a03e95a9e2400c6d4284588edc8794
      2fef277d
    • Pablo Gamito's avatar
      Increment protolog version · 9abac8a7
      Pablo Gamito authored
      Because we now dump 64 bit integers instead of 32 bit integers we need to have a different protolog version so we know which viewer config to use in Winscope
      
      Bug: 327002914
      
      Test: collected protolog trace in Winscope
      Change-Id: Iab3071952ff7957a11a0f01f09cfaa4306a7f7ae
      9abac8a7
    • Wei Li's avatar
      Change the default package license to Apache-2.0 and remove the Android.mk. · 1a20c12e
      Wei Li authored
      The Android.mk contains license declaration for aapt2_result only, and with this change that declares the license of the package precisely the
      Android.mk is not needed any more.
      
      Bug: 322285259
      Test: CIs
      Change-Id: Ie4b82686cc72d07b1c75016ede6f3c7c53816e83
      1a20c12e
  11. Feb 26, 2024
  12. Feb 22, 2024
    • Pablo Gamito's avatar
      Update ProtoLog build rules · 5fe2c80e
      Pablo Gamito authored
      ProtoLogTool now has additional parameters to support Perfetto tracing. We also need to generate and include a proto version of the viewer configuration.
      
      Flag: ACONFIG android.tracing.Flags.perfettoProtolog DEVELOPMENT
      Test: mp droid && atest FrameworksServicesTests
      Bug: 276432490
      Change-Id: I26929eed96faae04bec65ae5eaf86afda75cb83c
      5fe2c80e
    • Pablo Gamito's avatar
      Refactor ProtoLogImpl to support Perfetto tracing with flag better · 0ce7d7ce
      Pablo Gamito authored
      Flag: ACONFIG android.tracing.Flags.perfettoProtolog DEVELOPMENT
      Bug: 276432490
      Test: atest FrameworksServicesTests
      Change-Id: If95bfeeaff491ce51b61e34d2f8c22d8b635912d
      0ce7d7ce
    • Pablo Gamito's avatar
      Update ProtoLogTool · 44fe3a9a
      Pablo Gamito authored
      Generate the impl classes and support writing the viewer config to a proto file
      
      Flag: ACONFIG android.tracing.Flags.perfettoProtolog DEVELOPMENT
      Bug: 276432490
      Test: atest FrameworksServicesTests
      Change-Id: I69956b5ef2b8b48a98860aa3b8579521480d7bc0
      44fe3a9a
    • Pablo Gamito's avatar
      Update ProtoLogTool commands args · 329813a9
      Pablo Gamito authored
      We need these new parameters to inject those values into the generated classes so we don't have to manually create an impl of these class and passing those values manually.
      
      Flag: ACONFIG android.tracing.Flags.perfettoProtolog DEVELOPMENT
      Bug: 276432490
      Test: atest FrameworksServicesTests
      Change-Id: I32906cbe37c7c3899d7c487d5ed341381a05fdf1
      329813a9
    • Pablo Gamito's avatar
      Update ProtoLog hash function to 64 bit · 01e08016
      Pablo Gamito authored
      To avoid hash collisions now that we have more messages.
      
      Flag: ACONFIG android.tracing.Flags.perfettoProtolog DEVELOPMENT
      Bug: 276432490
      Test: atest FrameworksServicesTests
      Change-Id: Ia252f1fc60deb2beaf177b0782a8723e39f90a7e
      01e08016
    • Pablo Gamito's avatar
      Extract LogLevel to common package · f44daf99
      Pablo Gamito authored
      Since we now use it in a few different places including in the ProtoLogTool.
      
      Flag: ACONFIG android.tracing.Flags.perfettoProtolog DEVELOPMENT
      Bug: 276432490
      Test: atest FrameworksServicesTests
      Change-Id: Iba3a4904ea0b5e27afb1486c765e627fb343f6af
      f44daf99
  13. Feb 15, 2024
    • Makoto Onuki's avatar
      [Hoststubgen] Allow to apply policy based on inheritance · 3e12731d
      Makoto Onuki authored
      Use "*" + base class/interface name in the policy file to define
      an inheritance based policy.
      
      Wrote it to investigate classpath conflicting problem.
      
      It's not actually used on ravenwood. (at least yet)
      
      Test: ./ravenwood/run-ravenwood-tests.sh
      Bug: 292141694
      Change-Id: I173e2545a1ad9e0bc374d6798e1558dacc3569bd
      3e12731d
  14. Feb 14, 2024
    • Makoto Onuki's avatar
      Include hoststubgen tests in run-ravenwood-tests.sh · d347a616
      Makoto Onuki authored
      And remove the stale run-all-tests.sh.
      
      Bug: 315031371
      Test: ./ravenwood/run-ravenwood-tests.sh
      Change-Id: I2ac6457b1f60017c6e4e506ca11dbd7fc18dfa59
      d347a616
    • Dan Willemsen's avatar
      Set static timestamps in protologtool output · d0473319
      Dan Willemsen authored
      When build outputs are deterministic, that helps improve the RBE cache
      hit rate.
      
      Bug: 325124724
      Test: m out/soong/.intermediates/frameworks/base/libs/WindowManager/Shell/wm_shell_protolog_src/6c826b466f2421b82c3ec7d86f8481e7/gen/wm_shell_protolog.srcjar; zipinfo $!
      Change-Id: I838eb379531ae5434d576828e6be43663122187b
      d0473319
  15. Feb 13, 2024
    • Makoto Onuki's avatar
      Move "runtime helpers" to f/b/ravenwood · 053eac85
      Makoto Onuki authored
      - Also make sure framework-minus-apex is prioritized
      - Also some build rule cleanup
      
      Bug: 315031371
      Test: ./ravenwood/run-ravenwood-tests.sh
      
      Change-Id: I2d0eb822517abfc17f351810a53176ad9904f908
      053eac85
  16. Feb 12, 2024
    • Jeff Sharkey's avatar
      hoststubgen: Slightly refined stats. · fae66ea5
      Jeff Sharkey authored
      To give more accurate statistics, focus only on public non-abstract
      methods.  Shift measurement back to `BaseAdapter`, but only collect
      stats when operating in the `impl` mode; this ensures we're early
      enough to accurately count `substitute-from` methods.
      
      Also ignore common generated code like Protos, StatsLog, and
      LogTags, as we'll eventually be handling them all in a more
      consistent way.
      
      Bug: 324417456
      Test: atest FrameworksCoreTestsRavenwood
      Change-Id: I07e0ea4107b27dbfa241c48c9f05def445b78cfe
      fae66ea5
    • Jeff Sharkey's avatar
      Human-readable XML on Ravenwood. · 1e92835f
      Jeff Sharkey authored
      We had temporarily been using the binary XML implementation in all
      situations, but this change brings in the existing `kxml2-android`
      library to offer reading/writing of human-readable XML.  We also
      use the upstream SAX parser to offer an event-based parser.
      
      In all cases we carefully keep the existing XML libraries in place
      untouched on physical devices to avoid regressions.
      
      Bug: 324417456
      Test: atest CtsUtilTestCasesRavenwood
      Test: atest FrameworksCoreTestsRavenwood
      Test: atest FrameworksUtilTestsRavenwood
      Change-Id: I2effc7fca5c586968658073f9652d13cf50a2c66
      1e92835f
    • Pablo Gamito's avatar
      Add ProtoLog owners files · 2605a438
      Pablo Gamito authored
      Test: n/a
      Change-Id: I6e8a3f288a231f44e0df20b52f0bbf6a0ca08460
      2605a438
  17. Feb 09, 2024
    • Jeff Sharkey's avatar
      hoststubgen: Emit stats for dashboarding. · d2cc1917
      Jeff Sharkey authored
      As we expand our audience, developers will be interested in knowing
      what APIs are supported through a top-down dashboard view that we
      can continually update over time.
      
      This change emits a statistics CSV that can be easily bulk-imported
      to generate a dashboard.
      
      Bug: 322895594
      Test: TH
      Change-Id: Idea55b64cdb79e9a49f63340f83a1b395f8e5ec7
      d2cc1917
    • Dmitri Plotnikov's avatar
      Transition more PowerStats tests to Ravenwood · 77d4ceea
      Dmitri Plotnikov authored
      Bug: 314797745
      Test: atest PowerStatsTestsRavenwood PowerStatsTests FrameworksCoreTests
      Change-Id: I24bfe2e5c587e9547411ce5165d2fdd4c47b0e2b
      77d4ceea
  18. Feb 08, 2024
    • Jeff Sharkey's avatar
      Basic `ParcelFileDescriptor` on Ravenwood. · 6f218ec3
      Jeff Sharkey authored
      One of the final foundational building blocks, which wraps a Java
      `FileDescriptor` object.  Since many of the existing APIs here offer
      to work with "raw" int FD values, we need to reach "behind the
      curtain" to read/write the internal value.  Thankfully `SharedSecrets`
      already offers a way to gain access without requiring us to open
      up the entire `java.io` area of the `java.base` module.
      
      Bring along `android.util.CloseGuard` as a no-op wrapper.
      
      Bug: 324417456
      Test: atest CtsOsTestCasesRavenwood
      Change-Id: I8cffacf96d94aea2d40d75055a2411717e0c1bcf
      6f218ec3
  19. Feb 05, 2024
  20. Feb 02, 2024
    • Nelson Li's avatar
      Adding dist for aapt2_results · ffe60238
      Nelson Li authored
      In the previous transition to Android.bp change(aosp/2935114), the
      $(call dist-for-goals,aapt2_run_host_unit_tests, ...) was overlooked.
      This change added `dist` for `aapt2_results` to fix this issue.
      
      Bug: 322285259
      Test: m -j aapt2_run_host_unit_tests dist;
            Then, check ./out/dist/gtest/aapt2_host_unit_tests_result_x86.xml
            and ./out/dist/gtest/aapt2_host_unit_tests_result_x86_64.xml
      Change-Id: Ieaa67fef4a47b08fd97f3dc1810f4cd1933f155d
      ffe60238
  21. Feb 01, 2024
  22. Jan 30, 2024
    • Jeff Sharkey's avatar
      Ravenwood support for `wtf()`, wrap logging. · 587b3bec
      Jeff Sharkey authored
      There are some tests triggering `wtf()` during the normal course of
      operation, and we haven't been able to reproduce them yet.  This
      change gives us a valid `wtf()` implementation to aid debugging.
      
      It's also a bit jarring to have log-style messages interleaved with
      raw `System.out`, so also add `redirectLogStreams()` to match the
      logging behavior that developers observe on physical devices.
      
      Bug: 322805216
      Test: atest FrameworksCoreTestsRavenwood FrameworksUtilTestsRavenwood
      Change-Id: I8ea2d12638cd998e3962aaa8af09a3335fcd0d51
      587b3bec
    • Jeff Sharkey's avatar
      Improve Ravenwood logging/messages. · 3d14bf44
      Jeff Sharkey authored
      Emit "TestRunner" log messages around each test method, so that our
      local debugging logs match what developers experience with tests run
      on a physical device.
      
      Refine `onThrowMethodCalled()` message to be more descriptive about
      Ravenwood and link to docs.
      
      Bug: 322817109, 322526754
      Test: atest FrameworksCoreTestsRavenwood
      Change-Id: Id9f6a936145dd2024295c2eb14666fc43a5c7e34
      3d14bf44
    • Nelson Li's avatar
      Convert `aapt2_run_host_unit_tests` to Android.bp · 08b87e4c
      Nelson Li authored
      The handling of `declare-1p-target` will be deferred for future
      processing.
      
      Bug: 322285259
      Test: m aapt2_results
      Test: m aapt2_run_host_unit_tests
      Test: m -j out/host/linux-x86/gen/META/lic_intermediates/./out/soong/.intermediates/frameworks/base/tools/aapt2/aapt2_results.meta_lic
      Change-Id: I65ff18c9f4b490726011a490ba9045bf2078068e
      08b87e4c
  23. Jan 29, 2024
    • Jeff Sharkey's avatar
      Offer `TestLooperManager` on Ravenwood. · c91451a6
      Jeff Sharkey authored
      Common test utilities like `TestableLooper` rely on being able to
      drive `Looper` interactions via `TestLooperManager` which can only
      be obtained via `Instrumentation`.
      
      This change integrates with the common `InstrumentationRegistry`
      library which is how most tests obtain their `Instrumentation`
      instance.  We play an odd dance with `java_host_for_device` and
      `java_device_for_host` to get a version of `androidx.test.monitor`
      that we can link against our runtime.  (The build system otherwise
      gets excited that we're trying to compile an Android-linked library
      into what appears to be a Java-linked library, but we know that we're
      offering the Android runtime.)
      
      Fix subtle bug in `MessageQueue_host` where a requested wake might
      race with the `for (;;)` loop in `MessageQueue.next()`; if a wake is
      pending, it's a valid reason to return from `nativePollOnce()`.
      
      Add timeout logic to `RavenwoodRuleImpl` which can be enabled to
      dump all our stack traces just before Tradefed times out, to aid in
      debugging deadlocks; disabled by default.
      
      Bug: 319647875
      Test: atest SystemUiRoboTests
      Test: atest SystemUiRavenTests
      Test: atest FrameworksCoreTestsRavenwood:TestLooperManagerTest
      Change-Id: I13605d32df0c3e6758f541d5e75a6bdaf44368db
      c91451a6
Loading