Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
7c3d0b14
Commit
7c3d0b14
authored
Jun 18, 2020
by
Sylvain Berfini
🐮
Browse files
Do not disable keep alives based on Android screen on/off state
parent
809cc404
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
11 deletions
+2
-11
wrappers/java/classes/org/linphone/core/tools/AndroidPlatformHelper.java
...lasses/org/linphone/core/tools/AndroidPlatformHelper.java
+0
-7
wrappers/java/classes/org/linphone/core/tools/receiver/InteractivityReceiver.java
...g/linphone/core/tools/receiver/InteractivityReceiver.java
+2
-4
No files found.
wrappers/java/classes/org/linphone/core/tools/AndroidPlatformHelper.java
View file @
7c3d0b14
...
...
@@ -79,7 +79,6 @@ public class AndroidPlatformHelper {
private
NetworkManagerInterface
mNetworkManager
;
private
Handler
mMainHandler
;
private
boolean
mMonitoringEnabled
;
private
boolean
mIsInInteractiveMode
;
private
InteractivityReceiver
mInteractivityReceiver
;
private
String
[]
mDnsServers
;
...
...
@@ -109,7 +108,6 @@ public class AndroidPlatformHelper {
mResources
=
mContext
.
getResources
();
mMainHandler
=
new
Handler
(
mContext
.
getMainLooper
());
mIsInInteractiveMode
=
true
;
mDozeModeEnabled
=
false
;
MediastreamerAndroidContext
.
setContext
(
mContext
);
...
...
@@ -667,11 +665,6 @@ public class AndroidPlatformHelper {
mDozeModeEnabled
=
b
;
}
public
synchronized
void
setInteractiveMode
(
boolean
b
)
{
mIsInInteractiveMode
=
b
;
enableKeepAlive
(
mNativePtr
,
mIsInInteractiveMode
);
}
private
NetworkManagerInterface
createNetworkManager
()
{
NetworkManagerInterface
networkManager
=
null
;
if
(
Build
.
VERSION
.
SDK_INT
<
Build
.
VERSION_CODES
.
LOLLIPOP
)
{
...
...
wrappers/java/classes/org/linphone/core/tools/receiver/InteractivityReceiver.java
View file @
7c3d0b14
...
...
@@ -39,11 +39,9 @@ public class InteractivityReceiver extends BroadcastReceiver {
public
void
onReceive
(
Context
context
,
Intent
intent
)
{
String
action
=
intent
.
getAction
();
if
(
action
.
equalsIgnoreCase
(
Intent
.
ACTION_SCREEN_ON
))
{
Log
.
i
(
"[Platform Helper] [Interactivity Receiver] Device is in interactive mode"
);
if
(
mHelper
!=
null
)
mHelper
.
setInteractiveMode
(
true
);
Log
.
i
(
"[Platform Helper] [Interactivity Receiver] Device screen is ON"
);
}
else
if
(
action
.
equalsIgnoreCase
(
Intent
.
ACTION_SCREEN_OFF
))
{
Log
.
i
(
"[Platform Helper] [Interactivity Receiver] Device is not in interactive mode"
);
if
(
mHelper
!=
null
)
mHelper
.
setInteractiveMode
(
false
);
Log
.
i
(
"[Platform Helper] [Interactivity Receiver] Device screen is OFF"
);
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment