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

Commit 851a6d25 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Cleanup hide_pointer_indicators_for_secure_windows flag" into main

parents 42b1b6ce 461cd873
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -119,13 +119,6 @@ flag {
  bug: "330752824"
}

flag {
  name: "hide_pointer_indicators_for_secure_windows"
  namespace: "input"
  description: "Hide touch and pointer indicators if a secure window is present on display"
  bug: "325252005"
}

flag {
  name: "enable_keyboard_classifier"
  namespace: "input"
+0 −3
Original line number Diff line number Diff line
@@ -535,9 +535,6 @@ void PointerChoreographer::processDeviceReset(const NotifyDeviceResetArgs& args)
}

void PointerChoreographer::onControllerAddedOrRemovedLocked() {
    if (!com::android::input::flags::hide_pointer_indicators_for_secure_windows()) {
        return;
    }
    bool requireListener = !mTouchPointersByDevice.empty() || !mMousePointersByDisplay.empty() ||
            !mDrawingTabletPointersByDevice.empty() || !mStylusPointersByDevice.empty();

+3 −12
Original line number Diff line number Diff line
@@ -129,9 +129,6 @@ protected:
                                            mInjectedInitialWindowInfos};

    void SetUp() override {
        // flag overrides
        input_flags::hide_pointer_indicators_for_secure_windows(true);

        ON_CALL(mMockPolicy, createPointerController).WillByDefault([this](ControllerType type) {
            std::shared_ptr<FakePointerController> pc = std::make_shared<FakePointerController>();
            EXPECT_FALSE(pc->isPointerShown());
@@ -2109,10 +2106,7 @@ TEST_P(SkipPointerScreenshotForPrivacySensitiveDisplaysTestFixture,
    pc->assertSkipScreenshotFlagNotChanged();
}

TEST_F_WITH_FLAGS(
        PointerChoreographerTest, HidesPointerScreenshotForExistingPrivacySensitiveWindows,
        REQUIRES_FLAGS_ENABLED(ACONFIG_FLAG(com::android::input::flags,
                                            hide_pointer_indicators_for_secure_windows))) {
TEST_F(PointerChoreographerTest, HidesPointerScreenshotForExistingPrivacySensitiveWindows) {
    mChoreographer.setDisplayViewports(createViewports({DISPLAY_ID}));

    // Add a first mouse device
@@ -3169,11 +3163,8 @@ TEST_F(PointerChoreographerDisplayTopologyDefaultMouseDisplayTests,

class PointerChoreographerWindowInfoListenerTest : public testing::Test {};

TEST_F_WITH_FLAGS(
        PointerChoreographerWindowInfoListenerTest,
        doesNotCrashIfListenerCalledAfterPointerChoreographerDestroyed,
        REQUIRES_FLAGS_ENABLED(ACONFIG_FLAG(com::android::input::flags,
                                            hide_pointer_indicators_for_secure_windows))) {
TEST_F(PointerChoreographerWindowInfoListenerTest,
       doesNotCrashIfListenerCalledAfterPointerChoreographerDestroyed) {
    sp<android::gui::WindowInfosListener> registeredListener;
    sp<android::gui::WindowInfosListener> localListenerCopy;
    {