diff --git a/core/java/android/app/role/RoleManager.java b/core/java/android/app/role/RoleManager.java index ea66fd475153b..db4f1de1f7432 100644 --- a/core/java/android/app/role/RoleManager.java +++ b/core/java/android/app/role/RoleManager.java @@ -90,6 +90,7 @@ public final class RoleManager { * The name of the dialer role. * * @see Intent#ACTION_DIAL + * @see android.telecom.InCallService */ public static final String ROLE_DIALER = "android.app.role.DIALER"; diff --git a/telecomm/java/android/telecom/InCallService.java b/telecomm/java/android/telecom/InCallService.java index ebfa3a15639ae..982e5f30e28c9 100644 --- a/telecomm/java/android/telecom/InCallService.java +++ b/telecomm/java/android/telecom/InCallService.java @@ -20,6 +20,7 @@ import android.annotation.NonNull; import android.annotation.SdkConstant; import android.annotation.SystemApi; import android.app.Service; +import android.app.UiModeManager; import android.bluetooth.BluetoothDevice; import android.content.Intent; import android.hardware.camera2.CameraManager; @@ -43,12 +44,32 @@ import java.util.List; * phone calls. *
- * An app filling the role of the default phone app provides a user interface while the device is in - * a call, and the device is not in car mode. + * The default phone app provides a user interface while the device is in a call, and the device is + * not in car mode (i.e. {@link UiModeManager#getCurrentModeType()} is not + * {@link android.content.res.Configuration#UI_MODE_TYPE_CAR}). + *
+ * In order to fill the {@link android.app.role.RoleManager#ROLE_DIALER} role, an app must meet a + * number of requirements: + *
+ * Note: If the app filling the {@link android.app.role.RoleManager#ROLE_DIALER} crashes during + * {@link InCallService} binding, the Telecom framework will automatically fall back to using the + * dialer app pre-loaded on the device. The system will display a notification to the user to let + * them know that the app has crashed and that their call was continued using the pre-loaded dialer + * app. + *
+ * Further, the pre-loaded dialer will ALWAYS be used when the user places an emergency call. *
* Below is an example manifest registration for an {@code InCallService}. The meta-data
* {@link TelecomManager#METADATA_IN_CALL_SERVICE_UI} indicates that this particular
@@ -82,6 +103,11 @@ import java.util.List;
*
*