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

Commit 39b38221 authored by Muhammad Qureshi's avatar Muhammad Qureshi Committed by Automerger Merge Worker
Browse files

Merge changes Iad76baea,I3db5f4ff into rvc-dev am: 6fe5fd6e am: 0e66b860

Change-Id: I73ecaed190ce3fe91e586fdbba4c97bcda7b7964
parents dd9ed8f3 0e66b860
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -117,4 +117,6 @@ extend google.protobuf.FieldOptions {
    optional bool allow_from_any_uid = 50003 [default = false];

    repeated string module = 50004;

    optional bool truncate_timestamp = 50005 [default = false];
}
+12 −6
Original line number Diff line number Diff line
@@ -94,7 +94,8 @@ message Atom {
                10 [(module) = "framework", (module) = "statsdtest"];
        LongPartialWakelockStateChanged long_partial_wakelock_state_changed =
                11 [(module) = "framework"];
        MobileRadioPowerStateChanged mobile_radio_power_state_changed = 12 [(module) = "framework"];
        MobileRadioPowerStateChanged mobile_radio_power_state_changed =
                12 [(module) = "framework", (truncate_timestamp) = true];
        WifiRadioPowerStateChanged wifi_radio_power_state_changed = 13 [(module) = "framework"];
        ActivityManagerSleepStateChanged activity_manager_sleep_state_changed =
                14 [(module) = "framework"];
@@ -107,7 +108,8 @@ message Atom {
                20 [(module) = "framework", (module) = "statsdtest"];
        DeviceIdleModeStateChanged device_idle_mode_state_changed = 21 [(module) = "framework"];
        DeviceIdlingModeStateChanged device_idling_mode_state_changed = 22 [(module) = "framework"];
        AudioStateChanged audio_state_changed = 23 [(module) = "framework"];
        AudioStateChanged audio_state_changed =
                23 [(module) = "framework", (truncate_timestamp) = true];
        MediaCodecStateChanged media_codec_state_changed = 24 [(module) = "framework"];
        CameraStateChanged camera_state_changed = 25 [(module) = "framework"];
        FlashlightStateChanged flashlight_state_changed = 26 [(module) = "framework"];
@@ -128,7 +130,8 @@ message Atom {
        WifiLockStateChanged wifi_lock_state_changed = 37 [(module) = "wifi"];
        WifiSignalStrengthChanged wifi_signal_strength_changed = 38 [(module) = "wifi"];
        WifiScanStateChanged wifi_scan_state_changed = 39 [(module) = "wifi"];
        PhoneSignalStrengthChanged phone_signal_strength_changed = 40 [(module) = "framework"];
        PhoneSignalStrengthChanged phone_signal_strength_changed =
                40 [(module) = "framework", (truncate_timestamp) = true];
        SettingChanged setting_changed = 41 [(module) = "framework"];
        ActivityForegroundStateChanged activity_foreground_state_changed =
                42 [(module) = "framework", (module) = "statsdtest"];
@@ -154,7 +157,8 @@ message Atom {
                59 [(module) = "framework", (module) = "statsdtest"];
        ForegroundServiceStateChanged foreground_service_state_changed
                = 60 [(module) = "framework"];
        CallStateChanged call_state_changed = 61 [(module) = "telecom"];
        CallStateChanged call_state_changed =
                61 [(module) = "telecom", (truncate_timestamp) = true];
        KeyguardStateChanged keyguard_state_changed = 62 [(module) = "sysui"];
        KeyguardBouncerStateChanged keyguard_bouncer_state_changed = 63 [(module) = "sysui"];
        KeyguardBouncerPasswordEntered keyguard_bouncer_password_entered = 64 [(module) = "sysui"];
@@ -420,8 +424,10 @@ message Atom {
    oneof pulled {
        WifiBytesTransfer wifi_bytes_transfer = 10000 [(module) = "framework"];
        WifiBytesTransferByFgBg wifi_bytes_transfer_by_fg_bg = 10001 [(module) = "framework"];
        MobileBytesTransfer mobile_bytes_transfer = 10002 [(module) = "framework"];
        MobileBytesTransferByFgBg mobile_bytes_transfer_by_fg_bg = 10003 [(module) = "framework"];
        MobileBytesTransfer mobile_bytes_transfer =
                10002 [(module) = "framework", (truncate_timestamp) = true];
        MobileBytesTransferByFgBg mobile_bytes_transfer_by_fg_bg =
                10003 [(module) = "framework", (truncate_timestamp) = true];
        BluetoothBytesTransfer bluetooth_bytes_transfer = 10006 [(module) = "framework"];
        KernelWakelock kernel_wakelock = 10004 [(module) = "framework"];
        SubsystemSleepState subsystem_sleep_state = 10005 [(module) = "statsdtest"];
+17 −0
Original line number Diff line number Diff line
BasedOnStyle: Google
AllowShortIfStatementsOnASingleLine: true
AllowShortFunctionsOnASingleLine: false
AllowShortLoopsOnASingleLine: true
BinPackArguments: true
BinPackParameters: true
ColumnLimit: 100
CommentPragmas: NOLINT:.*
ContinuationIndentWidth: 8
DerivePointerAlignment: false
IndentWidth: 4
PointerAlignment: Left
TabWidth: 4
AccessModifierOffset: -4
IncludeCategories:
  - Regex:    '^"Log\.h"'
    Priority:    -1
+335 −343

File changed.

Preview size limit exceeded, changes collapsed.

+46 −35
Original line number Diff line number Diff line
@@ -17,24 +17,24 @@
#ifndef ANDROID_STATS_LOG_API_GEN_COLLATION_H
#define ANDROID_STATS_LOG_API_GEN_COLLATION_H


#include <google/protobuf/descriptor.h>
#include "frameworks/base/cmds/statsd/src/atom_field_options.pb.h"

#include <map>
#include <set>
#include <vector>
#include <map>

#include "frameworks/base/cmds/statsd/src/atom_field_options.pb.h"

namespace android {
namespace stats_log_api_gen {

using google::protobuf::Descriptor;
using google::protobuf::FieldDescriptor;
using std::map;
using std::set;
using std::shared_ptr;
using std::string;
using std::vector;
using google::protobuf::Descriptor;
using google::protobuf::FieldDescriptor;

const int PULL_ATOM_START_ID = 10000;

@@ -52,6 +52,8 @@ const int STATE_OPTION_EXCLUSIVE = os::statsd::StateField::EXCLUSIVE_STATE;
const int STATE_OPTION_PRIMARY_FIELD_FIRST_UID = os::statsd::StateField::PRIMARY_FIELD_FIRST_UID;
const int STATE_OPTION_PRIMARY = os::statsd::StateField::PRIMARY_FIELD;

const int ATOM_ID_FIELD_NUMBER = -1;

const string DEFAULT_MODULE_NAME = "DEFAULT";

/**
@@ -84,8 +86,10 @@ union AnnotationValue {
    int intValue;
    bool boolValue;

    AnnotationValue(const int value): intValue(value) {}
    AnnotationValue(const bool value): boolValue(value) {}
    AnnotationValue(const int value) : intValue(value) {
    }
    AnnotationValue(const bool value) : boolValue(value) {
    }
};

struct Annotation {
@@ -95,9 +99,11 @@ struct Annotation {
    AnnotationValue value;

    inline Annotation(unsigned char annotationId, int atomId, AnnotationType type,
            AnnotationValue value):
            annotationId(annotationId), atomId(atomId), type(type), value(value) {}
    inline ~Annotation() {}
                      AnnotationValue value)
        : annotationId(annotationId), atomId(atomId), type(type), value(value) {
    }
    inline ~Annotation() {
    }

    inline bool operator<(const Annotation& that) const {
        return atomId == that.atomId ? annotationId < that.annotationId : atomId < that.atomId;
@@ -113,16 +119,20 @@ struct AtomField {
    string name;
    java_type_t javaType;

    // If the field is of type enum, the following map contains the list of enum values.
    // If the field is of type enum, the following map contains the list of enum
    // values.
    map<int /* numeric value */, string /* value name */> enumValues;

    inline AtomField() :name(), javaType(JAVA_TYPE_UNKNOWN) {}
    inline AtomField(const AtomField& that) :name(that.name),
                                             javaType(that.javaType),
                                             enumValues(that.enumValues) {}
    inline AtomField() : name(), javaType(JAVA_TYPE_UNKNOWN) {
    }
    inline AtomField(const AtomField& that)
        : name(that.name), javaType(that.javaType), enumValues(that.enumValues) {
    }

    inline AtomField(string n, java_type_t jt) :name(n), javaType(jt) {}
    inline ~AtomField() {}
    inline AtomField(string n, java_type_t jt) : name(n), javaType(jt) {
    }
    inline ~AtomField() {
    }
};

/**
@@ -147,6 +157,8 @@ struct AtomDecl {

    bool whitelisted = false;

    bool truncateTimestamp = false;

    AtomDecl();
    AtomDecl(const AtomDecl& that);
    AtomDecl(int code, const string& name, const string& message);
@@ -174,5 +186,4 @@ int collate_atom(const Descriptor *atom, AtomDecl *atomDecl, vector<java_type_t>
}  // namespace stats_log_api_gen
}  // namespace android


#endif  // ANDROID_STATS_LOG_API_GEN_COLLATION_H
Loading