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

Commit 311748a5 authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

Add @Override annotation to onTouchEvent

Currently, it is not obvious that onTouchEvent is completely overridden
from View.java without calling back into the super method. Add an
@Override to make this explicit.

Also, make the sendEvent function private because no one is using it
outside of the current file.

Bug: 128553584
Test: presubmit
Change-Id: I72f64c5fab4e8386ba5e58bf1b24a7f953c78548
parent 9f70d02d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -198,6 +198,7 @@ public class KeyButtonView extends ImageView implements ButtonInterface {
        return super.performAccessibilityActionInternal(action, arguments);
    }

    @Override
    public boolean onTouchEvent(MotionEvent ev) {
        final boolean showSwipeUI = mOverviewProxyService.shouldShowSwipeUpUI();
        final int action = ev.getAction();
@@ -300,7 +301,7 @@ public class KeyButtonView extends ImageView implements ButtonInterface {
        sendEvent(action, flags, SystemClock.uptimeMillis());
    }

    void sendEvent(int action, int flags, long when) {
    private void sendEvent(int action, int flags, long when) {
        mMetricsLogger.write(new LogMaker(MetricsEvent.ACTION_NAV_BUTTON_EVENT)
                .setType(MetricsEvent.TYPE_ACTION)
                .setSubtype(mCode)