mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-09 07:36:50 +00:00
@@ -10,6 +10,7 @@ import android.util.Log;
|
||||
|
||||
import org.thoughtcrime.securesms.service.KeyCachingService;
|
||||
import org.thoughtcrime.securesms.util.DirectoryHelper;
|
||||
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@@ -27,10 +28,12 @@ public class ContactsSyncAdapter extends AbstractThreadedSyncAdapter {
|
||||
{
|
||||
Log.w(TAG, "onPerformSync(" + authority +")");
|
||||
|
||||
try {
|
||||
DirectoryHelper.refreshDirectory(getContext(), KeyCachingService.getMasterSecret(getContext()));
|
||||
} catch (IOException e) {
|
||||
Log.w(TAG, e);
|
||||
if (TextSecurePreferences.isPushRegistered(getContext())) {
|
||||
try {
|
||||
DirectoryHelper.refreshDirectory(getContext(), KeyCachingService.getMasterSecret(getContext()));
|
||||
} catch (IOException e) {
|
||||
Log.w(TAG, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user