Add OnCreate trace points in PerformanceLaunch.apk

Bug 31223422

Change-Id: Ic15a4206062259eb88258ed9835542dbb3a8b7bb
diff --git a/tests/perf/PerformanceLaunch/src/com/android/performanceLaunch/ComplexLayoutActivity.java b/tests/perf/PerformanceLaunch/src/com/android/performanceLaunch/ComplexLayoutActivity.java
index 608418e..73b2856 100644
--- a/tests/perf/PerformanceLaunch/src/com/android/performanceLaunch/ComplexLayoutActivity.java
+++ b/tests/perf/PerformanceLaunch/src/com/android/performanceLaunch/ComplexLayoutActivity.java
@@ -20,13 +20,16 @@
 
 import android.app.Activity;
 import android.os.Bundle;
+import android.os.Trace;
 
 public class ComplexLayoutActivity extends Activity {
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
+        Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "onCreate");
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_complex);
+        Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
     }
 
 }
diff --git a/tests/perf/PerformanceLaunch/src/com/android/performanceLaunch/EmptyActivity.java b/tests/perf/PerformanceLaunch/src/com/android/performanceLaunch/EmptyActivity.java
index efa822a..87b2c2b 100644
--- a/tests/perf/PerformanceLaunch/src/com/android/performanceLaunch/EmptyActivity.java
+++ b/tests/perf/PerformanceLaunch/src/com/android/performanceLaunch/EmptyActivity.java
@@ -18,11 +18,14 @@
 
 import android.app.Activity;
 import android.os.Bundle;
+import android.os.Trace;
 
 public class EmptyActivity extends Activity {
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
+        Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "onCreate");
         super.onCreate(savedInstanceState);
+        Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
     }
 }
diff --git a/tests/perf/PerformanceLaunch/src/com/android/performanceLaunch/EmptyWebViewActivity.java b/tests/perf/PerformanceLaunch/src/com/android/performanceLaunch/EmptyWebViewActivity.java
index 2f34098..04ae595 100644
--- a/tests/perf/PerformanceLaunch/src/com/android/performanceLaunch/EmptyWebViewActivity.java
+++ b/tests/perf/PerformanceLaunch/src/com/android/performanceLaunch/EmptyWebViewActivity.java
@@ -18,6 +18,7 @@
 
 import android.app.Activity;
 import android.os.Bundle;
+import android.os.Trace;
 import android.view.Window;
 import android.webkit.WebView;
 
@@ -27,10 +28,12 @@
 
     @Override
     public void onCreate(Bundle savedInstanceState) {
+        Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "onCreate");
         super.onCreate(savedInstanceState);
         getWindow().requestFeature(Window.FEATURE_NO_TITLE);
         mWebView = new WebView(this);
         this.setContentView(mWebView);
+        Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
     }
 
 }
diff --git a/tests/perf/PerformanceLaunch/src/com/android/performanceLaunch/ImageActivity.java b/tests/perf/PerformanceLaunch/src/com/android/performanceLaunch/ImageActivity.java
index 709ee3a..4fea551 100644
--- a/tests/perf/PerformanceLaunch/src/com/android/performanceLaunch/ImageActivity.java
+++ b/tests/perf/PerformanceLaunch/src/com/android/performanceLaunch/ImageActivity.java
@@ -20,13 +20,16 @@
 
 import android.app.Activity;
 import android.os.Bundle;
+import android.os.Trace;
 
 public class ImageActivity extends Activity {
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
+        Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "onCreate");
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_background);
+        Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
     }
 
 }
diff --git a/tests/perf/PerformanceLaunch/src/com/android/performanceLaunch/ManyConfigResourceActivity.java b/tests/perf/PerformanceLaunch/src/com/android/performanceLaunch/ManyConfigResourceActivity.java
index d82457a..cf7e8bd 100644
--- a/tests/perf/PerformanceLaunch/src/com/android/performanceLaunch/ManyConfigResourceActivity.java
+++ b/tests/perf/PerformanceLaunch/src/com/android/performanceLaunch/ManyConfigResourceActivity.java
@@ -18,14 +18,17 @@
 import android.annotation.Nullable;
 import android.app.Activity;
 import android.os.Bundle;
