Revert "android: Remove keeping the screen on in debug mode"

This reverts commit 333b11de7d4e67b0abd7269989609fe58c73c7ab.

We still have the "keep device from sleeping" permission. It seems we
will need to manually remove that permission. I rather have that
permission and have this super useful tool of keeping the screen on when
developing.
This commit is contained in:
Vishesh Handa
2020-01-29 15:30:08 +01:00
parent 7e5c2ba4a3
commit d48461a4cc

View File

@ -48,4 +48,13 @@ public class MainActivity extends FlutterActivity implements MethodCallHandler {
result.notImplemented();
}
@Override
protected void onResume() {
super.onResume();
if (BuildConfig.DEBUG) {
Log.d("SCREEN", "Keeping screen in debug mode");
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
}
}
}