mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
23 lines
660 B
Java
23 lines
660 B
Java
package org.wikimedia.commons.auth;
|
|
|
|
import android.app.Service;
|
|
import android.content.Intent;
|
|
import android.os.IBinder;
|
|
|
|
public class WikiAccountAuthenticatorService extends Service{
|
|
|
|
private static WikiAccountAuthenticator wikiAccountAuthenticator = null;
|
|
|
|
@Override
|
|
public IBinder onBind(Intent intent) {
|
|
if (!intent.getAction().equals(android.accounts.AccountManager.ACTION_AUTHENTICATOR_INTENT)) {
|
|
return null;
|
|
}
|
|
|
|
if(wikiAccountAuthenticator == null) {
|
|
wikiAccountAuthenticator = new WikiAccountAuthenticator(this);
|
|
}
|
|
return wikiAccountAuthenticator.getIBinder();
|
|
}
|
|
|
|
}
|