+import android.os.Trace;
 
 public class ManyConfigResourceActivity extends Activity {
     @Override
     protected void onCreate(@Nullable Bundle savedInstanceState) {
+        Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "onCreate");
         super.onCreate(savedInstanceState);
 
         for (int i = 0; i < 1000; i++) {
             getResources().getStringArray(R.array.many_configs);
         }
+        Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
     }
 }
diff --git a/tests/perf/PerformanceLaunch/src/com/android/performanceLaunch/SimpleActivity.java b/tests/perf/PerformanceLaunch/src/com/android/performanceLaunch/SimpleActivity.java
index 1bd7360..66d3f9a 100644
--- a/tests/perf/PerformanceLaunch/src/com/android/performanceLaunch/SimpleActivity.java
+++ b/tests/perf/PerformanceLaunch/src/com/android/performanceLaunch/SimpleActivity.java
@@ -20,13 +20,16 @@
 
 import android.app.Activity;
 import android.os.Bundle;
+import android.os.Trace;
 
 public class SimpleActivity extends Activity {
 
     @Override
     protected void onCreate(Bundle savedInstanceState) {
+        Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "onCreate");
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_simple);
+        Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
     }
 
 }
diff --git a/tests/perf/PerformanceLaunch/src/com/android/performanceLaunch/SimpleSurfaceGLActivity.java b/tests/perf/PerformanceLaunch/src/com/android/performanceLaunch/SimpleSurfaceGLActivity.java
index c6aa605..a8db787 100644
--- a/tests/perf/PerformanceLaunch/src/com/android/performanceLaunch/SimpleSurfaceGLActivity.java
+++ b/tests/perf/PerformanceLaunch/src/com/android/performanceLaunch/SimpleSurfaceGLActivity.java
@@ -21,6 +21,7 @@
 import android.app.Activity;
 import android.opengl.GLSurfaceView;
 import android.os.Bundle;
+import android.os.Trace;
 
 /**
  * To draw the GLSurface view Source : development/samples/OpenGL/HelloOpenGLES20
@@ -31,12 +32,14 @@
 
     @Override
     public void onCreate(Bundle savedInstanceState) {
+        Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "onCreate");
         super.onCreate(savedInstanceState);
 
         // Create a GLSurfaceView instance and set it
         // as the ContentView for this Activity
         mGLView = new SimpleGLSurfaceView(this);
         setContentView(mGLView);
+        Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
     }
 
     @Override
diff --git a/tests/perf/PerformanceLaunch/src/com/android/performanceLaunch/SimpleWebViewActivity.java b/tests/perf/PerformanceLaunch/src/com/android/performanceLaunch/SimpleWebViewActivity.java
index 7d3b417..fd2ab25 100644
--- a/tests/perf/PerformanceLaunch/src/com/android/performanceLaunch/SimpleWebViewActivity.java
+++ b/tests/perf/PerformanceLaunch/src/com/android/performanceLaunch/SimpleWebViewActivity.java
@@ -18,6 +18,7 @@
 
 import android.app.Activity;
 import android.os.Bundle;
+import android.os.Trace;
 import android.view.Window;
 import android.webkit.WebView;
 
@@ -27,11 +28,13 @@
 
     @Override
     public void onCreate(Bundle savedInstanceState) {
+        Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "onCreate");
         super.onCreate(savedInstanceState);
         getWindow().requestFeature(Window.FEATURE_NO_TITLE);
         mWebView = new WebView(this);
         mWebView.loadUrl("file:///android_asset/SimpleWebView.html");
         this.setContentView(mWebView);
+        Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
     }
 
 }