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

Commit a7e3d326 authored by Zhen Zhang's avatar Zhen Zhang
Browse files

Introduce signal collector service

This service will be responsible for managing collector lifecycles and
tracking states for attribution purposes.

Bug: 419591336
Flag: com.android.server.signalcollector.enable_binder_call_signal_collector
Test: atest FrameworksServicesTests

Change-Id: Ib345ac5d8d61dd73c6dd77f2a453bc28b809ebdd
parent d6b95205
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -238,13 +238,6 @@ flag {
    bug: "276752881"
}

flag {
    name: "enable_binder_call_signal_collector"
    namespace: "backstage_power"
    description: "Enable binder call signal collector for anomaly detection."
    bug: "421243909"
}

flag {
    name: "get_private_space_settings"
    namespace: "profile_experiences"
+1 −0
Original line number Diff line number Diff line
@@ -247,6 +247,7 @@ java_library_static {
        "android.adpf.sessionmanager_aidl-java",
        "uprobestats_flags_java_lib",
        "clipboard_flags_lib",
        "signal_collector_flags_lib",
    ],
    javac_shard_size: 50,
    javacflags: [
+11 −0
Original line number Diff line number Diff line
aconfig_declarations {
    name: "signal_collector_flags",
    package: "com.android.server.signalcollector",
    container: "system",
    srcs: ["flags.aconfig"],
}

java_aconfig_library {
    name: "signal_collector_flags_lib",
    aconfig_declarations: "signal_collector_flags",
}
+8 −0
Original line number Diff line number Diff line
# Bug component: 1764240
amosbianchi@google.com
mayankkk@google.com
spivack@google.com
zzhen@google.com

rajekumar@google.com #{LAST_RESORT_SUGGESTION}
yamasani@google.com #{LAST_RESORT_SUGGESTION}
 No newline at end of file
+36 −0
Original line number Diff line number Diff line
/*
 * Copyright (C) 2025 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.server.signalcollector;

import android.app.ActivityManager.ProcessState;

/**
 * Internal interface for the SignalCollectorService.
 *
 * @hide Only for use within the system server.
 */
public abstract class SignalCollectorManagerInternal {

    /**
     * Gets the process state of a uid.
     *
     * @param uid The uid to get the process state for.
     * @return The process state of the uid, or PROCESS_STATE_UNKNOWN if the uid is not found.
     */
    @ProcessState
    public abstract int getProcessState(int uid);
}
Loading