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

Commit 1ed5004a authored by Selim Cinek's avatar Selim Cinek
Browse files

Fixed the possibility to report rejected touch events

The functionality wasn't working properly with AOD

Bug: 71762354
Test: adb shell settings put secure data_collector_allow_rejected_touch_reports 1
Change-Id: I8a74351c65a12ef65d6f13fc60c07b191b7c04cb
parent 13ca8050
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -463,4 +463,8 @@ public class DataCollector implements SensorEventListener {
    public boolean isReportingEnabled() {
        return mAllowReportRejectedTouch;
    }

    public void onFalsingSessionStarted() {
        sessionEntrypoint();
    }
}
+3 −0
Original line number Diff line number Diff line
@@ -167,6 +167,9 @@ public class FalsingManager implements SensorEventListener {
        if (mDataCollector.isEnabledFull()) {
            registerSensors(COLLECTOR_SENSORS);
        }
        if (mDataCollector.isEnabled()) {
            mDataCollector.onFalsingSessionStarted();
        }
    }

    private void registerSensors(int [] sensors) {
+2 −1
Original line number Diff line number Diff line
@@ -1704,7 +1704,7 @@ public class StatusBar extends SystemUI implements DemoMode,
        if (mReportRejectedTouch == null) {
            return;
        }
        mReportRejectedTouch.setVisibility(mState == StatusBarState.KEYGUARD
        mReportRejectedTouch.setVisibility(mState == StatusBarState.KEYGUARD && !mDozing
                && mFalsingManager.isReportingEnabled() ? View.VISIBLE : View.INVISIBLE);
    }

@@ -4506,6 +4506,7 @@ public class StatusBar extends SystemUI implements DemoMode,
            ((DozeReceiver) mAmbientIndicationContainer).setDozing(mDozing);
        }
        updateDozingState();
        updateReportRejectedTouchVisibility();
        Trace.endSection();
    }