Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2a92e27d authored by Peter Kalauskas's avatar Peter Kalauskas
Browse files

New demo app for coroutine tracing

Add CoroutineTracingDemoApp for demonstrating coroutines tracing in
various scenarios.

Test: Install CoroutineTracingDemoApp, capture perfetto trace
Bug: 289353932
Flag: com.android.systemui.coroutine_tracing
Change-Id: Ifd6a29da7392ccdd7ff69c1f7f5c27da8f526b22
parent 44ab3f29
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -17,9 +17,17 @@ package {
}

android_app {
    name: "TracingLibDemoApp",
    name: "CoroutineTracingDemoApp",
    platform_apis: true,
    certificate: "platform",
    use_resource_processor: true,
    srcs: ["src/**/*.kt"],
    manifest: "app-manifest.xml",
    use_resource_processor: true,
    resource_dirs: ["res"],
    static_libs: [
        "tracinglib-platform",
        "dagger2",
        "jsr330",
    ],
    plugins: ["dagger2-compiler"],
}
+5 −0
Original line number Diff line number Diff line
# Building and Running

Build and install the app using Soong and adevice. Then, tap an experiment to run it. The
experiments run in the background, so to see what it is doing you will neeed to capture a perfetto
trace.
+18 −1
Original line number Diff line number Diff line
@@ -14,4 +14,21 @@
     limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.android.app.tracing.demo" />
        package="com.android.app.tracing.demo">
    <application
        android:name=".MainApplication"
        android:allowBackup="false"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/DefaultTheme">
        <activity
            android:name=".MainActivity"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>
+41 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?><!--
     Copyright (C) 2024 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/main_activity_view"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context=".MainActivity">

    <LinearLayout
        android:id="@+id/button_container"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical" />

    <ScrollView
        android:id="@+id/log_container"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <TextView
            android:id="@+id/logger_view"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:fontFamily="monospace" />
    </ScrollView>
</LinearLayout>
 No newline at end of file
+19 −0
Original line number Diff line number Diff line
<!--
     Copyright (C) 2024 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

          http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->
<resources>
    <string name="app_name">CoroutineTracingDemoApp</string>
    <string name="run_experiment_button_text">%1$s\n%2$s</string>
</resources>
Loading