Skip to content
Snippets Groups Projects
  1. Dec 28, 2024
  2. Dec 27, 2024
  3. Dec 26, 2024
  4. Dec 22, 2024
  5. Sep 23, 2024
    • Liz Prucka's avatar
      Error fix from enabling Clang thread-safety checks in Cuttlefish · 85e62f11
      Liz Prucka authored
      Parent bug: b/353324127. Enabling `thread-safety-reference-return`
      to allow developers to utilize Clang thread safety guardrails
      (GUARDED_BY, REQUIRES, EXCLUDES).
      
      Added NO_THREAD_SAFETY_ANALYSIS annotations to violating functions.
      If this is not desired, please respond with concerns
      or preferred fix.
      
      Bug: 354740314
      Flag: TEST_ONLY
      Test: m out/soong/.intermediates/frameworks/native/services/surfaceflinger/tests/unittests/libsurfaceflinger_unittest/android_x86_silvermont/obj/frameworks/native/services/surfaceflinger/tests/unittests/CommitTest.o
      Change-Id: I9be1254c3e2685b0aa950b314c581824f40ce26c
      85e62f11
    • Alec Mouri's avatar
      Revert "Add some tracing for release fences" · 454c5524
      Alec Mouri authored
      This reverts commit 3118f969.
      
      Reason for revert: b/368514217
      
      Change-Id: Id69a0bd8850d2b6c093f7ce78817cdf5705215b1
      454c5524
    • Melody Hsu's avatar
      [legacy layer cleanup] Misc dead code in Layer · 7d410016
      Melody Hsu authored
      Remove unused methods in legacy layer code.
      
      Flag: EXEMPT flag removal
      Bug: 330785038
      Test: presubmit
      Change-Id: I463f4a0c0a64a059babd5608ba4a4311ff6e2354
      7d410016
    • Melody Hsu's avatar
      [legacy layer cleanup] Transaction methods · 29f7d5c9
      Melody Hsu authored
      Remove unused methods in legacy layer code.
      
      Flag: EXEMPT flag removal
      Bug: 330785038
      Test: presubmit
      Change-Id: I097480082e95bb38d716336fa1909103c3593494
      29f7d5c9
    • Melody Hsu's avatar
      [legacy layer cleanup] Crop and transform methods · 2ee01c90
      Melody Hsu authored
      Remove unused methods in legacy layer code.
      
      Flag: EXEMPT flag removal
      Bug: 330785038
      Test: presubmit
      Change-Id: I0c008ea8548ef18c86bd99280f9c1f202f656cc9
      2ee01c90
  6. Sep 20, 2024
    • Linnan Li's avatar
      Move key remapping to InputReader thread(1/n) · e5657f27
      Linnan Li authored
      
      Currently, the key remapping operation occurs on a non-Reader thread,
      which leads to concurrent operations on the KCM object by this thread
      and the Reader, causing unpredictable concurrency issues.
      
      Here, we move this operation to the Reader thread, aligning it with
      most configuration refresh methods, which can resolve the
      aforementioned issues.
      
      Additionally, we are removing the device traversal method on the Java
      side because we actually intend for the key remapping operation to
      apply to all full-keyboard devices. This can be fully achieved during
      the InputReader refresh, so we are also removing the deviceId parameter
      from the remapping interface.
      
      There should be no behavioral changes.
      
      Bug: 358042225
      Test: atest CtsInputTestCases
      Test: atest InputTests
      Test: atest inputflinger_tests
      Flag: EXEMPT refactor
      
      Change-Id: I6ab802b70dc1242c796f672ac30672d10e34857f
      Signed-off-by: default avatarLinnan Li <lilinnan@xiaomi.corp-partner.google.com>
      e5657f27
    • Liz Prucka's avatar
      Disable Clang thread-safety checks in surfaceflinger unit tests · ac05bcc6
      Liz Prucka authored
      Parent bug: b/353324127. Enabling `thread-safety-reference-return`
      to allow developers to utilize Clang thread safety guardrails.
      
      The surfaceflinger unittest suite currently does not untilize mutex
      locks when calling required thread-safe variables.
      
      Example error:
      frameworks/native/services/surfaceflinger/tests/unittests/TestableScheduler.h:133:52
      error: returning variable 'mAttachedChoreographers' by reference
      requires holding mutex 'mChoreographerLock' exclusively
      [-Wthread-safety-reference-return]
      
      Added NO_THREAD_SAFETY_ANALYSIS annotations to violating functions.
      
      Bug: 354740314
      Test: make
      
      Change-Id: I95793ab942207660ea8e49cfd50d089e956a7ada
      ac05bcc6
    • Rachel Lee's avatar
      DO_NOT_MERGE Fix primaryRangeIsSingleRate + touch on dVRR · 5cf032c4
      Rachel Lee authored
      Disable a primaryRangeIsSingleRate section on dVRR and allow late touch
      boost to trigger when no layer score. On dVRR display, the primary
      physical range may be a single rate,
      but late touch boost should still be able to trigger.
      
      Bug: 353142444
      Bug: 362379874
      Flag: EXEMPT_bugfix
      Test: atest libsurfaceflinger_unittest
      Test: Twitter scrolling with and without video, with policy backdoor
      Test: notification shade scrolling with policy backdoor
      (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:7bedfbf0d7b106702a241a64a79c36205606496c)
      (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:14e725f4ba7d1f71af2067945498a676372e0499)
      Merged-In: Ic5b2b298fe0df357f77ef8f06b1fc0fc248e0498
      Change-Id: Ic5b2b298fe0df357f77ef8f06b1fc0fc248e0498
      5cf032c4
    • Wenhui Yang's avatar
      Fix the input info missing for SurfaceView · ab89d814
      Wenhui Yang authored
      Layer snapshots with buffers but without inputinfo were not sent to input or other window info listeners. This was due to a bug in how we checked to see if the layer needed an input info. FIx this to send SurfaceView layers to window info listeners.
      
      Fixes: 365167765
      Test: LayerSnapshotTest
      Test: LayerLifecycleManagerTest
      Flag: EXEMPT bugfix
      Change-Id: I49e5d1e503af860a8324cc8b36589748ca2b7a25
      ab89d814
  7. Sep 19, 2024
    • Rachel Lee's avatar
      DO_NOT_MERGE Fix primaryRangeIsSingleRate + touch on dVRR · 12b90231
      Rachel Lee authored
      Disable a primaryRangeIsSingleRate section on dVRR and allow late touch
      boost to trigger when no layer score. On dVRR display, the primary
      physical range may be a single rate,
      but late touch boost should still be able to trigger.
      
      Bug: 353142444
      Bug: 362379874
      Flag: EXEMPT_bugfix
      Test: atest libsurfaceflinger_unittest
      Test: Twitter scrolling with and without video, with policy backdoor
      Test: notification shade scrolling with policy backdoor
      (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:7bedfbf0d7b106702a241a64a79c36205606496c)
      Merged-In: Ic5b2b298fe0df357f77ef8f06b1fc0fc248e0498
      Change-Id: Ic5b2b298fe0df357f77ef8f06b1fc0fc248e0498
      12b90231
    • Asmita Poddar's avatar
      Disable key repeat when it is switched off · 2808d7eb
      Asmita Poddar authored
      Read whether key repeats are disabled via settings and disable
      generation of key repeats if so.
      
      Bug: 336585002
      Test: atest InputDispatcherKeyRepeatTest
      Test: atest InputManagerServiceTests
      Flag: com.android.input.flags.keyboard_repeat_keys
      Change-Id: I871bbfc0808bde4a6f85b7ea47ea92d4e80156c7
      2808d7eb
    • Siarhei Vishniakou's avatar
      Generate HOVER_EXIT if touchable region changes · b711e657
      Siarhei Vishniakou authored
      The dispatcher crashes whenever we try adding pointers to a target,
      but the target already had those pointers under a different mode.
      Only one dispatch mode is allowed for each event, per target.
      
      That's generally true, but there were instances where we ended up
      with multiple dispatch modes for the same event.
      
      For example, if a window changes bounds (for example, becomes hidden, or
      the touchable region shrinks), the pointer would no longer be inside
      that window. And if this window is also watching for outside touch,
      then an ACTION_DOWN event of the mouse would cause 2 things to happen:
      1) This would cause HOVER_EXIT, since the pointer is no longer in that
         window
      2) This would case ACTION_OUTSIDE, since the pointer is tapped outside
         of the window's bounds.
      
      This previously led to a crash in dispatcher because there would be two
      different dispatch modes for the same window for the same ACTION_DOWN
      event.
      
      Update being done here:
      When a window resizes, it's possible that the hovering pointer is no
      longer inside that window's bounds. We should generate a HOVER_EXIT
      event at that point; this will ensure that the next mouse event is still
      maintaining the contract that it's only dispatched with a single mode.
      
      Bug: 346121425
      Test: TEST=inputflinger_tests; m $TEST && $ANDROID_HOST_OUT/nativetest64/$TEST/$TEST --gtest_filter="*MouseClickUnderShrinkingTrustedOverlay"
      Flag: EXEMPT bugfix
      Change-Id: Ia5e5ac0421b127231d36ed375538eaebfb8994ac
      b711e657
  8. Sep 18, 2024
    • Marzia Favaro's avatar
      Cache edge extension shader · 7354b395
      Marzia Favaro authored
      Bug: 322036393
      Test: N/A
      Flag: com.android.graphics.libgui.flags.edge_extension_shader
      Change-Id: Idd44d0970e6a4e65888ba7122db97611e1bf22ac
      7354b395
    • Jerry Chang's avatar
      Apply input event profile to mitigate input latency of input threads · 27db62fa
      Jerry Chang authored
      Bug: 347122505
      Flag: com.android.input.flags.enable_input_policy_profile
      Test: check the priority and latency of input thread in Perffeto
      Change-Id: I428b9e718eace0bc39f1965d98475eebe9d3aaa5
      27db62fa
    • Harry Cutts's avatar
      TestEventMatchers: bounds check pointer indexes · ccd9d51b
      Harry Cutts authored
      b/365166534 was caused by a WithPointer… matcher not checking that its
      pointer index was in bounds, and this check is missing from a couple of
      other WithPointer… matchers. Add it, so that more bugs like this can be
      found instantly in future rather than causing flaky assertions against
      uninitialized memory.
      
      Test: atest inputflinger_tests
      Bug: 365166534
      Flag: TEST_ONLY
      Change-Id: I57d23909888749e15d4d034ddb0c091336b016d1
      ccd9d51b
  9. Sep 17, 2024
    • Rocky Fang's avatar
      Protect mMicSamplingPeriodBackup by mConnectionLock · 4a0de5b4
      Rocky Fang authored
      Test: Presubmit
      Fixes: 357599979
      Flag: EXEMPT bug fix
      Change-Id: I705579eef8cc5fe371f3e57d0e16e8df1acfc3c5
      4a0de5b4
    • Prabir Pradhan's avatar
      PointerChoreographer: Show spot hover icon for stylus when showing taps · 888993de
      Prabir Pradhan authored
      When "show touches" is enabled, we show the spot hover icon when the
      stylus is hovering. However, when an app is allowed to override the icon
      for a hovering stylus, we were never showing the spot hover icon.
      
      In this CL, we ensure that the spot hover icon is visible for a hovering
      stylus when "show touches" is enabled and the app has not specified an
      icon to use.
      
      Bug: 342067371
      Test: atest inputflinger_tests
      Flag: EXEMPT bug fix
      Change-Id: Iddf637c87ecba928a5a227a8efc0dd436b9528c7
      888993de
    • Lloyd Pique's avatar
      SF: Remove dead code from Scheduler · 6f240179
      Lloyd Pique authored
      While looking into some other Scheduler changes, I noticed that both
      Scheduler::mRenderEventConnection and
      Scheduler::mLastCompositeEventConnection are initialized but otherwise
      unused. Scheduler::getEventConnection() is never called to retrieve
      either value.
      
      As there doesn't seem to be any use for them, let's remove them.
      
      This change also required removing test fixture setup from the unit
      tests, as the tests worked to install test double implementations.
      
      Test: atest libsurfaceflinger_unittest
      Bug: None
      Flag: EXEMPT dead code
      
      Change-Id: Ic004df96dd5fe3dadd0cd1455cd85506736a1875
      6f240179
    • Harry Cutts's avatar
      CapturedTouchpadEventConverter: report relative axes · 75155343
      Harry Cutts authored
      In the old touchpad stack, when a touchpad was captured we'd report
      AXIS_RELATIVE_(X|Y) values for each finger, as offsets from the location
      it had in the previous frame. When I implemented captured mode in the
      new stack I didn't realize this, so the new stack introduced in Android
      U doesn't report them. This causes problems for games that capture the
      mouse pointer and use the relative axes for camera movement.
      
      This is attempt 2; the original CL [0] had a unit test that was flaky
      due to it accidentally making assertions about uninitialized memory. The
      changes since that CL are to TwoFingers_motionReportedCorrectly in
      CapturedTouchpadEventConverter_test.cpp (to change the last
      WithPointerRelativeMotion call to WithRelativeMotion) and
      TestEventMatchers.h (to use a class for WithPointerRelativeMotion and to
      check for out-of-range pointer indexes).
      
      [0]: Change ID I8a1caa4c9315dd41bc712fd9467146bb608cf6f3
      
      Bug: 330522990
      Bug: 365166534
      Test: check the axis values using a test app
      Test: $ atest inputflinger_tests:CapturedTouchpadEventConverterTest
      Flag: com.android.input.flags.include_relative_axis_values_for_captured_touchpads
      Change-Id: If6828f95e3aa359af479a708f95fbb5e31e5bc9a
      75155343
  10. Sep 16, 2024
    • Ram Indani's avatar
      DO NOT MERGE Early return for getPresentFenceShift · 29e307db
      Ram Indani authored
      When minFrameInterval is 0 then return the shift was 0.
      
      Bug: 365442861
      Merged-In: I00c1795c11f1dc38e6b4ce3ff49fae79e265f25c
      Change-Id: I00c1795c11f1dc38e6b4ce3ff49fae79e265f25c
      29e307db
    • Shuangxi Xiang's avatar
      Remove the redundant parameters in applyTransactionsLocked · f5831f9a
      Shuangxi Xiang authored
      
      In the major Android version upgrade from 13 to 14, the addCommittedTransactions function in the applyTransactionsLocked function that requires the vsyncId parameter has been moved to the updateLayerSnapshots and updateLayerSnapshotsLegacy functions. The rest of the operations in the applyTransactionsLocked function no longer require the vsyncId parameter, so the declaration and definition information about vsyncId in the applyTransactionsLocked function can be removed here.
      
      Bug: 362415544
      
      Change-Id: Ic4ded171e90bcfb7a0d58df2c272f4c219be3a04
      Merged-In: Ic4ded171e90bcfb7a0d58df2c272f4c219be3a04
      Signed-off-by: default avatar <xiangshuangxi@xiaomi.corp-partner.google.com>
      f5831f9a
    • Serdar Kocdemir's avatar
      Annotate GpuWorkTracepointTest with RequiresDevice · 9f249a41
      Serdar Kocdemir authored
      GpuWorkTracepointTest test requires GPU driver to generate kernel
      tracepoint events which should only be tested with real devices,
      but not with emulators. Replacing RestrictedBuildTest annotation
      with RequiresDevice to correctly indicate this.
      
      Bug: b/352538275
      Test: atest GpuWorkTracepointTest
      Flag: EXEMPT test fix
      Change-Id: I57f5f035a6ea7ac12e6fb6c619385af75defda2a
      9f249a41
    • Yifeng Zeng's avatar
      Disable native coverage for libinput_tests and inputflinger_tests. · 7ce293b8
      Yifeng Zeng authored
      These tests fail to build for coverage when Rust host coverage is
      enabled. This is a temporary workaround until the underlying issue is
      resolved.
      
      Bug: 338242594
      Bug: 330591720
      Test: m libinput_tests CLANG_COVERAGE=true NATIVE_COVERAGE_PATHS='*'
      Test: m inputflinger_tests CLANG_COVERAGE=true NATIVE_COVERAGE_PATHS='*'
      Merged-In: Idf82d31ce8a7078c3502b7bcb7c959177a1bbe4e
      Change-Id: Ibe21b560228f6ca3f8acd61bff1763492428fe29
      7ce293b8
Loading