Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC-Android
Manage
Activity
Members
Labels
Plan
Issues
535
Issue boards
Milestones
Wiki
Code
Merge requests
17
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC-Android
Commits
7db209ca
Commit
7db209ca
authored
7 years ago
by
Geoffrey Métais
Browse files
Options
Downloads
Patches
Plain Diff
Revert "Init network status at monitor registration"
This reverts commit
19d1e2ca
.
parent
af890c75
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vlc-android/src/org/videolan/vlc/ExternalMonitor.java
+2
-17
2 additions, 17 deletions
vlc-android/src/org/videolan/vlc/ExternalMonitor.java
with
2 additions
and
17 deletions
vlc-android/src/org/videolan/vlc/ExternalMonitor.java
+
2
−
17
View file @
7db209ca
...
...
@@ -51,8 +51,8 @@ import java.util.List;
public
class
ExternalMonitor
extends
BroadcastReceiver
{
public
final
static
String
TAG
=
"VLC/ExternalMonitor"
;
private
static
volatile
boolean
connected
=
fals
e
;
private
static
volatile
boolean
mobile
=
fals
e
;
private
static
volatile
boolean
connected
=
tru
e
;
private
static
volatile
boolean
mobile
=
tru
e
;
private
static
volatile
boolean
vpn
=
false
;
private
static
final
ExternalMonitor
instance
=
new
ExternalMonitor
();
private
static
final
List
<
NetworkObserver
>
networkObservers
=
new
LinkedList
<>();
...
...
@@ -70,21 +70,6 @@ public class ExternalMonitor extends BroadcastReceiver {
filter
.
addAction
(
Intent
.
ACTION_MEDIA_EJECT
);
filter
.
addDataScheme
(
"file"
);
ctx
.
registerReceiver
(
instance
,
filter
);
instance
.
init
();
}
private
void
init
()
{
if
(
cm
==
null
)
cm
=
(
ConnectivityManager
)
VLCApplication
.
getAppContext
().
getSystemService
(
Context
.
CONNECTIVITY_SERVICE
);
if
(
cm
==
null
)
return
;
final
NetworkInfo
networkInfo
=
cm
.
getActiveNetworkInfo
();
if
(
networkInfo
==
null
)
return
;
connected
=
networkInfo
.
isConnected
();
mobile
=
networkInfo
.
getType
()
==
ConnectivityManager
.
TYPE_MOBILE
;
vpn
=
updateVPNStatus
();
}
static
void
unregister
(
Context
ctx
)
{
...
...
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