Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Unified Diff: platform_tools/android/visualbench/src/com/skia/VisualBenchActivity.java

Issue 1202023002: fix spurious init on VisualBench startup (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nit Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: platform_tools/android/visualbench/src/com/skia/VisualBenchActivity.java
diff --git a/platform_tools/android/visualbench/src/com/skia/VisualBenchActivity.java b/platform_tools/android/visualbench/src/com/skia/VisualBenchActivity.java
index 00f2cb0df938ef8f47c3be6c9dcb52e3543983b1..90f70bfe0a097dfc24c0d5bd28ced6cb59750fc8 100644
--- a/platform_tools/android/visualbench/src/com/skia/VisualBenchActivity.java
+++ b/platform_tools/android/visualbench/src/com/skia/VisualBenchActivity.java
@@ -24,24 +24,23 @@ public class VisualBenchActivity extends android.app.NativeActivity {
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
- }
-
- @Override
- public void onWindowFocusChanged(boolean hasFocus) {
- super.onWindowFocusChanged(hasFocus);
- if (!hasFocus) {
- return;
- }
+
+ // Setup a bunch of window parameters. We have to do this here to prevent our backend from
+ // getting spurious term / init messages when we relayout
+
+ // Layout fullscreen and keep screen on
+ getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN |
+ WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
+
getWindow().getDecorView().setSystemUiVisibility(
- View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | // hide nav bar
- View.SYSTEM_UI_FLAG_FULLSCREEN |// hide status bar
- View.SYSTEM_UI_FLAG_IMMERSIVE);
+ View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | // hide nav bar
+ View.SYSTEM_UI_FLAG_FULLSCREEN |// hide status bar
+ View.SYSTEM_UI_FLAG_IMMERSIVE);
// Disable backlight to keep the system as cool as possible
// TODO make this configurable
- Settings.System.putInt(getContentResolver(),
- Settings.System.SCREEN_BRIGHTNESS_MODE,
- Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL);
+ Settings.System.putInt(getContentResolver(), Settings.System.SCREEN_BRIGHTNESS_MODE,
+ Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL);
WindowManager.LayoutParams lp = getWindow().getAttributes();
lp.screenBrightness = 0; // 0f - no backlight
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698