mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-26 23:50:58 +01:00
Manage connectivity on no connection
This commit is contained in:
@@ -5,7 +5,6 @@ import android.accounts.AccountManager;
|
||||
import android.accounts.AuthenticatorException;
|
||||
import android.accounts.OperationCanceledException;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.Network;
|
||||
@@ -305,15 +304,4 @@ public class ConnectionHelper {
|
||||
return Settings.System.getInt(context.getContentResolver(),
|
||||
Settings.Global.AIRPLANE_MODE_ON, 0) != 0;
|
||||
}
|
||||
|
||||
static Intent getSettingsIntent(Context context) {
|
||||
Intent intent;
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q)
|
||||
intent = new Intent(Settings.ACTION_WIRELESS_SETTINGS);
|
||||
else
|
||||
intent = new Intent(Settings.Panel.ACTION_INTERNET_CONNECTIVITY);
|
||||
if (intent.resolveActivity(context.getPackageManager()) == null)
|
||||
return null;
|
||||
return intent;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user