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

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

Issue 1295823004: Add VisualBenchTestActivity for instrumentation-testing VisualBench (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove extra dependencies Created 5 years, 4 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
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 package com.skia; 8 package com.skia;
9 9
10 import android.app.Activity;
11 import android.content.Intent;
12 import android.os.Bundle; 10 import android.os.Bundle;
13 import android.provider.Settings; 11 import android.provider.Settings;
14 import android.util.Log;
15 import android.view.View; 12 import android.view.View;
16 import android.view.WindowManager; 13 import android.view.WindowManager;
17 14
18 public class VisualBenchActivity extends android.app.NativeActivity { 15 public class VisualBenchActivity extends android.app.NativeActivity {
19 static { 16 static {
20 System.loadLibrary("skia_android"); 17 System.loadLibrary("skia_android");
21 } 18 }
22 19
23 @Override 20 @Override
24 public void onCreate(Bundle savedInstanceState) 21 public void onCreate(Bundle savedInstanceState)
(...skipping 15 matching lines...) Expand all
40 // Disable backlight to keep the system as cool as possible 37 // Disable backlight to keep the system as cool as possible
41 // TODO make this configurable 38 // TODO make this configurable
42 Settings.System.putInt(getContentResolver(), Settings.System.SCREEN_BRIG HTNESS_MODE, 39 Settings.System.putInt(getContentResolver(), Settings.System.SCREEN_BRIG HTNESS_MODE,
43 Settings.System.SCREEN_BRIG HTNESS_MODE_MANUAL); 40 Settings.System.SCREEN_BRIG HTNESS_MODE_MANUAL);
44 41
45 WindowManager.LayoutParams lp = getWindow().getAttributes(); 42 WindowManager.LayoutParams lp = getWindow().getAttributes();
46 lp.screenBrightness = 0; // 0f - no backlight 43 lp.screenBrightness = 0; // 0f - no backlight
47 getWindow().setAttributes(lp); 44 getWindow().setAttributes(lp);
48 } 45 }
49 } 46 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698