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

Commit 504a7f92 authored by Santos Cordon's avatar Santos Cordon
Browse files

Add dial extras to test app.

Change-Id: Ibd15b0d9f75a22291c96cd4cc6192de17527fcb4
parent 59c21a74
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ import android.os.Bundle;
import android.provider.CallLog.Calls;
import android.telecom.PhoneAccount;
import android.telecom.TelecomManager;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.EditText;
@@ -91,7 +92,7 @@ public class TestDialerActivity extends Activity {
        final TelecomManager telecomManager =
                (TelecomManager) getSystemService(Context.TELECOM_SERVICE);
        telecomManager.placeCall(Uri.fromParts(PhoneAccount.SCHEME_TEL,
                mNumberView.getText().toString(), null), null);
                mNumberView.getText().toString(), null), createCallIntentExtras());
    }

    private void testVoicemail() {
@@ -123,4 +124,14 @@ public class TestDialerActivity extends Activity {
        }
        Toast.makeText(this, "Privileged dialer operation succeeded", Toast.LENGTH_SHORT).show();
    }

    private Bundle createCallIntentExtras() {
        Bundle extras = new Bundle();
        extras.putString("com.android.server.telecom.testapps.CALL_EXTRAS", "Yorke was here");

        Bundle intentExtras = new Bundle();
        intentExtras.putBundle(TelecomManager.EXTRA_OUTGOING_CALL_EXTRAS, extras);
        Log.i("Santos xtr", intentExtras.toString());
        return intentExtras;
    }
}