summaryrefslogtreecommitdiff
path: root/app/src/main/java/se/leap/bitmaskclient/eip
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2024-10-26 04:45:50 +0200
committercyberta <cyberta@riseup.net>2024-12-11 00:09:34 +0000
commit2f79616938eb8d570bad779f6846644e09cfefa4 (patch)
tree21b0391f824acbb0ec23d4fce0d4ab1c7745c18c /app/src/main/java/se/leap/bitmaskclient/eip
parentc0da385377c22f445bef0b70aa8da52e1fda1037 (diff)
replace deprecated Bundle.getParcelable(...) call with BundleCompat.getParcelable(...)
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient/eip')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/eip/EipSetupObserver.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/EipSetupObserver.java b/app/src/main/java/se/leap/bitmaskclient/eip/EipSetupObserver.java
index f041a27f..31933717 100644
--- a/app/src/main/java/se/leap/bitmaskclient/eip/EipSetupObserver.java
+++ b/app/src/main/java/se/leap/bitmaskclient/eip/EipSetupObserver.java
@@ -61,6 +61,7 @@ import android.content.IntentFilter;
import android.os.Bundle;
import android.util.Log;
+import androidx.core.os.BundleCompat;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
import org.json.JSONObject;
@@ -201,7 +202,7 @@ public class EipSetupObserver extends BroadcastReceiver implements VpnStatus.Sta
switch (resultCode) {
case CORRECTLY_DOWNLOADED_EIP_SERVICE:
Log.d(TAG, "correctly updated service json");
- provider = resultData.getParcelable(PROVIDER_KEY);
+ provider = BundleCompat.getParcelable(resultData, PROVIDER_KEY, Provider.class);
ProviderObservable.getInstance().updateProvider(provider);
PreferenceHelper.storeProviderInPreferences(provider);
if (EipStatus.getInstance().isDisconnected()) {
@@ -209,7 +210,7 @@ public class EipSetupObserver extends BroadcastReceiver implements VpnStatus.Sta
}
break;
case CORRECTLY_UPDATED_INVALID_VPN_CERTIFICATE:
- provider = resultData.getParcelable(PROVIDER_KEY);
+ provider = BundleCompat.getParcelable(resultData, PROVIDER_KEY, Provider.class);
ProviderObservable.getInstance().updateProvider(provider);
PreferenceHelper.storeProviderInPreferences(provider);
EipCommand.startVPN(appContext, false);
@@ -219,7 +220,7 @@ public class EipSetupObserver extends BroadcastReceiver implements VpnStatus.Sta
}
break;
case CORRECTLY_DOWNLOADED_GEOIP_JSON:
- provider = resultData.getParcelable(PROVIDER_KEY);
+ provider = BundleCompat.getParcelable(resultData, PROVIDER_KEY, Provider.class);
ProviderObservable.getInstance().updateProvider(provider);
PreferenceHelper.storeProviderInPreferences(provider);
maybeStartEipService(resultData);