diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto index dc20a02156cbf..663f91005c3ee 100644 --- a/cmds/statsd/src/atoms.proto +++ b/cmds/statsd/src/atoms.proto @@ -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. * diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java index 06484a226165c..dbff643c6e32b 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java @@ -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); }