Loading core/java/android/accounts/AuthenticatorBindHelper.java +15 −9 Original line number Original line Diff line number Diff line Loading @@ -146,7 +146,7 @@ public class AuthenticatorBindHelper { Log.v(TAG, "there are no more callbacks for service " Log.v(TAG, "there are no more callbacks for service " + authenticatorType + ", unbinding service"); + authenticatorType + ", unbinding service"); } } unbindFromService(authenticatorType); unbindFromServiceLocked(authenticatorType); } else { } else { if (Log.isLoggable(TAG, Log.VERBOSE)) { if (Log.isLoggable(TAG, Log.VERBOSE)) { Log.v(TAG, "leaving service " + authenticatorType Log.v(TAG, "leaving service " + authenticatorType Loading @@ -161,7 +161,10 @@ public class AuthenticatorBindHelper { } } } } private void unbindFromService(String authenticatorType) { /** * You must synchronized on mServiceConnections before calling this */ private void unbindFromServiceLocked(String authenticatorType) { if (Log.isLoggable(TAG, Log.VERBOSE)) { if (Log.isLoggable(TAG, Log.VERBOSE)) { Log.v(TAG, "unbindService from " + authenticatorType); Log.v(TAG, "unbindService from " + authenticatorType); } } Loading Loading @@ -217,7 +220,9 @@ public class AuthenticatorBindHelper { // post a message for each service user to tell them that the service is disconnected, // post a message for each service user to tell them that the service is disconnected, // and unbind from the service. // and unbind from the service. synchronized (mServiceConnections) { synchronized (mServiceConnections) { for (Callback callback : mServiceUsers.get(mAuthenticatorType)) { final ArrayList<Callback> callbackList = mServiceUsers.get(mAuthenticatorType); if (callbackList != null) { for (Callback callback : callbackList) { if (Log.isLoggable(TAG, Log.VERBOSE)) { if (Log.isLoggable(TAG, Log.VERBOSE)) { Log.v(TAG, "the service became disconnected, scheduling a " Log.v(TAG, "the service became disconnected, scheduling a " + "disconnected message for " + "disconnected message for " Loading @@ -225,7 +230,8 @@ public class AuthenticatorBindHelper { } } mHandler.obtainMessage(mMessageWhatDisconnected, callback).sendToTarget(); mHandler.obtainMessage(mMessageWhatDisconnected, callback).sendToTarget(); } } unbindFromService(mAuthenticatorType); unbindFromServiceLocked(mAuthenticatorType); } } } } } } } Loading Loading
core/java/android/accounts/AuthenticatorBindHelper.java +15 −9 Original line number Original line Diff line number Diff line Loading @@ -146,7 +146,7 @@ public class AuthenticatorBindHelper { Log.v(TAG, "there are no more callbacks for service " Log.v(TAG, "there are no more callbacks for service " + authenticatorType + ", unbinding service"); + authenticatorType + ", unbinding service"); } } unbindFromService(authenticatorType); unbindFromServiceLocked(authenticatorType); } else { } else { if (Log.isLoggable(TAG, Log.VERBOSE)) { if (Log.isLoggable(TAG, Log.VERBOSE)) { Log.v(TAG, "leaving service " + authenticatorType Log.v(TAG, "leaving service " + authenticatorType Loading @@ -161,7 +161,10 @@ public class AuthenticatorBindHelper { } } } } private void unbindFromService(String authenticatorType) { /** * You must synchronized on mServiceConnections before calling this */ private void unbindFromServiceLocked(String authenticatorType) { if (Log.isLoggable(TAG, Log.VERBOSE)) { if (Log.isLoggable(TAG, Log.VERBOSE)) { Log.v(TAG, "unbindService from " + authenticatorType); Log.v(TAG, "unbindService from " + authenticatorType); } } Loading Loading @@ -217,7 +220,9 @@ public class AuthenticatorBindHelper { // post a message for each service user to tell them that the service is disconnected, // post a message for each service user to tell them that the service is disconnected, // and unbind from the service. // and unbind from the service. synchronized (mServiceConnections) { synchronized (mServiceConnections) { for (Callback callback : mServiceUsers.get(mAuthenticatorType)) { final ArrayList<Callback> callbackList = mServiceUsers.get(mAuthenticatorType); if (callbackList != null) { for (Callback callback : callbackList) { if (Log.isLoggable(TAG, Log.VERBOSE)) { if (Log.isLoggable(TAG, Log.VERBOSE)) { Log.v(TAG, "the service became disconnected, scheduling a " Log.v(TAG, "the service became disconnected, scheduling a " + "disconnected message for " + "disconnected message for " Loading @@ -225,7 +230,8 @@ public class AuthenticatorBindHelper { } } mHandler.obtainMessage(mMessageWhatDisconnected, callback).sendToTarget(); mHandler.obtainMessage(mMessageWhatDisconnected, callback).sendToTarget(); } } unbindFromService(mAuthenticatorType); unbindFromServiceLocked(mAuthenticatorType); } } } } } } } Loading