public class

EmergencyCallHandler

extends Activity
java.lang.Object
   ↳ android.content.Context
     ↳ android.content.ContextWrapper
       ↳ android.view.ContextThemeWrapper
         ↳ android.app.Activity
           ↳ com.android.phone.EmergencyCallHandler

Class Overview

Helper class used by the InCallScreen to handle certain special cases when making an emergency call. Specifically, if the user tries to dial an emergency number but the radio is off, e.g. if the device is in airplane mode, this class is responsible for turning the radio back on and retrying the call. This class is initially launched using the same intent originally passed to the InCallScreen (presumably an ACTION_CALL_EMERGENCY intent) but with this class explicitly set as the className/component. Later, we retry the emergency call by firing off that same intent, with the component cleared, and using an integer extra called EMERGENCY_CALL_RETRY_KEY to convey information about the current state.

Summary

Constants
String EMERGENCY_CALL_RETRY_KEY the key used to get the count from our Intent's extra(s)
int INITIAL_ATTEMPT count indicating an initial attempt at the call should be made.
int NUMBER_OF_RETRIES number of times to retry the call and the time spent in between attempts
int TIME_BETWEEN_RETRIES_MS
[Expand]
Inherited Constants
From class android.app.Activity
From class android.content.Context
From interface android.content.ComponentCallbacks2
[Expand]
Inherited Fields
From class android.app.Activity
Public Constructors
EmergencyCallHandler()
Protected Methods
void onCreate(Bundle icicle)
void onNewIntent(Intent intent)
[Expand]
Inherited Methods
From class android.app.Activity
From class android.view.ContextThemeWrapper
From class android.content.ContextWrapper
From class android.content.Context
From class java.lang.Object
From interface android.content.ComponentCallbacks
From interface android.content.ComponentCallbacks2
From interface android.view.KeyEvent.Callback
From interface android.view.LayoutInflater.Factory
From interface android.view.LayoutInflater.Factory2
From interface android.view.View.OnCreateContextMenuListener
From interface android.view.Window.Callback

Constants

public static final String EMERGENCY_CALL_RETRY_KEY

the key used to get the count from our Intent's extra(s)

Constant Value: "emergency_call_retry_count"

public static final int INITIAL_ATTEMPT

count indicating an initial attempt at the call should be made.

Constant Value: -1 (0xffffffff)

public static final int NUMBER_OF_RETRIES

number of times to retry the call and the time spent in between attempts

Constant Value: 6 (0x00000006)

public static final int TIME_BETWEEN_RETRIES_MS

Constant Value: 5000 (0x00001388)

Public Constructors

public EmergencyCallHandler ()

Protected Methods

protected void onCreate (Bundle icicle)

protected void onNewIntent (Intent intent)