Cleanup CommonsApplication Singelton

This commit is contained in:
addshore 2017-05-16 10:39:05 +02:00
parent 45a19620b9
commit bdfbdc7579
29 changed files with 116 additions and 83 deletions

View file

@ -61,7 +61,7 @@ public class ModificationsSyncAdapter extends AbstractThreadedSyncAdapter {
return;
}
MWApi api = CommonsApplication.createMWApi();
MWApi api = CommonsApplication.getInstance().getMWApi();
api.setAuthCookie(authCookie);
String editToken;

View file

@ -15,7 +15,7 @@ public class ModificationsSyncService extends Service {
super.onCreate();
synchronized (sSyncAdapterLock) {
if (sSyncAdapter == null) {
sSyncAdapter = new ModificationsSyncAdapter(getApplicationContext(), true);
sSyncAdapter = new ModificationsSyncAdapter(this, true);
}
}
}