Skip to content

Commit 7264689

Browse files
committed
android: check lock isHold instead screen state when pokeScreen.
1 parent 2412590 commit 7264689

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

android/src/main/java/com/zxcpoiu/incallmanager/InCallManagerModule.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,8 @@ private void releaseAudioFocus() {
783783
@ReactMethod
784784
public void pokeScreen(int timeout) {
785785
//debugScreenPowerState();
786-
if (!mPowerManager.isInteractive() && mWindowManager.getDefaultDisplay().getState() != Display.STATE_ON) {
786+
//if (!mPowerManager.isInteractive() && mWindowManager.getDefaultDisplay().getState() != Display.STATE_ON) {
787+
if (!mPokeFullLock.isHeld()) {
787788
Log.d(TAG, "pokeScreen()");
788789
if (timeout > 0) {
789790
acquirePokeFullWakeLockReleaseAfter(timeout); // --- ms

0 commit comments

Comments
 (0)