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

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

Issue 1215023017: Update Android Apps to use gradle (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: onlyIf Created 5 years, 5 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
« no previous file with comments | « platform_tools/android/visualbench/project.properties ('k') | site/user/quick/android.md » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.app.Activity;
11 import android.content.Intent;
12 import android.os.Bundle;
13 import android.provider.Settings;
14 import android.util.Log;
15 import android.view.View;
16 import android.view.WindowManager;
17
18 public class VisualBenchActivity extends android.app.NativeActivity {
19 static {
20 System.loadLibrary("skia_android");
21 }
22
23 @Override
24 public void onCreate(Bundle savedInstanceState)
25 {
26 super.onCreate(savedInstanceState);
27
28 // Setup a bunch of window parameters. We have to do this here to preve nt our backend from
29 // getting spurious term / init messages when we relayout
30
31 // Layout fullscreen and keep screen on
32 getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN |
33 WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
34
35 getWindow().getDecorView().setSystemUiVisibility(
36 View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | // hide nav bar
37 View.SYSTEM_UI_FLAG_FULLSCREEN |// hide status bar
38 View.SYSTEM_UI_FLAG_IMMERSIVE);
39
40 // Disable backlight to keep the system as cool as possible
41 // TODO make this configurable
42 Settings.System.putInt(getContentResolver(), Settings.System.SCREEN_BRIG HTNESS_MODE,
43 Settings.System.SCREEN_BRIG HTNESS_MODE_MANUAL);
44
45 WindowManager.LayoutParams lp = getWindow().getAttributes();
46 lp.screenBrightness = 0; // 0f - no backlight
47 getWindow().setAttributes(lp);
48 }
49 }
OLDNEW
« no previous file with comments | « platform_tools/android/visualbench/project.properties ('k') | site/user/quick/android.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698