Ich brauche Hilfe in Bezug auf die Erklärung vonsingelton Objekt synchron Adapterklasse
, warum wir ein Singleton-Objekt synchron Adapter Dienstklasse
private static SyncAdapter sSyncAdapter = null;
private static final Object sSyncAdapterLock = new Object();
@Override
public void onCreate() {
synchronized (sSyncAdapterLock) {
if (sSyncAdapter == null) {
sSyncAdapter = new SyncAdapter(getApplicationContext(), true);
}
}
}
ja, danke –