Increment a MetricsLogger counter on back press.

For Wear, we want to know how often users press the side button, which
is mapped to a back key press. The number of times the back button is
pressed is probably a useful metric for the rest of Android.

The counter string, "key_back_down" is not yet declared in
go/tron-counters, but we should get the framework change in ASAP.

Bug: 32396371
Change-Id: Ia102318cd5ca4d077ce404944084806198c334f7
This commit is contained in:
Nimrod Gileadi
2016-10-31 20:42:19 +00:00
parent 1e0055bb51
commit 580135c1b8

View File

@@ -1042,6 +1042,7 @@ public class PhoneWindowManager implements WindowManagerPolicy {
}
private void interceptBackKeyDown() {
MetricsLogger.count(mContext, "key_back_down", 1);
// Reset back key state for long press
mBackKeyHandled = false;