Prevent Android from automatically locking display (#6876)
authorWayward One <calmthefirewithin@gmail.com>
Thu, 4 Jan 2018 20:18:18 +0000 (15:18 -0500)
committerLoïc Blot <nerzhul@users.noreply.github.com>
Thu, 4 Jan 2018 20:18:18 +0000 (21:18 +0100)
As mentioned in #5759

build/android/src/main/java/net.minetest.minetest/MtNativeActivity.java

index 159521a5025e48f7b0f0c524c8abc4b1c60b9feb..ea3cec45fc41dfd996b4bca7bd21af9ca6dd8fba 100644 (file)
@@ -10,6 +10,7 @@ public class MtNativeActivity extends NativeActivity {
        @Override
        public void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
+               getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
                m_MessagReturnCode = -1;
                m_MessageReturnValue = "";