Merge "Delete unused imports in Statsd"

This commit is contained in:
Tom Cherry
2020-07-27 21:35:51 +00:00
committed by Gerrit Code Review
52 changed files with 13 additions and 152 deletions

View File

@@ -118,7 +118,6 @@ cc_defaults {
static_libs: [
"libhealthhalutils",
"libplatformprotos",
],
shared_libs: [

View File

@@ -16,8 +16,6 @@
#define DEBUG false // STOPSHIP if true
#include "Log.h"
#include <mutex>
#include "HashableDimensionKey.h"
#include "FieldValue.h"

View File

@@ -16,12 +16,12 @@
#define DEBUG false // STOPSHIP if true
#include "Log.h"
#include "statslog.h"
#include "StatsLogProcessor.h"
#include <android-base/file.h>
#include <dirent.h>
#include <frameworks/base/cmds/statsd/src/active_config_list.pb.h>
#include "StatsLogProcessor.h"
#include "android-base/stringprintf.h"
#include "atoms_info.h"
#include "external/StatsPullerManager.h"
@@ -29,12 +29,9 @@
#include "metrics/CountMetricProducer.h"
#include "stats_log_util.h"
#include "stats_util.h"
#include "statslog.h"
#include "storage/StorageManager.h"
#include <log/log_event_list.h>
#include <utils/Errors.h>
#include <utils/SystemClock.h>
using namespace android;
using android::base::StringPrintf;
using android::util::FIELD_COUNT_REPEATED;
@@ -45,8 +42,6 @@ using android::util::FIELD_TYPE_INT64;
using android::util::FIELD_TYPE_MESSAGE;
using android::util::FIELD_TYPE_STRING;
using android::util::ProtoOutputStream;
using std::make_unique;
using std::unique_ptr;
using std::vector;
namespace android {

View File

@@ -27,13 +27,11 @@
#include "subscriber/SubscriberReporter.h"
#include <android-base/file.h>
#include <android-base/stringprintf.h>
#include <android-base/strings.h>
#include <binder/IPCThreadState.h>
#include <binder/IServiceManager.h>
#include <binder/PermissionController.h>
#include <cutils/multiuser.h>
#include <dirent.h>
#include <frameworks/base/cmds/statsd/src/statsd_config.pb.h>
#include <frameworks/base/cmds/statsd/src/uid_data.pb.h>
#include <private/android_filesystem_config.h>
@@ -42,17 +40,13 @@
#include <stdlib.h>
#include <sys/system_properties.h>
#include <unistd.h>
#include <utils/Looper.h>
#include <utils/String16.h>
#include <chrono>
using namespace android;
using android::base::StringPrintf;
using android::util::FIELD_COUNT_REPEATED;
using android::util::FIELD_TYPE_INT64;
using android::util::FIELD_TYPE_MESSAGE;
using android::util::ProtoReader;
namespace android {
namespace os {

View File

@@ -36,11 +36,9 @@
#include <binder/ParcelFileDescriptor.h>
#include <utils/Looper.h>
#include <deque>
#include <mutex>
using namespace android;
using namespace android::base;
using namespace android::binder;
using namespace android::frameworks::stats::V1_0;
using namespace android::os;

View File

@@ -21,8 +21,6 @@
#include <android/os/IStatsCompanionService.h>
#include <utils/RefBase.h>
#include <queue>
#include <set>
#include <unordered_set>
#include <vector>

View File

@@ -16,8 +16,6 @@
#pragma once
#include <memory> // unique_ptr
#include <stdlib.h>
#include <gtest/gtest_prod.h>

View File

@@ -17,10 +17,6 @@
#define DEBUG false // STOPSHIP if true
#include "Log.h"
#include <android/os/IIncidentManager.h>
#include <android/os/IncidentReportArgs.h>
#include <binder/IServiceManager.h>
#include "external/Perfetto.h"
#include "subscriber/IncidentdReporter.h"
#include "subscriber/SubscriberReporter.h"

View File

@@ -18,15 +18,10 @@
#include "Log.h"
#include "CombinationConditionTracker.h"
#include <log/logprint.h>
namespace android {
namespace os {
namespace statsd {
using std::map;
using std::string;
using std::unique_ptr;
using std::unordered_map;
using std::vector;

View File

@@ -21,10 +21,8 @@
#include "matchers/LogMatchingTracker.h"
#include "matchers/matcher_util.h"
#include <log/logprint.h>
#include <utils/RefBase.h>
#include <unordered_set>
#include <unordered_map>
namespace android {

View File

@@ -14,14 +14,11 @@
* limitations under the License.
*/
#include "ConditionWizard.h"
#include <unordered_set>
namespace android {
namespace os {
namespace statsd {
using std::map;
using std::string;
using std::vector;
ConditionState ConditionWizard::query(const int index, const ConditionKey& parameters,

View File

@@ -24,11 +24,7 @@ namespace android {
namespace os {
namespace statsd {
using std::map;
using std::string;
using std::unique_ptr;
using std::unordered_map;
using std::vector;
SimpleConditionTracker::SimpleConditionTracker(
const ConfigKey& key, const int64_t& id, const int index,

View File

@@ -18,11 +18,6 @@
#include "condition_util.h"
#include <log/event_tag_map.h>
#include <log/log_event_list.h>
#include <log/logprint.h>
#include <utils/Errors.h>
#include <unordered_map>
#include "../matchers/matcher_util.h"
#include "ConditionTracker.h"
#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
@@ -32,9 +27,6 @@ namespace android {
namespace os {
namespace statsd {
using std::set;
using std::string;
using std::unordered_map;
using std::vector;

View File

@@ -19,14 +19,12 @@
#include "config/ConfigKey.h"
#include <utils/RefBase.h>
#include <string>
namespace android {
namespace os {
namespace statsd {
using android::RefBase;
using std::string;
/**
* Callback for different subsystems inside statsd to implement to find out

View File

@@ -25,8 +25,6 @@
#include "stats_util.h"
#include "stats_log_util.h"
#include <android-base/file.h>
#include <dirent.h>
#include <stdio.h>
#include <vector>
#include "android-base/stringprintf.h"
@@ -35,9 +33,7 @@ namespace android {
namespace os {
namespace statsd {
using std::map;
using std::pair;
using std::set;
using std::string;
using std::vector;

View File

@@ -22,7 +22,6 @@
#include <map>
#include <mutex>
#include <set>
#include <string>
#include <stdio.h>

View File

@@ -21,12 +21,8 @@
#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h" // Alert
#include <android-base/unique_fd.h>
#include <errno.h>
#include <fcntl.h>
#include <inttypes.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
#include <string>

View File

@@ -15,8 +15,6 @@
*/
#pragma once
#include <utils/String16.h>
#include <unordered_map>
#include <utils/RefBase.h>
#include "StatsPuller.h"
#include "logd/LogEvent.h"

View File

@@ -17,7 +17,7 @@
#pragma once
#include <android/os/IStatsPullerCallback.h>
#include <utils/String16.h>
#include "StatsPuller.h"
namespace android {

View File

@@ -38,14 +38,8 @@
#include "TrainInfoPuller.h"
#include "statslog.h"
#include <iostream>
using std::make_shared;
using std::map;
using std::shared_ptr;
using std::string;
using std::vector;
using std::list;
namespace android {
namespace os {

View File

@@ -22,8 +22,6 @@
#include <utils/RefBase.h>
#include <utils/threads.h>
#include <list>
#include <string>
#include <unordered_map>
#include <vector>
#include "PullDataReceiver.h"
#include "StatsPuller.h"

View File

@@ -36,7 +36,6 @@ using android::util::FIELD_TYPE_MESSAGE;
using android::util::FIELD_TYPE_STRING;
using android::util::ProtoOutputStream;
using std::lock_guard;
using std::map;
using std::shared_ptr;
using std::string;
using std::vector;

View File

@@ -20,10 +20,8 @@
#include <android/os/StatsLogEventWrapper.h>
#include <android/util/ProtoOutputStream.h>
#include <log/log_event_list.h>
#include <log/log_read.h>
#include <private/android_logger.h>
#include <utils/Errors.h>
#include <string>
#include <vector>
@@ -239,4 +237,3 @@ void writeExperimentIdsToProto(const std::vector<int64_t>& experimentIds, std::v
} // namespace statsd
} // namespace os
} // namespace android

View File

@@ -19,10 +19,8 @@
#include "LogEvent.h"
#include <condition_variable>
#include <memory>
#include <mutex>
#include <queue>
#include <thread>
namespace android {
namespace os {

View File

@@ -20,16 +20,11 @@
#include "StatsService.h"
#include "socket/StatsSocketListener.h"
#include <binder/IInterface.h>
#include <binder/IPCThreadState.h>
#include <binder/IServiceManager.h>
#include <binder/ProcessState.h>
#include <binder/Status.h>
#include <hidl/HidlTransportSupport.h>
#include <utils/Looper.h>
#include <utils/StrongPointer.h>
#include <memory>
#include <stdio.h>
#include <sys/stat.h>

View File

@@ -24,8 +24,6 @@ namespace os {
namespace statsd {
using std::set;
using std::string;
using std::unique_ptr;
using std::unordered_map;
using std::vector;

View File

@@ -16,9 +16,6 @@
#ifndef COMBINATION_LOG_MATCHING_TRACKER_H
#define COMBINATION_LOG_MATCHING_TRACKER_H
#include <log/log_read.h>
#include <log/logprint.h>
#include <set>
#include <unordered_map>
#include <vector>
#include "LogMatchingTracker.h"

View File

@@ -14,14 +14,11 @@
* limitations under the License.
*/
#include "EventMatcherWizard.h"
#include <unordered_set>
namespace android {
namespace os {
namespace statsd {
using std::map;
using std::string;
using std::vector;
MatchingState EventMatcherWizard::matchLogEvent(const LogEvent& event, int matcher_index) {

View File

@@ -23,8 +23,6 @@ namespace android {
namespace os {
namespace statsd {
using std::string;
using std::unique_ptr;
using std::unordered_map;
using std::vector;

View File

@@ -17,9 +17,6 @@
#ifndef SIMPLE_LOG_MATCHING_TRACKER_H
#define SIMPLE_LOG_MATCHING_TRACKER_H
#include <log/log_read.h>
#include <log/logprint.h>
#include <set>
#include <unordered_map>
#include <vector>
#include "LogMatchingTracker.h"

View File

@@ -23,7 +23,6 @@
using std::set;
using std::string;
using std::unordered_map;
using std::vector;
namespace android {

View File

@@ -18,11 +18,6 @@
#include "logd/LogEvent.h"
#include <log/log_read.h>
#include <log/logprint.h>
#include <set>
#include <string>
#include <unordered_map>
#include <vector>
#include "frameworks/base/cmds/statsd/src/statsd_config.pb.h"
#include "packages/UidMap.h"

View File

@@ -21,8 +21,6 @@
#include "GaugeMetricProducer.h"
#include "../stats_log_util.h"
#include <cutils/log.h>
using android::util::FIELD_COUNT_REPEATED;
using android::util::FIELD_TYPE_BOOL;
using android::util::FIELD_TYPE_FLOAT;

View File

@@ -29,7 +29,6 @@ namespace android {
namespace os {
namespace statsd {
using std::map;
// for ActiveMetric
const int FIELD_ID_ACTIVE_METRIC_ID = 1;

View File

@@ -17,9 +17,11 @@
#ifndef METRIC_PRODUCER_H
#define METRIC_PRODUCER_H
#include <shared_mutex>
#include <frameworks/base/cmds/statsd/src/active_config_list.pb.h>
#include <utils/RefBase.h>
#include <unordered_map>
#include "HashableDimensionKey.h"
#include "anomaly/AnomalyTracker.h"
#include "condition/ConditionWizard.h"
@@ -27,10 +29,6 @@
#include "matchers/matcher_util.h"
#include "packages/PackageInfoListener.h"
#include <log/logprint.h>
#include <utils/RefBase.h>
#include <unordered_map>
namespace android {
namespace os {
namespace statsd {

View File

@@ -15,8 +15,10 @@
*/
#define DEBUG false // STOPSHIP if true
#include "Log.h"
#include "MetricsManager.h"
#include "statslog.h"
#include <private/android_filesystem_config.h>
#include "CountMetricProducer.h"
#include "atoms_info.h"
@@ -28,10 +30,9 @@
#include "metrics_manager_util.h"
#include "stats_util.h"
#include "stats_log_util.h"
#include "statslog.h"
#include <log/logprint.h>
#include <private/android_filesystem_config.h>
#include <utils/SystemClock.h>
using android::util::FIELD_COUNT_REPEATED;
using android::util::FIELD_TYPE_INT32;
@@ -40,10 +41,8 @@ using android::util::FIELD_TYPE_MESSAGE;
using android::util::FIELD_TYPE_STRING;
using android::util::ProtoOutputStream;
using std::make_unique;
using std::set;
using std::string;
using std::unordered_map;
using std::vector;
namespace android {

View File

@@ -21,7 +21,6 @@
#include "../guardrail/StatsdStats.h"
#include "../stats_log_util.h"
#include <cutils/log.h>
#include <limits.h>
#include <stdlib.h>
@@ -33,12 +32,8 @@ using android::util::FIELD_TYPE_INT64;
using android::util::FIELD_TYPE_MESSAGE;
using android::util::FIELD_TYPE_STRING;
using android::util::ProtoOutputStream;
using std::list;
using std::make_pair;
using std::make_shared;
using std::map;
using std::shared_ptr;
using std::unique_ptr;
using std::unordered_map;
namespace android {

View File

@@ -17,8 +17,6 @@
#pragma once
#include <gtest/gtest_prod.h>
#include <utils/threads.h>
#include <list>
#include "anomaly/AnomalyTracker.h"
#include "condition/ConditionTimer.h"
#include "condition/ConditionTracker.h"

View File

@@ -19,7 +19,6 @@
#include "DurationTracker.h"
#include <set>
namespace android {
namespace os {
namespace statsd {

View File

@@ -38,7 +38,6 @@
#include <inttypes.h>
using std::set;
using std::string;
using std::unordered_map;
using std::vector;

View File

@@ -16,7 +16,6 @@
#pragma once
#include <memory>
#include <set>
#include <unordered_map>
#include <vector>

View File

@@ -17,7 +17,6 @@
#ifndef STATSD_PACKAGE_INFO_LISTENER_H
#define STATSD_PACKAGE_INFO_LISTENER_H
#include <utils/RefBase.h>
#include <string>
namespace android {

View File

@@ -21,10 +21,6 @@
#include "guardrail/StatsdStats.h"
#include "packages/UidMap.h"
#include <android/os/IStatsCompanionService.h>
#include <binder/IServiceManager.h>
#include <utils/Errors.h>
#include <inttypes.h>
using namespace android;

View File

@@ -21,10 +21,8 @@
#include "packages/PackageInfoListener.h"
#include "stats_util.h"
#include <binder/IResultReceiver.h>
#include <binder/IShellCallback.h>
#include <gtest/gtest_prod.h>
#include <log/logprint.h>
#include <stdio.h>
#include <utils/RefBase.h>
#include <list>

View File

@@ -18,7 +18,6 @@
#include "ShellSubscriber.h"
#include <android-base/file.h>
#include "matchers/matcher_util.h"
#include "stats_log_util.h"

View File

@@ -22,7 +22,6 @@
#include <binder/IResultReceiver.h>
#include <condition_variable>
#include <mutex>
#include <string>
#include <thread>
#include "external/StatsPullerManager.h"
#include "frameworks/base/cmds/statsd/src/shell/shell_config.pb.h"

View File

@@ -27,9 +27,6 @@
#include <unistd.h>
#include <cutils/sockets.h>
#include <private/android_filesystem_config.h>
#include <private/android_logger.h>
#include <unordered_map>
#include "StatsSocketListener.h"
#include "guardrail/StatsdStats.h"

View File

@@ -17,12 +17,8 @@
#include "hash.h"
#include "stats_log_util.h"
#include <logd/LogEvent.h>
#include <private/android_filesystem_config.h>
#include <utils/Log.h>
#include <set>
#include <stack>
#include <utils/Log.h>
#include <utils/SystemClock.h>
using android::util::AtomsInfo;

View File

@@ -18,12 +18,6 @@
#include "StatsLogProcessor.h"
using namespace android;
using namespace android::base;
using namespace android::binder;
using namespace android::os;
using namespace std;
namespace android {
namespace os {
namespace statsd {

View File

@@ -23,10 +23,8 @@
#include "stats_log_util.h"
#include <android-base/file.h>
#include <dirent.h>
#include <private/android_filesystem_config.h>
#include <fstream>
#include <iostream>
namespace android {
namespace os {

View File

@@ -24,7 +24,6 @@
#include <android/os/IIncidentManager.h>
#include <android/os/IncidentReportArgs.h>
#include <android/util/ProtoOutputStream.h>
#include <binder/IBinder.h>
#include <binder/IServiceManager.h>
#include <vector>

View File

@@ -21,7 +21,6 @@
using android::IBinder;
using std::lock_guard;
using std::unordered_map;
namespace android {
namespace os {