Loading src/com/android/server/telecom/CallsManager.java +3 −1 Original line number Diff line number Diff line Loading @@ -1812,10 +1812,12 @@ public class CallsManager extends Call.ListenerBase */ void handleConnectionServiceDeath(ConnectionServiceWrapper service) { if (service != null) { Log.i(this, "handleConnectionServiceDeath: service %s died", service); for (Call call : mCalls) { if (call.getConnectionService() == service) { if (call.getState() != CallState.DISCONNECTED) { markCallAsDisconnected(call, new DisconnectCause(DisconnectCause.ERROR)); markCallAsDisconnected(call, new DisconnectCause(DisconnectCause.ERROR, "CS_DEATH")); } markCallAsRemoved(call); } Loading src/com/android/server/telecom/ConnectionServiceWrapper.java +1 −1 Original line number Diff line number Diff line Loading @@ -1375,7 +1375,7 @@ public class ConnectionServiceWrapper extends ServiceBinder { mPendingResponses.clear(); for (int i = 0; i < responses.length; i++) { responses[i].handleCreateConnectionFailure( new DisconnectCause(DisconnectCause.ERROR)); new DisconnectCause(DisconnectCause.ERROR, "CS_DEATH")); } } mCallIdMapper.clear(); Loading src/com/android/server/telecom/DtmfLocalTonePlayer.java +33 −30 Original line number Diff line number Diff line Loading @@ -28,7 +28,6 @@ import android.telecom.Log; import android.telecom.Logging.Session; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.util.Preconditions; // TODO: Needed for move to system service: import com.android.internal.R; Loading Loading @@ -86,6 +85,7 @@ public class DtmfLocalTonePlayer { @Override public void handleMessage(Message msg) { try { if (msg.obj instanceof Session) { Log.continueSession((Session) msg.obj, "DLTP.TH"); } Loading Loading @@ -118,6 +118,9 @@ public class DtmfLocalTonePlayer { Log.w(this, "Unknown message: %d", msg.what); break; } } finally { Log.endSession(); } } } Loading src/com/android/server/telecom/ServiceBinder.java +49 −9 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.content.Context; import android.content.Intent; import android.content.ServiceConnection; import android.os.IBinder; import android.os.RemoteException; import android.os.UserHandle; import android.telecom.Log; import android.text.TextUtils; Loading Loading @@ -104,6 +105,29 @@ abstract class ServiceBinder { } } private class ServiceDeathRecipient implements IBinder.DeathRecipient { private ComponentName mComponentName; ServiceDeathRecipient(ComponentName name) { mComponentName = name; } @Override public void binderDied() { try { synchronized (mLock) { Log.startSession("SDR.bD"); Log.i(this, "binderDied: ConnectionService %s died.", mComponentName); logServiceDisconnected("binderDied"); handleDisconnect(); } } finally { Log.endSession(); } } } private final class ServiceBinderConnection implements ServiceConnection { /** * The initial call for which the service was bound. Loading Loading @@ -132,10 +156,20 @@ abstract class ServiceBinder { handleFailedConnection(); return; } if (binder != null) { mServiceDeathRecipient = new ServiceDeathRecipient(componentName); try { binder.linkToDeath(mServiceDeathRecipient, 0); mServiceConnection = this; setBinder(binder); handleSuccessfulConnection(); } catch (RemoteException e) { Log.w(this, "onServiceConnected: %s died."); if (mServiceDeathRecipient != null) { mServiceDeathRecipient.binderDied(); } } } } } finally { Log.endSession(); Loading @@ -148,11 +182,7 @@ abstract class ServiceBinder { Log.startSession("SBC.oSD"); synchronized (mLock) { logServiceDisconnected("onServiceDisconnected"); mServiceConnection = null; clearAbort(); handleServiceDisconnected(); handleDisconnect(); } } finally { Log.endSession(); Loading @@ -160,6 +190,13 @@ abstract class ServiceBinder { } } private void handleDisconnect() { mServiceConnection = null; clearAbort(); handleServiceDisconnected(); } /** The application context. */ private final Context mContext; Loading @@ -178,6 +215,9 @@ abstract class ServiceBinder { /** Used to bind and unbind from the service. */ private ServiceConnection mServiceConnection; /** Used to handle death of the service. */ private ServiceDeathRecipient mServiceDeathRecipient; /** {@link UserHandle} to use for binding, to support work profiles and multi-user. */ private UserHandle mUserHandle; Loading Loading
src/com/android/server/telecom/CallsManager.java +3 −1 Original line number Diff line number Diff line Loading @@ -1812,10 +1812,12 @@ public class CallsManager extends Call.ListenerBase */ void handleConnectionServiceDeath(ConnectionServiceWrapper service) { if (service != null) { Log.i(this, "handleConnectionServiceDeath: service %s died", service); for (Call call : mCalls) { if (call.getConnectionService() == service) { if (call.getState() != CallState.DISCONNECTED) { markCallAsDisconnected(call, new DisconnectCause(DisconnectCause.ERROR)); markCallAsDisconnected(call, new DisconnectCause(DisconnectCause.ERROR, "CS_DEATH")); } markCallAsRemoved(call); } Loading
src/com/android/server/telecom/ConnectionServiceWrapper.java +1 −1 Original line number Diff line number Diff line Loading @@ -1375,7 +1375,7 @@ public class ConnectionServiceWrapper extends ServiceBinder { mPendingResponses.clear(); for (int i = 0; i < responses.length; i++) { responses[i].handleCreateConnectionFailure( new DisconnectCause(DisconnectCause.ERROR)); new DisconnectCause(DisconnectCause.ERROR, "CS_DEATH")); } } mCallIdMapper.clear(); Loading
src/com/android/server/telecom/DtmfLocalTonePlayer.java +33 −30 Original line number Diff line number Diff line Loading @@ -28,7 +28,6 @@ import android.telecom.Log; import android.telecom.Logging.Session; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.util.Preconditions; // TODO: Needed for move to system service: import com.android.internal.R; Loading Loading @@ -86,6 +85,7 @@ public class DtmfLocalTonePlayer { @Override public void handleMessage(Message msg) { try { if (msg.obj instanceof Session) { Log.continueSession((Session) msg.obj, "DLTP.TH"); } Loading Loading @@ -118,6 +118,9 @@ public class DtmfLocalTonePlayer { Log.w(this, "Unknown message: %d", msg.what); break; } } finally { Log.endSession(); } } } Loading
src/com/android/server/telecom/ServiceBinder.java +49 −9 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ import android.content.Context; import android.content.Intent; import android.content.ServiceConnection; import android.os.IBinder; import android.os.RemoteException; import android.os.UserHandle; import android.telecom.Log; import android.text.TextUtils; Loading Loading @@ -104,6 +105,29 @@ abstract class ServiceBinder { } } private class ServiceDeathRecipient implements IBinder.DeathRecipient { private ComponentName mComponentName; ServiceDeathRecipient(ComponentName name) { mComponentName = name; } @Override public void binderDied() { try { synchronized (mLock) { Log.startSession("SDR.bD"); Log.i(this, "binderDied: ConnectionService %s died.", mComponentName); logServiceDisconnected("binderDied"); handleDisconnect(); } } finally { Log.endSession(); } } } private final class ServiceBinderConnection implements ServiceConnection { /** * The initial call for which the service was bound. Loading Loading @@ -132,10 +156,20 @@ abstract class ServiceBinder { handleFailedConnection(); return; } if (binder != null) { mServiceDeathRecipient = new ServiceDeathRecipient(componentName); try { binder.linkToDeath(mServiceDeathRecipient, 0); mServiceConnection = this; setBinder(binder); handleSuccessfulConnection(); } catch (RemoteException e) { Log.w(this, "onServiceConnected: %s died."); if (mServiceDeathRecipient != null) { mServiceDeathRecipient.binderDied(); } } } } } finally { Log.endSession(); Loading @@ -148,11 +182,7 @@ abstract class ServiceBinder { Log.startSession("SBC.oSD"); synchronized (mLock) { logServiceDisconnected("onServiceDisconnected"); mServiceConnection = null; clearAbort(); handleServiceDisconnected(); handleDisconnect(); } } finally { Log.endSession(); Loading @@ -160,6 +190,13 @@ abstract class ServiceBinder { } } private void handleDisconnect() { mServiceConnection = null; clearAbort(); handleServiceDisconnected(); } /** The application context. */ private final Context mContext; Loading @@ -178,6 +215,9 @@ abstract class ServiceBinder { /** Used to bind and unbind from the service. */ private ServiceConnection mServiceConnection; /** Used to handle death of the service. */ private ServiceDeathRecipient mServiceDeathRecipient; /** {@link UserHandle} to use for binding, to support work profiles and multi-user. */ private UserHandle mUserHandle; Loading