Loading AndroidManifest.xml +32 −28 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" package="com.android.server.telecom" coreApp="true" android:sharedUserId="android.uid.phone"> android:sharedUserId="android.uid.system"> <!-- Prevents the activity manager from delaying any activity-start requests by this package, including requests immediately after Loading @@ -27,6 +27,7 @@ <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /> <uses-permission android:name="android.permission.CALL_PRIVILEGED" /> <uses-permission android:name="android.permission.MANAGE_USERS" /> <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS" /> <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" /> <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> <uses-permission android:name="android.permission.READ_CALL_LOG" /> Loading @@ -38,18 +39,6 @@ <uses-permission android:name="android.permission.MODIFY_PHONE_STATE" /> <uses-permission android:name="android.permission.BROADCAST_CALLLOG_INFO" /> <!-- Protects the ability to register any PhoneAccount with a capability flags of either PhoneAccount#CAPABILITY_CALL_PROVIDER or PhoneAccount#CAPABILITY_SIM_SUBSCRIPTION. --> <permission android:name="com.android.server.telecom.permission.REGISTER_PROVIDER_OR_SUBSCRIPTION" android:label="Register CALL_PROVIDER or SIM_SUBSCRIPTION PhoneAccount" android:protectionLevel="signature"/> <permission android:name="com.android.server.telecom.permission.REGISTER_CONNECTION_MANAGER" android:label="Register CONNECTION_MANAGER PhoneAccount" android:protectionLevel="signature"/> <permission android:name="android.permission.BROADCAST_CALLLOG_INFO" android:label="Broadcast the call type/duration information" Loading @@ -64,12 +53,11 @@ can check for incompatible APIs. --> <uses-sdk android:minSdkVersion="19" /> <application android:name="TelecomApp" android:persistent="true" android:label="@string/telecommAppLabel" <application android:label="@string/telecommAppLabel" android:icon="@mipmap/ic_launcher_phone" android:allowBackup="false" android:supportsRtl="true"> android:supportsRtl="true" android:process="system"> <!-- CALL vs CALL_PRIVILEGED vs CALL_EMERGENCY We have three different intents through which a call can be initiated each with its Loading @@ -90,9 +78,8 @@ <activity android:name="CallActivity" android:theme="@style/Theme.Telecomm.Transparent" android:permission="android.permission.CALL_PHONE" android:configChanges="orientation|screenSize|keyboardHidden" android:screenOrientation="nosensor" android:excludeFromRecents="true"> android:excludeFromRecents="true" android:process=":ui"> <!-- CALL action intent filters for the various ways of initiating an outgoing call. --> <intent-filter> <action android:name="android.intent.action.CALL" /> Loading Loading @@ -128,7 +115,8 @@ the system from processing this intent (b/8871505). --> <activity-alias android:name="PrivilegedCallActivity" android:targetActivity="CallActivity" android:permission="android.permission.CALL_PRIVILEGED"> android:permission="android.permission.CALL_PRIVILEGED" android:process=":ui"> <intent-filter android:priority="1000"> <action android:name="android.intent.action.CALL_PRIVILEGED" /> <category android:name="android.intent.category.DEFAULT" /> Loading Loading @@ -162,7 +150,8 @@ that scheme be removed from this activity? --> <activity-alias android:name="EmergencyCallActivity" android:targetActivity="CallActivity" android:permission="android.permission.CALL_PRIVILEGED"> android:permission="android.permission.CALL_PRIVILEGED" android:process=":ui"> <intent-filter android:priority="1000"> <action android:name="android.intent.action.CALL_EMERGENCY" /> <category android:name="android.intent.category.DEFAULT" /> Loading Loading @@ -196,7 +185,8 @@ </intent-filter> </activity-alias> <receiver android:name="TelecomBroadcastReceiver" android:exported="false"> <receiver android:name="TelecomBroadcastReceiver" android:exported="false" android:process="system"> <intent-filter> <action android:name="com.android.server.telecom.ACTION_CALL_BACK_FROM_NOTIFICATION" /> <action android:name="com.android.server.telecom.ACTION_CALL_BACK_FROM_NOTIFICATION" /> Loading @@ -208,7 +198,8 @@ </intent-filter> </receiver> <receiver android:name="PhoneAccountBroadcastReceiver"> <receiver android:name="PhoneAccountBroadcastReceiver" android:process="system"> <intent-filter> <action android:name="android.intent.action.PACKAGE_FULLY_REMOVED" /> <data android:scheme="package" /> Loading @@ -217,7 +208,8 @@ <activity android:name=".RespondViaSmsSettings$Settings" android:label="@string/respond_via_sms_setting_title" android:configChanges="orientation|screenSize|keyboardHidden"> android:configChanges="orientation|screenSize|keyboardHidden" android:process=":ui"> <intent-filter> <action android:name="android.intent.action.MAIN" /> </intent-filter> Loading @@ -227,15 +219,19 @@ android:configChanges="orientation|screenSize|keyboardHidden" android:excludeFromRecents="true" android:launchMode="singleInstance" android:theme="@style/Theme.Telecomm.Transparent"> android:theme="@style/Theme.Telecomm.Transparent" android:process=":ui"> </activity> <receiver android:name=".CallReceiver" android:exported="false"> android:exported="true" android:permission="android.permission.MODIFY_PHONE_STATE" android:process="system"> </receiver> <service android:name="BluetoothPhoneService" android:singleUser="true"> android:singleUser="true" android:process="system"> <intent-filter> <action android:name="android.bluetooth.IBluetoothHeadsetPhone" /> </intent-filter> Loading @@ -244,5 +240,13 @@ android:theme="@style/Theme.Telecomm.Transparent" android:excludeFromRecents="true"/> <service android:name=".TelecomService" android:singleUser="true" android:process="system"> <intent-filter> <action android:name="android.telecom.ITelecomService" /> </intent-filter> </service> </application> </manifest> src/com/android/server/telecom/AccountSelection.java +0 −1 Original line number Diff line number Diff line Loading @@ -129,7 +129,6 @@ public class AccountSelection extends Activity { PhoneAccountHandle accountHandle = getItem(position); PhoneAccount account = mTelecomManager.getPhoneAccount(accountHandle); textView.setText(account.getLabel()); imageView.setImageDrawable(account.getIcon(mContext)); return rowView; } Loading src/com/android/server/telecom/BluetoothPhoneService.java +54 −51 File changed.Preview size limit exceeded, changes collapsed. Show changes src/com/android/server/telecom/Call.java +49 −18 Original line number Diff line number Diff line Loading @@ -30,7 +30,6 @@ import android.telecom.GatewayInfo; import android.telecom.ParcelableConnection; import android.telecom.PhoneAccount; import android.telecom.PhoneAccountHandle; import android.telecom.PhoneCapabilities; import android.telecom.Response; import android.telecom.StatusHints; import android.telecom.TelecomManager; Loading Loading @@ -74,7 +73,7 @@ final class Call implements CreateConnectionResponse { void onFailedUnknownCall(Call call); void onRingbackRequested(Call call, boolean ringbackRequested); void onPostDialWait(Call call, String remaining); void onCallCapabilitiesChanged(Call call); void onConnectionCapabilitiesChanged(Call call); void onCallPropertiesChanged(Call call); void onParentChanged(Call call); void onChildrenChanged(Call call); Loading Loading @@ -111,7 +110,7 @@ final class Call implements CreateConnectionResponse { @Override public void onPostDialWait(Call call, String remaining) {} @Override public void onCallCapabilitiesChanged(Call call) {} public void onConnectionCapabilitiesChanged(Call call) {} @Override public void onCallPropertiesChanged(Call call) {} @Override Loading Loading @@ -279,7 +278,7 @@ final class Call implements CreateConnectionResponse { /** Whether direct-to-voicemail query is pending. */ private boolean mDirectToVoicemailQueryPending; private int mCallCapabilities; private int mConnectionCapabilities; private int mCallProperties; private boolean mIsConference = false; Loading Loading @@ -349,6 +348,37 @@ final class Call implements CreateConnectionResponse { maybeLoadCannedSmsResponses(); } /** * Persists the specified parameters and initializes the new instance. * * @param context The context. * @param repository The connection service repository. * @param handle The handle to dial. * @param gatewayInfo Gateway information to use for the call. * @param connectionManagerPhoneAccountHandle Account to use for the service managing the call. * This account must be one that was registered with the * {@link PhoneAccount#CAPABILITY_CONNECTION_MANAGER} flag. * @param targetPhoneAccountHandle Account information to use for the call. This account must be * one that was registered with the {@link PhoneAccount#CAPABILITY_CALL_PROVIDER} flag. * @param isIncoming True if this is an incoming call. * @param connectTimeMillis The connection time of the call. */ Call( Context context, ConnectionServiceRepository repository, Uri handle, GatewayInfo gatewayInfo, PhoneAccountHandle connectionManagerPhoneAccountHandle, PhoneAccountHandle targetPhoneAccountHandle, boolean isIncoming, boolean isConference, long oldConnectTimeMillis) { this(context, repository, handle, gatewayInfo, connectionManagerPhoneAccountHandle, targetPhoneAccountHandle, isIncoming, isConference); mConnectTimeMillis = oldConnectTimeMillis; } void addListener(Listener listener) { mListeners.add(listener); } Loading @@ -375,7 +405,7 @@ final class Call implements CreateConnectionResponse { getVideoState(), getChildCalls().size(), getParentCall() != null, PhoneCapabilities.toString(getCallCapabilities()), Connection.capabilitiesToString(getConnectionCapabilities()), mIsActiveSub, mTargetPhoneAccountHandle, getCallSubstate()); Loading Loading @@ -588,20 +618,21 @@ final class Call implements CreateConnectionResponse { mConnectTimeMillis = connectTimeMillis; } int getCallCapabilities() { return mCallCapabilities; int getConnectionCapabilities() { return mConnectionCapabilities; } void setCallCapabilities(int callCapabilities) { setCallCapabilities(callCapabilities, false /* forceUpdate */); void setConnectionCapabilities(int connectionCapabilities) { setConnectionCapabilities(connectionCapabilities, false /* forceUpdate */); } void setCallCapabilities(int callCapabilities, boolean forceUpdate) { Log.v(this, "setCallCapabilities: %s", PhoneCapabilities.toString(callCapabilities)); if (forceUpdate || mCallCapabilities != callCapabilities) { mCallCapabilities = callCapabilities; void setConnectionCapabilities(int connectionCapabilities, boolean forceUpdate) { Log.v(this, "setConnectionCapabilities: %s", Connection.capabilitiesToString( connectionCapabilities)); if (forceUpdate || mConnectionCapabilities != connectionCapabilities) { mConnectionCapabilities = connectionCapabilities; for (Listener l : mListeners) { l.onCallCapabilitiesChanged(this); l.onConnectionCapabilitiesChanged(this); } } } Loading Loading @@ -723,7 +754,7 @@ final class Call implements CreateConnectionResponse { setHandle(connection.getHandle(), connection.getHandlePresentation()); setCallerDisplayName( connection.getCallerDisplayName(), connection.getCallerDisplayNamePresentation()); setCallCapabilities(connection.getCapabilities()); setConnectionCapabilities(connection.getConnectionCapabilities()); setCallProperties(connection.getProperties()); setVideoProvider(connection.getVideoProvider()); setVideoState(connection.getVideoState()); Loading Loading @@ -1007,7 +1038,7 @@ final class Call implements CreateConnectionResponse { void mergeConference() { if (mConnectionService == null) { Log.w(this, "merging conference calls without a connection service."); } else if (can(PhoneCapabilities.MERGE_CONFERENCE)) { } else if (can(Connection.CAPABILITY_MERGE_CONFERENCE)) { mConnectionService.mergeConference(this); mWasConferencePreviouslyMerged = true; } Loading @@ -1016,7 +1047,7 @@ final class Call implements CreateConnectionResponse { void swapConference() { if (mConnectionService == null) { Log.w(this, "swapping conference calls without a connection service."); } else if (can(PhoneCapabilities.SWAP_CONFERENCE)) { } else if (can(Connection.CAPABILITY_SWAP_CONFERENCE)) { mConnectionService.swapConference(this); switch (mChildCalls.size()) { case 1: Loading Loading @@ -1074,7 +1105,7 @@ final class Call implements CreateConnectionResponse { } boolean can(int capability) { return (mCallCapabilities & capability) == capability; return (mConnectionCapabilities & capability) == capability; } private void addChildCall(Call call) { Loading src/com/android/server/telecom/CallActivity.java +2 −29 Original line number Diff line number Diff line Loading @@ -90,26 +90,7 @@ public class CallActivity extends Activity { if (Intent.ACTION_CALL.equals(action) || Intent.ACTION_CALL_PRIVILEGED.equals(action) || Intent.ACTION_CALL_EMERGENCY.equals(action)) { boolean isAddParticipant = intent.getBooleanExtra( TelephonyProperties.ADD_PARTICIPANT_KEY, false); Log.d(this, "isAddparticipant = "+isAddParticipant); if (isAddParticipant) { String number = PhoneNumberUtils.getNumberFromIntent(intent, this); boolean isConferenceUri = intent.getBooleanExtra( TelephonyProperties.EXTRA_DIAL_CONFERENCE_URI, false); if (!isConferenceUri) { number = PhoneNumberUtils.stripSeparators(number); } CallsManager callsManager = CallsManager.getInstance(); if (callsManager != null) { callsManager.addParticipant(number); callsManager.getInCallController().bringToForeground(false); } else { Log.w(this, "CallsManager is null, can't process add Participant"); } } else { processOutgoingCallIntent(intent); } } else if (TelecomManager.ACTION_INCOMING_CALL.equals(action)) { processIncomingCallIntent(intent); } Loading Loading @@ -189,12 +170,8 @@ public class CallActivity extends Activity { intent.putExtra(CallReceiver.KEY_IS_DEFAULT_DIALER, isDefaultDialer()); if (UserHandle.myUserId() == UserHandle.USER_OWNER) { CallReceiver.processOutgoingCallIntent(getApplicationContext(), intent); } else { sendBroadcastToReceiver(intent, false /* isIncoming */); } } private boolean isTtyModeEnabled() { return (android.provider.Settings.Secure.getInt( Loading @@ -204,12 +181,8 @@ public class CallActivity extends Activity { } private void processIncomingCallIntent(Intent intent) { if (UserHandle.myUserId() == UserHandle.USER_OWNER) { CallReceiver.processIncomingCallIntent(intent); } else { sendBroadcastToReceiver(intent, true /* isIncoming */); } } private boolean isDefaultDialer() { final String packageName = getCallingPackage(); Loading Loading
AndroidManifest.xml +32 −28 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" package="com.android.server.telecom" coreApp="true" android:sharedUserId="android.uid.phone"> android:sharedUserId="android.uid.system"> <!-- Prevents the activity manager from delaying any activity-start requests by this package, including requests immediately after Loading @@ -27,6 +27,7 @@ <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /> <uses-permission android:name="android.permission.CALL_PRIVILEGED" /> <uses-permission android:name="android.permission.MANAGE_USERS" /> <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS" /> <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" /> <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> <uses-permission android:name="android.permission.READ_CALL_LOG" /> Loading @@ -38,18 +39,6 @@ <uses-permission android:name="android.permission.MODIFY_PHONE_STATE" /> <uses-permission android:name="android.permission.BROADCAST_CALLLOG_INFO" /> <!-- Protects the ability to register any PhoneAccount with a capability flags of either PhoneAccount#CAPABILITY_CALL_PROVIDER or PhoneAccount#CAPABILITY_SIM_SUBSCRIPTION. --> <permission android:name="com.android.server.telecom.permission.REGISTER_PROVIDER_OR_SUBSCRIPTION" android:label="Register CALL_PROVIDER or SIM_SUBSCRIPTION PhoneAccount" android:protectionLevel="signature"/> <permission android:name="com.android.server.telecom.permission.REGISTER_CONNECTION_MANAGER" android:label="Register CONNECTION_MANAGER PhoneAccount" android:protectionLevel="signature"/> <permission android:name="android.permission.BROADCAST_CALLLOG_INFO" android:label="Broadcast the call type/duration information" Loading @@ -64,12 +53,11 @@ can check for incompatible APIs. --> <uses-sdk android:minSdkVersion="19" /> <application android:name="TelecomApp" android:persistent="true" android:label="@string/telecommAppLabel" <application android:label="@string/telecommAppLabel" android:icon="@mipmap/ic_launcher_phone" android:allowBackup="false" android:supportsRtl="true"> android:supportsRtl="true" android:process="system"> <!-- CALL vs CALL_PRIVILEGED vs CALL_EMERGENCY We have three different intents through which a call can be initiated each with its Loading @@ -90,9 +78,8 @@ <activity android:name="CallActivity" android:theme="@style/Theme.Telecomm.Transparent" android:permission="android.permission.CALL_PHONE" android:configChanges="orientation|screenSize|keyboardHidden" android:screenOrientation="nosensor" android:excludeFromRecents="true"> android:excludeFromRecents="true" android:process=":ui"> <!-- CALL action intent filters for the various ways of initiating an outgoing call. --> <intent-filter> <action android:name="android.intent.action.CALL" /> Loading Loading @@ -128,7 +115,8 @@ the system from processing this intent (b/8871505). --> <activity-alias android:name="PrivilegedCallActivity" android:targetActivity="CallActivity" android:permission="android.permission.CALL_PRIVILEGED"> android:permission="android.permission.CALL_PRIVILEGED" android:process=":ui"> <intent-filter android:priority="1000"> <action android:name="android.intent.action.CALL_PRIVILEGED" /> <category android:name="android.intent.category.DEFAULT" /> Loading Loading @@ -162,7 +150,8 @@ that scheme be removed from this activity? --> <activity-alias android:name="EmergencyCallActivity" android:targetActivity="CallActivity" android:permission="android.permission.CALL_PRIVILEGED"> android:permission="android.permission.CALL_PRIVILEGED" android:process=":ui"> <intent-filter android:priority="1000"> <action android:name="android.intent.action.CALL_EMERGENCY" /> <category android:name="android.intent.category.DEFAULT" /> Loading Loading @@ -196,7 +185,8 @@ </intent-filter> </activity-alias> <receiver android:name="TelecomBroadcastReceiver" android:exported="false"> <receiver android:name="TelecomBroadcastReceiver" android:exported="false" android:process="system"> <intent-filter> <action android:name="com.android.server.telecom.ACTION_CALL_BACK_FROM_NOTIFICATION" /> <action android:name="com.android.server.telecom.ACTION_CALL_BACK_FROM_NOTIFICATION" /> Loading @@ -208,7 +198,8 @@ </intent-filter> </receiver> <receiver android:name="PhoneAccountBroadcastReceiver"> <receiver android:name="PhoneAccountBroadcastReceiver" android:process="system"> <intent-filter> <action android:name="android.intent.action.PACKAGE_FULLY_REMOVED" /> <data android:scheme="package" /> Loading @@ -217,7 +208,8 @@ <activity android:name=".RespondViaSmsSettings$Settings" android:label="@string/respond_via_sms_setting_title" android:configChanges="orientation|screenSize|keyboardHidden"> android:configChanges="orientation|screenSize|keyboardHidden" android:process=":ui"> <intent-filter> <action android:name="android.intent.action.MAIN" /> </intent-filter> Loading @@ -227,15 +219,19 @@ android:configChanges="orientation|screenSize|keyboardHidden" android:excludeFromRecents="true" android:launchMode="singleInstance" android:theme="@style/Theme.Telecomm.Transparent"> android:theme="@style/Theme.Telecomm.Transparent" android:process=":ui"> </activity> <receiver android:name=".CallReceiver" android:exported="false"> android:exported="true" android:permission="android.permission.MODIFY_PHONE_STATE" android:process="system"> </receiver> <service android:name="BluetoothPhoneService" android:singleUser="true"> android:singleUser="true" android:process="system"> <intent-filter> <action android:name="android.bluetooth.IBluetoothHeadsetPhone" /> </intent-filter> Loading @@ -244,5 +240,13 @@ android:theme="@style/Theme.Telecomm.Transparent" android:excludeFromRecents="true"/> <service android:name=".TelecomService" android:singleUser="true" android:process="system"> <intent-filter> <action android:name="android.telecom.ITelecomService" /> </intent-filter> </service> </application> </manifest>
src/com/android/server/telecom/AccountSelection.java +0 −1 Original line number Diff line number Diff line Loading @@ -129,7 +129,6 @@ public class AccountSelection extends Activity { PhoneAccountHandle accountHandle = getItem(position); PhoneAccount account = mTelecomManager.getPhoneAccount(accountHandle); textView.setText(account.getLabel()); imageView.setImageDrawable(account.getIcon(mContext)); return rowView; } Loading
src/com/android/server/telecom/BluetoothPhoneService.java +54 −51 File changed.Preview size limit exceeded, changes collapsed. Show changes
src/com/android/server/telecom/Call.java +49 −18 Original line number Diff line number Diff line Loading @@ -30,7 +30,6 @@ import android.telecom.GatewayInfo; import android.telecom.ParcelableConnection; import android.telecom.PhoneAccount; import android.telecom.PhoneAccountHandle; import android.telecom.PhoneCapabilities; import android.telecom.Response; import android.telecom.StatusHints; import android.telecom.TelecomManager; Loading Loading @@ -74,7 +73,7 @@ final class Call implements CreateConnectionResponse { void onFailedUnknownCall(Call call); void onRingbackRequested(Call call, boolean ringbackRequested); void onPostDialWait(Call call, String remaining); void onCallCapabilitiesChanged(Call call); void onConnectionCapabilitiesChanged(Call call); void onCallPropertiesChanged(Call call); void onParentChanged(Call call); void onChildrenChanged(Call call); Loading Loading @@ -111,7 +110,7 @@ final class Call implements CreateConnectionResponse { @Override public void onPostDialWait(Call call, String remaining) {} @Override public void onCallCapabilitiesChanged(Call call) {} public void onConnectionCapabilitiesChanged(Call call) {} @Override public void onCallPropertiesChanged(Call call) {} @Override Loading Loading @@ -279,7 +278,7 @@ final class Call implements CreateConnectionResponse { /** Whether direct-to-voicemail query is pending. */ private boolean mDirectToVoicemailQueryPending; private int mCallCapabilities; private int mConnectionCapabilities; private int mCallProperties; private boolean mIsConference = false; Loading Loading @@ -349,6 +348,37 @@ final class Call implements CreateConnectionResponse { maybeLoadCannedSmsResponses(); } /** * Persists the specified parameters and initializes the new instance. * * @param context The context. * @param repository The connection service repository. * @param handle The handle to dial. * @param gatewayInfo Gateway information to use for the call. * @param connectionManagerPhoneAccountHandle Account to use for the service managing the call. * This account must be one that was registered with the * {@link PhoneAccount#CAPABILITY_CONNECTION_MANAGER} flag. * @param targetPhoneAccountHandle Account information to use for the call. This account must be * one that was registered with the {@link PhoneAccount#CAPABILITY_CALL_PROVIDER} flag. * @param isIncoming True if this is an incoming call. * @param connectTimeMillis The connection time of the call. */ Call( Context context, ConnectionServiceRepository repository, Uri handle, GatewayInfo gatewayInfo, PhoneAccountHandle connectionManagerPhoneAccountHandle, PhoneAccountHandle targetPhoneAccountHandle, boolean isIncoming, boolean isConference, long oldConnectTimeMillis) { this(context, repository, handle, gatewayInfo, connectionManagerPhoneAccountHandle, targetPhoneAccountHandle, isIncoming, isConference); mConnectTimeMillis = oldConnectTimeMillis; } void addListener(Listener listener) { mListeners.add(listener); } Loading @@ -375,7 +405,7 @@ final class Call implements CreateConnectionResponse { getVideoState(), getChildCalls().size(), getParentCall() != null, PhoneCapabilities.toString(getCallCapabilities()), Connection.capabilitiesToString(getConnectionCapabilities()), mIsActiveSub, mTargetPhoneAccountHandle, getCallSubstate()); Loading Loading @@ -588,20 +618,21 @@ final class Call implements CreateConnectionResponse { mConnectTimeMillis = connectTimeMillis; } int getCallCapabilities() { return mCallCapabilities; int getConnectionCapabilities() { return mConnectionCapabilities; } void setCallCapabilities(int callCapabilities) { setCallCapabilities(callCapabilities, false /* forceUpdate */); void setConnectionCapabilities(int connectionCapabilities) { setConnectionCapabilities(connectionCapabilities, false /* forceUpdate */); } void setCallCapabilities(int callCapabilities, boolean forceUpdate) { Log.v(this, "setCallCapabilities: %s", PhoneCapabilities.toString(callCapabilities)); if (forceUpdate || mCallCapabilities != callCapabilities) { mCallCapabilities = callCapabilities; void setConnectionCapabilities(int connectionCapabilities, boolean forceUpdate) { Log.v(this, "setConnectionCapabilities: %s", Connection.capabilitiesToString( connectionCapabilities)); if (forceUpdate || mConnectionCapabilities != connectionCapabilities) { mConnectionCapabilities = connectionCapabilities; for (Listener l : mListeners) { l.onCallCapabilitiesChanged(this); l.onConnectionCapabilitiesChanged(this); } } } Loading Loading @@ -723,7 +754,7 @@ final class Call implements CreateConnectionResponse { setHandle(connection.getHandle(), connection.getHandlePresentation()); setCallerDisplayName( connection.getCallerDisplayName(), connection.getCallerDisplayNamePresentation()); setCallCapabilities(connection.getCapabilities()); setConnectionCapabilities(connection.getConnectionCapabilities()); setCallProperties(connection.getProperties()); setVideoProvider(connection.getVideoProvider()); setVideoState(connection.getVideoState()); Loading Loading @@ -1007,7 +1038,7 @@ final class Call implements CreateConnectionResponse { void mergeConference() { if (mConnectionService == null) { Log.w(this, "merging conference calls without a connection service."); } else if (can(PhoneCapabilities.MERGE_CONFERENCE)) { } else if (can(Connection.CAPABILITY_MERGE_CONFERENCE)) { mConnectionService.mergeConference(this); mWasConferencePreviouslyMerged = true; } Loading @@ -1016,7 +1047,7 @@ final class Call implements CreateConnectionResponse { void swapConference() { if (mConnectionService == null) { Log.w(this, "swapping conference calls without a connection service."); } else if (can(PhoneCapabilities.SWAP_CONFERENCE)) { } else if (can(Connection.CAPABILITY_SWAP_CONFERENCE)) { mConnectionService.swapConference(this); switch (mChildCalls.size()) { case 1: Loading Loading @@ -1074,7 +1105,7 @@ final class Call implements CreateConnectionResponse { } boolean can(int capability) { return (mCallCapabilities & capability) == capability; return (mConnectionCapabilities & capability) == capability; } private void addChildCall(Call call) { Loading
src/com/android/server/telecom/CallActivity.java +2 −29 Original line number Diff line number Diff line Loading @@ -90,26 +90,7 @@ public class CallActivity extends Activity { if (Intent.ACTION_CALL.equals(action) || Intent.ACTION_CALL_PRIVILEGED.equals(action) || Intent.ACTION_CALL_EMERGENCY.equals(action)) { boolean isAddParticipant = intent.getBooleanExtra( TelephonyProperties.ADD_PARTICIPANT_KEY, false); Log.d(this, "isAddparticipant = "+isAddParticipant); if (isAddParticipant) { String number = PhoneNumberUtils.getNumberFromIntent(intent, this); boolean isConferenceUri = intent.getBooleanExtra( TelephonyProperties.EXTRA_DIAL_CONFERENCE_URI, false); if (!isConferenceUri) { number = PhoneNumberUtils.stripSeparators(number); } CallsManager callsManager = CallsManager.getInstance(); if (callsManager != null) { callsManager.addParticipant(number); callsManager.getInCallController().bringToForeground(false); } else { Log.w(this, "CallsManager is null, can't process add Participant"); } } else { processOutgoingCallIntent(intent); } } else if (TelecomManager.ACTION_INCOMING_CALL.equals(action)) { processIncomingCallIntent(intent); } Loading Loading @@ -189,12 +170,8 @@ public class CallActivity extends Activity { intent.putExtra(CallReceiver.KEY_IS_DEFAULT_DIALER, isDefaultDialer()); if (UserHandle.myUserId() == UserHandle.USER_OWNER) { CallReceiver.processOutgoingCallIntent(getApplicationContext(), intent); } else { sendBroadcastToReceiver(intent, false /* isIncoming */); } } private boolean isTtyModeEnabled() { return (android.provider.Settings.Secure.getInt( Loading @@ -204,12 +181,8 @@ public class CallActivity extends Activity { } private void processIncomingCallIntent(Intent intent) { if (UserHandle.myUserId() == UserHandle.USER_OWNER) { CallReceiver.processIncomingCallIntent(intent); } else { sendBroadcastToReceiver(intent, true /* isIncoming */); } } private boolean isDefaultDialer() { final String packageName = getCallingPackage(); Loading