pub struct AndroidReportConfig {
pub reporter_service_package: Option<String>,
pub reporter_service_class: Option<String>,
pub skip_report: Option<bool>,
pub use_pipe_in_framework_for_testing: Option<bool>,
}
Expand description
Android-only. Not for general use. If set, reports the trace to the Android framework. This field is read by perfetto_cmd, rather than the tracing service. This field must be set when passing the –upload flag to perfetto_cmd.
In this message, either:
- |reporter_service_package| and |reporter_service_class| must be set.
- |skip_reporting| must be explicitly set to true.
Fields§
§reporter_service_package: Option<String>
§reporter_service_class: Option<String>
§skip_report: Option<bool>
If true, then skips reporting the trace to Android framework.
This flag is useful in testing (e.g. Perfetto-statsd integration tests) or when we explicitly don’t want to report traces to the framework even when they usually would (e.g. configs deployed using statsd but only used for inclusion in bugreports using |bugreport_score|).
The motivation for having this flag, instead of just not setting |framework_report_config|, is prevent accidents where |framework_report_config| is omitted by mistake.
use_pipe_in_framework_for_testing: Option<bool>
If true, will direct the Android framework to read the data in trace file and pass it to the reporter class over a pipe instead of passing the file descriptor directly.
This flag is needed because the Android test framework does not currently support priv-app helper apps (in terms of SELinux) and we really don’t want to add an allow rule for untrusted_app to receive trace fds.
Because of this, we instead will direct the framework to create a new pipe and pass this to the reporter process instead. As the pipe is created by the framework, we won’t have any problems with SELinux (system_server is already allowed to pass pipe fds, even to untrusted apps).
As the name suggests this option MUST only be used for testing. Note that the framework will reject (and drop) files which are too large both for simplicity and to be minimize the amount of data we pass to a non-priv app (note that the framework will still check manifest permissions even though SELinux permissions are worked around).
Implementations§
Source§impl AndroidReportConfig
impl AndroidReportConfig
Sourcepub fn reporter_service_package(&self) -> &str
pub fn reporter_service_package(&self) -> &str
Returns the value of reporter_service_package
, or the default value if reporter_service_package
is unset.
Sourcepub fn reporter_service_class(&self) -> &str
pub fn reporter_service_class(&self) -> &str
Returns the value of reporter_service_class
, or the default value if reporter_service_class
is unset.
Sourcepub fn skip_report(&self) -> bool
pub fn skip_report(&self) -> bool
Returns the value of skip_report
, or the default value if skip_report
is unset.
Sourcepub fn use_pipe_in_framework_for_testing(&self) -> bool
pub fn use_pipe_in_framework_for_testing(&self) -> bool
Returns the value of use_pipe_in_framework_for_testing
, or the default value if use_pipe_in_framework_for_testing
is unset.
Trait Implementations§
Source§impl Clone for AndroidReportConfig
impl Clone for AndroidReportConfig
Source§fn clone(&self) -> AndroidReportConfig
fn clone(&self) -> AndroidReportConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for AndroidReportConfig
impl Debug for AndroidReportConfig
Source§impl Default for AndroidReportConfig
impl Default for AndroidReportConfig
Source§impl Message for AndroidReportConfig
impl Message for AndroidReportConfig
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
Source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
Source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
Source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
. Read moreSource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
.