Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
bitmask_android
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
leap
bitmask_android
Commits
087f0093
Commit
087f0093
authored
4 months ago
by
cyberta
Committed by
cyberta
4 months ago
Browse files
Options
Downloads
Patches
Plain Diff
catch possible exceptions when trying to set base country in bitmask-core
parent
d7483bc9
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!324
Release 1.5.0RC1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderApiManagerV5.java
+12
-5
12 additions, 5 deletions
...eap/bitmaskclient/providersetup/ProviderApiManagerV5.java
with
12 additions
and
5 deletions
app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderApiManagerV5.java
+
12
−
5
View file @
087f0093
...
...
@@ -104,7 +104,11 @@ public class ProviderApiManagerV5 extends ProviderApiManagerBase implements IPro
return
eventSender
.
setErrorResult
(
currentDownload
,
R
.
string
.
config_error_found
,
null
);
}
configureBaseCountryCode
(
bm
,
parameters
);
try
{
configureBaseCountryCode
(
bm
,
parameters
);
}
catch
(
Exception
e
)
{
return
eventSender
.
setErrorResult
(
currentDownload
,
R
.
string
.
config_error_found
,
null
);
}
try
{
String
serviceJson
=
bm
.
getService
();
...
...
@@ -159,12 +163,16 @@ public class ProviderApiManagerV5 extends ProviderApiManagerBase implements IPro
bm
.
setSocksProxy
(
SOCKS_PROXY_SCHEME
+
PROXY_HOST
+
":"
+
TorStatusObservable
.
getSocksProxyPort
());
}
// TODO bm.setIntroducer();
}
catch
(
IllegalState
Exception
e
)
{
}
catch
(
Exception
e
)
{
// TODO: improve error message
return
eventSender
.
setErrorResult
(
currentDownload
,
R
.
string
.
config_error_found
,
null
);
}
configureBaseCountryCode
(
bm
,
parameters
);
try
{
configureBaseCountryCode
(
bm
,
parameters
);
}
catch
(
Exception
e
)
{
return
eventSender
.
setErrorResult
(
currentDownload
,
R
.
string
.
config_error_found
,
null
);
}
try
{
String
serviceJson
=
bm
.
getService
();
...
...
@@ -223,13 +231,12 @@ public class ProviderApiManagerV5 extends ProviderApiManagerBase implements IPro
}
@Nullable
private
void
configureBaseCountryCode
(
BitmaskMobile
bm
,
Bundle
parameters
)
{
private
void
configureBaseCountryCode
(
BitmaskMobile
bm
,
Bundle
parameters
)
throws
Exception
{
String
cc
=
parameters
.
getString
(
COUNTRYCODE
,
null
);
if
(
cc
==
null
&&
EipStatus
.
getInstance
().
isDisconnected
()
&&
TorStatusObservable
.
getStatus
()
==
OFF
)
{
try
{
// FIXME: doGeolocationLookup currently sets the country code implicitly, change that in bitmask-core
cc
=
bm
.
getGeolocation
();
}
catch
(
Exception
e
)
{
// print exception and ignore
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment