mirror of
https://github.com/pierre42100/ComunicAndroid
synced 2024-12-25 13:08:58 +00:00
Avoid screen lock on call activity
This commit is contained in:
parent
87f5164d9b
commit
40fce5bef3
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user