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

Commit f8e70a5b authored by Howard Ro's avatar Howard Ro Committed by Android (Google) Code Review
Browse files

Merge "Expose AStatsSocket_close() from the statsd apex"

parents 450d6e42 2ebc2e3d
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -25,6 +25,7 @@ cc_library {
        // TODO(b/145573568): Remove stats_event_list once stats_event
        // TODO(b/145573568): Remove stats_event_list once stats_event
        // migration is complete.
        // migration is complete.
        "stats_event_list.c",
        "stats_event_list.c",
        "stats_socket.c",
        "statsd_writer.c",
        "statsd_writer.c",
    ],
    ],
    host_supported: true,
    host_supported: true,
+33 −0
Original line number Original line Diff line number Diff line
/*
 * Copyright (C) 2020 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.
 */

#pragma once

/**
 * Helpers to manage the statsd socket.
 **/

#ifdef __cplusplus
extern "C" {
#endif  // __CPLUSPLUS

/**
 * Closes the statsd socket file descriptor.
 **/
void AStatsSocket_close();
#ifdef __cplusplus
}
#endif  // __CPLUSPLUS
+1 −0
Original line number Original line Diff line number Diff line
@@ -14,6 +14,7 @@ LIBSTATSSOCKET {
        AStatsEvent_writeAttributionChain; # apex # introduced=30
        AStatsEvent_writeAttributionChain; # apex # introduced=30
        AStatsEvent_addBoolAnnotation; # apex # introduced=30
        AStatsEvent_addBoolAnnotation; # apex # introduced=30
        AStatsEvent_addInt32Annotation; # apex # introduced=30
        AStatsEvent_addInt32Annotation; # apex # introduced=30
        AStatsSocket_close; # apex # introduced=30
    local:
    local:
        *;
        *;
};
};
+22 −0
Original line number Original line Diff line number Diff line
/*
 * Copyright (C) 2020 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.
 */

#include "include/stats_socket.h"
#include "stats_buffer_writer.h"

void AStatsSocket_close() {
    stats_log_close();
}