summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Wren <cwren@android.com>2015-06-08 14:38:28 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-06-08 14:38:30 +0000
commitaaf68f216327a8a2adaf72032904b50796b4aea7 (patch)
treef6eba19fefddfb6c666f723f6bbf27744e27c258
parent51ddeca82466dc11219628ea7886f1ccffb56dba (diff)
parentde0a21f4360280b40598e877b01dda8a0363a527 (diff)
downloadframeworks_base-aaf68f216327a8a2adaf72032904b50796b4aea7.zip
frameworks_base-aaf68f216327a8a2adaf72032904b50796b4aea7.tar.gz
frameworks_base-aaf68f216327a8a2adaf72032904b50796b4aea7.tar.bz2
Merge "instrument emergency call button" into mnc-dev
-rw-r--r--core/java/com/android/internal/logging/MetricsLogger.java1
-rw-r--r--packages/Keyguard/src/com/android/keyguard/EmergencyButton.java2
2 files changed, 3 insertions, 0 deletions
diff --git a/core/java/com/android/internal/logging/MetricsLogger.java b/core/java/com/android/internal/logging/MetricsLogger.java
index 230d96d..2f21efd 100644
--- a/core/java/com/android/internal/logging/MetricsLogger.java
+++ b/core/java/com/android/internal/logging/MetricsLogger.java
@@ -27,6 +27,7 @@ import android.view.View;
*/
public class MetricsLogger implements MetricsConstants {
// Temporary constants go here, to await migration to MetricsConstants.
+ public static final int ACTION_EMERGENCY_CALL = 200;
public static void visible(Context context, int category) throws IllegalArgumentException {
if (Build.IS_DEBUGGABLE && category == VIEW_UNKNOWN) {
diff --git a/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java b/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java
index e03f449..cbf22c0 100644
--- a/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java
+++ b/packages/Keyguard/src/com/android/keyguard/EmergencyButton.java
@@ -28,6 +28,7 @@ import android.util.AttributeSet;
import android.view.View;
import android.widget.Button;
+import com.android.internal.logging.MetricsLogger;
import com.android.internal.telephony.IccCardConstants.State;
import com.android.internal.widget.LockPatternUtils;
@@ -116,6 +117,7 @@ public class EmergencyButton extends Button {
* Shows the emergency dialer or returns the user to the existing call.
*/
public void takeEmergencyCallAction() {
+ MetricsLogger.action(mContext, MetricsLogger.ACTION_EMERGENCY_CALL);
// TODO: implement a shorter timeout once new PowerManager API is ready.
// should be the equivalent to the old userActivity(EMERGENCY_CALL_TIMEOUT)
mPowerManager.userActivity(SystemClock.uptimeMillis(), true);