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

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

Snap for 12687986 from c4fd50c6 to 25Q1-release

Change-Id: Ia1332764e6298316351faa81b14297fdead9fe38
parents f2876d3e c4fd50c6
Loading
Loading
Loading
Loading
+9 −11
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ aconfig_declarations_group {
        "android.media.tv.flags-aconfig-java",
        "android.multiuser.flags-aconfig-java",
        "android.net.platform.flags-aconfig-java",
        "android.net.vcn.flags-aconfig-java",
        "android.net.vcn.flags-aconfig-java-export",
        "android.net.wifi.flags-aconfig-java",
        "android.nfc.flags-aconfig-java",
        "android.os.flags-aconfig-java",
@@ -100,7 +100,7 @@ aconfig_declarations_group {
        "com.android.media.flags.performance-aconfig-java",
        "com.android.media.flags.projection-aconfig-java",
        "com.android.net.thread.platform.flags-aconfig-java",
        "com.android.ranging.flags.ranging-aconfig-java",
        "com.android.ranging.flags.ranging-aconfig-java-export",
        "com.android.server.contextualsearch.flags-java",
        "com.android.server.flags.services-aconfig-java",
        "com.android.text.flags-aconfig-java",
@@ -1170,16 +1170,21 @@ java_aconfig_library {
}

// VCN
// TODO:376339506 Move the VCN code, the flag declaration and
// java_aconfig_library to framework-connectivity-b
aconfig_declarations {
    name: "android.net.vcn.flags-aconfig",
    package: "android.net.vcn",
    container: "system",
    container: "com.android.tethering",
    exportable: true,
    srcs: ["core/java/android/net/vcn/*.aconfig"],
}

java_aconfig_library {
    name: "android.net.vcn.flags-aconfig-java",
    name: "android.net.vcn.flags-aconfig-java-export",
    aconfig_declarations: "android.net.vcn.flags-aconfig",
    mode: "exported",
    min_sdk_version: "35",
    defaults: ["framework-minus-apex-aconfig-java-defaults"],
}

@@ -1646,13 +1651,6 @@ java_aconfig_library {
    defaults: ["framework-minus-apex-aconfig-java-defaults"],
}

// Ranging
java_aconfig_library {
    name: "com.android.ranging.flags.ranging-aconfig-java",
    aconfig_declarations: "ranging_aconfig_flags",
    defaults: ["framework-minus-apex-aconfig-java-defaults"],
}

// System Server
aconfig_declarations {
    name: "android.systemserver.flags-aconfig",
+2 −0
Original line number Diff line number Diff line
@@ -397,6 +397,8 @@ java_defaults {
        "ext",
        "framework-updatable-stubs-module_libs_api",
        "unsupportedappusage",
        // TODO(b/379770939): remove prod version of flags from other containers in framework
        "aconfig_storage_stub",
    ],
    sdk_version: "core_platform",
    static_libs: [
+18 −1
Original line number Diff line number Diff line
@@ -19,6 +19,9 @@ import android.app.Activity;
import android.os.Bundle;
import android.os.ServiceManager.ServiceNotFoundException;
import android.perftests.utils.Stats;
import android.tracing.perfetto.DataSourceParams;
import android.tracing.perfetto.InitArguments;
import android.tracing.perfetto.Producer;

import androidx.test.InstrumentationRegistry;

@@ -70,6 +73,8 @@ public class ProtoLogPerfTest {
    }

    private IProtoLog mProcessedProtoLogger;
    private static ProtoLogDataSource sTestDataSource;
    private static final String TEST_PROTOLOG_DATASOURCE_NAME = "test.android.protolog";
    private static final String MOCK_TEST_FILE_PATH = "mock/file/path";
    private static final perfetto.protos.Protolog.ProtoLogViewerConfig VIEWER_CONFIG =
            perfetto.protos.Protolog.ProtoLogViewerConfig.newBuilder()
@@ -89,6 +94,17 @@ public class ProtoLogPerfTest {

    @BeforeClass
    public static void init() {
        Producer.init(InitArguments.DEFAULTS);

        sTestDataSource = new ProtoLogDataSource(TEST_PROTOLOG_DATASOURCE_NAME);
        DataSourceParams params =
                new DataSourceParams.Builder()
                        .setBufferExhaustedPolicy(
                                DataSourceParams
                                        .PERFETTO_DS_BUFFER_EXHAUSTED_POLICY_DROP)
                        .build();
        sTestDataSource.register(params);

        ProtoLog.init(TestProtoLogGroup.values());
    }

@@ -98,9 +114,10 @@ public class ProtoLogPerfTest {
        TestProtoLogGroup.TEST_GROUP.setLogToLogcat(mLogToLogcat);

        mProcessedProtoLogger = new ProcessedPerfettoProtoLogImpl(
                sTestDataSource,
                MOCK_TEST_FILE_PATH,
                () -> new AutoClosableProtoInputStream(VIEWER_CONFIG.toByteArray()),
                () -> {},
                (instance) -> {},
                TestProtoLogGroup.values()
        );
    }

cmds/interrupter/Android.bp

deleted100644 → 0
+0 −20
Original line number Diff line number Diff line
package {
    // See: http://go/android-license-faq
    // A large-scale-change added 'default_applicable_licenses' to import
    // all of the 'license_kinds' from "frameworks_base_license"
    // to get the below license kinds:
    //   SPDX-license-identifier-Apache-2.0
    default_applicable_licenses: ["frameworks_base_license"],
}

cc_library_shared {
    name: "interrupter",
    host_supported: true,
    srcs: ["interrupter.c"],
    cflags: [
        "-Wall",
        "-Werror",
        "-Wunused",
        "-Wunreachable-code",
    ],
}

cmds/interrupter/interrupter.h

deleted100644 → 0
+0 −79
Original line number Diff line number Diff line
/*
 * Copyright 2012, 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.
 */

#define CONCATENATE(arg1, arg2)   CONCATENATE1(arg1, arg2)
#define CONCATENATE1(arg1, arg2)  CONCATENATE2(arg1, arg2)
#define CONCATENATE2(arg1, arg2)  arg1##arg2

#define INTERRUPTER(sym) \
    if (real_##sym == NULL) \
        __init_##sym(); \
    if (maybe_interrupt()) { \
        errno = EINTR; \
        return -1; \
    }

#define CALL_FUNCTION_1(sym, ret, type1) \
ret (*real_##sym)(type1) = NULL; \
ret sym(type1 arg1) { \
    INTERRUPTER(sym) \
    return real_##sym(arg1); \
}

#define CALL_FUNCTION_2(sym, ret, type1, type2) \
ret (*real_##sym)(type1, type2) = NULL; \
ret sym(type1 arg1, type2 arg2) { \
    INTERRUPTER(sym) \
    return real_##sym(arg1, arg2); \
}

#define CALL_FUNCTION_3(sym, ret, type1, type2, type3) \
ret (*real_##sym)(type1, type2, type3) = NULL; \
ret sym(type1 arg1, type2 arg2, type3 arg3) { \
    INTERRUPTER(sym) \
    return real_##sym(arg1, arg2, arg3); \
}

#define CALL_FUNCTION_4(sym, ret, type1, type2, type3, type4) \
ret (*real_##sym)(type1, type2, type3, type4) = NULL; \
ret sym(type1 arg1, type2 arg2, type3 arg3, type4 arg4) { \
    INTERRUPTER(sym) \
    return real_##sym(arg1, arg2, arg3, arg4); \
}

#define CALL_FUNCTION_5(sym, ret, type1, type2, type3, type4, type5) \
ret (*real_##sym)(type1, type2, type3, type4, type5) = NULL; \
ret sym(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) { \
    INTERRUPTER(sym) \
    return real_##sym(arg1, arg2, arg3, arg4, arg5); \
}

#define DEFINE_INTERCEPT_N(N, sym, ret, ...) \
static void __init_##sym(void); \
CONCATENATE(CALL_FUNCTION_, N)(sym, ret, __VA_ARGS__) \
static void __init_##sym(void) { \
    real_##sym = dlsym(RTLD_NEXT, #sym); \
    if (real_##sym == NULL) { \
        fprintf(stderr, "Error hooking " #sym ": %s\n", dlerror()); \
    } \
}

#define INTERCEPT_NARG(...) INTERCEPT_NARG_N(__VA_ARGS__, INTERCEPT_RSEQ_N())
#define INTERCEPT_NARG_N(...) INTERCEPT_ARG_N(__VA_ARGS__)
#define INTERCEPT_ARG_N(_1, _2, _3, _4, _5, _6, _7, _8, N, ...) N
#define INTERCEPT_RSEQ_N() 8, 7, 6, 5, 4, 3, 2, 1, 0

#define DEFINE_INTERCEPT(sym, ret, ...) DEFINE_INTERCEPT_N(INTERCEPT_NARG(__VA_ARGS__), sym, ret, __VA_ARGS__)
Loading