mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 07:05:49 +03:00
Clear DNS cache on network changes
Signed-off-by: Álvaro Brey Vilas <alvaro.brey@nextcloud.com>
This commit is contained in:
parent
648c104cd9
commit
7299b598d4
1 changed files with 2 additions and 0 deletions
|
@ -30,6 +30,7 @@ import android.content.IntentFilter;
|
|||
import com.nextcloud.client.account.UserAccountManager;
|
||||
import com.nextcloud.client.device.PowerManagementService;
|
||||
import com.nextcloud.client.network.ConnectivityService;
|
||||
import com.nextcloud.common.DNSCache;
|
||||
import com.owncloud.android.MainApp;
|
||||
import com.owncloud.android.datamodel.UploadsStorageManager;
|
||||
|
||||
|
@ -55,6 +56,7 @@ public final class ReceiversHelper {
|
|||
BroadcastReceiver broadcastReceiver = new BroadcastReceiver() {
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
DNSCache.clear();
|
||||
if (connectivityService.getConnectivity().isConnected()) {
|
||||
FilesSyncHelper.restartJobsIfNeeded(uploadsStorageManager,
|
||||
accountManager,
|
||||
|
|
Loading…
Reference in a new issue