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
a323e3c3
Commit
a323e3c3
authored
Aug 26, 2014
by
François Grisez
Browse files
Add the setAndroidPowerManager private method to the LinphoneCoreImpl class
parent
69750c29
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
coreapi/linphonecore_jni.cc
coreapi/linphonecore_jni.cc
+2
-3
java/impl/org/linphone/core/LinphoneCoreImpl.java
java/impl/org/linphone/core/LinphoneCoreImpl.java
+3
-0
No files found.
coreapi/linphonecore_jni.cc
View file @
a323e3c3
...
...
@@ -3462,9 +3462,8 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setAudioDscp(JNIEnv* env
extern
"C"
void
Java_org_linphone_core_LinphoneCoreImpl_setAndroidPowerManager
(
JNIEnv
*
env
,
jclass
cls
,
jobject
pm
)
{
#ifdef ANDROID
JavaVM
*
jvm
;
env
->
GetJavaVM
(
&
jvm
);
bellesip_wake_lock_init
(
jvm
,
pm
);
if
(
pm
!=
NULL
)
bellesip_wake_lock_init
(
env
,
pm
);
else
bellesip_wake_lock_uninit
(
env
);
#endif
}
...
...
java/impl/org/linphone/core/LinphoneCoreImpl.java
View file @
a323e3c3
...
...
@@ -153,6 +153,7 @@ class LinphoneCoreImpl implements LinphoneCore {
private
native
void
enableSdp200Ack
(
long
nativePtr
,
boolean
enable
);
private
native
boolean
isSdp200AckEnabled
(
long
nativePtr
);
private
native
void
stopRinging
(
long
nativePtr
);
private
native
static
void
setAndroidPowerManager
(
Object
pm
);
LinphoneCoreImpl
(
LinphoneCoreListener
listener
,
File
userConfig
,
File
factoryConfig
,
Object
userdata
)
throws
IOException
{
mListener
=
listener
;
...
...
@@ -179,6 +180,7 @@ class LinphoneCoreImpl implements LinphoneCore {
public
void
setContext
(
Object
context
)
{
mContext
=
(
Context
)
context
;
mAudioManager
=
(
AudioManager
)
mContext
.
getSystemService
(
Context
.
AUDIO_SERVICE
);
setAndroidPowerManager
(
mContext
.
getSystemService
(
Context
.
POWER_SERVICE
));
}
public
synchronized
void
addAuthInfo
(
LinphoneAuthInfo
info
)
{
...
...
@@ -272,6 +274,7 @@ class LinphoneCoreImpl implements LinphoneCore {
}
public
synchronized
void
destroy
()
{
isValid
();
setAndroidPowerManager
(
null
);
delete
(
nativePtr
);
nativePtr
=
0
;
}
...
...
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