Merge "instrument emergency call button" into mnc-dev
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user