Loading src/com/android/server/telecom/Call.java +11 −0 Original line number Diff line number Diff line Loading @@ -2043,6 +2043,17 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable { } } /** * Initiates a handover of this Call to the {@link ConnectionService} identified * by destAcct. * @param destAcct ConnectionService to which the call should be handed over. * @param videoState The video state desired after the handover. * @param extras Extra information to be passed to ConnectionService */ public void handoverTo(PhoneAccountHandle destAcct, int videoState, Bundle extras) { // TODO: Call requestHandover(destAcct, videoState, extras); } /** * Sets this {@link Call} to has the specified {@code parentCall}. Also sets the parent to * have this call as a child. Loading src/com/android/server/telecom/CallsManager.java +4 −0 Original line number Diff line number Diff line Loading @@ -3325,4 +3325,8 @@ public class CallsManager extends Call.ListenerBase } return ; } public void acceptHandover(Uri srcAddr, int videoState, PhoneAccountHandle destAcct) { // TODO: } } src/com/android/server/telecom/InCallAdapter.java +23 −0 Original line number Diff line number Diff line Loading @@ -577,4 +577,27 @@ class InCallAdapter extends IInCallAdapter.Stub { Log.endSession(); } } @Override public void handoverTo(String callId, PhoneAccountHandle destAcct, int videoState, Bundle extras) { try { Log.startSession("ICA.hT", mOwnerComponentName); long token = Binder.clearCallingIdentity(); try { synchronized (mLock) { Call call = mCallIdMapper.getCall(callId); if (call != null) { call.handoverTo(destAcct, videoState, extras); } else { Log.w(this, "handoverTo, unknown call id: %s", callId); } } } finally { Binder.restoreCallingIdentity(token); } } finally { Log.endSession(); } } } src/com/android/server/telecom/TelecomServiceImpl.java +36 −0 Original line number Diff line number Diff line Loading @@ -1081,6 +1081,42 @@ public class TelecomServiceImpl { } } /** * @see android.telecom.TelecomManager#acceptHandover */ @Override public void acceptHandover(Uri srcAddr, int videoState, PhoneAccountHandle destAcct) { try { Log.startSession("TSI.aHO"); synchronized (mLock) { Log.i(this, "Handover call to phoneAccountHandle %s", destAcct); if (destAcct != null && destAcct.getComponentName() != null) { mAppOpsManager.checkPackage( Binder.getCallingUid(), destAcct.getComponentName().getPackageName()); enforceUserHandleMatchesCaller(destAcct); enforcePhoneAccountIsRegisteredEnabled(destAcct, Binder.getCallingUserHandle()); if (isSelfManagedConnectionService(destAcct)) { // Self-managed phone account, ensure it has MANAGE_OWN_CALLS. mContext.enforceCallingOrSelfPermission( android.Manifest.permission.MANAGE_OWN_CALLS, "Self-managed phone accounts must have MANAGE_OWN_CALLS " + "permission."); } mCallsManager.acceptHandover(srcAddr, videoState, destAcct); } else { Log.w(this, "Null phoneAccountHandle. Ignoring request " + "to handover the call"); } } } finally { Log.endSession(); } } /** * @see android.telecom.TelecomManager#addNewUnknownCall */ Loading Loading
src/com/android/server/telecom/Call.java +11 −0 Original line number Diff line number Diff line Loading @@ -2043,6 +2043,17 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable { } } /** * Initiates a handover of this Call to the {@link ConnectionService} identified * by destAcct. * @param destAcct ConnectionService to which the call should be handed over. * @param videoState The video state desired after the handover. * @param extras Extra information to be passed to ConnectionService */ public void handoverTo(PhoneAccountHandle destAcct, int videoState, Bundle extras) { // TODO: Call requestHandover(destAcct, videoState, extras); } /** * Sets this {@link Call} to has the specified {@code parentCall}. Also sets the parent to * have this call as a child. Loading
src/com/android/server/telecom/CallsManager.java +4 −0 Original line number Diff line number Diff line Loading @@ -3325,4 +3325,8 @@ public class CallsManager extends Call.ListenerBase } return ; } public void acceptHandover(Uri srcAddr, int videoState, PhoneAccountHandle destAcct) { // TODO: } }
src/com/android/server/telecom/InCallAdapter.java +23 −0 Original line number Diff line number Diff line Loading @@ -577,4 +577,27 @@ class InCallAdapter extends IInCallAdapter.Stub { Log.endSession(); } } @Override public void handoverTo(String callId, PhoneAccountHandle destAcct, int videoState, Bundle extras) { try { Log.startSession("ICA.hT", mOwnerComponentName); long token = Binder.clearCallingIdentity(); try { synchronized (mLock) { Call call = mCallIdMapper.getCall(callId); if (call != null) { call.handoverTo(destAcct, videoState, extras); } else { Log.w(this, "handoverTo, unknown call id: %s", callId); } } } finally { Binder.restoreCallingIdentity(token); } } finally { Log.endSession(); } } }
src/com/android/server/telecom/TelecomServiceImpl.java +36 −0 Original line number Diff line number Diff line Loading @@ -1081,6 +1081,42 @@ public class TelecomServiceImpl { } } /** * @see android.telecom.TelecomManager#acceptHandover */ @Override public void acceptHandover(Uri srcAddr, int videoState, PhoneAccountHandle destAcct) { try { Log.startSession("TSI.aHO"); synchronized (mLock) { Log.i(this, "Handover call to phoneAccountHandle %s", destAcct); if (destAcct != null && destAcct.getComponentName() != null) { mAppOpsManager.checkPackage( Binder.getCallingUid(), destAcct.getComponentName().getPackageName()); enforceUserHandleMatchesCaller(destAcct); enforcePhoneAccountIsRegisteredEnabled(destAcct, Binder.getCallingUserHandle()); if (isSelfManagedConnectionService(destAcct)) { // Self-managed phone account, ensure it has MANAGE_OWN_CALLS. mContext.enforceCallingOrSelfPermission( android.Manifest.permission.MANAGE_OWN_CALLS, "Self-managed phone accounts must have MANAGE_OWN_CALLS " + "permission."); } mCallsManager.acceptHandover(srcAddr, videoState, destAcct); } else { Log.w(this, "Null phoneAccountHandle. Ignoring request " + "to handover the call"); } } } finally { Log.endSession(); } } /** * @see android.telecom.TelecomManager#addNewUnknownCall */ Loading