Skip to content
Snippets Groups Projects
  1. May 22, 2024
  2. May 14, 2024
  3. May 13, 2024
    • derek.li's avatar
      Fix Boot animation display issue on android 14 devices · 9231011c
      derek.li authored
      Use the size of limitSurfaceSize to set the window
      
      Bug: 339763174
      Test: 1. set the property:
      	    [ro.surface_flinger.max_graphics_height]: [1080]
          	[ro.surface_flinger.max_graphics_width]: [1920]
          2. Repeatedly Turn on/off while connecting to 4K TV and check the boot animation
      Change-Id: I378aab715d75b8ddb47068cb0e81503d83339021
      9231011c
  4. May 09, 2024
  5. Apr 23, 2024
    • Harry Cutts's avatar
      uinput: fix timestamps for JSON-style recordings · 24cff7df
      Harry Cutts authored
      The previous changes to support specifying timestamps for evemu
      recordings inadvertently made injections from JSON-style recordings have
      the timestamps at which the injection was scheduled, not when it
      happened, causing many events to be injected with very close-together
      timestamps. This broke drawing in the tests for some inking libraries,
      such as Keep's.
      
      Bug: 330844071
      Test: $ atest 'PlatformScenarioTests:android.platform.test.scenario.sysui.stylus.StylusInkingTest#writeText_appearsInShowcaseApp'
            (with the @Ignore in StylusInkingTest.kt removed)
      Test: replay the recording from b/330844071#comment30, check the curve
            is drawn correctly
      Test: replay an evemu recording and check that the timestamps shown by
            `getevent -lt` are still correct
      Change-Id: I5342a79d4f9b53875b9918443bf1f5fd16cd205e
      24cff7df
  6. Apr 05, 2024
    • Ronald Braunstein's avatar
      Migrating test options From TEST_MAPPING -> Android.bp · d9b0dc59
      Ronald Braunstein authored
      See parent cl: aosp/3028633
      
      Test: atest -p cmds/locksettings:postsubmit
      Test: atest -p services/core/java/com/android/server/locksettings:postsubmit
      Test: atest -p services/devicepolicy:postsubmit
      Change-Id: I6d0d0320e0bf8927f9b8b27b471ae58ace56124a
      d9b0dc59
  7. Apr 04, 2024
  8. Apr 03, 2024
    • Harry Cutts's avatar
      uinput: add updateTimeBase command · 526ae41a
      Harry Cutts authored
      The recent change to how event injections are scheduled causes problems
      when a client waits a considerable time after a device registration
      before sending a lot of events separated by delays. The long wait means
      that many of the events get scheduled in the past, so they're all
      injected at once, filling the kernel's buffers and causing events to be
      dropped.
      
      The updateTimeBase command allows the client to tell us that the long
      delay is intentional, and that the following injections should be
      scheduled relative to the current time, rather than the previous
      injections or the registration.
      
      [0]: change Ieaa4f2f06d5e0b7d13abc3afa474948996db7c0a
      
      Bug: 330844071
      Test: check for SYN_DROPPED events in the output of:
            $ adb shell getevent -lt
            while running the inking test:
            $ atest 'PlatformScenarioTests:android.platform.test.scenario.sysui.stylus.StylusInkingTest#writeText_appearsInShowcaseApp'
      Change-Id: I31c596251e27149da16270a23f4f57e7bb8e3460
      526ae41a
  9. Apr 02, 2024
    • Piyush Mehrotra's avatar
      Increase BMM logging coverage for restore at install flow · f11e886d
      Piyush Mehrotra authored
      This change adds BMM logging in restore at install flow right from the point when PackageManager triggers restore.
      The change also adds more detailed logging in Full Restore flow, around various failure points. This'll help with quantify different failures that happen in Full Restore flow, some of which are masked by the complexity in Framework code.
      
      Bug: 331749778
      Test: Ensure that the change builds (m -j frameworks/base)
      	Ensure CTS and GTS B&R tests pass
      Change-Id: Ieff6df433398ffff71c7eeda73174f9f1d509b58
      f11e886d
    • Gregory Montoir's avatar
      Restrict fields stripping to TYPE_MESSAGE · 4574283f
      Gregory Montoir authored
      Section 1002 (/proc/version) is primitive data (TYPE_STRING)
      
      Bug: 277334359
      Bug: 328677623
      Test: adb shell incident -p AUTOMATIC 1002 | protoc --decode_raw
      Change-Id: I2f9728d542becd3690522b3a113a4760c7d324d2
      4574283f
  10. Mar 15, 2024
    • Yein Jo's avatar
      Add -a to capture all the physical displays. · e644f58c
      Yein Jo authored
      when -a is given, it will append a postfix to the FILENAME, such that
      FILENAME_0.png, FILENAME_1.png. this won't break the existing behavior
      as it doesn't mutate the name if it's taking a single display.
      when both -a and -d are given, it will ignore -d and capture all the
      displays.
      also updated the usage doc to clarify it captures the default display
      when the id is not given.
      
      Test cases:
      - no argument > prints out in the cmd window
      - only -p > prints out in the cmd window as png format
      - -h > correctly shows the usage
      - -d with and without .png > saves as a file
      - -a with and without .png > saves as files
      - -d and -a > ignores -d and shows the same results as single -a
      
      Bug: 321278149
      Test: adb shell screencap with various flags
      Flag: NA
      Change-Id: Iecfeec1a1edbc95d7e8931ac3b22ac7f0706c3e7
      e644f58c
  11. Mar 07, 2024
    • Josep del Rio's avatar
      Remove redudant string conversions · 60e4fdfa
      Josep del Rio authored
      In the review of ag/26174212, an unnecessary string conversion was
      identified; this CL corrects that, plus two other instances in
      the same function.
      
      Bug: 314732730
      Test: Presubmit
      Change-Id: Id2b620088e12266f041be864271493ffe7e1a3b1
      60e4fdfa
    • Josep del Rio's avatar
      Add hid command support for uniq device attribute · 93a4c0fb
      Josep del Rio authored
      Sony gamepads need a uniq attribute of a certain size in order to
      obtain the MAC address, which makes our CTS test fail. This CL
      adds the ability to define this attribute in our test definitions.
      
      Bug: 314732730
      Test: Compiles properly, will be tested together with the test
      definition change in the same topic
      
      Change-Id: I83203e8eb876b27d0e6e60adfbf6de3f4a6e9872
      93a4c0fb
  12. Feb 29, 2024
    • Yurii Zubrytskyi's avatar
      [res] Use fstat() for idmap::IsUpToDate() · e7c1f007
      Yurii Zubrytskyi authored
      The most common operation when getting a new Resources object
      is checking if all apks and overlays are still up to date to
      reuse the cached object. It makes sense to optimize it by
      excluding the file by path lookups and instead keeping an open
      FD to the file in the cache
      
      + Make IsFabricatedOverlay() more efficient via a name check
        and string_view where possible
      
      Bug: 282215580
      Test: build + boot + presubmit
      Change-Id: Ib1ab20cba359c2195a72dd2e10096883d95b4453
      e7c1f007
  13. Feb 28, 2024
    • Paul Lawrence's avatar
      Prevent error message on svc power reboot · 86b8d5e5
      Paul Lawrence authored
      With the changes to sys.powerctl this variable is no longer set on a
      power event - the power action is simply carried out. (This is to avoid
      possible DoS of these power functions.) However, this means that this
      property can no longer be read to see if a power event is happening.
      Since there is no longer a way of telling if a remote exception is real
      or not, best not to print out an error.
      
      Note that this bug occurs on some devices, not all. I was able to
      reproduce it reliably on a Pixel 7a, but not on a Pixel 7 or Cuttlefish.
      
      Bug: 318323013
      Test: adb shell svc power reboot
      
      Change-Id: Icbc1ec1b7882140d4d742b056ea2adaafae67ee9
      86b8d5e5
    • Brad Ebinger's avatar
      Remove shell commands to TelecomShellCommands · 7a92b472
      Brad Ebinger authored
      Remove shell commands from the commands.Telecom binary and into
      TelecomServiceImpl.
      
      For backwards compatibility, still allow Telecom to process the
      commands by retrofitting in TelecomShellCommand.
      
      Bug: 327310548
      Test: atest CtsTelecomTestCases CtsTelecomCujTestCases
      Change-Id: I44fe946046504b804204e1935b02a3047328bf4e
      7a92b472
  14. Feb 22, 2024
  15. Feb 12, 2024
    • Harry Cutts's avatar
      Reland "uinput: delay from the end of the last delay" · dfc798ea
      Harry Cutts authored
      (This CL is unchanged. Original description below, with additional Test:
      line)
      
      If we want to inject events at predictable times, then we shouldn't take
      into account the current time when scheduling those injections, as that
      could change depending on the timings of the process sending commands to
      uinput. Instead, assume that the process sending commands intends time
      offsets between injected events to be as close as possible to those
      specified in the delay commands.
      
      Bug: 310958309
      Test: atest CtsInputTestCases
      Test: atest android.view.cts.input.InputDeviceKeyLayoutMapTest \
                  android.view.cts.input.InputDeviceSensorManagerTest \
                  --rerun-until-failure=10
      Change-Id: Ieaa4f2f06d5e0b7d13abc3afa474948996db7c0a
      dfc798ea
    • Harry Cutts's avatar
      Reland "uinput: Specify timestamps when injecting events..." · 1c6ce068
      Harry Cutts authored
      The reland fixes an issue where the time at registration would be used
      for timestamp values forever unless `delay` commands were introduced.
      
      (Original description, with additional Test line:)
      
      Last year support for specifying timestamps for uinput events was added
      to the Linux Kernel [0]. This allows us to give precise timestamps for
      events being played back from an evemu recording, despite the actual
      times at which we inject them being imprecise due to how threads and
      the kernel are scheduled.
      
      [0]: https://lore.kernel.org/lkml/20230427000152.1407471-1-biswarupp@google.com/
      
      Bug: 310958309
      Test: with the patch added to the device's kernel, play back pointing
            stick and touchscreen recordings. Compare `getevent -lt` output
            with the timestamps in the recordings to check that the offsets
            between timestamps match (e.g. using a spreadsheet).
      Test: atest UinputTests
      Test: atest android.view.cts.input.InputDeviceKeyLayoutMapTest \
                  android.view.cts.input.InputDeviceSensorManagerTest \
                  --rerun-until-failure=10
      Change-Id: Icf77e8adba075ab070806311f31c6a5e1bd98bc9
      1c6ce068
    • Harry Cutts's avatar
      Reland "uinput: use nanoseconds for delay durations" · b8c7f5eb
      Harry Cutts authored
      (This CL is unchanged. Original description below, with additional Test:
      line)
      
      evemu recordings use microseconds for their time intervals, but we can
      only schedule handler calls in Device at millisecond precision. So far
      we've converted the microseconds into milliseconds in EvemuParser, which
      means that the precision losses compound over time (since each delay
      will be slightly shorter than it should be, and the next delay will
      start from that slightly earlier time, etc.). Keeping the delay
      durations in a more precise unit up until the very last moment means
      that we'll only get the precision loss once for each event. Since it's
      somewhat uncommon to use microseconds elsewhere in Android code, and we
      get the system time in nanoseconds, we may as well use nanoseconds
      rather than microseconds.
      
      Bug: 310958309
      Test: play an evemu recording through uinput
      Test: atest UinputTests
      Test: atest android.view.cts.input.InputDeviceKeyLayoutMapTest \
                  android.view.cts.input.InputDeviceSensorManagerTest \
      	    --rerun-until-failure=10
      Change-Id: Ibb968487ed114a4c464ac7061af4cda188e92498
      b8c7f5eb
  16. Feb 11, 2024
  17. Feb 09, 2024
  18. Feb 08, 2024
    • Harry Cutts's avatar
      uinput: delay from the end of the last delay · b959f744
      Harry Cutts authored
      If we want to inject events at predictable times, then we shouldn't take
      into account the current time when scheduling those injections, as that
      could change depending on the timings of the process sending commands to
      uinput. Instead, assume that the process sending commands intends time
      offsets between injected events to be as close as possible to those
      specified in the delay commands.
      
      Bug: 310958309
      Test: atest CtsInputTestCases
      Change-Id: I3ceab49bd6f492244e53d3263bf10802353853c2
      b959f744
    • Harry Cutts's avatar
      uinput: Specify timestamps when injecting events from evemu · ee829890
      Harry Cutts authored
      Last year support for specifying timestamps for uinput events was added
      to the Linux Kernel [0]. This allows us to give precise timestamps for
      events being played back from an evemu recording, despite the actual
      times at which we inject them being imprecise due to how threads and
      the kernel are scheduled.
      
      [0]: https://lore.kernel.org/lkml/20230427000152.1407471-1-biswarupp@google.com/
      
      Bug: 310958309
      Test: with the patch added to the device's kernel, play back pointing
            stick and touchscreen recordings. Compare `getevent -lt` output
            with the timestamps in the recordings to check that the offsets
            between timestamps match (e.g. using a spreadsheet).
      Test: atest UinputTests
      Change-Id: If486cdb7218918aca64e6561f9fc2f30acce736a
      ee829890
    • Harry Cutts's avatar
      uinput: use nanoseconds for delay durations · 8767c663
      Harry Cutts authored
      evemu recordings use microseconds for their time intervals, but we can
      only schedule handler calls in Device at millisecond precision. So far
      we've converted the microseconds into milliseconds in EvemuParser, which
      means that the precision losses compound over time (since each delay
      will be slightly shorter than it should be, and the next delay will
      start from that slightly earlier time, etc.). Keeping the delay
      durations in a more precise unit up until the very last moment means
      that we'll only get the precision loss once for each event. Since it's
      somewhat uncommon to use microseconds elsewhere in Android code, and we
      get the system time in nanoseconds, we may as well use nanoseconds
      rather than microseconds.
      
      Bug: 310958309
      Test: play an evemu recording through uinput
      Test: atest UinputTests
      Change-Id: I68d54c05214ae778167adfd0d3fc9a345454c336
      8767c663
  19. Feb 02, 2024
    • Harry Cutts's avatar
      uinput: recycle SomeArgs after opening uinput · 49c9fca3
      Harry Cutts authored
      SomeArgs objects are held in a pool, which gets depleted if they're not
      recycled after use, lowering performance.
      
      Bug: 245989146
      Test: play back an evemu recording
      Change-Id: I0d5109f654bd61eb2b3ef68a2ce7a3ab07371ded
      49c9fca3
  20. Jan 18, 2024
    • Yurii Zubrytskyi's avatar
      [res] Optimize name lookups in idmap service · 596fa178
      Yurii Zubrytskyi authored
      The most common operation when build idmaps is to find the
      resource ID by name. This is the least optimized operation
      in the current resources data structures, as they only
      expect ID -> value lookups
      
      This change adds an optional flag that creates a name->ID
      hash map inside ResStringPool, and use it when loading
      APKs in idmap2d
      
      Bug: 282215580
      Test: build + boot + perf record
      
      Change-Id: I82f4d684cb48e2dcddcd677b882b11497c1c13b1
      596fa178
    • Yurii Zubrytskyi's avatar
      [cleanup] Fix initializers order · 77e28bd5
      Yurii Zubrytskyi authored
      Bug: 282215580
      Test: build + boot + perf record
      
      Change-Id: I5c76515aa3dad405a2938d8d0e87048cc52cf61b
      77e28bd5
  21. Jan 09, 2024
  22. Dec 05, 2023
    • Jeremy Meyer's avatar
      Handle 9patches being used for frros · deb46f31
      Jeremy Meyer authored
      This adds an api that allows creation of nine patch frros.
      We process them the same as aapt2 does so that
      when they are used at runtime they work correctly.
      
      API-Coverage-Bug: 314168567
      Test: manual and automatic
      Bug: 296324826
      Change-Id: I40da020189e9ec914fbea0c17f181209347d83de
      deb46f31
  23. Nov 22, 2023
  24. Nov 21, 2023
    • Harry Cutts's avatar
      uinput: support evemu recordings · 4ec6969f
      Harry Cutts authored
      evemu [0] is a system used by the wider Linux community to record
      sequences of evdev events and descriptions of the device that created
      them. Together with the evemu-record implementation added to
      frameworks/native, implementing support for evemu recordings in uinput
      gives us a system for event recording and replay that's compatible with
      other Linux systems.
      
      Since the format looks quite different from the existing JSON-style one,
      we can automatically detect which type of data is being passed in,
      instead of having to change the command-line interface.
      
      As part of the implementation, the Event.Bus enum is replaced with plain
      integers. This allows the tool to support new bus IDs that are added to
      Linux's input.h without code changes, at least for evemu files.
      
      [0]: https://gitlab.freedesktop.org/libevdev/evemu
      
      Bug: 302297266
      Test: replay recordings made using Android and FreeDesktop
            evemu-record implementations
      Change-Id: Ie2f969da24db9aa04037335d5b697cdc0db0b3ca
      4ec6969f
    • Pascal Muetschard's avatar
      Move counter producer off of vendor partition. · 342e37d2
      Pascal Muetschard authored
      Although the binary looks for a vendor provided shared library,
      it is an otherwise vendor agnostic tool. Moving it off the
      vendor partition also has the added benefit of it not requiring
      root to be run.
      
      Bug: b/273907878
      Test: manual
      Change-Id: I81726ffb7d96acef69b7b77c864be254be9a74c5
      342e37d2
  25. Nov 16, 2023
    • Harry Cutts's avatar
      uinput: pass Commands to Event.Builder.setCommand · 766ff01f
      Harry Cutts authored
      Parsing strings into enum values should be done by the parser, not the
      builder, and this means that the evemu parser will be able to pass
      properly typed values to setCommand rather than "magic" strings.
      
      Bug: 302297266
      Test: m uinput
      Change-Id: Icac5764a66025412c87c326280d1895f3da78cac
      766ff01f
    • Harry Cutts's avatar
      uinput: crash if device creation fails · e28db5f1
      Harry Cutts authored
      Previously the tool just carried on, with event injections being
      silently dropped, which isn't very obvious behaviour.
      
      Bug: 302297266
      Test: cause device creation to fail somehow, check the tool exits
      Change-Id: I94e931729339bff0f6fc7ab5b591f062043a1d7a
      e28db5f1
Loading