diff options
author | cyBerta <cyberta@riseup.net> | 2020-12-30 00:58:00 +0100 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2020-12-30 00:58:00 +0100 |
commit | 15d5fdba32a1d2ac6468f167848f0d98bb170912 (patch) | |
tree | 8a6c9f56be4abc4fbafb9fbd2f092c93b6b0e4e4 /app/src/main/java/se | |
parent | b38f2b0f543ef39555812c9d66c5073fd5bb451d (diff) |
replace jetbrains.annotations by androidx.annotations
Diffstat (limited to 'app/src/main/java/se')
4 files changed, 17 insertions, 19 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/EipCommand.java b/app/src/main/java/se/leap/bitmaskclient/eip/EipCommand.java index 39d4e33e..0650e8cd 100644 --- a/app/src/main/java/se/leap/bitmaskclient/eip/EipCommand.java +++ b/app/src/main/java/se/leap/bitmaskclient/eip/EipCommand.java @@ -6,11 +6,9 @@ import android.content.Intent; import android.os.ResultReceiver; import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import androidx.annotation.VisibleForTesting; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - import static se.leap.bitmaskclient.base.models.Constants.EIP_ACTION_CHECK_CERT_VALIDITY; import static se.leap.bitmaskclient.base.models.Constants.EIP_ACTION_CONFIGURE_TETHERING; import static se.leap.bitmaskclient.base.models.Constants.EIP_ACTION_START; @@ -26,7 +24,7 @@ import static se.leap.bitmaskclient.base.models.Constants.EIP_RECEIVER; public class EipCommand { - private static void execute(@NotNull Context context, @NotNull String action) { + private static void execute(@NonNull Context context, @NonNull String action) { execute(context.getApplicationContext(), action, null, null); } @@ -37,7 +35,7 @@ public class EipCommand { * filter for the EIP class * @param resultReceiver The resultreceiver to reply to */ - private static void execute(@NotNull Context context, @NotNull String action, @Nullable ResultReceiver resultReceiver, @Nullable Intent vpnIntent) { + private static void execute(@NonNull Context context, @NonNull String action, @Nullable ResultReceiver resultReceiver, @Nullable Intent vpnIntent) { if (vpnIntent == null) { vpnIntent = new Intent(); } diff --git a/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderAPICommand.java b/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderAPICommand.java index 79a107d1..1408dce8 100644 --- a/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderAPICommand.java +++ b/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderAPICommand.java @@ -5,8 +5,8 @@ import android.content.Intent; import android.os.Bundle; import android.os.ResultReceiver; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import se.leap.bitmaskclient.base.models.Constants; import se.leap.bitmaskclient.base.models.Provider; @@ -20,18 +20,18 @@ public class ProviderAPICommand { private ResultReceiver resultReceiver; private Provider provider; - private ProviderAPICommand(@NotNull Context context, @NotNull String action, @NotNull Provider provider, ResultReceiver resultReceiver) { + private ProviderAPICommand(@NonNull Context context, @NonNull String action, @NonNull Provider provider, ResultReceiver resultReceiver) { this(context.getApplicationContext(), action, Bundle.EMPTY, provider, resultReceiver); } - private ProviderAPICommand(@NotNull Context context, @NotNull String action, @NotNull Provider provider) { + private ProviderAPICommand(@NonNull Context context, @NonNull String action, @NonNull Provider provider) { this(context.getApplicationContext(), action, Bundle.EMPTY, provider); } - private ProviderAPICommand(@NotNull Context context, @NotNull String action, @NotNull Bundle parameters, @NotNull Provider provider) { + private ProviderAPICommand(@NonNull Context context, @NonNull String action, @NonNull Bundle parameters, @NonNull Provider provider) { this(context.getApplicationContext(), action, parameters, provider, null); } - private ProviderAPICommand(@NotNull Context context, @NotNull String action, @NotNull Bundle parameters, @NotNull Provider provider, @Nullable ResultReceiver resultReceiver) { + private ProviderAPICommand(@NonNull Context context, @NonNull String action, @NonNull Bundle parameters, @NonNull Provider provider, @Nullable ResultReceiver resultReceiver) { super(); this.context = context; this.action = action; @@ -64,22 +64,22 @@ public class ProviderAPICommand { return command; } - public static void execute(Context context, String action, @NotNull Provider provider) { + public static void execute(Context context, String action, @NonNull Provider provider) { ProviderAPICommand command = new ProviderAPICommand(context, action, provider); command.execute(); } - public static void execute(Context context, String action, Bundle parameters, @NotNull Provider provider) { + public static void execute(Context context, String action, Bundle parameters, @NonNull Provider provider) { ProviderAPICommand command = new ProviderAPICommand(context, action, parameters, provider); command.execute(); } - public static void execute(Context context, String action, Bundle parameters, @NotNull Provider provider, ResultReceiver resultReceiver) { + public static void execute(Context context, String action, Bundle parameters, @NonNull Provider provider, ResultReceiver resultReceiver) { ProviderAPICommand command = new ProviderAPICommand(context, action, parameters, provider, resultReceiver); command.execute(); } - public static void execute(Context context, String action, @NotNull Provider provider, ResultReceiver resultReceiver) { + public static void execute(Context context, String action, @NonNull Provider provider, ResultReceiver resultReceiver) { ProviderAPICommand command = new ProviderAPICommand(context, action, provider, resultReceiver); command.execute(); } diff --git a/app/src/main/java/se/leap/bitmaskclient/providersetup/activities/ProviderSetupBaseActivity.java b/app/src/main/java/se/leap/bitmaskclient/providersetup/activities/ProviderSetupBaseActivity.java index e54fb048..40efd811 100644 --- a/app/src/main/java/se/leap/bitmaskclient/providersetup/activities/ProviderSetupBaseActivity.java +++ b/app/src/main/java/se/leap/bitmaskclient/providersetup/activities/ProviderSetupBaseActivity.java @@ -21,12 +21,12 @@ import android.content.IntentFilter; import android.os.Bundle; import android.util.Log; +import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.DialogFragment; import androidx.fragment.app.FragmentTransaction; import androidx.localbroadcastmanager.content.LocalBroadcastManager; -import org.jetbrains.annotations.NotNull; import org.json.JSONException; import org.json.JSONObject; @@ -107,7 +107,7 @@ public abstract class ProviderSetupBaseActivity extends ConfigWizardBaseActivity @Override - public void onSaveInstanceState(@NotNull Bundle outState) { + public void onSaveInstanceState(@NonNull Bundle outState) { outState.putString(ACTIVITY_STATE, providerConfigState.toString()); outState.putString(REASON_TO_FAIL, reasonToFail); diff --git a/app/src/main/java/se/leap/bitmaskclient/providersetup/connectivity/DnsResolver.java b/app/src/main/java/se/leap/bitmaskclient/providersetup/connectivity/DnsResolver.java index 44de1e6d..c5100a67 100644 --- a/app/src/main/java/se/leap/bitmaskclient/providersetup/connectivity/DnsResolver.java +++ b/app/src/main/java/se/leap/bitmaskclient/providersetup/connectivity/DnsResolver.java @@ -1,6 +1,6 @@ package se.leap.bitmaskclient.providersetup.connectivity; -import org.jetbrains.annotations.NotNull; +import androidx.annotation.NonNull; import java.net.InetAddress; import java.net.UnknownHostException; @@ -15,7 +15,7 @@ import se.leap.bitmaskclient.base.utils.IPAddress; class DnsResolver implements Dns { @Override - public List<InetAddress> lookup(@NotNull String hostname) throws UnknownHostException { + public List<InetAddress> lookup(@NonNull String hostname) throws UnknownHostException { try { return Dns.SYSTEM.lookup(hostname); } catch (UnknownHostException e) { |