Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-client-android
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-client-android
Commits
69c7ea1c
Commit
69c7ea1c
authored
Apr 6, 2018
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
network: keep account alive with push notifications
Change-Id: I8acedaee131b95c09bdd6b6d9bf0a7fe532b34f2
parent
5f51c724
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
ring-android/app/src/main/java/cx/ring/utils/NetworkUtils.java
+3
-1
3 additions, 1 deletion
...android/app/src/main/java/cx/ring/utils/NetworkUtils.java
with
3 additions
and
1 deletion
ring-android/app/src/main/java/cx/ring/utils/NetworkUtils.java
+
3
−
1
View file @
69c7ea1c
...
@@ -40,7 +40,9 @@ public final class NetworkUtils {
...
@@ -40,7 +40,9 @@ public final class NetworkUtils {
return
info
!=
null
&&
info
.
isConnected
()
&&
(
info
.
getType
()
!=
ConnectivityManager
.
TYPE_MOBILE
||
allowMobile
);
return
info
!=
null
&&
info
.
isConnected
()
&&
(
info
.
getType
()
!=
ConnectivityManager
.
TYPE_MOBILE
||
allowMobile
);
}
}
public
static
boolean
isPushAllowed
(
Context
context
,
boolean
allowMobile
)
{
public
static
boolean
isPushAllowed
(
Context
context
,
boolean
allowMobile
)
{
if
(
allowMobile
)
return
true
;
NetworkInfo
info
=
NetworkUtils
.
getNetworkInfo
(
context
);
NetworkInfo
info
=
NetworkUtils
.
getNetworkInfo
(
context
);
return
info
!=
null
&&
(
info
.
getType
()
!=
ConnectivityManager
.
TYPE_MOBILE
||
allowMobile
)
;
return
info
!=
null
&&
info
.
getType
()
!=
ConnectivityManager
.
TYPE_MOBILE
;
}
}
}
}
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