Loading src/com/android/server/telecom/CallIntentProcessor.java +7 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ import android.net.Uri; import android.os.Bundle; import android.os.Trace; import android.os.UserHandle; import android.telecom.Connection; import android.telecom.PhoneAccount; import android.telecom.PhoneAccountHandle; import android.telecom.TelecomManager; Loading Loading @@ -87,6 +88,12 @@ public class CallIntentProcessor { clientExtras = new Bundle(); } // Ensure call subject is passed on to the connection service. if (intent.hasExtra(TelecomManager.EXTRA_CALL_SUBJECT)) { String callsubject = intent.getStringExtra(TelecomManager.EXTRA_CALL_SUBJECT); clientExtras.putString(TelecomManager.EXTRA_CALL_SUBJECT, callsubject); } final boolean isPrivilegedDialer = intent.getBooleanExtra(KEY_IS_PRIVILEGED_DIALER, false); // Send to CallsManager to ensure the InCallUI gets kicked off before the broadcast returns Loading testapps/src/com/android/server/telecom/testapps/CallServiceNotifier.java +4 −2 Original line number Diff line number Diff line Loading @@ -111,7 +111,8 @@ public class CallServiceNotifier { .setAddress(Uri.parse("tel:555-TEST")) .setSubscriptionAddress(Uri.parse("tel:555-TEST")) .setCapabilities(PhoneAccount.CAPABILITY_CALL_PROVIDER | PhoneAccount.CAPABILITY_VIDEO_CALLING) PhoneAccount.CAPABILITY_VIDEO_CALLING | PhoneAccount.CAPABILITY_CALL_SUBJECT) .setIcon(Icon.createWithResource( context.getResources(), R.drawable.stat_sys_phone_call)) // TODO: Add icon tint (Color.RED) Loading @@ -129,7 +130,8 @@ public class CallServiceNotifier { .setSubscriptionAddress(Uri.parse("tel:555-TSIM")) .setCapabilities(PhoneAccount.CAPABILITY_CALL_PROVIDER | PhoneAccount.CAPABILITY_SIM_SUBSCRIPTION | PhoneAccount.CAPABILITY_VIDEO_CALLING) PhoneAccount.CAPABILITY_VIDEO_CALLING | PhoneAccount.CAPABILITY_CALL_SUBJECT) .setIcon(Icon.createWithResource( context.getResources(), R.drawable.stat_sys_phone_call)) // TODO: Add icon tint (Color.GREEN) Loading testapps/src/com/android/server/telecom/testapps/TestConnectionService.java +26 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ import android.telecom.PhoneAccountHandle; import android.telecom.TelecomManager; import android.telecom.VideoProfile; import android.util.Log; import android.widget.Toast; import com.android.server.telecom.testapps.R; Loading Loading @@ -299,6 +300,13 @@ public class TestConnectionService extends ConnectionService { String gatewayPackage = extras.getString(TelecomManager.GATEWAY_PROVIDER_PACKAGE); Uri originalHandle = extras.getParcelable(TelecomManager.GATEWAY_ORIGINAL_ADDRESS); if (extras.containsKey(TelecomManager.EXTRA_CALL_SUBJECT)) { String callSubject = extras.getString(TelecomManager.EXTRA_CALL_SUBJECT); log("Got subject: " + callSubject); Toast.makeText(getApplicationContext(), "Got subject :" + callSubject, Toast.LENGTH_SHORT).show(); } log("gateway package [" + gatewayPackage + "], original handle [" + originalHandle + "]"); Loading Loading @@ -354,6 +362,24 @@ public class TestConnectionService extends ConnectionService { VideoProfile.STATE_BIDIRECTIONAL : VideoProfile.STATE_AUDIO_ONLY; connection.setVideoState(videoState); Bundle connectionExtras = connection.getExtras(); if (connectionExtras == null) { connectionExtras = new Bundle(); } // Randomly choose a varying length call subject. int subjectFormat = mRandom.nextInt(3); if (subjectFormat == 0) { connectionExtras.putString(Connection.EXTRA_CALL_SUBJECT, "This is a test of call subject lines. Subjects for a call can be long " + " and can go even longer."); } else if (subjectFormat == 1) { connectionExtras.putString(Connection.EXTRA_CALL_SUBJECT, "This is a test of call subject lines."); } connection.setExtras(connectionExtras); setAddress(connection, address); addVideoProvider(connection); Loading Loading
src/com/android/server/telecom/CallIntentProcessor.java +7 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ import android.net.Uri; import android.os.Bundle; import android.os.Trace; import android.os.UserHandle; import android.telecom.Connection; import android.telecom.PhoneAccount; import android.telecom.PhoneAccountHandle; import android.telecom.TelecomManager; Loading Loading @@ -87,6 +88,12 @@ public class CallIntentProcessor { clientExtras = new Bundle(); } // Ensure call subject is passed on to the connection service. if (intent.hasExtra(TelecomManager.EXTRA_CALL_SUBJECT)) { String callsubject = intent.getStringExtra(TelecomManager.EXTRA_CALL_SUBJECT); clientExtras.putString(TelecomManager.EXTRA_CALL_SUBJECT, callsubject); } final boolean isPrivilegedDialer = intent.getBooleanExtra(KEY_IS_PRIVILEGED_DIALER, false); // Send to CallsManager to ensure the InCallUI gets kicked off before the broadcast returns Loading
testapps/src/com/android/server/telecom/testapps/CallServiceNotifier.java +4 −2 Original line number Diff line number Diff line Loading @@ -111,7 +111,8 @@ public class CallServiceNotifier { .setAddress(Uri.parse("tel:555-TEST")) .setSubscriptionAddress(Uri.parse("tel:555-TEST")) .setCapabilities(PhoneAccount.CAPABILITY_CALL_PROVIDER | PhoneAccount.CAPABILITY_VIDEO_CALLING) PhoneAccount.CAPABILITY_VIDEO_CALLING | PhoneAccount.CAPABILITY_CALL_SUBJECT) .setIcon(Icon.createWithResource( context.getResources(), R.drawable.stat_sys_phone_call)) // TODO: Add icon tint (Color.RED) Loading @@ -129,7 +130,8 @@ public class CallServiceNotifier { .setSubscriptionAddress(Uri.parse("tel:555-TSIM")) .setCapabilities(PhoneAccount.CAPABILITY_CALL_PROVIDER | PhoneAccount.CAPABILITY_SIM_SUBSCRIPTION | PhoneAccount.CAPABILITY_VIDEO_CALLING) PhoneAccount.CAPABILITY_VIDEO_CALLING | PhoneAccount.CAPABILITY_CALL_SUBJECT) .setIcon(Icon.createWithResource( context.getResources(), R.drawable.stat_sys_phone_call)) // TODO: Add icon tint (Color.GREEN) Loading
testapps/src/com/android/server/telecom/testapps/TestConnectionService.java +26 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ import android.telecom.PhoneAccountHandle; import android.telecom.TelecomManager; import android.telecom.VideoProfile; import android.util.Log; import android.widget.Toast; import com.android.server.telecom.testapps.R; Loading Loading @@ -299,6 +300,13 @@ public class TestConnectionService extends ConnectionService { String gatewayPackage = extras.getString(TelecomManager.GATEWAY_PROVIDER_PACKAGE); Uri originalHandle = extras.getParcelable(TelecomManager.GATEWAY_ORIGINAL_ADDRESS); if (extras.containsKey(TelecomManager.EXTRA_CALL_SUBJECT)) { String callSubject = extras.getString(TelecomManager.EXTRA_CALL_SUBJECT); log("Got subject: " + callSubject); Toast.makeText(getApplicationContext(), "Got subject :" + callSubject, Toast.LENGTH_SHORT).show(); } log("gateway package [" + gatewayPackage + "], original handle [" + originalHandle + "]"); Loading Loading @@ -354,6 +362,24 @@ public class TestConnectionService extends ConnectionService { VideoProfile.STATE_BIDIRECTIONAL : VideoProfile.STATE_AUDIO_ONLY; connection.setVideoState(videoState); Bundle connectionExtras = connection.getExtras(); if (connectionExtras == null) { connectionExtras = new Bundle(); } // Randomly choose a varying length call subject. int subjectFormat = mRandom.nextInt(3); if (subjectFormat == 0) { connectionExtras.putString(Connection.EXTRA_CALL_SUBJECT, "This is a test of call subject lines. Subjects for a call can be long " + " and can go even longer."); } else if (subjectFormat == 1) { connectionExtras.putString(Connection.EXTRA_CALL_SUBJECT, "This is a test of call subject lines."); } connection.setExtras(connectionExtras); setAddress(connection, address); addVideoProvider(connection); Loading