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

Commit 83e81b9b authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 12304452 from b62f08e6 to 24Q4-release

Change-Id: Ib9268749b43ab8f6aea3ee5b879328c79ce39bd2
parents 317dfadb b62f08e6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ android_library {
android_library {
    name: "animationlib-tests-base",
    libs: [
        "android.test.base",
        "android.test.base.stubs.system",
        "androidx.test.core",
    ],
    static_libs: [
+2 −2
Original line number Diff line number Diff line
@@ -73,8 +73,8 @@ android_test {
        "**/*.kt",
    ],
    libs: [
        "android.test.runner",
        "android.test.base",
        "android.test.runner.stubs.system",
        "android.test.base.stubs.system",
    ],
    test_suites: ["device-tests"],
}
+2 −1
Original line number Diff line number Diff line
@@ -46,7 +46,8 @@ interface MSDLPlayer {
     *   properties can modify how a token plays (e.g.,
     *   [InteractionProperties.DynamicVibrationScale] for slider haptics in the
     *   [MSDLToken.DRAG_INDICATOR] token) and can be supplied if custom
     *   [android.os.VibrationAttributes] are required for haptic playback.
     *   [android.os.VibrationAttributes] are required for haptic playback. If no properties are
     *   supplied, haptic feedback will play using USAGE_TOUCH [android.os.VibrationAttributes].
     */
    fun playToken(token: MSDLToken, properties: InteractionProperties? = null)

+2 −21
Original line number Diff line number Diff line
@@ -18,38 +18,19 @@ package {

java_library {
    name: "tracinglib-platform",
    defaults: ["tracinglib-defaults"],
    static_libs: [
        "kotlinx_coroutines_android",
        "com_android_systemui_flags_lib",
        "//frameworks/libs/systemui:compilelib",
    ],
    srcs: ["android/src/**/*.kt"],
}

java_test_host {
    name: "tracinglib-host-test",
    defaults: ["tracinglib-defaults"],
    srcs: [
        "host/src-fake/**/*.kt",
        "host/test/**/*.kt",
    ],
    static_libs: [
        "kotlinx_coroutines",
    ],
    libs: [
        "junit",
        "androidx.annotation_annotation",
    ],
}

java_defaults {
    name: "tracinglib-defaults",
    common_srcs: ["common/src/**/*.kt"],
    kotlincflags: [
        "-Xjvm-default=all",
        "-Xmulti-platform",
        "-opt-in=kotlin.ExperimentalStdlibApi",
        "-opt-in=kotlinx.coroutines.DelicateCoroutinesApi",
        "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi",
    ],
    srcs: ["src/**/*.kt"],
}
+0 −63
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.
 */

package com.android.app.tracing

import android.os.Trace

@PublishedApi
internal actual fun isEnabled(): Boolean {
    return Trace.isEnabled()
}

internal actual fun traceCounter(counterName: String, counterValue: Int) {
    Trace.traceCounter(Trace.TRACE_TAG_APP, counterName, counterValue)
}

internal actual fun traceBegin(methodName: String) {
    Trace.traceBegin(Trace.TRACE_TAG_APP, methodName)
}

internal actual fun traceEnd() {
    Trace.traceEnd(Trace.TRACE_TAG_APP)
}

internal actual fun asyncTraceBegin(methodName: String, cookie: Int) {
    Trace.asyncTraceBegin(Trace.TRACE_TAG_APP, methodName, cookie)
}

internal actual fun asyncTraceEnd(methodName: String, cookie: Int) {
    Trace.asyncTraceEnd(Trace.TRACE_TAG_APP, methodName, cookie)
}

@PublishedApi
internal actual fun asyncTraceForTrackBegin(trackName: String, methodName: String, cookie: Int) {
    Trace.asyncTraceForTrackBegin(Trace.TRACE_TAG_APP, trackName, methodName, cookie)
}

@PublishedApi
internal actual fun asyncTraceForTrackEnd(trackName: String, methodName: String, cookie: Int) {
    Trace.asyncTraceForTrackEnd(Trace.TRACE_TAG_APP, trackName, cookie)
}

internal actual fun instant(eventName: String) {
    Trace.instant(Trace.TRACE_TAG_APP, eventName)
}

@PublishedApi
internal actual fun instantForTrack(trackName: String, eventName: String) {
    Trace.instantForTrack(Trace.TRACE_TAG_APP, trackName, eventName)
}
Loading