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

Commit 0c2d2038 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Move some definitions into anonymous namespaces" into udc-qpr-dev am:...

Merge "Move some definitions into anonymous namespaces" into udc-qpr-dev am: 635339c5 am: 4d835ab0

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/23452220



Change-Id: I93fa1514f14d743682c738a9318a60cfb6d95b6b
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 845debd9 4d835ab0
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -30,6 +30,8 @@ using android::os::InputEventInjectionSync;

namespace android::inputdispatcher {

namespace {

// An arbitrary device id.
constexpr int32_t DEVICE_ID = 1;

@@ -348,6 +350,8 @@ static void benchmarkOnWindowInfosChanged(benchmark::State& state) {
    dispatcher.stop();
}

} // namespace

BENCHMARK(benchmarkNotifyMotion);
BENCHMARK(benchmarkInjectMotion);
BENCHMARK(benchmarkOnWindowInfosChanged);
+4 −0
Original line number Diff line number Diff line
@@ -31,6 +31,8 @@ using android::gui::WindowInfoHandle;

namespace android::inputdispatcher {

namespace {

class FakeWindowHandle : public WindowInfoHandle {
public:
    FakeWindowHandle(const std::string& name, const sp<IBinder>& token, bool focusable,
@@ -49,6 +51,8 @@ public:
    }
};

} // namespace

TEST(FocusResolverTest, SetFocusedWindow) {
    sp<IBinder> focusableWindowToken = sp<BBinder>::make();
    sp<IBinder> invisibleWindowToken = sp<BBinder>::make();
+4 −0
Original line number Diff line number Diff line
@@ -846,6 +846,8 @@ TEST_F(InputDispatcherTest, NotifySwitch_CallsPolicy) {
    mFakePolicy->assertNotifySwitchWasCalled(args);
}

namespace {

// --- InputDispatcherTest SetInputWindowTest ---
static constexpr std::chrono::duration INJECT_EVENT_TIMEOUT = 500ms;
// Default input dispatching timeout if there is no focused application or paused window
@@ -1592,6 +1594,8 @@ static NotifyPointerCaptureChangedArgs generatePointerCaptureChangedArgs(
    return NotifyPointerCaptureChangedArgs(/*id=*/0, systemTime(SYSTEM_TIME_MONOTONIC), request);
}

} // namespace

/**
 * When a window unexpectedly disposes of its input channel, policy should be notified about the
 * broken channel.