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

Commit 4d835ab0 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: 635339c5

parents 89e486a5 635339c5
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.