Make calls from TestDialerActivity

Bug: 20348183
Change-Id: Ib4c5b08aa7fdfe61a3dc31a880541423be255543
This commit is contained in:
Yorke Lee 2015-04-20 16:25:40 -07:00
parent e99ee052d0
commit 562ad5e757
2 changed files with 6 additions and 1 deletions

View File

@ -19,6 +19,7 @@
package="com.android.server.telecom.testapps">
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.CONTROL_INCALL_EXPERIENCE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.REGISTER_CALL_PROVIDER" />

View File

@ -2,7 +2,9 @@ package com.android.server.telecom.testapps;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.telecom.PhoneAccount;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.EditText;
@ -51,6 +53,8 @@ public class TestDialerActivity extends Activity {
}
private void placeCall() {
// TODO: Place a call with the number entered in the number field
final Intent intent = new Intent(Intent.ACTION_CALL,
Uri.fromParts(PhoneAccount.SCHEME_TEL, mNumberView.getText().toString(), null));
startActivityForResult(intent, 0);
}
}