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

Commit 7149f4df authored by Jeffrey Huang's avatar Jeffrey Huang Committed by Android (Google) Code Review
Browse files

Merge "Delete References to Statsd in StatsManager"

parents 49176f7e 67ad2e7a
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@ filegroup {
        "android/os/IPullAtomResultReceiver.aidl",
        "android/os/IStatsCompanionService.aidl",
        "android/os/IStatsd.aidl",
        "android/os/IStatsPullerCallback.aidl",
        "android/util/StatsEventParcel.aidl",
    ],
}
+0 −36
Original line number Diff line number Diff line
/*
 * Copyright (C) 2019 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 android.os;

import android.os.StatsLogEventWrapper;

/**
  * DEPRECATED
  * Binder interface to pull atoms for the stats service.
  * {@hide}
  */
interface IStatsPullerCallback {
    /**
     * Pull data for the specified atom tag. Returns an array of StatsLogEventWrapper containing
     * the data.
     *
     * Note: These pulled atoms should not have uid/attribution chain. Additionally, the event
     * timestamps will be truncated to the nearest 5 minutes.
     */
    StatsLogEventWrapper[] pullData(int atomTag, long elapsedNanos, long wallClocknanos);

}
+0 −18
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@

package android.os;

import android.os.IStatsPullerCallback;
import android.os.IPendingIntentRef;
import android.os.IPullAtomCallback;
import android.os.ParcelFileDescriptor;
@@ -183,16 +182,6 @@ interface IStatsd {
     */
    void sendAppBreadcrumbAtom(int label, int state);

    /**
     * Registers a puller callback function that, when invoked, pulls the data
     * for the specified vendor atom tag.
     *
     * Requires Manifest.permission.DUMP and Manifest.permission.PACKAGE_USAGE_STATS
     * @deprecated please use registerPullAtomCallback.
     */
    oneway void registerPullerCallback(int atomTag, IStatsPullerCallback pullerCallback,
                                       String packageName);

   /**
    * Registers a puller callback function that, when invoked, pulls the data
    * for the specified atom tag.
@@ -207,13 +196,6 @@ interface IStatsd {
    oneway void registerNativePullAtomCallback(int atomTag, long coolDownNs, long timeoutNs,
                           in int[] additiveFields, IPullAtomCallback pullerCallback);

   /**
    * Unregisters a puller callback function for the given vendor atom.
    *
    * Requires Manifest.permission.DUMP and Manifest.permission.PACKAGE_USAGE_STATS
    */
    oneway void unregisterPullerCallback(int atomTag, String packageName);

    /**
     * Unregisters any pullAtomCallback for the given uid/atom.
     */
+0 −1
Original line number Diff line number Diff line
@@ -73,7 +73,6 @@ cc_defaults {
        "src/external/puller_util.cpp",
        "src/external/ResourceHealthManagerPuller.cpp",
        "src/external/StatsCallbackPuller.cpp",
        "src/external/StatsCallbackPullerDeprecated.cpp",
        "src/external/StatsCompanionServicePuller.cpp",
        "src/external/StatsPuller.cpp",
        "src/external/StatsPullerManager.cpp",
+0 −18
Original line number Diff line number Diff line
@@ -1265,16 +1265,6 @@ Status StatsService::sendAppBreadcrumbAtom(int32_t label, int32_t state) {
    return Status::ok();
}

Status StatsService::registerPullerCallback(int32_t atomTag,
        const sp<android::os::IStatsPullerCallback>& pullerCallback,
        const String16& packageName) {
    ENFORCE_DUMP_AND_USAGE_STATS(packageName);

    VLOG("StatsService::registerPullerCallback called.");
    mPullerManager->RegisterPullerCallback(atomTag, pullerCallback);
    return Status::ok();
}

Status StatsService::registerPullAtomCallback(int32_t uid, int32_t atomTag, int64_t coolDownNs,
                                    int64_t timeoutNs, const std::vector<int32_t>& additiveFields,
                                    const sp<android::os::IPullAtomCallback>& pullerCallback) {
@@ -1297,14 +1287,6 @@ Status StatsService::registerNativePullAtomCallback(int32_t atomTag, int64_t coo
    return Status::ok();
}

Status StatsService::unregisterPullerCallback(int32_t atomTag, const String16& packageName) {
    ENFORCE_DUMP_AND_USAGE_STATS(packageName);

    VLOG("StatsService::unregisterPullerCallback called.");
    mPullerManager->UnregisterPullerCallback(atomTag);
    return Status::ok();
}

Status StatsService::unregisterPullAtomCallback(int32_t uid, int32_t atomTag) {
    ENFORCE_UID(AID_SYSTEM);
    VLOG("StatsService::unregisterPullAtomCallback called.");
Loading