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

Side by Side Diff: platform_tools/android/apps/visualbench/src/main/java/com/skia/VisualBenchActivity.java

Issue 2018603003: Remove VisualBench and its Android implementation. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 /*
2 * Copyright 2015 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 package com.skia;
9
10 import android.os.Bundle;
11 import android.provider.Settings;
12 import android.view.View;
13 import android.view.WindowManager;
14
15 public class VisualBenchActivity extends android.app.NativeActivity {
16 static {
17 System.loadLibrary("skia_android");
18 }
19
20 @Override
21 public void onCreate(Bundle savedInstanceState)
22 {
23 super.onCreate(savedInstanceState);
24
25 // Setup a bunch of window parameters. We have to do this here to preve nt our backend from
26 // getting spurious term / init messages when we relayout
27
28 // Layout fullscreen and keep screen on
29 getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN |
30 WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
31
32 getWindow().getDecorView().setSystemUiVisibility(
33 View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | // hide nav bar
34 View.SYSTEM_UI_FLAG_FULLSCREEN |// hide status bar
35 View.SYSTEM_UI_FLAG_IMMERSIVE);
36
37 // Disable backlight to keep the system as cool as possible
38 // TODO make this configurable
39 Settings.System.putInt(getContentResolver(), Settings.System.SCREEN_BRIG HTNESS_MODE,
40 Settings.System.SCREEN_BRIG HTNESS_MODE_MANUAL);
41
42 WindowManager.LayoutParams lp = getWindow().getAttributes();
43 lp.screenBrightness = 0; // 0f - no backlight
44 getWindow().setAttributes(lp);
45 }
46 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698