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

Commit de0a21f4 authored by Chris Wren's avatar Chris Wren
Browse files

instrument emergency call button

Bug: 21527672
Change-Id: I1cc8ace204e16964ae2a251152f36133e6d02932
parent 7a4f9ca9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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) {
+2 −0
Original line number Diff line number Diff line
@@ -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);