1 /*
2  * Copyright (C) 2015 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package org.chromium.latency.walt;
18 
19 import android.os.Bundle;
20 import android.support.v7.app.AppCompatActivity;
21 import android.text.method.ScrollingMovementMethod;
22 import android.widget.TextView;
23 
24 
25 /**
26  * A separate activity to display exception trace on the screen in case of a crash.
27  * This is useful because we dont have the USB cable connected for debugging in many cases, because
28  * the USB port is taken by the WALT device.
29  */
30 public class CrashLogActivity extends AppCompatActivity {
31 
32     TextView txtCrashLog;
33 
34     @Override
onCreate(Bundle savedInstanceState)35     protected void onCreate(Bundle savedInstanceState) {
36         super.onCreate(savedInstanceState);
37         setContentView(R.layout.activity_crash_log);
38         txtCrashLog = (TextView) findViewById(R.id.txt_crash_log);
39         txtCrashLog.setText(getIntent().getStringExtra("crash_log"));
40         txtCrashLog.setMovementMethod(new ScrollingMovementMethod());
41     }
42 
43 }
44