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

Commit cf249064 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 12722466 from 7dd4415a to 25Q1-release

Change-Id: Iacd485a73500be1544d6e9d76f94ce991414fe44
parents 489671f6 7dd4415a
Loading
Loading
Loading
Loading
+92 −0
Original line number Diff line number Diff line
@@ -76,6 +76,8 @@ __BEGIN_DECLS
struct APerformanceHintManager;
struct APerformanceHintSession;
struct AWorkDuration;
struct ANativeWindow;
struct ASurfaceControl;

/**
 * {@link AWorkDuration} is an opaque type that represents the breakdown of the
@@ -353,6 +355,39 @@ int APerformanceHint_notifyWorkloadReset(
        APerformanceHintSession* _Nonnull session,
        bool cpu, bool gpu, const char* _Nonnull debugName) __INTRODUCED_IN(36);

/**
 * Associates a session with any {@link ASurfaceControl} or {@link ANativeWindow}
 * instances managed by this session.
 *
 * This method is primarily intended for sessions that manage the timing of an entire
 * graphics pipeline end-to-end, such as those using the
 * {@link ASessionCreationConfig_setGraphicsPipeline} API. However, any session directly
 * or indirectly managing a graphics pipeline should still associate themselves with
 * directly relevant ASurfaceControl or ANativeWindow instances for better optimization.
 *
 * To see any benefit from this method, the client must make sure they are updating the framerate
 * of attached surfaces using methods such as {@link ANativeWindow_setFrameRate}, or by updating
 * any associated ASurfaceControls with transactions that have {ASurfaceTransaction_setFrameRate}.
 *
 * @param session The {@link APerformanceHintSession} instance to update.
 * @param nativeWindows A pointer to a list of ANativeWindows associated with this session.
 *        nullptr can be passed to indicate there are no associated ANativeWindows.
 * @param nativeWindowsSize The number of ANativeWindows in the list.
 * @param surfaceControls A pointer to a list of ASurfaceControls associated with this session.
 *        nullptr can be passed to indicate there are no associated ASurfaceControls.
 * @param surfaceControlsSize The number of ASurfaceControls in the list.
 *
 * @return 0 on success.
 *         EPIPE if communication has failed.
 *         ENOTSUP if unsupported.
 *         EINVAL if invalid or empty arguments passed.
 */

int APerformanceHint_setNativeSurfaces(APerformanceHintSession* _Nonnull session,
        ANativeWindow* _Nonnull* _Nullable nativeWindows, int nativeWindowsSize,
        ASurfaceControl* _Nonnull* _Nullable surfaceControls, int surfaceControlsSize)
        __INTRODUCED_IN(36);

/**
 * Creates a new AWorkDuration. When the client finishes using {@link AWorkDuration}, it should
 * call {@link AWorkDuration_release()} to destroy {@link AWorkDuration} and release all resources
@@ -520,6 +555,63 @@ int ASessionCreationConfig_setPreferPowerEfficiency(
int ASessionCreationConfig_setGraphicsPipeline(
        ASessionCreationConfig* _Nonnull config, bool enabled)  __INTRODUCED_IN(36);

/**
 * Associates a session with any {@link ASurfaceControl} or {@link ANativeWindow}
 * instances managed by this session. See {@link APerformanceHint_setNativeSurfaces}
 * for more details.
 *
 * @param config The {@link ASessionCreationConfig}
 *        created by calling {@link ASessionCreationConfig_create()}.
 * @param nativeWindows A pointer to a list of ANativeWindows associated with this session.
 *        nullptr can be passed to indicate there are no associated ANativeWindows.
 * @param nativeWindowsSize The number of ANativeWindows in the list.
 * @param surfaceControls A pointer to a list of ASurfaceControls associated with this session.
 *        nullptr can be passed to indicate there are no associated ASurfaceControls.
 * @param surfaceControlsSize The number of ASurfaceControls in the list.
 *
 * @return 0 on success.
 *         ENOTSUP if unsupported.
 *         EINVAL if invalid or empty arguments passed.
 */
int ASessionCreationConfig_setNativeSurfaces(
        ASessionCreationConfig* _Nonnull config,
        ANativeWindow* _Nonnull* _Nullable nativeWindows, int nativeWindowsSize,
        ASurfaceControl* _Nonnull* _Nullable surfaceControls, int surfaceControlsSize)
        __INTRODUCED_IN(36);

