Skip to content
Snippets Groups Projects
  1. Jul 11, 2023
    • Yurii Zubrytskyi's avatar
      Reland "Use reference counted pointers for ApkAssets" · 1cf74939
      Yurii Zubrytskyi authored
      This reverts commit cf6e79f8
      
      Updates:
          Prepare the shared pointers for the whole operation at once
          instead of re-locking them on each iteration.
          Still a regression of about 5% for changing theme's
          AssetManager object, vs the original 40%
      
          + change the log message to a warning as it doesn't break
            the app
      
      Original comment:
      
          Use reference counted pointers for ApkAssets
      
          The primary reason for memory corruption is freed ApkAssets
          Java expected them to only be freed in the finalizers, but
          there are explicit close() calls now, destroying objects that
          are still in use in some AssetManager2 objects
      
          This CL makes sure those AssetManagers don't assume ApkAssets
          always exist, but instead tries to lock them in memory for any
          access
      
          It also adds logging in case of deleting an assets object with
          any weak pointers still existing. Those will get into the
          bugreports attached to related bugs to help with investigation.
      
          Benchmarks don't regress, and the device appears to be working.
          Given that the crashes used to be pretty rare, let's wait for
          any new reports or lack of those.
      
          + add a missing .clang-format file to the jni directory
          + enabled C++23 in the project that uses AssetManager headers
      
          Bug: 197260547
          Bug: 276922628
          Test: unit tests + boot + benchmarks
          Old change id: I495fd9e012fe370a1f725dbb0265b4ee1be8d805
      (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b3455190124b41e2deb1774d9c05b396b73b41a2)
      Merged-In: Id668fbcf07db17b09691a344c04e98df83006f97
      Change-Id: Id668fbcf07db17b09691a344c04e98df83006f97
      1cf74939
  2. May 26, 2023
    • Dominik Laskowski's avatar
      screencap: Allow virtual display ID in -d switch · 622c4aef
      Dominik Laskowski authored
      Ibe3679d810602456205e157fe2cb8cc510062215 restricted the argument to
      PhysicalDisplayId, which prevents capture of virtual displays.
      
      Fixes: 280785757
      Test: screencap -d <id>
      Change-Id: I41a8d1adaa51c6804c03f1b3084ac04ff6b4f1fa
      622c4aef
  3. May 10, 2023
  4. Apr 25, 2023
  5. Apr 07, 2023
  6. Apr 04, 2023
  7. Mar 28, 2023
    • Pascal Muetschard's avatar
      Adds the gpu_counter_producer command. · 33da4aef
      Pascal Muetschard authored
      This is a small binary that will load a GPU vendor provided shared
      library called libgpudataproducer.so, look for the "start" symbol in
      that library, and call it. This can be used to start the GPU hardware
      counter Perfetto producer that will allow tracing of GPU profiling data
      via Perfetto.
      
      See go/gpu-profiling-arch for more details on the GPU profiling
      architecture design.
      
      Test: manual
      Bug: b/273907878
      Change-Id: Iacccb562d0ef154c105de034c8801642cab72532
      33da4aef
  8. Mar 20, 2023
  9. Mar 15, 2023
    • Andrii Chepurnyi's avatar
      Request correct rendering type for EGL config · d93f7b27
      Andrii Chepurnyi authored
      According to [1] :
      section 3.4 :
      ...
      Creation of a client API context based on an EGLConfig will
      fail unless the EGLConfig’s EGL_RENDERABLE_TYPE attribute
      include the bit corresponding to that API and version.
      ...
      
      section 3.7.1.6:
      ...
      An EGL_BAD_MATCH error is generated if config does not support the
      requested client API. This includes requesting creation of an OpenGL ES
      1.x, 2.0, or 3.0 context when the EGL_RENDERABLE_TYPE attribute of config
      does not contain EGL_OPENGL_ES_BIT, EGL_OPENGL_ES2_BIT, or EGL_-
      OPENGL_ES3_BIT respectively.
      ...
      
      Bootanimation uses EGL_CONTEXT_CLIENT_VERSION  2 for context creation,
      so appropriate EGL_RENDERABLE_TYPE should be requested during eglChooseConfig.
      
      1. https://registry.khronos.org/EGL/specs/eglspec.1.5.pdf
      
      
      
      Change-Id: I5ebc18d8ace84197d069049decadb402576546b5
      Signed-off-by: default avatarAndrii Chepurnyi <andrii_chepurnyi@epam.com>
      d93f7b27
  10. Feb 23, 2023
    • Manjeet Rulhania's avatar
      Rely on Display#getRealSize when dumping XML hierarchy · 74184991
      Manjeet Rulhania authored
      * Previously, the height returned by Display#getSize was used to
        determine visible objects. Based on the API level and the presence of system decorations (e.g. notches), this can cause objects near the
        bottom of the screen to be considered out of bounds (i.e. only objects
        within y=0 and y=partial_height are considered even if the omitted
        decorations are at the top of the screen). cherry pick from aosp/2384832
      
      Bug: 236669488
      Test: manual
      Merged-In: Iba21245c947cec0d0054f6d86e3585ba73233223
      Change-Id: I50f143528d1f5a5b677eb2628efbcd658f4cc1b0
      (cherry picked from commit afebeb7b)
      74184991
  11. Jan 17, 2023
    • Ruslan Tkhakokhov's avatar
      Allow disabling framework Backup scheduling · 8094d4da
      Ruslan Tkhakokhov authored
      This remerges ag/20838898 that was reverted due to breaking a
      robolectric test in BackupFrameworksServicesRoboTests.
      
      Test: 1. atest BackupFrameworksServicesRoboTests
            2. atest CtsBackupHostTestCases
      Bug: 259953764
      Change-Id: I11c7dbe9959f5b5d1acf53e7830b7256357768e2
      8094d4da
  12. Jan 13, 2023
  13. Jan 06, 2023
    • Ricky Niu's avatar
      usb: Implement the AIDL in framework · 2617fd66
      Ricky Niu authored
      
      Implement the AIDL and HIDL coexist in framework
      
      Note: This is a cherry-pick of ag/17905026
      Bug: 218791946
      Test: USB function switch success and AIDL service is running.
            atest VtsHalUsbGadgetV2_0HostTest
      Signed-off-by: default avatarRicky Niu <rickyniu@google.com>
      
      Merged-In: I6d9bc861a4aceb753bf6f816daccd039e423994d
      Change-Id: I6d9bc861a4aceb753bf6f816daccd039e423994d
      (cherry picked from commit 74272e24)
      2617fd66
  14. Dec 19, 2022
    • Mariia Sandrikova's avatar
      Set orientation for boot animation and default display rotation. · a166f012
      Mariia Sandrikova authored
      Change the default display rotation value and boot animation orientation to the value specified in the sysprop ro.bootanim.set_orientation_<display_id>. Four values are supported: ORIENTATION_0, ORIENTATION_90, ORIENTATION_180 and ORIENTATION_270. If the value isn't specified or is ORIENTATION_0, nothing will be changed.
      
      This is needed to support having default rotation behavior and boot animation in orientation different from the natural device orientation. For example, on tablets that may want to keep natural orientation
      portrait for applications compatibility but have landscape orientation as a default choice from the UX perspective.
      
      Bug: 260627934
      Test: manual test with all 4 values and atest WmTests still pass
      Change-Id: I322919999ef787ff2c149293d7e1c7e669796c9a
      a166f012
  15. Dec 07, 2022
  16. Dec 01, 2022
  17. Nov 30, 2022
  18. Nov 28, 2022
    • felkachang's avatar
      Enforce the overlayable mechanism for self-targeting · a8fc0153
      felkachang authored
      The overlayable mechanism has defined which roles can overlay the
      specified resources and which resources are overlayable.
      
      In order to reduce the argument between platform and applications,
      self-targeting applications should enforce the overlayable mechanism.
      It makes the overlay range be defined in the overlayable list. It
      also defines the limitation of what kind of package can overlay the
      resources of the self-targeting application.
      
      To fill the policy flag, OverlayManagerImpl.java gets the following
      information and passes them as bool type to JNI OverlayManagerImpl.
      * SYSTEM_PARTITION
      * VENDOR_PARTITION
      * PRODUCT_PARTITION
      * ODM_PARTITION
      * OEM_PARTITION
      * SIGNATURE
      
      Not support
      * ACTOR_SIGNATURE
      * CONFIG_SIGNATURE
      
      JNI OverlayManagerImpl fills the policy flags according to the
      information from the ApplicationInfo. 'enforce_overlayable'is true to
      enforce checking overlayable before generating an idmap.
      
      Fixes: 238061808
      Bug: 205919743
      
      Test: atest \
                    OverlayHostTests \
                    OverlayDeviceTests \
                    SelfTargetingOverlayDeviceTests \
                    OverlayRemountedTest \
                    FrameworksServicesTests:com.android.server.om \
                    CtsContentTestCases:android.content.om.cts \
                    idmap2_tests
      
      Change-Id: I749d1a90a00f0a91e7796bc0f9f668f9ecfdb8b0
      a8fc0153
  19. Nov 24, 2022
    • felkachang's avatar
      Add OverlayManagerImpl to create frro, idmap and get overlayInfos · 1039d61b
      felkachang authored
      Add OverlayManagerImpl to let applications create frro and idmap files
      for overlaying itself's android resources.
      * OverlayManagerImpl.java
        * check the FabricatedOverlayInternal.
      * com_android_internal_content_om_OverlayManagerImpl.cpp
        * convert and read Java objects to native data.
        * call the APIs in libidmap2 to create frro and idmap files.
      
      Add OverlayManagerImpl.cpp into AndroidRuntime by modifying Android.bp
      * Add register_com_android_internal_content_om_OverlayManagerImpl
        register JNI methods
      * add com_android_internal_content_om_OverlayManagerImpl.cpp
          * It's a adapter to delegate the tasks to SelfTargeting.cpp
          * dynamic link with libidmap2 by using dlopen and dlsym to call
            functions in libidmap2.
      
      Add SelfTargeting.cpp into libidmap2
      * createFrroFile
      * createIdmapFile
      * getFabricatedOverlayInfo
      
      for interoperability between libandroid_runtime and libidmap2.
      * move OverlayManifestInfo from libidmap2 to libandroidfw
      * add FabricatedOverlayEntryParameters into libandroidfw
      
      Bug: 205919743
      
      Test: build
      Test: atest \
                        OverlayHostTests \
                        OverlayDeviceTests \
                        SelfTargetingOverlayDeviceTests \
                        OverlayRemountedTest \
                        FrameworksServicesTests:com.android.server.om \
                        CtsContentTestCases:android.content.om.cts \
                        idmap2_tests
      
      Change-Id: I5425f3229e9a3858e57427ef84e6abaf32e89b6e
      1039d61b
  20. Nov 14, 2022
  21. Nov 08, 2022
    • Andrew Zeng's avatar
      Fix boot animation alpha multiplication computations · f9f5822d
      Andrew Zeng authored
      Previously, this was resulting in the output color roughtly as
      
        output_n = color_n * mask_n^2 * (mask_0 + mask_1 + mask_2 + mask_3)
      
      where n is a color channel between 0 and 3.
      
      This caused extra aliasing around edges, since the alpha fades too
      quickly along an edge.
      
      Bug: 239632466
      Bug: 258246539
      Test: verify pixel values for boot animation match mask on watch + phone
      Test: modify uFade value, verify pixel colors match
      Change-Id: I86742a181576e684aa698a190a8766f4223de799
      f9f5822d
  22. Nov 02, 2022
    • Daniel Peykov's avatar
      Rely on Display#getRealSize when dumping XML hierarchy · afebeb7b
      Daniel Peykov authored
      * Previously, the height returned by Display#getSize was used to
        determine visible objects. Based on the API level and the presence of
        system decorations (e.g. notches), this can cause objects near the
        bottom of the screen to be considered out of bounds (i.e. only objects
        within y=0 and y=partial_height are considered even if the omitted
        decorations are at the top of the screen).
      
      Bug: 193270758
      Bug: 188156320
      Bug: 27537269
      Test: manual
      Change-Id: Iba21245c947cec0d0054f6d86e3585ba73233223
      afebeb7b
    • Yunfan Chen's avatar
      Fix display size calculations in large screen (2/3) · 6183509d
      Yunfan Chen authored
      The fix is taken from AOSP patch aosp/2154236.
      
      This will make sure the UI Automator always has the entire display to
      interact with. Otherwise, in multi-windowing mode or on devices with
      task bar, it will only be able to interact with the current focused
      window, the default launch bounds, or the display excluding task bar,
      depends on the actual scenario.
      
      Test: PlatformSenarioTests
      Bug: 238981445
      Bug: 238985243
      Bug: 238581838
      Bug: 233945217
      Change-Id: I9223ef5552ddb081e75de1242670862f2813e56d
      (cherry picked from commit d1e350c7)
      Merged-In: I9223ef5552ddb081e75de1242670862f2813e56d
      6183509d
  23. Oct 25, 2022
  24. Oct 10, 2022
    • Huihong Luo's avatar
      Capture first display for multi-display devices · 6f645f70
      Huihong Luo authored
      When no display id is explicitly specified, the first display is
      captured, and a warning message is printed out. This is to make
      the utility to be backward compatible with previous versions so
      tools depending on it continue to work.
      
      Bug: 241285477
      Test: manual, run screencap command to verify
      Change-Id: I713e1e5c625fd80ecb5587e0b2313f58baaffd40
      6f645f70
    • Kevin Jeon's avatar
      Reinstate most dumpsys sections in incident · b814366e
      Kevin Jeon authored
      This change reinstates most dumpsys sections in incident, because at
      least one of these sections are being used by ABT (ODPM info for Battery
      Historian). The dumpsys sections were originally removed because they
      were being collected elsewhere in dumpstate.
      
      The most expensive dumpsys section (meminfo, ~6 seconds) remains
      omitted, so most of the improvements of aosp/2156679 should be retained.
      
      Test: - atest incidentd_test
            - Capture bug report on an internal build and verify that ABT's
      	Battery Historian tab contains ODPM rails.
      Bug: 252586237
      Change-Id: I3e1e5ebea6d6829cb3b70ddb70721878053eb7ca
      b814366e
  25. Oct 04, 2022
    • Yurii Zubrytskyi's avatar
      [security] Make frro iteration thread-safe · 7b4d4ca5
      Yurii Zubrytskyi authored
      Add a lock over all frro iterator methods to make sure the
      iterator isn't changed or removed from under the iteration
      call while it's running.
      
      + Also introduce an ID ensuring the caller is the same for
        all the acquire/next/release methods
      
      + a bit of moves where they were supposed to be from the start
      
      Bug: 245727875
      Test: manual + presubmits
      Merged-In: Ie585b6d113ebddee491c9ee433f070bed71a57cc
      
      (cherry picked from commit de47d0b9)
      
      Change-Id: Ib4870d680501426dcc0a62eebd003451120179a5
      7b4d4ca5
  26. Oct 03, 2022
    • Huihong Luo's avatar
      Remove internal display related methods · 44305105
      Huihong Luo authored
      Sync with changes made in SurfaceFlinger and SurfaceComposerClient.
      Use the system property, persist.boot.animation.displays, to determine
      the displays to show the boot animation. If the system property is not
      present, the first display from the display list is used.
      
      Bug: 241285477
      Test: manual, run bootanim command to verify
      Change-Id: If29ecb12a68fc075daef2b8f674995d0f11cbc09
      44305105
  27. Sep 29, 2022
    • Yurii Zubrytskyi's avatar
      [security] Make frro iteration thread-safe · de47d0b9
      Yurii Zubrytskyi authored
      Add a lock over all frro iterator methods to make sure the
      iterator isn't changed or removed from under the iteration
      call while it's running.
      
      + Also introduce an ID ensuring the caller is the same for
        all the acquire/next/release methods
      
      + a bit of moves where they were supposed to be from the start
      
      Bug: 245727875
      Test: manual + presubmits
      Change-Id: Ie585b6d113ebddee491c9ee433f070bed71a57cc
      de47d0b9
    • Yurii Zubrytskyi's avatar
      Clean up some resources code · 1fc44ebb
      Yurii Zubrytskyi authored
      More moves and fewer allocations
      
      Bug: 237583012
      Test: unit tests
      Change-Id: I5cf43c8af0743c0e4d96808f1e55ceb4f02d7021
      1fc44ebb
  28. Sep 26, 2022
    • Huihong Luo's avatar
      Remove internal display related methods · 41ea7d14
      Huihong Luo authored
      Sync with changes made in SurfaceFlinger and SurfaceComposerClient.
      In the case of multi-display devices, a display id must be specified
      with "-d" option for screencap, since SurfaceFlinger is not guaranteed
      to provide the correct default display.
      
      Note this change breaks the default behavior of screencap, therefore
      tools that rely on screencap will have to be modified to select a display to deal with multi-display devices.
      
      Bug: 241285477
      Test: manual, run screencap command to verify
      Change-Id: Ibe3679d810602456205e157fe2cb8cc510062215
      41ea7d14
  29. Sep 20, 2022
    • Jeremy Meyer's avatar
      Avoid unnecessary object creation · b8aec01e
      Jeremy Meyer authored
      Without this change there are errors when running with the new version
      of clang
      
      Bug: 247585041
      Test: verified that frros used for colors still works, automated tests
      
      Change-Id: Iebbef8aaca866c6f34c381792c1e66bd6b2121f0
      b8aec01e
  30. Sep 19, 2022
    • Chih-Hung Hsieh's avatar
      Allow modernize-use-emplace warnings · a602a8b1
      Chih-Hung Hsieh authored
      Bug: 247585041
      Test: presubmit
      Test: lunch aosp_cf_arm64_only_phone_hwasan-userdebug;
      Test: make tidy-frameworks-base-cmds-idmap2_subset
      Change-Id: I2cd78fddb330c3fda3bbb88c2470dfb8b51ea4cf
      a602a8b1
  31. Sep 15, 2022
    • Jeremy Meyer's avatar
      Store frro configs in idmap file · be2b7797
      Jeremy Meyer authored
      This also includes the change to use the configs to decide which (if
      any) frros to use at runtime
      
      Bug: 243066074
      Test: Manual, updated and created automated tests
      Change-Id: I3f1d23e2958ad170799880b9f5eb5bd8ceb1fa67
      be2b7797
  32. Sep 13, 2022
    • Andrew Maganito's avatar
      Support for SensorHeadTrackerTest on Hid command · f532c911
      Andrew Maganito authored
      - Added support for SensorHeadTrackerTest. This does not affect other tests used by Hid Command tool.
      - Added two new functions setGetReportResponse() and
        sendSetReportReply()
      
      Bug: 228319672
      Test: atest android.hardware.cts.SensorHeadTrackerTest
      Change-Id: I83cfe1f71df57584dac7288ab092164a5c5dea3c
      f532c911
  33. Sep 01, 2022
    • Cole Faust's avatar
      Fix module-file name collisions · d633c8e4
      Cole Faust authored
      Bazel doesn't allow a module and file with the same name.
      
      These are some extra modules I missed in aosp/2201115
      
      Bug: 198619163
      Test: m am, verified it was still installed to out/target/product/emulator64_x86_64/system/bin/am and not am.sh
      Change-Id: I763a938918854541ec5b0bcf740b1b6cf0fce771
      d633c8e4
    • Ryan Prichard's avatar
      Add missing cassert includes · d9a3ffa6
      Ryan Prichard authored
      Bug: http://b/175635923
      Test: treehugger
      Change-Id: I8caf940f7b6e2fdd921516efea4aed14e0c2afb7
      d9a3ffa6
  34. Aug 31, 2022
    • felkachang's avatar
      Assign nullopt to remove unnecessary log · e03cea43
      felkachang authored
      Once the client requests idmap2d to release a directory iterator,
      idmap2d should follow the client request to free and release
      frro_iter_.
      
      It should not only check the value of frro_iter_ but also make
      frro_iter_ to be nullopt in releaseFabricatedOverlayIterator.
      
      Fixes: 244389702
      Test: adb reboot; adb wait-for-device; adb logcat -s idmap2d
      Change-Id: Ida1e7e7ae89f12407d26e66ab318a91e4f861df4
      e03cea43
Loading