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

Commit f321423a authored by Maryam Karimzadehgan's avatar Maryam Karimzadehgan Committed by Automerger Merge Worker
Browse files

Merge "Log IME Touches. Design document:...

parents 6fe2a52e cdae986c
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -486,6 +486,7 @@ message Atom {
        KeystoreKeyEventReported keystore_key_event_reported = 302;
        NetworkTetheringReported  network_tethering_reported =
            303 [(module) = "network_tethering"];
        ImeTouchReported ime_touch_reported = 304 [(module) = "sysui"];

        // StatsdStats tracks platform atoms with ids upto 500.
        // Update StatsdStats::kMaxPushedAtomId when atom ids here approach that value.
@@ -3060,6 +3061,18 @@ message ExclusionRectStateChanged {
    optional int32 duration_millis = 7;
}

/**
 * Logs when IME is on.
 *
 * Logged from: /packages/SystemUI/src/com/android/systemui/
                statusbar/phone/NavigationBarView.java
 *
 */
message ImeTouchReported {
    optional int32 x_coordinate = 1;  // X coordinate for ACTION_DOWN event.
    optional int32 y_coordinate = 2;  // Y coordinate for ACTION_DOWN event.
}

/**
 * Logs when Launcher (HomeScreen) UI has changed or was interacted.
 *
+6 −0
Original line number Diff line number Diff line
@@ -74,6 +74,7 @@ import com.android.systemui.recents.RecentsOnboarding;
import com.android.systemui.shared.plugins.PluginManager;
import com.android.systemui.shared.system.ActivityManagerWrapper;
import com.android.systemui.shared.system.QuickStepContract;
import com.android.systemui.shared.system.SysUiStatsLog;
import com.android.systemui.shared.system.WindowManagerWrapper;
import com.android.systemui.stackdivider.Divider;
import com.android.systemui.statusbar.CommandQueue;
@@ -372,6 +373,11 @@ public class NavigationBarView extends FrameLayout implements

    @Override
    public boolean onInterceptTouchEvent(MotionEvent event) {
        if (isGesturalMode(mNavBarMode) && mImeVisible
                && event.getAction() == MotionEvent.ACTION_DOWN) {
            SysUiStatsLog.write(SysUiStatsLog.IME_TOUCH_REPORTED,
                    (int) event.getX(), (int) event.getY());
        }
        return shouldDeadZoneConsumeTouchEvents(event) || super.onInterceptTouchEvent(event);
    }