/**
 * Enable automatic timing mode for sessions using the GRAPHICS_PIPELINE API with an attached
 * surface. In this mode, sessions do not need to report actual durations and only need
 * to keep their thread list up-to-date, set a native surface, call
 * {@link ASessionCreationConfig_setGraphicsPipeline()} to signal that the session is in
 * "graphics pipeline" mode, and then set whether automatic timing is desired for the
 * CPU, GPU, or both, using this method.
 *
 * It is still be beneficial to set an accurate target time, as this may help determine
 * timing information for some workloads where there is less information available from
 * the framework, such as games. Additionally, reported CPU durations will be ignored
 * while automatic CPU timing is enabled, and similarly GPU durations will be ignored
 * when automatic GPU timing is enabled. When both are enabled, the entire
 * reportActualWorkDuration call will be ignored, and the session will be managed
 * completely automatically.
 *
 * This mode will not work unless the client makes sure they are updating the framerate
 * of attached surfaces with methods such as {@link ANativeWindow_setFrameRate}, or updating
 * any associated ASurfaceControls with transactions that have {ASurfaceTransaction_setFrameRate}.
 *
 * @param config The {@link ASessionCreationConfig}
 *        created by calling {@link ASessionCreationConfig_create()}.
 * @param cpu Whether to enable automatic timing for the CPU for this session.
 * @param gpu Whether to enable automatic timing for the GPU for this session.
 *
 * @return 0 on success.
 *         ENOTSUP if unsupported.
 */
int ASessionCreationConfig_setUseAutoTiming(
        ASessionCreationConfig* _Nonnull config,
        bool cpu, bool gpu)
        __INTRODUCED_IN(36);

__END_DECLS

