mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-02-17 03:40:38 +01:00
fix #31, never allow phone sleep while on the main screen
This commit is contained in:
parent
c8266491be
commit
0dab91be56
@ -549,6 +549,7 @@ public class MainActivity extends SimpleActivity
|
|||||||
checkButtons();
|
checkButtons();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void resumeCameraItems() {
|
private void resumeCameraItems() {
|
||||||
@ -577,6 +578,7 @@ public class MainActivity extends SimpleActivity
|
|||||||
@Override
|
@Override
|
||||||
protected void onPause() {
|
protected void onPause() {
|
||||||
super.onPause();
|
super.onPause();
|
||||||
|
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||||
if (!hasCameraAndStoragePermission() || mIsAskingPermissions)
|
if (!hasCameraAndStoragePermission() || mIsAskingPermissions)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user