mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1036459. r=nalexander
This commit is contained in:
parent
269b7f8038
commit
0a64b2a703
@ -16,7 +16,7 @@ public class FxAccountAuthenticatorService extends Service {
|
||||
// Lazily initialized by <code>getAuthenticator</code>.
|
||||
protected FxAccountAuthenticator accountAuthenticator = null;
|
||||
|
||||
protected FxAccountAuthenticator getAuthenticator() {
|
||||
protected synchronized FxAccountAuthenticator getAuthenticator() {
|
||||
if (accountAuthenticator == null) {
|
||||
accountAuthenticator = new FxAccountAuthenticator(this);
|
||||
}
|
||||
@ -35,10 +35,21 @@ public class FxAccountAuthenticatorService extends Service {
|
||||
public IBinder onBind(Intent intent) {
|
||||
Logger.debug(LOG_TAG, "onBind");
|
||||
|
||||
if (intent.getAction().equals(android.accounts.AccountManager.ACTION_AUTHENTICATOR_INTENT)) {
|
||||
return getAuthenticator().getIBinder();
|
||||
if (intent == null) {
|
||||
// Should never happen, but can -- Bug 1025937.
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
if (!android.accounts.AccountManager.ACTION_AUTHENTICATOR_INTENT.equals(intent.getAction())) {
|
||||
return null;
|
||||
}
|
||||
|
||||
final FxAccountAuthenticator authenticator = getAuthenticator();
|
||||
if (authenticator == null) {
|
||||
// Should never happen.
|
||||
return null;
|
||||
}
|
||||
|
||||
return authenticator.getIBinder();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user