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

Commit aaf68f21 authored by Chris Wren's avatar Chris Wren Committed by Android (Google) Code Review
Browse files

Merge "instrument emergency call button" into mnc-dev

parents 51ddeca8 de0a21f4
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);