OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |