From ad25528b1863447588a36e4471a0cb61363733ae Mon Sep 17 00:00:00 2001 From: cyBerta Date: Tue, 17 Mar 2020 00:37:45 +0100 Subject: switch to AndroidX --- app/build.gradle | 26 +++++++++--------- .../test/StartActivityDrawerTest.java | 30 ++++++++++---------- .../leap/bitmaskclient/ProviderListActivity.java | 2 +- .../main/java/de/blinkt/openvpn/VpnProfile.java | 4 +-- .../java/de/blinkt/openvpn/core/ConfigParser.java | 2 +- .../java/de/blinkt/openvpn/core/ExtAuthHelper.java | 6 ++-- .../java/de/blinkt/openvpn/core/NetworkSpace.java | 2 +- .../de/blinkt/openvpn/core/OpenVPNService.java | 2 +- .../blinkt/openvpn/core/OpenVPNStatusService.java | 2 +- .../openvpn/core/OpenVpnManagementThread.java | 7 ++--- .../AbstractProviderDetailActivity.java | 6 ++-- .../bitmaskclient/AddProviderBaseActivity.java | 4 +-- .../java/se/leap/bitmaskclient/BitmaskApp.java | 4 +-- .../se/leap/bitmaskclient/ButterKnifeActivity.java | 2 +- .../bitmaskclient/ConfigWizardBaseActivity.java | 14 +++++----- .../bitmaskclient/CustomProviderSetupActivity.java | 4 +-- .../java/se/leap/bitmaskclient/EipFragment.java | 16 +++++------ .../se/leap/bitmaskclient/EipSetupObserver.java | 2 +- .../bitmaskclient/FragmentManagerEnhanced.java | 6 ++-- .../java/se/leap/bitmaskclient/LoginActivity.java | 2 +- .../java/se/leap/bitmaskclient/MainActivity.java | 12 ++++---- .../bitmaskclient/MainActivityErrorDialog.java | 8 +++--- .../leap/bitmaskclient/OkHttpClientGenerator.java | 2 +- .../main/java/se/leap/bitmaskclient/Provider.java | 4 +-- .../java/se/leap/bitmaskclient/ProviderAPI.java | 2 +- .../leap/bitmaskclient/ProviderApiConnector.java | 2 +- .../leap/bitmaskclient/ProviderApiManagerBase.java | 2 +- .../ProviderCredentialsBaseActivity.java | 14 +++++----- .../bitmaskclient/ProviderListBaseActivity.java | 4 +-- .../se/leap/bitmaskclient/ProviderManager.java | 2 +- .../bitmaskclient/ProviderSetupBaseActivity.java | 8 +++--- .../bitmaskclient/ProviderSetupFailedDialog.java | 6 ++-- .../java/se/leap/bitmaskclient/SignupActivity.java | 3 +- .../java/se/leap/bitmaskclient/StartActivity.java | 4 +-- .../leap/bitmaskclient/VpnNotificationManager.java | 13 ++++----- .../drawer/NavigationDrawerFragment.java | 24 ++++++++-------- .../main/java/se/leap/bitmaskclient/eip/EIP.java | 10 +++---- .../java/se/leap/bitmaskclient/eip/EipCommand.java | 8 ++---- .../leap/bitmaskclient/eip/EipResultBroadcast.java | 2 +- .../java/se/leap/bitmaskclient/eip/EipStatus.java | 2 +- .../java/se/leap/bitmaskclient/eip/Gateway.java | 2 +- .../leap/bitmaskclient/eip/VpnConfigGenerator.java | 2 +- .../bitmaskclient/fragments/AboutFragment.java | 2 +- .../bitmaskclient/fragments/AlwaysOnDialog.java | 10 +++---- .../fragments/DonationReminderDialog.java | 8 +++--- .../fragments/ExcludeAppsFragment.java | 2 +- .../leap/bitmaskclient/fragments/LogFragment.java | 4 +-- .../bitmaskclient/fragments/TetheringDialog.java | 12 ++++---- .../pluggableTransports/Dispatcher.java | 2 +- .../tethering/TetheringObservable.java | 2 +- .../tethering/TetheringStateManager.java | 2 +- .../main/java/se/leap/bitmaskclient/utils/Cmd.java | 2 +- .../se/leap/bitmaskclient/utils/ConfigHelper.java | 6 ++-- .../leap/bitmaskclient/utils/PreferenceHelper.java | 2 +- .../se/leap/bitmaskclient/utils/ViewHelper.java | 5 ++-- .../bitmaskclient/views/IconCheckboxEntry.java | 8 +++--- .../leap/bitmaskclient/views/IconSwitchEntry.java | 11 ++++---- .../se/leap/bitmaskclient/views/IconTextEntry.java | 8 +++--- .../se/leap/bitmaskclient/views/IconTextView.java | 2 +- .../bitmaskclient/views/ProviderHeaderView.java | 10 +++---- .../se/leap/bitmaskclient/views/VpnStateImage.java | 4 +-- .../main/res/layout-xlarge-port/a_add_provider.xml | 14 +++++----- .../layout-xlarge-port/a_custom_provider_setup.xml | 14 +++++----- .../layout-xlarge-port/a_provider_credentials.xml | 14 +++++----- .../res/layout-xlarge-port/a_provider_detail.xml | 14 +++++----- .../res/layout-xlarge-port/a_provider_list.xml | 14 +++++----- app/src/main/res/layout-xlarge/a_add_provider.xml | 14 +++++----- .../res/layout-xlarge/a_custom_provider_setup.xml | 14 +++++----- .../res/layout-xlarge/a_provider_credentials.xml | 14 +++++----- .../main/res/layout-xlarge/a_provider_detail.xml | 14 +++++----- app/src/main/res/layout-xlarge/a_provider_list.xml | 14 +++++----- app/src/main/res/layout-xlarge/f_eip.xml | 22 +++++++-------- .../main/res/layout-xlarge/v_loading_screen.xml | 4 +-- .../main/res/layout-xlarge/v_provider_header.xml | 4 +-- .../main/res/layout-xlarge/v_switch_list_item.xml | 4 +-- app/src/main/res/layout/a_add_provider.xml | 6 ++-- .../layout/a_add_provider_tablet_scrollview.xml | 6 ++-- app/src/main/res/layout/a_main.xml | 8 +++--- app/src/main/res/layout/a_provider_credentials.xml | 2 +- ...a_provider_credentials_tablet_linear_layout.xml | 2 +- app/src/main/res/layout/a_provider_detail.xml | 2 +- .../a_provider_detail_tablet_linear_layout.xml | 2 +- app/src/main/res/layout/d_checkbox_confirm.xml | 4 +-- app/src/main/res/layout/d_list_selection.xml | 6 ++-- .../main/res/layout/donation_reminder_dialog.xml | 4 +-- app/src/main/res/layout/f_drawer_main.xml | 4 +-- app/src/main/res/layout/f_eip.xml | 22 +++++++-------- app/src/main/res/layout/v_add_provider.xml | 4 +-- .../res/layout/v_icon_select_text_list_item.xml | 4 +-- app/src/main/res/layout/v_loading_screen.xml | 4 +-- app/src/main/res/layout/v_main_button.xml | 32 +++++++++++----------- app/src/main/res/layout/v_provider_credentials.xml | 20 +++++++------- app/src/main/res/layout/v_provider_header.xml | 4 +-- app/src/main/res/layout/v_switch_list_item.xml | 4 +-- .../se/leap/bitmaskclient/AddProviderActivity.java | 5 ---- .../se/leap/bitmaskclient/ProviderApiManager.java | 2 +- .../leap/bitmaskclient/ProviderListActivity.java | 2 +- .../leap/bitmaskclient/testutils/MockHelper.java | 2 +- .../testutils/MockSharedPreferences.java | 2 +- gradle.properties | 2 ++ 100 files changed, 346 insertions(+), 364 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index f8ee9d3a..5824addd 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -42,7 +42,7 @@ android { buildConfigField "String", "customProviderIp", '""' buildConfigField "String", "customProviderApiIp", '""' - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" dexOptions { jumboMode true multiDexEnabled true @@ -297,9 +297,9 @@ dependencies { testImplementation group: 'com.tngtech.java', name: 'junit-dataprovider', version: '1.10.0' androidTestImplementation 'org.mockito:mockito-core:2.8.9' - androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' - androidTestImplementation 'com.android.support.test.espresso:espresso-contrib:3.0.2' - androidTestImplementation 'com.android.support.test.espresso:espresso-intents:3.0.2' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0' + androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.1.0' + androidTestImplementation 'androidx.test.espresso:espresso-intents:3.1.0' //TODO: remove that library androidTestImplementation 'com.jayway.android.robotium:robotium-solo:5.6.3' testImplementation 'junit:junit:4.12' @@ -316,15 +316,15 @@ dependencies { implementation 'com.intellij:annotations:12.0' implementation 'com.google.code.gson:gson:2.8.2' implementation 'com.squareup.okhttp3:okhttp:3.9.0' - implementation "com.android.support:support-core-utils:28.0.0" - implementation 'com.android.support:support-annotations:28.0.0' - implementation 'com.android.support:support-v4:28.0.0' - implementation 'com.android.support:appcompat-v7:28.0.0' - implementation 'com.android.support:design:28.0.0' - implementation 'com.android.support:support-fragment:28.0.0' - implementation 'com.android.support.constraint:constraint-layout:1.1.3' - implementation 'com.android.support:multidex:1.0.3' - implementation 'com.android.support:cardview-v7:28.0.0' + implementation 'androidx.legacy:legacy-support-core-utils:1.0.0' + implementation 'androidx.annotation:annotation:1.0.0' + implementation 'androidx.legacy:legacy-support-v4:1.0.0' + implementation 'androidx.appcompat:appcompat:1.0.0' + implementation 'com.google.android.material:material:1.0.0' + implementation 'androidx.fragment:fragment:1.0.0' + implementation 'androidx.constraintlayout:constraintlayout:1.1.3' + implementation 'androidx.multidex:multidex:2.0.0' + implementation 'androidx.cardview:cardview:1.0.0' implementation project(path: ':shapeshifter') } diff --git a/app/src/androidTest/java/se/leap/bitmaskclient/test/StartActivityDrawerTest.java b/app/src/androidTest/java/se/leap/bitmaskclient/test/StartActivityDrawerTest.java index 31247e0a..50a70d8a 100644 --- a/app/src/androidTest/java/se/leap/bitmaskclient/test/StartActivityDrawerTest.java +++ b/app/src/androidTest/java/se/leap/bitmaskclient/test/StartActivityDrawerTest.java @@ -3,10 +3,10 @@ package se.leap.bitmaskclient.test; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; -import android.support.test.InstrumentationRegistry; -import android.support.test.espresso.contrib.DrawerActions; -import android.support.test.rule.ActivityTestRule; -import android.support.test.runner.AndroidJUnit4; +import androidx.test.platform.app.InstrumentationRegistry; +import androidx.test.espresso.contrib.DrawerActions; +import androidx.test.rule.ActivityTestRule; +import androidx.test.ext.junit.runners.AndroidJUnit4; import org.junit.Before; import org.junit.Rule; @@ -21,17 +21,17 @@ import se.leap.bitmaskclient.Provider; import se.leap.bitmaskclient.R; import se.leap.bitmaskclient.testutils.TestSetupHelper; -import static android.support.test.InstrumentationRegistry.getInstrumentation; -import static android.support.test.espresso.Espresso.onData; -import static android.support.test.espresso.Espresso.onView; -import static android.support.test.espresso.action.ViewActions.click; -import static android.support.test.espresso.assertion.ViewAssertions.matches; -import static android.support.test.espresso.contrib.DrawerMatchers.isClosed; -import static android.support.test.espresso.contrib.DrawerMatchers.isOpen; -import static android.support.test.espresso.matcher.RootMatchers.isDialog; -import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed; -import static android.support.test.espresso.matcher.ViewMatchers.withId; -import static android.support.test.espresso.matcher.ViewMatchers.withText; +import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation; +import static androidx.test.espresso.Espresso.onData; +import static androidx.test.espresso.Espresso.onView; +import static androidx.test.espresso.action.ViewActions.click; +import static androidx.test.espresso.assertion.ViewAssertions.matches; +import static androidx.test.espresso.contrib.DrawerMatchers.isClosed; +import static androidx.test.espresso.contrib.DrawerMatchers.isOpen; +import static androidx.test.espresso.matcher.RootMatchers.isDialog; +import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed; +import static androidx.test.espresso.matcher.ViewMatchers.withId; +import static androidx.test.espresso.matcher.ViewMatchers.withText; import static org.hamcrest.Matchers.anything; import static se.leap.bitmaskclient.Constants.FIRST_TIME_USER_DATE; import static se.leap.bitmaskclient.Constants.LAST_DONATION_REMINDER_DATE; diff --git a/app/src/insecure/java/se/leap/bitmaskclient/ProviderListActivity.java b/app/src/insecure/java/se/leap/bitmaskclient/ProviderListActivity.java index dfadaf05..d151c987 100644 --- a/app/src/insecure/java/se/leap/bitmaskclient/ProviderListActivity.java +++ b/app/src/insecure/java/se/leap/bitmaskclient/ProviderListActivity.java @@ -17,7 +17,7 @@ package se.leap.bitmaskclient; import android.os.Bundle; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import static se.leap.bitmaskclient.Constants.DANGER_ON; import static se.leap.bitmaskclient.ProviderAPI.SET_UP_PROVIDER; diff --git a/app/src/main/java/de/blinkt/openvpn/VpnProfile.java b/app/src/main/java/de/blinkt/openvpn/VpnProfile.java index 50362085..519c2106 100644 --- a/app/src/main/java/de/blinkt/openvpn/VpnProfile.java +++ b/app/src/main/java/de/blinkt/openvpn/VpnProfile.java @@ -15,8 +15,8 @@ import android.os.Build; import android.preference.PreferenceManager; import android.security.KeyChain; import android.security.KeyChainException; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import android.text.TextUtils; import android.util.Base64; diff --git a/app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java b/app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java index 5ccd83dd..c6240bd0 100644 --- a/app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java +++ b/app/src/main/java/de/blinkt/openvpn/core/ConfigParser.java @@ -6,7 +6,7 @@ package de.blinkt.openvpn.core; import android.os.Build; -import android.support.v4.util.Pair; +import androidx.core.util.Pair; import android.text.TextUtils; import java.io.BufferedReader; diff --git a/app/src/main/java/de/blinkt/openvpn/core/ExtAuthHelper.java b/app/src/main/java/de/blinkt/openvpn/core/ExtAuthHelper.java index 166bce12..a62a4c62 100644 --- a/app/src/main/java/de/blinkt/openvpn/core/ExtAuthHelper.java +++ b/app/src/main/java/de/blinkt/openvpn/core/ExtAuthHelper.java @@ -13,9 +13,9 @@ import android.content.pm.PackageManager; import android.content.pm.ResolveInfo; import android.os.*; import android.security.KeyChainException; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.WorkerThread; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.WorkerThread; import android.widget.ArrayAdapter; import android.widget.Spinner; import android.widget.SpinnerAdapter; diff --git a/app/src/main/java/de/blinkt/openvpn/core/NetworkSpace.java b/app/src/main/java/de/blinkt/openvpn/core/NetworkSpace.java index 0c54b050..860897db 100644 --- a/app/src/main/java/de/blinkt/openvpn/core/NetworkSpace.java +++ b/app/src/main/java/de/blinkt/openvpn/core/NetworkSpace.java @@ -6,7 +6,7 @@ package de.blinkt.openvpn.core; import android.os.Build; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import java.math.BigInteger; import java.net.Inet6Address; diff --git a/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java b/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java index 67d3c4f2..61969769 100644 --- a/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java +++ b/app/src/main/java/de/blinkt/openvpn/core/OpenVPNService.java @@ -24,7 +24,7 @@ import android.os.IBinder; import android.os.Message; import android.os.ParcelFileDescriptor; import android.os.RemoteException; -import android.support.annotation.RequiresApi; +import androidx.annotation.RequiresApi; import android.system.OsConstants; import android.text.TextUtils; import android.util.Log; diff --git a/app/src/main/java/de/blinkt/openvpn/core/OpenVPNStatusService.java b/app/src/main/java/de/blinkt/openvpn/core/OpenVPNStatusService.java index b52e39a2..0f4d54b7 100644 --- a/app/src/main/java/de/blinkt/openvpn/core/OpenVPNStatusService.java +++ b/app/src/main/java/de/blinkt/openvpn/core/OpenVPNStatusService.java @@ -14,7 +14,7 @@ import android.os.Message; import android.os.ParcelFileDescriptor; import android.os.RemoteCallbackList; import android.os.RemoteException; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import android.util.Pair; import java.io.DataOutputStream; diff --git a/app/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java b/app/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java index 787d2b1b..00147828 100644 --- a/app/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java +++ b/app/src/main/java/de/blinkt/openvpn/core/OpenVpnManagementThread.java @@ -12,17 +12,15 @@ import android.net.LocalSocket; import android.net.LocalSocketAddress; import android.os.Build; import android.os.Handler; -import android.os.Looper; import android.os.ParcelFileDescriptor; -import android.support.annotation.NonNull; -import android.support.annotation.RequiresApi; +import androidx.annotation.NonNull; +import androidx.annotation.RequiresApi; import android.system.Os; import android.util.Log; import de.blinkt.openvpn.core.connection.Connection; import se.leap.bitmaskclient.R; import de.blinkt.openvpn.VpnProfile; -import se.leap.bitmaskclient.utils.ConfigHelper; import java.io.FileDescriptor; import java.io.IOException; @@ -32,7 +30,6 @@ import java.lang.reflect.Method; import java.net.InetSocketAddress; import java.net.SocketAddress; import java.util.*; -import java.util.logging.Logger; public class OpenVpnManagementThread implements Runnable, OpenVPNManagement { diff --git a/app/src/main/java/se/leap/bitmaskclient/AbstractProviderDetailActivity.java b/app/src/main/java/se/leap/bitmaskclient/AbstractProviderDetailActivity.java index 28e5f5af..a9f156a2 100644 --- a/app/src/main/java/se/leap/bitmaskclient/AbstractProviderDetailActivity.java +++ b/app/src/main/java/se/leap/bitmaskclient/AbstractProviderDetailActivity.java @@ -2,11 +2,9 @@ package se.leap.bitmaskclient; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v7.widget.AppCompatTextView; +import androidx.annotation.Nullable; +import androidx.appcompat.widget.AppCompatTextView; import android.util.Log; -import android.view.View; -import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.ListView; import android.widget.TextView; diff --git a/app/src/main/java/se/leap/bitmaskclient/AddProviderBaseActivity.java b/app/src/main/java/se/leap/bitmaskclient/AddProviderBaseActivity.java index ca848f2e..e0bb0061 100644 --- a/app/src/main/java/se/leap/bitmaskclient/AddProviderBaseActivity.java +++ b/app/src/main/java/se/leap/bitmaskclient/AddProviderBaseActivity.java @@ -2,8 +2,8 @@ package se.leap.bitmaskclient; import android.content.Intent; import android.os.Bundle; -import android.support.design.widget.TextInputEditText; -import android.support.design.widget.TextInputLayout; +import com.google.android.material.textfield.TextInputEditText; +import com.google.android.material.textfield.TextInputLayout; import android.text.Editable; import android.text.TextWatcher; import android.view.View; diff --git a/app/src/main/java/se/leap/bitmaskclient/BitmaskApp.java b/app/src/main/java/se/leap/bitmaskclient/BitmaskApp.java index 48910fb5..bde5114b 100644 --- a/app/src/main/java/se/leap/bitmaskclient/BitmaskApp.java +++ b/app/src/main/java/se/leap/bitmaskclient/BitmaskApp.java @@ -2,8 +2,8 @@ package se.leap.bitmaskclient; import android.content.Context; import android.content.SharedPreferences; -import android.support.multidex.MultiDexApplication; -import android.support.v7.app.AppCompatDelegate; +import androidx.multidex.MultiDexApplication; +import androidx.appcompat.app.AppCompatDelegate; import com.squareup.leakcanary.LeakCanary; import com.squareup.leakcanary.RefWatcher; diff --git a/app/src/main/java/se/leap/bitmaskclient/ButterKnifeActivity.java b/app/src/main/java/se/leap/bitmaskclient/ButterKnifeActivity.java index 41164463..0ef77e2b 100644 --- a/app/src/main/java/se/leap/bitmaskclient/ButterKnifeActivity.java +++ b/app/src/main/java/se/leap/bitmaskclient/ButterKnifeActivity.java @@ -1,6 +1,6 @@ package se.leap.bitmaskclient; -import android.support.v7.app.AppCompatActivity; +import androidx.appcompat.app.AppCompatActivity; import android.view.View; import butterknife.ButterKnife; diff --git a/app/src/main/java/se/leap/bitmaskclient/ConfigWizardBaseActivity.java b/app/src/main/java/se/leap/bitmaskclient/ConfigWizardBaseActivity.java index 7aa50add..2d163859 100644 --- a/app/src/main/java/se/leap/bitmaskclient/ConfigWizardBaseActivity.java +++ b/app/src/main/java/se/leap/bitmaskclient/ConfigWizardBaseActivity.java @@ -5,13 +5,13 @@ import android.graphics.PorterDuff; import android.graphics.Rect; import android.os.Build; import android.os.Bundle; -import android.support.annotation.DrawableRes; -import android.support.annotation.Nullable; -import android.support.annotation.StringRes; -import android.support.constraint.ConstraintLayout; -import android.support.constraint.Guideline; -import android.support.v4.content.ContextCompat; -import android.support.v7.widget.AppCompatTextView; +import androidx.annotation.DrawableRes; +import androidx.annotation.Nullable; +import androidx.annotation.StringRes; +import androidx.constraintlayout.widget.ConstraintLayout; +import androidx.constraintlayout.widget.Guideline; +import androidx.core.content.ContextCompat; +import androidx.appcompat.widget.AppCompatTextView; import android.view.View; import android.view.ViewGroup; import android.view.ViewTreeObserver; diff --git a/app/src/main/java/se/leap/bitmaskclient/CustomProviderSetupActivity.java b/app/src/main/java/se/leap/bitmaskclient/CustomProviderSetupActivity.java index b3ee44ca..8f17d482 100644 --- a/app/src/main/java/se/leap/bitmaskclient/CustomProviderSetupActivity.java +++ b/app/src/main/java/se/leap/bitmaskclient/CustomProviderSetupActivity.java @@ -18,8 +18,8 @@ package se.leap.bitmaskclient; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import static se.leap.bitmaskclient.Constants.REQUEST_CODE_CONFIGURE_LEAP; import static se.leap.bitmaskclient.ProviderAPI.SET_UP_PROVIDER; diff --git a/app/src/main/java/se/leap/bitmaskclient/EipFragment.java b/app/src/main/java/se/leap/bitmaskclient/EipFragment.java index a6f8040f..b8883f77 100644 --- a/app/src/main/java/se/leap/bitmaskclient/EipFragment.java +++ b/app/src/main/java/se/leap/bitmaskclient/EipFragment.java @@ -27,14 +27,14 @@ import android.graphics.ColorMatrixColorFilter; import android.os.Bundle; import android.os.IBinder; import android.os.Vibrator; -import android.support.annotation.NonNull; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentTransaction; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.AppCompatButton; -import android.support.v7.widget.AppCompatImageView; -import android.support.v7.widget.AppCompatTextView; +import androidx.annotation.NonNull; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentTransaction; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.widget.AppCompatButton; +import androidx.appcompat.widget.AppCompatImageView; +import androidx.appcompat.widget.AppCompatTextView; import android.text.TextUtils; import android.util.Log; import android.view.Gravity; diff --git a/app/src/main/java/se/leap/bitmaskclient/EipSetupObserver.java b/app/src/main/java/se/leap/bitmaskclient/EipSetupObserver.java index 84516ee3..ee7e7ef5 100644 --- a/app/src/main/java/se/leap/bitmaskclient/EipSetupObserver.java +++ b/app/src/main/java/se/leap/bitmaskclient/EipSetupObserver.java @@ -6,7 +6,7 @@ import android.content.Intent; import android.content.IntentFilter; import android.content.SharedPreferences; import android.os.Bundle; -import android.support.v4.content.LocalBroadcastManager; +import androidx.localbroadcastmanager.content.LocalBroadcastManager; import android.util.Log; import org.json.JSONObject; diff --git a/app/src/main/java/se/leap/bitmaskclient/FragmentManagerEnhanced.java b/app/src/main/java/se/leap/bitmaskclient/FragmentManagerEnhanced.java index d567277d..4d0d4785 100644 --- a/app/src/main/java/se/leap/bitmaskclient/FragmentManagerEnhanced.java +++ b/app/src/main/java/se/leap/bitmaskclient/FragmentManagerEnhanced.java @@ -16,9 +16,9 @@ */ package se.leap.bitmaskclient; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentTransaction; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentTransaction; public class FragmentManagerEnhanced { diff --git a/app/src/main/java/se/leap/bitmaskclient/LoginActivity.java b/app/src/main/java/se/leap/bitmaskclient/LoginActivity.java index 00ede1a6..15166c67 100644 --- a/app/src/main/java/se/leap/bitmaskclient/LoginActivity.java +++ b/app/src/main/java/se/leap/bitmaskclient/LoginActivity.java @@ -1,7 +1,7 @@ package se.leap.bitmaskclient; import android.os.Bundle; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import butterknife.OnClick; diff --git a/app/src/main/java/se/leap/bitmaskclient/MainActivity.java b/app/src/main/java/se/leap/bitmaskclient/MainActivity.java index 39c4a8f1..4239a3e4 100644 --- a/app/src/main/java/se/leap/bitmaskclient/MainActivity.java +++ b/app/src/main/java/se/leap/bitmaskclient/MainActivity.java @@ -20,12 +20,12 @@ package se.leap.bitmaskclient; import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; -import android.support.annotation.StringRes; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentTransaction; -import android.support.v7.app.ActionBar; -import android.support.v7.app.AppCompatActivity; +import androidx.annotation.StringRes; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentTransaction; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AppCompatActivity; import android.util.Log; import org.json.JSONException; diff --git a/app/src/main/java/se/leap/bitmaskclient/MainActivityErrorDialog.java b/app/src/main/java/se/leap/bitmaskclient/MainActivityErrorDialog.java index 4548e79e..7e9bad22 100644 --- a/app/src/main/java/se/leap/bitmaskclient/MainActivityErrorDialog.java +++ b/app/src/main/java/se/leap/bitmaskclient/MainActivityErrorDialog.java @@ -19,10 +19,10 @@ package se.leap.bitmaskclient; import android.app.Dialog; import android.content.Context; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.DialogFragment; -import android.support.v7.app.AlertDialog; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.DialogFragment; +import androidx.appcompat.app.AlertDialog; import org.json.JSONObject; diff --git a/app/src/main/java/se/leap/bitmaskclient/OkHttpClientGenerator.java b/app/src/main/java/se/leap/bitmaskclient/OkHttpClientGenerator.java index 9d1168aa..7b9874e0 100644 --- a/app/src/main/java/se/leap/bitmaskclient/OkHttpClientGenerator.java +++ b/app/src/main/java/se/leap/bitmaskclient/OkHttpClientGenerator.java @@ -20,7 +20,7 @@ package se.leap.bitmaskclient; import android.content.SharedPreferences; import android.content.res.Resources; import android.os.Build; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import org.json.JSONException; import org.json.JSONObject; diff --git a/app/src/main/java/se/leap/bitmaskclient/Provider.java b/app/src/main/java/se/leap/bitmaskclient/Provider.java index 11d685f5..4dd7c76e 100644 --- a/app/src/main/java/se/leap/bitmaskclient/Provider.java +++ b/app/src/main/java/se/leap/bitmaskclient/Provider.java @@ -18,7 +18,7 @@ package se.leap.bitmaskclient; import android.os.Parcel; import android.os.Parcelable; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import com.google.gson.Gson; @@ -30,8 +30,6 @@ import java.net.MalformedURLException; import java.net.URL; import java.util.Locale; -import se.leap.bitmaskclient.utils.IPAddress; - import static de.blinkt.openvpn.core.connection.Connection.TransportType.OBFS4; import static se.leap.bitmaskclient.Constants.CAPABILITIES; import static se.leap.bitmaskclient.Constants.GATEWAYS; diff --git a/app/src/main/java/se/leap/bitmaskclient/ProviderAPI.java b/app/src/main/java/se/leap/bitmaskclient/ProviderAPI.java index 0e27592b..57bea0d3 100644 --- a/app/src/main/java/se/leap/bitmaskclient/ProviderAPI.java +++ b/app/src/main/java/se/leap/bitmaskclient/ProviderAPI.java @@ -20,7 +20,7 @@ import android.annotation.SuppressLint; import android.app.IntentService; import android.content.Intent; import android.content.SharedPreferences; -import android.support.v4.content.LocalBroadcastManager; +import androidx.localbroadcastmanager.content.LocalBroadcastManager; import static se.leap.bitmaskclient.Constants.SHARED_PREFERENCES; diff --git a/app/src/main/java/se/leap/bitmaskclient/ProviderApiConnector.java b/app/src/main/java/se/leap/bitmaskclient/ProviderApiConnector.java index af79a95e..84f21343 100644 --- a/app/src/main/java/se/leap/bitmaskclient/ProviderApiConnector.java +++ b/app/src/main/java/se/leap/bitmaskclient/ProviderApiConnector.java @@ -17,7 +17,7 @@ package se.leap.bitmaskclient; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.util.Pair; import java.io.IOException; diff --git a/app/src/main/java/se/leap/bitmaskclient/ProviderApiManagerBase.java b/app/src/main/java/se/leap/bitmaskclient/ProviderApiManagerBase.java index 7577f098..1fb6bf48 100644 --- a/app/src/main/java/se/leap/bitmaskclient/ProviderApiManagerBase.java +++ b/app/src/main/java/se/leap/bitmaskclient/ProviderApiManagerBase.java @@ -22,7 +22,7 @@ import android.content.SharedPreferences; import android.content.res.Resources; import android.os.Bundle; import android.os.ResultReceiver; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.util.Base64; import android.util.Log; import android.util.Pair; diff --git a/app/src/main/java/se/leap/bitmaskclient/ProviderCredentialsBaseActivity.java b/app/src/main/java/se/leap/bitmaskclient/ProviderCredentialsBaseActivity.java index 55a1da93..c61caead 100644 --- a/app/src/main/java/se/leap/bitmaskclient/ProviderCredentialsBaseActivity.java +++ b/app/src/main/java/se/leap/bitmaskclient/ProviderCredentialsBaseActivity.java @@ -23,13 +23,13 @@ import android.content.IntentFilter; import android.os.Build; import android.os.Build.VERSION_CODES; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.annotation.StringRes; -import android.support.design.widget.TextInputEditText; -import android.support.design.widget.TextInputLayout; -import android.support.v4.content.LocalBroadcastManager; -import android.support.v7.widget.AppCompatButton; -import android.support.v7.widget.AppCompatTextView; +import androidx.annotation.Nullable; +import androidx.annotation.StringRes; +import com.google.android.material.textfield.TextInputEditText; +import com.google.android.material.textfield.TextInputLayout; +import androidx.localbroadcastmanager.content.LocalBroadcastManager; +import androidx.appcompat.widget.AppCompatButton; +import androidx.appcompat.widget.AppCompatTextView; import android.text.Editable; import android.text.Html; import android.text.TextWatcher; diff --git a/app/src/main/java/se/leap/bitmaskclient/ProviderListBaseActivity.java b/app/src/main/java/se/leap/bitmaskclient/ProviderListBaseActivity.java index 56edd534..7c45c921 100644 --- a/app/src/main/java/se/leap/bitmaskclient/ProviderListBaseActivity.java +++ b/app/src/main/java/se/leap/bitmaskclient/ProviderListBaseActivity.java @@ -19,13 +19,11 @@ package se.leap.bitmaskclient; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import android.widget.ListView; import com.pedrogomez.renderers.Renderer; -import java.net.MalformedURLException; -import java.net.URL; import java.util.ArrayList; import java.util.List; diff --git a/app/src/main/java/se/leap/bitmaskclient/ProviderManager.java b/app/src/main/java/se/leap/bitmaskclient/ProviderManager.java index ab165450..6d074a7a 100644 --- a/app/src/main/java/se/leap/bitmaskclient/ProviderManager.java +++ b/app/src/main/java/se/leap/bitmaskclient/ProviderManager.java @@ -1,7 +1,7 @@ package se.leap.bitmaskclient; import android.content.res.AssetManager; -import android.support.annotation.VisibleForTesting; +import androidx.annotation.VisibleForTesting; import com.pedrogomez.renderers.AdapteeCollection; diff --git a/app/src/main/java/se/leap/bitmaskclient/ProviderSetupBaseActivity.java b/app/src/main/java/se/leap/bitmaskclient/ProviderSetupBaseActivity.java index b1bb3b07..396b8b26 100644 --- a/app/src/main/java/se/leap/bitmaskclient/ProviderSetupBaseActivity.java +++ b/app/src/main/java/se/leap/bitmaskclient/ProviderSetupBaseActivity.java @@ -20,10 +20,10 @@ import android.content.Intent; import android.content.IntentFilter; import android.os.Bundle; import android.os.Handler; -import android.support.annotation.Nullable; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.FragmentTransaction; -import android.support.v4.content.LocalBroadcastManager; +import androidx.annotation.Nullable; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.FragmentTransaction; +import androidx.localbroadcastmanager.content.LocalBroadcastManager; import android.util.Log; import org.jetbrains.annotations.NotNull; diff --git a/app/src/main/java/se/leap/bitmaskclient/ProviderSetupFailedDialog.java b/app/src/main/java/se/leap/bitmaskclient/ProviderSetupFailedDialog.java index e2f3e173..d64f34d8 100644 --- a/app/src/main/java/se/leap/bitmaskclient/ProviderSetupFailedDialog.java +++ b/app/src/main/java/se/leap/bitmaskclient/ProviderSetupFailedDialog.java @@ -21,9 +21,9 @@ import android.app.Dialog; import android.content.Context; import android.content.DialogInterface; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.DialogFragment; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.DialogFragment; import org.json.JSONObject; diff --git a/app/src/main/java/se/leap/bitmaskclient/SignupActivity.java b/app/src/main/java/se/leap/bitmaskclient/SignupActivity.java index 4a16351a..abd3d224 100644 --- a/app/src/main/java/se/leap/bitmaskclient/SignupActivity.java +++ b/app/src/main/java/se/leap/bitmaskclient/SignupActivity.java @@ -17,8 +17,7 @@ package se.leap.bitmaskclient; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.view.View; +import androidx.annotation.Nullable; import butterknife.OnClick; diff --git a/app/src/main/java/se/leap/bitmaskclient/StartActivity.java b/app/src/main/java/se/leap/bitmaskclient/StartActivity.java index b89363b2..b6ace6db 100644 --- a/app/src/main/java/se/leap/bitmaskclient/StartActivity.java +++ b/app/src/main/java/se/leap/bitmaskclient/StartActivity.java @@ -21,8 +21,8 @@ import android.content.Intent; import android.content.SharedPreferences; import android.content.pm.PackageManager; import android.os.Bundle; -import android.support.annotation.IntDef; -import android.support.annotation.Nullable; +import androidx.annotation.IntDef; +import androidx.annotation.Nullable; import android.util.Log; import java.lang.annotation.Retention; diff --git a/app/src/main/java/se/leap/bitmaskclient/VpnNotificationManager.java b/app/src/main/java/se/leap/bitmaskclient/VpnNotificationManager.java index b276a402..290a9aa9 100644 --- a/app/src/main/java/se/leap/bitmaskclient/VpnNotificationManager.java +++ b/app/src/main/java/se/leap/bitmaskclient/VpnNotificationManager.java @@ -27,12 +27,11 @@ import android.graphics.Color; import android.graphics.Typeface; import android.os.Build; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.NotificationCompat; -import android.support.v4.app.NotificationManagerCompat; +import androidx.annotation.NonNull; +import androidx.core.app.NotificationCompat; +import androidx.core.app.NotificationManagerCompat; import android.text.Spannable; import android.text.SpannableString; -import android.text.SpannableStringBuilder; import android.text.TextUtils; import android.text.style.StyleSpan; import android.widget.RemoteViews; @@ -43,9 +42,9 @@ import de.blinkt.openvpn.core.OpenVPNService; import se.leap.bitmaskclient.eip.VoidVpnService; import static android.os.Build.VERSION_CODES.O; -import static android.support.v4.app.NotificationCompat.PRIORITY_HIGH; -import static android.support.v4.app.NotificationCompat.PRIORITY_MAX; -import static android.support.v4.app.NotificationCompat.PRIORITY_MIN; +import static androidx.core.app.NotificationCompat.PRIORITY_HIGH; +import static androidx.core.app.NotificationCompat.PRIORITY_MAX; +import static androidx.core.app.NotificationCompat.PRIORITY_MIN; import static android.text.TextUtils.isEmpty; import static de.blinkt.openvpn.core.ConnectionStatus.LEVEL_NONETWORK; import static de.blinkt.openvpn.core.ConnectionStatus.LEVEL_WAITING_FOR_USER_INPUT; diff --git a/app/src/main/java/se/leap/bitmaskclient/drawer/NavigationDrawerFragment.java b/app/src/main/java/se/leap/bitmaskclient/drawer/NavigationDrawerFragment.java index 715d278d..fabaa7c3 100644 --- a/app/src/main/java/se/leap/bitmaskclient/drawer/NavigationDrawerFragment.java +++ b/app/src/main/java/se/leap/bitmaskclient/drawer/NavigationDrawerFragment.java @@ -25,18 +25,18 @@ import android.net.Uri; import android.os.Build; import android.os.Bundle; import android.os.Handler; -import android.support.annotation.NonNull; -import android.support.annotation.StringRes; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentTransaction; -import android.support.v4.view.GravityCompat; -import android.support.v4.widget.DrawerLayout; -import android.support.v7.app.ActionBar; -import android.support.v7.app.ActionBarDrawerToggle; -import android.support.v7.app.AlertDialog; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; +import androidx.annotation.NonNull; +import androidx.annotation.StringRes; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentTransaction; +import androidx.core.view.GravityCompat; +import androidx.drawerlayout.widget.DrawerLayout; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.ActionBarDrawerToggle; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuInflater; diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java b/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java index 1186b54f..511a33bc 100644 --- a/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java +++ b/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java @@ -26,11 +26,11 @@ import android.os.Bundle; import android.os.IBinder; import android.os.RemoteException; import android.os.ResultReceiver; -import android.support.annotation.NonNull; -import android.support.annotation.StringRes; -import android.support.annotation.WorkerThread; -import android.support.v4.app.JobIntentService; -import android.support.v4.content.LocalBroadcastManager; +import androidx.annotation.NonNull; +import androidx.annotation.StringRes; +import androidx.annotation.WorkerThread; +import androidx.core.app.JobIntentService; +import androidx.localbroadcastmanager.content.LocalBroadcastManager; import android.util.Log; import org.json.JSONException; 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 d2667e42..1f5b3741 100644 --- a/app/src/main/java/se/leap/bitmaskclient/eip/EipCommand.java +++ b/app/src/main/java/se/leap/bitmaskclient/eip/EipCommand.java @@ -4,15 +4,13 @@ import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.os.ResultReceiver; -import android.support.annotation.NonNull; -import android.support.annotation.VisibleForTesting; -import android.support.v4.content.ContextCompat; +import androidx.annotation.NonNull; +import androidx.annotation.VisibleForTesting; +import androidx.core.content.ContextCompat; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import se.leap.bitmaskclient.Provider; - import static se.leap.bitmaskclient.Constants.EIP_ACTION_CHECK_CERT_VALIDITY; import static se.leap.bitmaskclient.Constants.EIP_ACTION_CONFIGURE_TETHERING; import static se.leap.bitmaskclient.Constants.EIP_ACTION_START; diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/EipResultBroadcast.java b/app/src/main/java/se/leap/bitmaskclient/eip/EipResultBroadcast.java index e1efb375..92d1338c 100644 --- a/app/src/main/java/se/leap/bitmaskclient/eip/EipResultBroadcast.java +++ b/app/src/main/java/se/leap/bitmaskclient/eip/EipResultBroadcast.java @@ -4,7 +4,7 @@ import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.os.ResultReceiver; -import android.support.v4.content.LocalBroadcastManager; +import androidx.localbroadcastmanager.content.LocalBroadcastManager; import android.util.Log; import static android.content.Intent.CATEGORY_DEFAULT; diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/EipStatus.java b/app/src/main/java/se/leap/bitmaskclient/eip/EipStatus.java index 684bd646..ad84ec5a 100644 --- a/app/src/main/java/se/leap/bitmaskclient/eip/EipStatus.java +++ b/app/src/main/java/se/leap/bitmaskclient/eip/EipStatus.java @@ -18,7 +18,7 @@ package se.leap.bitmaskclient.eip; import android.content.Context; import android.os.AsyncTask; -import android.support.annotation.VisibleForTesting; +import androidx.annotation.VisibleForTesting; import android.util.Log; import java.util.Observable; diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/Gateway.java b/app/src/main/java/se/leap/bitmaskclient/eip/Gateway.java index aae622b8..66c9fe84 100644 --- a/app/src/main/java/se/leap/bitmaskclient/eip/Gateway.java +++ b/app/src/main/java/se/leap/bitmaskclient/eip/Gateway.java @@ -17,7 +17,7 @@ package se.leap.bitmaskclient.eip; import android.content.Context; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import com.google.gson.Gson; diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java b/app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java index 075aac71..08e219c7 100644 --- a/app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java +++ b/app/src/main/java/se/leap/bitmaskclient/eip/VpnConfigGenerator.java @@ -16,7 +16,7 @@ */ package se.leap.bitmaskclient.eip; -import android.support.annotation.VisibleForTesting; +import androidx.annotation.VisibleForTesting; import org.json.JSONArray; import org.json.JSONException; diff --git a/app/src/main/java/se/leap/bitmaskclient/fragments/AboutFragment.java b/app/src/main/java/se/leap/bitmaskclient/fragments/AboutFragment.java index 1a2e2df0..b7743a75 100644 --- a/app/src/main/java/se/leap/bitmaskclient/fragments/AboutFragment.java +++ b/app/src/main/java/se/leap/bitmaskclient/fragments/AboutFragment.java @@ -3,7 +3,7 @@ package se.leap.bitmaskclient.fragments; import android.content.pm.PackageInfo; import android.content.pm.PackageManager.NameNotFoundException; import android.os.Bundle; -import android.support.v4.app.Fragment; +import androidx.fragment.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/se/leap/bitmaskclient/fragments/AlwaysOnDialog.java b/app/src/main/java/se/leap/bitmaskclient/fragments/AlwaysOnDialog.java index 09817b78..cb26e685 100644 --- a/app/src/main/java/se/leap/bitmaskclient/fragments/AlwaysOnDialog.java +++ b/app/src/main/java/se/leap/bitmaskclient/fragments/AlwaysOnDialog.java @@ -4,11 +4,11 @@ import android.app.Dialog; import android.content.Intent; import android.os.Build; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v7.app.AlertDialog; -import android.support.v7.app.AppCompatDialogFragment; -import android.support.v7.widget.AppCompatTextView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.app.AppCompatDialogFragment; +import androidx.appcompat.widget.AppCompatTextView; import android.view.LayoutInflater; import android.view.View; import android.widget.CheckBox; diff --git a/app/src/main/java/se/leap/bitmaskclient/fragments/DonationReminderDialog.java b/app/src/main/java/se/leap/bitmaskclient/fragments/DonationReminderDialog.java index 66db9bc8..d2454d77 100644 --- a/app/src/main/java/se/leap/bitmaskclient/fragments/DonationReminderDialog.java +++ b/app/src/main/java/se/leap/bitmaskclient/fragments/DonationReminderDialog.java @@ -5,10 +5,10 @@ import android.content.Context; import android.content.Intent; import android.net.Uri; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v7.app.AlertDialog; -import android.support.v7.app.AppCompatDialogFragment; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.app.AppCompatDialogFragment; import android.util.Log; import android.view.LayoutInflater; import android.view.View; diff --git a/app/src/main/java/se/leap/bitmaskclient/fragments/ExcludeAppsFragment.java b/app/src/main/java/se/leap/bitmaskclient/fragments/ExcludeAppsFragment.java index 9dc838c6..9559978b 100644 --- a/app/src/main/java/se/leap/bitmaskclient/fragments/ExcludeAppsFragment.java +++ b/app/src/main/java/se/leap/bitmaskclient/fragments/ExcludeAppsFragment.java @@ -11,7 +11,7 @@ import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.os.Bundle; -import android.support.v4.app.Fragment; +import androidx.fragment.app.Fragment; import android.text.TextUtils; import android.util.Log; import android.view.LayoutInflater; diff --git a/app/src/main/java/se/leap/bitmaskclient/fragments/LogFragment.java b/app/src/main/java/se/leap/bitmaskclient/fragments/LogFragment.java index 64d199dc..19787dc3 100644 --- a/app/src/main/java/se/leap/bitmaskclient/fragments/LogFragment.java +++ b/app/src/main/java/se/leap/bitmaskclient/fragments/LogFragment.java @@ -19,8 +19,8 @@ import android.os.Handler; import android.os.Handler.Callback; import android.os.Message; import android.preference.PreferenceManager; -import android.support.annotation.Nullable; -import android.support.v4.app.ListFragment; +import androidx.annotation.Nullable; +import androidx.fragment.app.ListFragment; import android.text.SpannableString; import android.text.format.DateFormat; import android.view.LayoutInflater; diff --git a/app/src/main/java/se/leap/bitmaskclient/fragments/TetheringDialog.java b/app/src/main/java/se/leap/bitmaskclient/fragments/TetheringDialog.java index 77acb657..24e3c814 100644 --- a/app/src/main/java/se/leap/bitmaskclient/fragments/TetheringDialog.java +++ b/app/src/main/java/se/leap/bitmaskclient/fragments/TetheringDialog.java @@ -7,12 +7,12 @@ import android.content.Intent; import android.graphics.drawable.Drawable; import android.os.Bundle; import android.provider.Settings; -import android.support.annotation.NonNull; -import android.support.v7.app.AlertDialog; -import android.support.v7.app.AppCompatDialogFragment; -import android.support.v7.widget.AppCompatTextView; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AlertDialog; +import androidx.appcompat.app.AppCompatDialogFragment; +import androidx.appcompat.widget.AppCompatTextView; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.text.Spannable; import android.text.SpannableString; import android.text.method.LinkMovementMethod; diff --git a/app/src/main/java/se/leap/bitmaskclient/pluggableTransports/Dispatcher.java b/app/src/main/java/se/leap/bitmaskclient/pluggableTransports/Dispatcher.java index 8e787b57..210c94b6 100644 --- a/app/src/main/java/se/leap/bitmaskclient/pluggableTransports/Dispatcher.java +++ b/app/src/main/java/se/leap/bitmaskclient/pluggableTransports/Dispatcher.java @@ -17,7 +17,7 @@ package se.leap.bitmaskclient.pluggableTransports; import android.content.Context; -import android.support.annotation.WorkerThread; +import androidx.annotation.WorkerThread; import android.text.TextUtils; import android.util.Log; diff --git a/app/src/main/java/se/leap/bitmaskclient/tethering/TetheringObservable.java b/app/src/main/java/se/leap/bitmaskclient/tethering/TetheringObservable.java index 9bca25e9..a25f8c85 100644 --- a/app/src/main/java/se/leap/bitmaskclient/tethering/TetheringObservable.java +++ b/app/src/main/java/se/leap/bitmaskclient/tethering/TetheringObservable.java @@ -16,7 +16,7 @@ */ package se.leap.bitmaskclient.tethering; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import java.util.Observable; diff --git a/app/src/main/java/se/leap/bitmaskclient/tethering/TetheringStateManager.java b/app/src/main/java/se/leap/bitmaskclient/tethering/TetheringStateManager.java index 0af4c357..44e9da6e 100644 --- a/app/src/main/java/se/leap/bitmaskclient/tethering/TetheringStateManager.java +++ b/app/src/main/java/se/leap/bitmaskclient/tethering/TetheringStateManager.java @@ -18,7 +18,7 @@ package se.leap.bitmaskclient.tethering; import android.content.Context; import android.content.IntentFilter; -import android.support.annotation.VisibleForTesting; +import androidx.annotation.VisibleForTesting; import java.net.Inet4Address; import java.net.InterfaceAddress; diff --git a/app/src/main/java/se/leap/bitmaskclient/utils/Cmd.java b/app/src/main/java/se/leap/bitmaskclient/utils/Cmd.java index d033ed24..7b97add2 100644 --- a/app/src/main/java/se/leap/bitmaskclient/utils/Cmd.java +++ b/app/src/main/java/se/leap/bitmaskclient/utils/Cmd.java @@ -17,7 +17,7 @@ package se.leap.bitmaskclient.utils; -import android.support.annotation.WorkerThread; +import androidx.annotation.WorkerThread; import java.io.IOException; import java.io.InputStreamReader; diff --git a/app/src/main/java/se/leap/bitmaskclient/utils/ConfigHelper.java b/app/src/main/java/se/leap/bitmaskclient/utils/ConfigHelper.java index d4a640bb..2748c944 100644 --- a/app/src/main/java/se/leap/bitmaskclient/utils/ConfigHelper.java +++ b/app/src/main/java/se/leap/bitmaskclient/utils/ConfigHelper.java @@ -20,9 +20,9 @@ import android.content.Context; import android.content.res.Resources; import android.os.Build; import android.os.Looper; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.StringRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.StringRes; import org.json.JSONException; import org.json.JSONObject; diff --git a/app/src/main/java/se/leap/bitmaskclient/utils/PreferenceHelper.java b/app/src/main/java/se/leap/bitmaskclient/utils/PreferenceHelper.java index 238b00a1..669b7f8e 100644 --- a/app/src/main/java/se/leap/bitmaskclient/utils/PreferenceHelper.java +++ b/app/src/main/java/se/leap/bitmaskclient/utils/PreferenceHelper.java @@ -2,7 +2,7 @@ package se.leap.bitmaskclient.utils; import android.content.Context; import android.content.SharedPreferences; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import org.json.JSONException; import org.json.JSONObject; diff --git a/app/src/main/java/se/leap/bitmaskclient/utils/ViewHelper.java b/app/src/main/java/se/leap/bitmaskclient/utils/ViewHelper.java index 86af3479..5f4fc2a6 100644 --- a/app/src/main/java/se/leap/bitmaskclient/utils/ViewHelper.java +++ b/app/src/main/java/se/leap/bitmaskclient/utils/ViewHelper.java @@ -1,9 +1,8 @@ package se.leap.bitmaskclient.utils; import android.content.Context; -import android.content.res.Resources; -import android.support.annotation.DimenRes; -import android.util.DisplayMetrics; + +import androidx.annotation.DimenRes; /** * Created by cyberta on 29.06.18. diff --git a/app/src/main/java/se/leap/bitmaskclient/views/IconCheckboxEntry.java b/app/src/main/java/se/leap/bitmaskclient/views/IconCheckboxEntry.java index ca44592e..efe20b4c 100644 --- a/app/src/main/java/se/leap/bitmaskclient/views/IconCheckboxEntry.java +++ b/app/src/main/java/se/leap/bitmaskclient/views/IconCheckboxEntry.java @@ -3,10 +3,10 @@ package se.leap.bitmaskclient.views; import android.annotation.TargetApi; import android.content.Context; import android.graphics.drawable.Drawable; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; -import android.support.v4.graphics.drawable.DrawableCompat; -import android.support.v7.widget.AppCompatImageView; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; +import androidx.core.graphics.drawable.DrawableCompat; +import androidx.appcompat.widget.AppCompatImageView; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; diff --git a/app/src/main/java/se/leap/bitmaskclient/views/IconSwitchEntry.java b/app/src/main/java/se/leap/bitmaskclient/views/IconSwitchEntry.java index b41f3a50..c9b6024d 100644 --- a/app/src/main/java/se/leap/bitmaskclient/views/IconSwitchEntry.java +++ b/app/src/main/java/se/leap/bitmaskclient/views/IconSwitchEntry.java @@ -4,16 +4,15 @@ import android.annotation.TargetApi; import android.content.Context; import android.content.res.TypedArray; import android.graphics.drawable.Drawable; -import android.support.annotation.DrawableRes; -import android.support.annotation.Nullable; -import android.support.annotation.StringRes; -import android.support.v7.widget.AppCompatImageView; -import android.support.v7.widget.SwitchCompat; +import androidx.annotation.DrawableRes; +import androidx.annotation.Nullable; +import androidx.annotation.StringRes; +import androidx.appcompat.widget.AppCompatImageView; +import androidx.appcompat.widget.SwitchCompat; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; import android.widget.CompoundButton; -import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; diff --git a/app/src/main/java/se/leap/bitmaskclient/views/IconTextEntry.java b/app/src/main/java/se/leap/bitmaskclient/views/IconTextEntry.java index cd151885..7a1717e9 100644 --- a/app/src/main/java/se/leap/bitmaskclient/views/IconTextEntry.java +++ b/app/src/main/java/se/leap/bitmaskclient/views/IconTextEntry.java @@ -4,10 +4,10 @@ import android.annotation.TargetApi; import android.content.Context; import android.content.res.TypedArray; import android.graphics.drawable.Drawable; -import android.support.annotation.ColorRes; -import android.support.annotation.DrawableRes; -import android.support.annotation.Nullable; -import android.support.annotation.StringRes; +import androidx.annotation.ColorRes; +import androidx.annotation.DrawableRes; +import androidx.annotation.Nullable; +import androidx.annotation.StringRes; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; diff --git a/app/src/main/java/se/leap/bitmaskclient/views/IconTextView.java b/app/src/main/java/se/leap/bitmaskclient/views/IconTextView.java index 0af33c68..29c70859 100644 --- a/app/src/main/java/se/leap/bitmaskclient/views/IconTextView.java +++ b/app/src/main/java/se/leap/bitmaskclient/views/IconTextView.java @@ -4,7 +4,7 @@ package se.leap.bitmaskclient.views; import android.content.Context; import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; -import android.support.v7.widget.AppCompatTextView; +import androidx.appcompat.widget.AppCompatTextView; import android.text.Spannable; import android.text.style.ImageSpan; import android.util.AttributeSet; diff --git a/app/src/main/java/se/leap/bitmaskclient/views/ProviderHeaderView.java b/app/src/main/java/se/leap/bitmaskclient/views/ProviderHeaderView.java index ab5d6bc8..4fa3771b 100644 --- a/app/src/main/java/se/leap/bitmaskclient/views/ProviderHeaderView.java +++ b/app/src/main/java/se/leap/bitmaskclient/views/ProviderHeaderView.java @@ -1,11 +1,11 @@ package se.leap.bitmaskclient.views; import android.content.Context; -import android.support.annotation.DrawableRes; -import android.support.annotation.RequiresApi; -import android.support.annotation.StringRes; -import android.support.v7.widget.AppCompatImageView; -import android.support.v7.widget.AppCompatTextView; +import androidx.annotation.DrawableRes; +import androidx.annotation.RequiresApi; +import androidx.annotation.StringRes; +import androidx.appcompat.widget.AppCompatImageView; +import androidx.appcompat.widget.AppCompatTextView; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; diff --git a/app/src/main/java/se/leap/bitmaskclient/views/VpnStateImage.java b/app/src/main/java/se/leap/bitmaskclient/views/VpnStateImage.java index 86761642..c0432edc 100644 --- a/app/src/main/java/se/leap/bitmaskclient/views/VpnStateImage.java +++ b/app/src/main/java/se/leap/bitmaskclient/views/VpnStateImage.java @@ -17,8 +17,8 @@ package se.leap.bitmaskclient.views; import android.content.Context; -import android.support.constraint.ConstraintLayout; -import android.support.v7.widget.AppCompatImageView; +import androidx.constraintlayout.widget.ConstraintLayout; +import androidx.appcompat.widget.AppCompatImageView; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; diff --git a/app/src/main/res/layout-xlarge-port/a_add_provider.xml b/app/src/main/res/layout-xlarge-port/a_add_provider.xml index 67aef3d6..2ec2f1b7 100644 --- a/app/src/main/res/layout-xlarge-port/a_add_provider.xml +++ b/app/src/main/res/layout-xlarge-port/a_add_provider.xml @@ -1,5 +1,5 @@ - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout-xlarge-port/a_custom_provider_setup.xml b/app/src/main/res/layout-xlarge-port/a_custom_provider_setup.xml index f32cdd65..1f285968 100644 --- a/app/src/main/res/layout-xlarge-port/a_custom_provider_setup.xml +++ b/app/src/main/res/layout-xlarge-port/a_custom_provider_setup.xml @@ -1,5 +1,5 @@ - - - - - - - + diff --git a/app/src/main/res/layout-xlarge-port/a_provider_credentials.xml b/app/src/main/res/layout-xlarge-port/a_provider_credentials.xml index ab140a2e..73c2131c 100644 --- a/app/src/main/res/layout-xlarge-port/a_provider_credentials.xml +++ b/app/src/main/res/layout-xlarge-port/a_provider_credentials.xml @@ -1,5 +1,5 @@ - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout-xlarge-port/a_provider_detail.xml b/app/src/main/res/layout-xlarge-port/a_provider_detail.xml index dac21eaf..cb2045c9 100644 --- a/app/src/main/res/layout-xlarge-port/a_provider_detail.xml +++ b/app/src/main/res/layout-xlarge-port/a_provider_detail.xml @@ -1,5 +1,5 @@ - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout-xlarge-port/a_provider_list.xml b/app/src/main/res/layout-xlarge-port/a_provider_list.xml index 61ea6882..94829b42 100644 --- a/app/src/main/res/layout-xlarge-port/a_provider_list.xml +++ b/app/src/main/res/layout-xlarge-port/a_provider_list.xml @@ -1,5 +1,5 @@ - - - - - - - + diff --git a/app/src/main/res/layout-xlarge/a_add_provider.xml b/app/src/main/res/layout-xlarge/a_add_provider.xml index 4e6abd3d..8cfd43c5 100644 --- a/app/src/main/res/layout-xlarge/a_add_provider.xml +++ b/app/src/main/res/layout-xlarge/a_add_provider.xml @@ -1,5 +1,5 @@ - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout-xlarge/a_custom_provider_setup.xml b/app/src/main/res/layout-xlarge/a_custom_provider_setup.xml index a6578c2a..7c9a1798 100644 --- a/app/src/main/res/layout-xlarge/a_custom_provider_setup.xml +++ b/app/src/main/res/layout-xlarge/a_custom_provider_setup.xml @@ -1,5 +1,5 @@ - - - - - - - + diff --git a/app/src/main/res/layout-xlarge/a_provider_credentials.xml b/app/src/main/res/layout-xlarge/a_provider_credentials.xml index 02ad25f9..2cf9e16a 100644 --- a/app/src/main/res/layout-xlarge/a_provider_credentials.xml +++ b/app/src/main/res/layout-xlarge/a_provider_credentials.xml @@ -1,5 +1,5 @@ - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout-xlarge/a_provider_detail.xml b/app/src/main/res/layout-xlarge/a_provider_detail.xml index 75aa8bbd..bead7d92 100644 --- a/app/src/main/res/layout-xlarge/a_provider_detail.xml +++ b/app/src/main/res/layout-xlarge/a_provider_detail.xml @@ -1,5 +1,5 @@ - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout-xlarge/a_provider_list.xml b/app/src/main/res/layout-xlarge/a_provider_list.xml index 7bdcba9e..58d75246 100644 --- a/app/src/main/res/layout-xlarge/a_provider_list.xml +++ b/app/src/main/res/layout-xlarge/a_provider_list.xml @@ -1,5 +1,5 @@ - - - - - - - + diff --git a/app/src/main/res/layout-xlarge/f_eip.xml b/app/src/main/res/layout-xlarge/f_eip.xml index 1c355d58..fdaab8ca 100644 --- a/app/src/main/res/layout-xlarge/f_eip.xml +++ b/app/src/main/res/layout-xlarge/f_eip.xml @@ -1,5 +1,5 @@ - - - - - - - - - - - + diff --git a/app/src/main/res/layout-xlarge/v_loading_screen.xml b/app/src/main/res/layout-xlarge/v_loading_screen.xml index 2af6b411..a002665f 100644 --- a/app/src/main/res/layout-xlarge/v_loading_screen.xml +++ b/app/src/main/res/layout-xlarge/v_loading_screen.xml @@ -7,7 +7,7 @@ android:orientation="vertical" android:visibility="gone"> - - - - - - - - - + - - - + - - - + - + diff --git a/app/src/main/res/layout/a_provider_credentials.xml b/app/src/main/res/layout/a_provider_credentials.xml index 99287cfe..93f44208 100644 --- a/app/src/main/res/layout/a_provider_credentials.xml +++ b/app/src/main/res/layout/a_provider_credentials.xml @@ -37,7 +37,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" /> - - - - - - - - - - - +