• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2021 The ANGLE Project Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 //
5 // AngleUnitTestActivity:
6 //   A {@link android.app.NativeActivity} for running angle gtests.
7 
8 package com.android.angle.test;
9 
10 import android.app.NativeActivity;
11 import android.os.Bundle;
12 import android.util.Log;
13 
14 import org.chromium.build.NativeLibraries;
15 
16 public class AngleUnitTestActivity extends NativeActivity
17 {
18     private static final String TAG = "NativeTest";
19 
20     private AngleNativeTest mTest = new AngleNativeTest();
21 
22     @Override
onCreate(Bundle savedInstanceState)23     public void onCreate(Bundle savedInstanceState)
24     {
25         // For NativeActivity based tests,
26         // dependency libraries must be loaded before NativeActivity::OnCreate,
27         // otherwise loading android.app.lib_name will fail
28         for (String library : NativeLibraries.LIBRARIES)
29         {
30             Log.i(TAG, "loading: " + library);
31             System.loadLibrary(library);
32             Log.i(TAG, "loaded: " + library);
33         }
34 
35         super.onCreate(savedInstanceState);
36         mTest.postCreate(this);
37     }
38 
39     @Override
onStart()40     public void onStart()
41     {
42         super.onStart();
43         mTest.postStart(this);
44     }
45 }
46