#endif // ANDROID_NATIVE_PERFORMANCE_HINT_H
+18 −165
Original line number Diff line number Diff line
@@ -35,109 +35,34 @@
      ]
    },
    {
      "name": "CtsHardwareTestCases",
      "options": [
        {
          "include-filter": "android.hardware.input.cts.tests"
        },
        {
          "exclude-annotation": "androidx.test.filters.FlakyTest"
        }
      ]
      "name": "CtsHardwareTestCases_cts_tests"
    },
    {
      "name": "CtsInputTestCases"
    },
    {
      "name": "CtsViewTestCases",
      "options": [
        {
          "include-filter": "android.view.cts.input"
        }
      ]
    },
    {
      "name": "CtsViewTestCases",
      "options": [
        {
          "include-filter": "android.view.cts.HoverTest"
        },
        {
          "include-filter": "android.view.cts.MotionEventTest"
        },
        {
          "include-filter": "android.view.cts.PointerCaptureTest"
      "name": "CtsViewTestCases_cts_input"
    },
    {
          "include-filter": "android.view.cts.TooltipTest"
      "name": "CtsViewTestCases_input_related"
    },
    {
          "include-filter": "android.view.cts.TouchDelegateTest"
      "name": "CtsWidgetTestCases_seekbar_and_numberpicker"
    },
    {
          "include-filter": "android.view.cts.VerifyInputEventTest"
      "name": "FrameworksCoreTests_hardware_input"
    },
    {
          "include-filter": "android.view.cts.ViewTest"
        },
        {
          "include-filter": "android.view.cts.ViewUnbufferedTest"
        }
      ]
      "name": "FrameworksCoreTests_view_verified"
    },
    {
      "name": "CtsWidgetTestCases",
      "options": [
        {
          "include-filter": "android.widget.cts.NumberPickerTest"
      "name": "CtsAppTestCases_cts_toolbaractionbartest"
    },
    {
          "include-filter": "android.widget.cts.SeekBarTest"
        }
      ]
      "name": "FrameworksServicesTests_android_server_input"
    },
    {
      "name": "FrameworksCoreTests",
      "options": [
        {
          "include-filter": "android.hardware.input"
        }
      ]
    },
    {
      "name": "FrameworksCoreTests",
      "options": [
        {
          "include-filter": "android.view.VerifiedKeyEventTest"
        },
        {
          "include-filter": "android.view.VerifiedMotionEventTest"
        }
      ]
    },
    {
      "name": "CtsAppTestCases",
      "options": [
        {
          "include-filter": "android.app.cts.ToolbarActionBarTest"
        }
      ]
    },
    {
      "name": "FrameworksServicesTests",
      "options": [
        {
          "include-filter": "com.android.server.input"
        }
      ]
    },
    {
      "name": "CtsSecurityTestCases",
      "options": [
        {
          "include-filter": "android.security.cts.MotionEventTest"
        }
      ]
      "name": "CtsSecurityTestCases_cts_motioneventtest"
    },
    {
      "name": "CtsSecurityBulletinHostTestCases",
@@ -156,12 +81,7 @@
  ],
  "postsubmit": [
    {
      "name": "CtsWindowManagerDeviceWindow",
      "options": [
        {
          "include-filter": "android.server.wm.window.WindowInputTests"
        }
      ]
      "name": "CtsWindowManagerDeviceWindow_window_windowinputtests"
    },
    {
      "name": "libinput_tests"
@@ -187,98 +107,31 @@
      ]
    },
    {
      "name": "CtsHardwareTestCases",
      "options": [
        {
          "include-filter": "android.hardware.input.cts.tests"
        }
      ]
      "name": "CtsHardwareTestCases_cts_tests"
    },
    {
      "name": "CtsInputTestCases"
    },
    {
      "name": "CtsViewTestCases",
      "options": [
        {
          "include-filter": "android.view.cts.input"
        }
      ]
    },
    {
      "name": "CtsViewTestCases",
      "options": [
        {
          "include-filter": "android.view.cts.HoverTest"
        },
        {
          "include-filter": "android.view.cts.MotionEventTest"
        },
        {
          "include-filter": "android.view.cts.PointerCaptureTest"
      "name": "CtsViewTestCases_cts_input"
    },
    {
          "include-filter": "android.view.cts.TooltipTest"
      "name": "CtsViewTestCases_input_related"
    },
    {
          "include-filter": "android.view.cts.TouchDelegateTest"
      "name": "CtsWidgetTestCases_seekbar_and_numberpicker"
    },
    {
          "include-filter": "android.view.cts.VerifyInputEventTest"
      "name": "FrameworksCoreTests_view_verified"
    },
    {
          "include-filter": "android.view.cts.ViewTest"
      "name": "CtsAppTestCases_cts_toolbaractionbartest"
    },
    {
          "include-filter": "android.view.cts.ViewUnbufferedTest"
        }
      ]
      "name": "FrameworksServicesTests_server_input"
    },
    {
      "name": "CtsWidgetTestCases",
      "options": [
        {
          "include-filter": "android.widget.cts.NumberPickerTest"
        },
        {
          "include-filter": "android.widget.cts.SeekBarTest"
        }
      ]
    },
    {
      "name": "FrameworksCoreTests",
      "options": [
        {
          "include-filter": "android.view.VerifiedKeyEventTest"
        },
        {
          "include-filter": "android.view.VerifiedMotionEventTest"
        }
      ]
    },
    {
      "name": "CtsAppTestCases",
      "options": [
        {
          "include-filter": "android.app.cts.ToolbarActionBarTest"
        }
      ]
    },
    {
      "name": "FrameworksServicesTests",
      "options": [
        {
          "include-filter": "com.android.server.input"
        }
      ]
    },
    {
      "name": "CtsSecurityTestCases",
      "options": [
        {
          "include-filter": "android.security.cts.MotionEventTest"
        }
      ]
      "name": "CtsSecurityTestCases_cts_motioneventtest"
    },
    {
      "name": "CtsSecurityBulletinHostTestCases",
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@
# 6: Percent
# Default value for data of type int/long is 2 (bytes).
#
# See system/core/logcat/event.logtags for the master copy of the tags.
# See system/logging/logcat/event.logtags for the master copy of the tags.

# 62000 - 62199 reserved for inputflinger

+4 −0
Original line number Diff line number Diff line
@@ -245,6 +245,9 @@ struct InputReaderConfiguration {
    // True to use three-finger tap as a customizable shortcut; false to use it as a middle-click.
    bool touchpadThreeFingerTapShortcutEnabled;

    // True to enable system gestures (three- and four-finger swipes) on touchpads.
    bool touchpadSystemGesturesEnabled;

    // The set of currently disabled input devices.
    std::set<int32_t> disabledDevices;

@@ -297,6 +300,7 @@ struct InputReaderConfiguration {
            shouldNotifyTouchpadHardwareState(false),
            touchpadRightClickZoneEnabled(false),
            touchpadThreeFingerTapShortcutEnabled(false),
            touchpadSystemGesturesEnabled(true),
            stylusButtonMotionEventsEnabled(true),
            stylusPointerIconEnabled(false),
            mouseReverseVerticalScrollingEnabled(false),
+3 −2
Original line number Diff line number Diff line
@@ -351,6 +351,7 @@ std::list<NotifyArgs> TouchpadInputMapper::reconfigure(nsecs_t when,

        bumpGeneration();
    }
    std::list<NotifyArgs> out;
    if (!changes.any() || changes.test(InputReaderConfiguration::Change::TOUCHPAD_SETTINGS)) {
        mPropertyProvider.getProperty("Use Custom Touchpad Pointer Accel Curve")
                .setBoolValues({true});
@@ -375,11 +376,11 @@ std::list<NotifyArgs> TouchpadInputMapper::reconfigure(nsecs_t when,
        mPropertyProvider.getProperty("Button Right Click Zone Enable")
                .setBoolValues({config.touchpadRightClickZoneEnabled});
        mTouchpadHardwareStateNotificationsEnabled = config.shouldNotifyTouchpadHardwareState;

        mGestureConverter.setThreeFingerTapShortcutEnabled(
                config.touchpadThreeFingerTapShortcutEnabled);
        out += mGestureConverter.setEnableSystemGestures(when,
                                                         config.touchpadSystemGesturesEnabled);
    }
    std::list<NotifyArgs> out;
    if ((!changes.any() && config.pointerCaptureRequest.isEnable()) ||
        changes.test(InputReaderConfiguration::Change::POINTER_CAPTURE)) {
        mPointerCaptured = config.pointerCaptureRequest.isEnable();
Loading