Example usage for android.telecom TelecomManager EXTRA_UNKNOWN_CALL_HANDLE

List of usage examples for android.telecom TelecomManager EXTRA_UNKNOWN_CALL_HANDLE

Introduction

In this page you can find the example usage for android.telecom TelecomManager EXTRA_UNKNOWN_CALL_HANDLE.

Prototype

String EXTRA_UNKNOWN_CALL_HANDLE

To view the source code for android.telecom TelecomManager EXTRA_UNKNOWN_CALL_HANDLE.

Click Source Link

Usage

From source file:com.android.server.telecom.testapps.CallNotificationReceiver.java

public static void addNewUnknownCall(Context context, Uri handle, Bundle extras) {
    Log.i(TAG, "Adding new unknown call with handle " + handle);
    PhoneAccountHandle phoneAccount = new PhoneAccountHandle(
            new ComponentName(context, TestConnectionService.class), CallServiceNotifier.SIM_SUBSCRIPTION_ID);

    if (extras == null) {
        extras = new Bundle();
    }//from w w  w  .j av a2 s.  c om

    if (handle != null) {
        extras.putParcelable(TelecomManager.EXTRA_UNKNOWN_CALL_HANDLE, handle);
        extras.putParcelable(TestConnectionService.EXTRA_HANDLE, handle);
    }

    TelecomManager.from(context).addNewUnknownCall(phoneAccount, extras);
}