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

Side by Side Diff: testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java

Issue 110173003: Refactor audio manager for Android to avoid heavy tasks at startup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed mActive state Created 7 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.native_test; 5 package org.chromium.native_test;
6 6
7 import android.app.Activity; 7 import android.app.Activity;
8 import android.content.Context; 8 import android.content.Context;
9 import android.os.Bundle; 9 import android.os.Bundle;
10 import android.os.Handler; 10 import android.os.Handler;
(...skipping 17 matching lines...) Expand all
28 public void onCreate(Bundle savedInstanceState) { 28 public void onCreate(Bundle savedInstanceState) {
29 super.onCreate(savedInstanceState); 29 super.onCreate(savedInstanceState);
30 // Needed by path_utils_unittest.cc 30 // Needed by path_utils_unittest.cc
31 PathUtils.setPrivateDataDirectorySuffix("chrome"); 31 PathUtils.setPrivateDataDirectorySuffix("chrome");
32 32
33 // Needed by system_monitor_unittest.cc 33 // Needed by system_monitor_unittest.cc
34 PowerMonitor.createForTests(this); 34 PowerMonitor.createForTests(this);
35 35
36 loadLibraries(); 36 loadLibraries();
37 Bundle extras = this.getIntent().getExtras(); 37 Bundle extras = this.getIntent().getExtras();
38 if (extras != null && extras.containsKey(EXTRA_RUN_IN_SUB_THREAD)) { 38 if (true || extras != null && extras.containsKey(EXTRA_RUN_IN_SUB_THREAD )) {
bulach 2013/12/13 13:49:49 remove it :)
henrika (OOO until Aug 14) 2013/12/13 14:58:42 Of course.
39 // Create a new thread and run tests on it. 39 // Create a new thread and run tests on it.
40 new Thread() { 40 new Thread() {
41 @Override 41 @Override
42 public void run() { 42 public void run() {
43 runTests(); 43 runTests();
44 } 44 }
45 }.start(); 45 }.start();
46 } else { 46 } else {
47 // Post a task to run the tests. This allows us to not block 47 // Post a task to run the tests. This allows us to not block
48 // onCreate and still run tests on the main thread. 48 // onCreate and still run tests on the main thread.
(...skipping 21 matching lines...) Expand all
70 private void loadLibraries() { 70 private void loadLibraries() {
71 for (String library: NativeLibraries.LIBRARIES) { 71 for (String library: NativeLibraries.LIBRARIES) {
72 Log.i(TAG, "loading: " + library); 72 Log.i(TAG, "loading: " + library);
73 System.loadLibrary(library); 73 System.loadLibrary(library);
74 Log.i(TAG, "loaded: " + library); 74 Log.i(TAG, "loaded: " + library);
75 } 75 }
76 } 76 }
77 77
78 private native void nativeRunTests(String filesDir, Context appContext); 78 private native void nativeRunTests(String filesDir, Context appContext);
79 } 79 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698