Avoid screen lock on call activity

This commit is contained in:
Pierre HUBERT 2019-03-02 09:24:49 +01:00
parent 87f5164d9b
commit 40fce5bef3

View File

@ -8,6 +8,7 @@ import android.util.Log;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.PopupMenu;
@ -177,6 +178,15 @@ public class CallActivity extends BaseActivity implements SignalExchangerCallbac
//Make sure we have access to user camera and microphone
askForPermissions();
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
}
@Override
protected void onPause() {
super.onPause();
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
}
@Override