mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 19:38:08 +00:00
Fix crash with dozemode
This commit is contained in:
parent
17cb58b074
commit
7e8b12175d
1 changed files with 2 additions and 1 deletions
|
|
@ -846,9 +846,10 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
|
|||
mDozeReceiver = new DozeReceiver();
|
||||
|
||||
if (mPrefs.isDozeModeEnabled()) {
|
||||
mServiceContext.registerReceiver(mDozeReceiver, mDozeIntentFilter);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
dozeModeEnabled = ((PowerManager) mServiceContext.getSystemService(Context.POWER_SERVICE)).isDeviceIdleMode();
|
||||
if (dozeModeEnabled)
|
||||
mServiceContext.registerReceiver(mDozeReceiver, mDozeIntentFilter);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue