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
d5fa1677
Commit
d5fa1677
authored
4 months ago
by
cyberta
Committed by
cyberta
4 months ago
Browse files
Options
Downloads
Patches
Plain Diff
replace switch with if condition in ProviderApiManagerFactory
parent
139d7ecb
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/ProviderApiManagerFactory.java
+4
-6
4 additions, 6 deletions
...itmaskclient/providersetup/ProviderApiManagerFactory.java
with
4 additions
and
6 deletions
app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderApiManagerFactory.java
+
4
−
6
View file @
d5fa1677
...
...
@@ -16,12 +16,10 @@ public class ProviderApiManagerFactory {
}
public
IProviderApiManager
getProviderApiManager
(
Provider
provider
)
throws
IllegalArgumentException
{
switch
(
provider
.
getApiVersion
())
{
case
5
:
return
new
ProviderApiManagerV5
(
resources
,
callback
);
default
:
OkHttpClientGenerator
clientGenerator
=
new
OkHttpClientGenerator
(
resources
);
return
new
ProviderApiManagerV3
(
resources
,
clientGenerator
,
callback
);
if
(
provider
.
getApiVersion
()
>=
5
)
{
return
new
ProviderApiManagerV5
(
resources
,
callback
);
}
OkHttpClientGenerator
clientGenerator
=
new
OkHttpClientGenerator
(
resources
);
return
new
ProviderApiManagerV3
(
resources
,
clientGenerator
,
callback
);
}
}
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