Loading testapps/res/layout/incall_screen.xml +5 −0 Original line number Diff line number Diff line Loading @@ -131,6 +131,11 @@ android:layout_height="wrap_content" android:layout_marginLeft="10dp"/> </LinearLayout> <TextView android:id="@+id/incoming_composer_attachments" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dp"/> <Button android:id="@+id/disable_incallservice" android:layout_width="wrap_content" Loading testapps/res/layout/testdialer_main.xml +5 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,11 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/startCallWithRtt"/> <CheckBox android:id="@+id/add_composer_attachments_checkbox" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/addComposerAttachments"/> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" Loading testapps/res/values/donottranslate_strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,8 @@ <string name="startCallWithRtt">Start call with RTT</string> <string name="addComposerAttachments">Add call composer attachments</string> <string name="rttIfaceButton">RTT</string> <string name="endRttButton">End RTT</string> Loading testapps/src/com/android/server/telecom/testapps/TestDialerActivity.java +17 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ import android.content.ContentValues; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.location.Location; import android.net.Uri; import android.os.Bundle; import android.os.PersistableBundle; Loading @@ -32,8 +33,18 @@ public class TestDialerActivity extends Activity { private EditText mNumberView; private CheckBox mRttCheckbox; private CheckBox mComposerCheckbox; private EditText mPriorityView; private static final String COMPOSER_SUBJECT = "Sample call composer subject"; private static final Location COMPOSER_LOCATION; static { // Area 51 COMPOSER_LOCATION = new Location(""); COMPOSER_LOCATION.setLongitude(-115.806407); COMPOSER_LOCATION.setLatitude(37.236214); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Loading Loading @@ -68,6 +79,7 @@ public class TestDialerActivity extends Activity { mNumberView = (EditText) findViewById(R.id.number); mRttCheckbox = (CheckBox) findViewById(R.id.call_with_rtt_checkbox); mComposerCheckbox = (CheckBox) findViewById(R.id.add_composer_attachments_checkbox); findViewById(R.id.enable_car_mode).setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Loading Loading @@ -169,6 +181,11 @@ public class TestDialerActivity extends Activity { if (mRttCheckbox.isChecked()) { extras.putBoolean(TelecomManager.EXTRA_START_CALL_WITH_RTT, true); } if (mComposerCheckbox.isChecked()) { extras.putInt(TelecomManager.EXTRA_PRIORITY, TelecomManager.PRIORITY_URGENT); extras.putParcelable(TelecomManager.EXTRA_LOCATION, COMPOSER_LOCATION); extras.putString(TelecomManager.EXTRA_CALL_SUBJECT, COMPOSER_SUBJECT); } Bundle intentExtras = new Bundle(); intentExtras.putBundle(TelecomManager.EXTRA_OUTGOING_CALL_EXTRAS, extras); Loading testapps/src/com/android/server/telecom/testapps/TestInCallUI.java +39 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.bluetooth.BluetoothDevice; import android.content.ComponentName; import android.content.Intent; import android.content.pm.PackageManager; import android.location.Location; import android.os.Bundle; import android.telecom.Call; import android.telecom.CallAudioState; Loading Loading @@ -248,6 +249,44 @@ public class TestInCallUI extends Activity { enableInCallService(); } }); // Find the ringing call and populate the composer extras for (int i = 0; i < TestCallList.getInstance().size(); i++) { Call call = TestCallList.getInstance().getCall(i); if (call.getState() == Call.STATE_RINGING) { int priority = call.getDetails() .getIntentExtras().getInt(TelecomManager.EXTRA_PRIORITY, -1); Location location = call.getDetails() .getIntentExtras().getParcelable(TelecomManager.EXTRA_LOCATION); String subject = call.getDetails() .getIntentExtras().getString(TelecomManager.EXTRA_CALL_SUBJECT); StringBuilder display = new StringBuilder(); display.append("priority="); switch (priority) { case TelecomManager.PRIORITY_NORMAL: display.append("normal"); break; case TelecomManager.PRIORITY_URGENT: display.append("urgent"); break; default: display.append("unset"); } display.append(";"); if (location != null) { display.append("lat=" + location.getLatitude()); display.append("lon=" + location.getLongitude()); } else { display.append("loc=null"); } display.append(" subject=" + subject); TextView attachmentsTextView = findViewById(R.id.incoming_composer_attachments); attachmentsTextView.setText(display.toString()); break; } } } public void updateCallAudioState(CallAudioState cas) { Loading Loading
testapps/res/layout/incall_screen.xml +5 −0 Original line number Diff line number Diff line Loading @@ -131,6 +131,11 @@ android:layout_height="wrap_content" android:layout_marginLeft="10dp"/> </LinearLayout> <TextView android:id="@+id/incoming_composer_attachments" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dp"/> <Button android:id="@+id/disable_incallservice" android:layout_width="wrap_content" Loading
testapps/res/layout/testdialer_main.xml +5 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,11 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/startCallWithRtt"/> <CheckBox android:id="@+id/add_composer_attachments_checkbox" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/addComposerAttachments"/> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" Loading
testapps/res/values/donottranslate_strings.xml +2 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,8 @@ <string name="startCallWithRtt">Start call with RTT</string> <string name="addComposerAttachments">Add call composer attachments</string> <string name="rttIfaceButton">RTT</string> <string name="endRttButton">End RTT</string> Loading
testapps/src/com/android/server/telecom/testapps/TestDialerActivity.java +17 −0 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ import android.content.ContentValues; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.location.Location; import android.net.Uri; import android.os.Bundle; import android.os.PersistableBundle; Loading @@ -32,8 +33,18 @@ public class TestDialerActivity extends Activity { private EditText mNumberView; private CheckBox mRttCheckbox; private CheckBox mComposerCheckbox; private EditText mPriorityView; private static final String COMPOSER_SUBJECT = "Sample call composer subject"; private static final Location COMPOSER_LOCATION; static { // Area 51 COMPOSER_LOCATION = new Location(""); COMPOSER_LOCATION.setLongitude(-115.806407); COMPOSER_LOCATION.setLatitude(37.236214); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Loading Loading @@ -68,6 +79,7 @@ public class TestDialerActivity extends Activity { mNumberView = (EditText) findViewById(R.id.number); mRttCheckbox = (CheckBox) findViewById(R.id.call_with_rtt_checkbox); mComposerCheckbox = (CheckBox) findViewById(R.id.add_composer_attachments_checkbox); findViewById(R.id.enable_car_mode).setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { Loading Loading @@ -169,6 +181,11 @@ public class TestDialerActivity extends Activity { if (mRttCheckbox.isChecked()) { extras.putBoolean(TelecomManager.EXTRA_START_CALL_WITH_RTT, true); } if (mComposerCheckbox.isChecked()) { extras.putInt(TelecomManager.EXTRA_PRIORITY, TelecomManager.PRIORITY_URGENT); extras.putParcelable(TelecomManager.EXTRA_LOCATION, COMPOSER_LOCATION); extras.putString(TelecomManager.EXTRA_CALL_SUBJECT, COMPOSER_SUBJECT); } Bundle intentExtras = new Bundle(); intentExtras.putBundle(TelecomManager.EXTRA_OUTGOING_CALL_EXTRAS, extras); Loading
testapps/src/com/android/server/telecom/testapps/TestInCallUI.java +39 −0 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.bluetooth.BluetoothDevice; import android.content.ComponentName; import android.content.Intent; import android.content.pm.PackageManager; import android.location.Location; import android.os.Bundle; import android.telecom.Call; import android.telecom.CallAudioState; Loading Loading @@ -248,6 +249,44 @@ public class TestInCallUI extends Activity { enableInCallService(); } }); // Find the ringing call and populate the composer extras for (int i = 0; i < TestCallList.getInstance().size(); i++) { Call call = TestCallList.getInstance().getCall(i); if (call.getState() == Call.STATE_RINGING) { int priority = call.getDetails() .getIntentExtras().getInt(TelecomManager.EXTRA_PRIORITY, -1); Location location = call.getDetails() .getIntentExtras().getParcelable(TelecomManager.EXTRA_LOCATION); String subject = call.getDetails() .getIntentExtras().getString(TelecomManager.EXTRA_CALL_SUBJECT); StringBuilder display = new StringBuilder(); display.append("priority="); switch (priority) { case TelecomManager.PRIORITY_NORMAL: display.append("normal"); break; case TelecomManager.PRIORITY_URGENT: display.append("urgent"); break; default: display.append("unset"); } display.append(";"); if (location != null) { display.append("lat=" + location.getLatitude()); display.append("lon=" + location.getLongitude()); } else { display.append("loc=null"); } display.append(" subject=" + subject); TextView attachmentsTextView = findViewById(R.id.incoming_composer_attachments); attachmentsTextView.setText(display.toString()); break; } } } public void updateCallAudioState(CallAudioState cas) { Loading