mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-27 01:02:14 +08:00
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:
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user