Loading api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -3663,6 +3663,7 @@ package android.os { } public final class ConfigUpdate { field public static final java.lang.String ACTION_UPDATE_CARRIER_ID_DB = "android.os.action.UPDATE_CARRIER_ID_DB"; field public static final java.lang.String ACTION_UPDATE_CARRIER_PROVISIONING_URLS = "android.intent.action.UPDATE_CARRIER_PROVISIONING_URLS"; field public static final java.lang.String ACTION_UPDATE_CT_LOGS = "android.intent.action.UPDATE_CT_LOGS"; field public static final java.lang.String ACTION_UPDATE_INTENT_FIREWALL = "android.intent.action.UPDATE_INTENT_FIREWALL"; Loading cmds/media/src/com/android/commands/media/Media.java +7 −5 Original line number Diff line number Diff line Loading @@ -46,6 +46,8 @@ import java.io.PrintStream; import java.util.List; public class Media extends BaseCommand { // This doesn't belongs to any package. Setting the package name to empty string. private static final String PACKAGE_NAME = ""; private ISessionManager mSessionService; /** Loading Loading @@ -104,7 +106,7 @@ public class Media extends BaseCommand { private void sendMediaKey(KeyEvent event) { try { mSessionService.dispatchMediaKeyEvent(event, false); mSessionService.dispatchMediaKeyEvent(PACKAGE_NAME, false, event, false); } catch (RemoteException e) { } } Loading Loading @@ -264,13 +266,13 @@ public class Media extends BaseCommand { } else if ("q".equals(line) || "quit".equals(line)) { break; } else if ("play".equals(line)) { mController.play(""); mController.play(PACKAGE_NAME); } else if ("pause".equals(line)) { mController.pause(""); mController.pause(PACKAGE_NAME); } else if ("next".equals(line)) { mController.next(""); mController.next(PACKAGE_NAME); } else if ("previous".equals(line)) { mController.previous(""); mController.previous(PACKAGE_NAME); } else { System.out.println("Invalid command: " + line); } Loading cmds/statsd/src/StatsLogProcessor.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -503,7 +503,8 @@ void StatsLogProcessor::flushIfNecessaryLocked( void StatsLogProcessor::WriteDataToDiskLocked(const ConfigKey& key, const int64_t timestampNs, const DumpReportReason dumpReportReason) { if (mMetricsManagers.find(key) == mMetricsManagers.end()) { if (mMetricsManagers.find(key) == mMetricsManagers.end() || !mMetricsManagers.find(key)->second->shouldWriteToDisk()) { return; } ProtoOutputStream proto; Loading cmds/statsd/src/metrics/GaugeMetricProducer.cpp +13 −3 Original line number Diff line number Diff line Loading @@ -186,7 +186,6 @@ void GaugeMetricProducer::onDumpReportLocked(const int64_t dumpTimeNs, flushIfNeededLocked(dumpTimeNs); } flushIfNeededLocked(dumpTimeNs); if (mPastBuckets.empty()) { return; } Loading Loading @@ -324,6 +323,10 @@ void GaugeMetricProducer::pullLocked(const int64_t timestampNs) { triggerPuller = true; break; } case GaugeMetric::CONDITION_CHANGE_TO_TRUE: { triggerPuller = mCondition; break; } default: break; } Loading @@ -348,7 +351,7 @@ void GaugeMetricProducer::onConditionChangedLocked(const bool conditionMet, flushIfNeededLocked(eventTimeNs); mCondition = conditionMet; if (mPullTagId != -1 && mCondition) { if (mPullTagId != -1) { pullLocked(eventTimeNs); } // else: Push mode. No need to proactively pull the gauge data. } Loading Loading @@ -538,7 +541,14 @@ void GaugeMetricProducer::flushCurrentBucketLocked(const int64_t& eventTimeNs) { size_t GaugeMetricProducer::byteSizeLocked() const { size_t totalSize = 0; for (const auto& pair : mPastBuckets) { totalSize += pair.second.size() * kBucketSize; for (const auto& bucket : pair.second) { totalSize += bucket.mGaugeAtoms.size() * sizeof(GaugeAtom); for (const auto& atom : bucket.mGaugeAtoms) { if (atom.mFields != nullptr) { totalSize += atom.mFields->size() * sizeof(FieldValue); } } } } return totalSize; } Loading cmds/statsd/src/metrics/MetricsManager.h +4 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,10 @@ public: return !mAllowedPkg.empty(); } bool shouldWriteToDisk() const { return mNoReportMetricIds.size() != mAllMetricProducers.size(); } void dumpStates(FILE* out, bool verbose); inline bool isInTtl(const int64_t timestampNs) const { Loading Loading
api/system-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -3663,6 +3663,7 @@ package android.os { } public final class ConfigUpdate { field public static final java.lang.String ACTION_UPDATE_CARRIER_ID_DB = "android.os.action.UPDATE_CARRIER_ID_DB"; field public static final java.lang.String ACTION_UPDATE_CARRIER_PROVISIONING_URLS = "android.intent.action.UPDATE_CARRIER_PROVISIONING_URLS"; field public static final java.lang.String ACTION_UPDATE_CT_LOGS = "android.intent.action.UPDATE_CT_LOGS"; field public static final java.lang.String ACTION_UPDATE_INTENT_FIREWALL = "android.intent.action.UPDATE_INTENT_FIREWALL"; Loading
cmds/media/src/com/android/commands/media/Media.java +7 −5 Original line number Diff line number Diff line Loading @@ -46,6 +46,8 @@ import java.io.PrintStream; import java.util.List; public class Media extends BaseCommand { // This doesn't belongs to any package. Setting the package name to empty string. private static final String PACKAGE_NAME = ""; private ISessionManager mSessionService; /** Loading Loading @@ -104,7 +106,7 @@ public class Media extends BaseCommand { private void sendMediaKey(KeyEvent event) { try { mSessionService.dispatchMediaKeyEvent(event, false); mSessionService.dispatchMediaKeyEvent(PACKAGE_NAME, false, event, false); } catch (RemoteException e) { } } Loading Loading @@ -264,13 +266,13 @@ public class Media extends BaseCommand { } else if ("q".equals(line) || "quit".equals(line)) { break; } else if ("play".equals(line)) { mController.play(""); mController.play(PACKAGE_NAME); } else if ("pause".equals(line)) { mController.pause(""); mController.pause(PACKAGE_NAME); } else if ("next".equals(line)) { mController.next(""); mController.next(PACKAGE_NAME); } else if ("previous".equals(line)) { mController.previous(""); mController.previous(PACKAGE_NAME); } else { System.out.println("Invalid command: " + line); } Loading
cmds/statsd/src/StatsLogProcessor.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -503,7 +503,8 @@ void StatsLogProcessor::flushIfNecessaryLocked( void StatsLogProcessor::WriteDataToDiskLocked(const ConfigKey& key, const int64_t timestampNs, const DumpReportReason dumpReportReason) { if (mMetricsManagers.find(key) == mMetricsManagers.end()) { if (mMetricsManagers.find(key) == mMetricsManagers.end() || !mMetricsManagers.find(key)->second->shouldWriteToDisk()) { return; } ProtoOutputStream proto; Loading
cmds/statsd/src/metrics/GaugeMetricProducer.cpp +13 −3 Original line number Diff line number Diff line Loading @@ -186,7 +186,6 @@ void GaugeMetricProducer::onDumpReportLocked(const int64_t dumpTimeNs, flushIfNeededLocked(dumpTimeNs); } flushIfNeededLocked(dumpTimeNs); if (mPastBuckets.empty()) { return; } Loading Loading @@ -324,6 +323,10 @@ void GaugeMetricProducer::pullLocked(const int64_t timestampNs) { triggerPuller = true; break; } case GaugeMetric::CONDITION_CHANGE_TO_TRUE: { triggerPuller = mCondition; break; } default: break; } Loading @@ -348,7 +351,7 @@ void GaugeMetricProducer::onConditionChangedLocked(const bool conditionMet, flushIfNeededLocked(eventTimeNs); mCondition = conditionMet; if (mPullTagId != -1 && mCondition) { if (mPullTagId != -1) { pullLocked(eventTimeNs); } // else: Push mode. No need to proactively pull the gauge data. } Loading Loading @@ -538,7 +541,14 @@ void GaugeMetricProducer::flushCurrentBucketLocked(const int64_t& eventTimeNs) { size_t GaugeMetricProducer::byteSizeLocked() const { size_t totalSize = 0; for (const auto& pair : mPastBuckets) { totalSize += pair.second.size() * kBucketSize; for (const auto& bucket : pair.second) { totalSize += bucket.mGaugeAtoms.size() * sizeof(GaugeAtom); for (const auto& atom : bucket.mGaugeAtoms) { if (atom.mFields != nullptr) { totalSize += atom.mFields->size() * sizeof(FieldValue); } } } } return totalSize; } Loading
cmds/statsd/src/metrics/MetricsManager.h +4 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,10 @@ public: return !mAllowedPkg.empty(); } bool shouldWriteToDisk() const { return mNoReportMetricIds.size() != mAllMetricProducers.size(); } void dumpStates(FILE* out, bool verbose); inline bool isInTtl(const int64_t timestampNs) const { Loading