Commit Graph

27 Commits

Author SHA1 Message Date
Dianne Hackborn
025d4a59fc Work on issue #77931346: The notification that should not be named appeared
Keep track of whether a foreground service has been shown in a
notification channel and, the first time one is, make sure the channel
is sufficiently important regardless of what the user or app last
set for it.

Bug: 77931346
Test: runtest systemui-notification
Change-Id: Idecad2dceb8cc918feec91ca1ee26edf3d3ab7de
2018-05-01 22:56:23 -07:00
Kweku Adams
21b8d26084 Cleaning up frameworks protos.
Note: It is currently only safe to renumber the fields because we have
not started using them yet.

* animationadapter: added in http://ag/3709688, but was not following
the indentation policy or the unit naming policy. The durations that
have documentation in
frameworks/base/services/core/java/com/android/server/wm/ state that
they're in milliseconds. These durations didn't have documentation, but
I'm assuming they're in the same units.
* batterystats: was not following the indentation policy
* jobscheduler: AppIdleController was removed in http://ag/3699210 and
the proto was only partially updated
* powermanagerservice: BatterySaverStateMachineProto added in
http://ag/3763026 but was not privacy tagged and the indentation was off
* surfaceanimator: was not following the indentation policy
* remote_animation_target: was not following the indentation policy
* others: weren't following the indentation policy

Bug: 74975371
Test: flash device and run 'test CtsIncidentHostTestCases'
Change-Id: Id012f4690b1d58816fef096523e1a0ea2bccadb0
2018-04-11 16:55:33 -07:00
Bookatz
235343daec Fix statsd logging in BatteryStats (nesting prob.)
Several statsd atoms are not logged correctly from batterystats, due to
possible nesting issues (batterystats only reports a single stop at the
end, whereas statsd expects each stop, resulting in statsd thinking that
the event is still continuing). This cl fixes those.

Bug: 69478888
Test: current ones still pass
Change-Id: I3ae8d7cc3d2eec7d4ab2721c83d208384adbf690
2018-03-27 09:32:18 -07:00
Tej Singh
33a412b52d ScheduledJobStateChanged: add stop reason
Adds stop reason to scheduled job state changed

Bug: b/71755130
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.atom.UidAtomTests#testScheduledJobState
Test: cts-tradefed run cts-dev -m CtsIncidentHostTestCases -t com.android.server.cts.JobSchedulerIncidentTest
Change-Id: Ic29a5e9160ac258140a52d31bc6210300949545d
2018-03-20 11:20:58 -07:00
Jorim Jaggi
54cff64ec6 Insert correct app transition events for recents anim
The transition delay will be the latency until all the leashes
were created etc. Thus, the actual latency is going to be in
WINDOWS_DRAWN_DELAY.

Also fix an issue where we inadvertently started a transition,
and then the transition logger was hanging.

Bug: 72967764
Test: Swipe up from home button, observe eventlog
Change-Id: I2b1fb7d9d694a629a33653c1fa3d5ed47f53de6b
2018-03-19 14:55:41 +00:00
Kweku Adams
5dd532315e Adding privacy tags to last few protos.
I left out the protos that aren't officially used in incident.proto in any way.
The notification captions are set in NotificationManagerService and
ConditionProviders. They're not set by the app at all.

Bug: 72393215
Test: flash device and check incident.proto output
Change-Id: I4b36e066740fa1e6755eb946e2bcfa4959d9f9db
2018-01-29 16:08:59 +00:00
TreeHugger Robot
d2e162890e Merge "Proto enum reference for App Transitions" 2018-01-26 22:12:26 +00:00
TreeHugger Robot
c110e17bef Merge "incidentd: Adding privacy tag and expanding field." 2018-01-26 22:07:21 +00:00
TreeHugger Robot
f4c5faf932 Merge "Adding privacy tags to alarmmanager protos." 2018-01-26 02:21:15 +00:00
Bookatz
80d11a00eb Proto enum reference for App Transitions
App transitions, from ActivityManagerInternal, are now referenced via a
proto enum. This is also referenced by statsd's atoms.proto.

Bug: 69478930
Test: still compiles
Change-Id: Ifb5cb0120d4cd4e2464ce3b5a7455842cb55259c
2018-01-25 17:12:31 -08:00
Kweku Adams
ce9ab2d9e1 Adding privacy tags to alarmmanager protos.
Bug: 72393215
Test: Flash device and check incident.proto output
Change-Id: Ibd28a52621ce3c8e1ba447356522772aa04baa3b
2018-01-25 15:52:15 -08:00
Kweku Adams
9954633827 incidentd: Adding privacy tag and expanding field.
Also updating priority category enum to note new values.
Bug: 65750824
Bug: 72393215
Test: flash device and check incident.proto output

Change-Id: I0c764cd4bb258160aa7140e60e81f76f84cc28ce
2018-01-25 14:59:02 -08:00
TreeHugger Robot
b93b797199 Merge "Update to the ActivityManager proto" 2018-01-25 22:21:30 +00:00
Yi Jin
0d7bc2d17d Tag platform protos with right privacy level.
Bug: 72407926
Test: flash and run incident -p <each section>
Change-Id: Ieb36260bb57b0d38791817d548a9e12429e88987
2018-01-24 22:38:43 +00:00
Bookatz
db026a28aa Update to the ActivityManager proto
Rename the activitymanager.proto to enums.proto, in accordance with the
new convention on naming these protos.
Also, changes processStateAmToProto from simplying multiplying by 100 to
a switch statement, to be more future-proof.
Also, changes the values of the proto's process state, to reflect that
the values will not be kept in sync with ActivityManager.

Note that this cl was originally started in ag/3008434, and partially fulfilled in ag/3114337.

Bug: 69478930
Test: run cts-dev -m CtsStatsdHostTestCases -t android.cts.statsd.ProcStateAtomTests
Change-Id: I2b3bf2552b879c74d8985338df5a57c01850cb91
2018-01-24 12:07:35 -08:00
Yi Jin
148d7f4291 Implement activity --proto --processes
Bug: 66729158
Test: out/host/linux-x86/bin/incident_report -w amprocesses
Change-Id: Iae043203bca954bfc4aadad0460cc56621e9ba05
2018-01-23 16:49:58 -08:00
Vishnu Nair
9a3e406eac Add PhoneWindowManager proto definitions
Bug: 64831661

Test: verified proto dump from winscope
Test: atest FrameworksServicesTests:com.android.server.policy.PhoneWindowManagerTest
Test: atest FrameworksServicesTests:com.android.server.policy.PhoneWindowManagerLayoutTest

Change-Id: I7b0f081d15cfc63d7565431b672bd8be81583aa5
2018-01-11 11:24:46 -08:00
Kweku Adams
bee6d5f92e incidentd: Updating process state enum.
It's fine to rearrange and update right now since the protos aren't
being used yet. In the future, we should just update the mapping
function.

Bug: 65750826
Test: $ cts-tradefed run cts-dev --module CtsIncidentHostTestCases --test com.android.server.cts.PowerIncidentTest
Change-Id: Ia5e44ec74009a68e06d74e0cfb4a4c83b1bcb58a
2018-01-04 10:05:29 -08:00
Joe Onorato
62c220b20b Fix how we build the statsd protos.
This lets us include frameworks protos, and use the constants
and messages from them.

Change-Id: I609d6e524f780e6a5beea543a68561bede47813e
Test: make
2017-12-13 18:26:45 -08:00
Yi Jin
6b51414154 Implement Activity Manager Dumpsys --service option
Bug: 66729158
Test: out/host/linux-x86/bin/incident_report -w amservices
Change-Id: I72015b9744bc8028001306283f169fca4797c700
2017-11-17 11:58:06 -08:00
Kweku Adams
e6b00c2a16 incidentd: Updating PowerManagerService proto files.
Moving to the proto/.../server directory since PowerManagerService is in
com.android.server.
Extracting enums from other components into their own files.

Bug: 65750826
Bug: 65750806
Test: flash device and check incident.proto output
Change-Id: Ib91b7c08142fa66adf18b6e85106d4cbb5adf660
2017-10-25 15:04:55 -07:00
Kweku Adams
61e0329207 incidentd: Adding proto dump for AlarmManager.
Test: flash device and check incident.proto output.
Bug: 65750801
Change-Id: If1e42c70908a0b11358cf48766c028e37c0329ae
2017-10-23 17:49:13 -07:00
Kweku Adams
103351f9c2 incidentd: dumping batterystats app data to proto
Bug: 65750808
Test: flash device and checkout proto output against csv output
Change-Id: I2dad948d4b43dc904f01dcaef137a3ff947062c6
2017-10-18 12:32:38 -07:00
Yi Jin
c7f93070b6 Convert proto3 to proto2 to avoid forced zero enum value.
The rationale for this change:
1. When defining enum values for platform, we want to use the current
integers, in some cases zero is not defined, but proto3 enforces a zero
default value.

2. Android Metrics Team uses proto2 on server-side

3. When copying .proto to server-side, the known issue of dropping
unknown fields might affect if using proto3

4. Not much benefits from using proto3

Bug: 67110257
Test: manully generate incident report and it looks normal
Change-Id: Ia63e39de549a46683e9f80fcb74f1d771782b7f4
2017-10-16 11:04:01 -07:00
Kweku Adams
62b4224757 incidentd: Adding RankingHelper data to NotificationManager proto output.
BUG: 65750824
Test: flash on device and look at incident.proto output
Change-Id: I9323cc109d96715b2114aa405eda79ae4c109c14
2017-10-03 12:35:48 -07:00
Kweku Adams
5ec78cd58f incidentd: creating PolicyProto for NotificationManager
The previous code saved a String in the proto like
"NotificationManager.Policy[priorityCategories=PRIORITY_CATEGORY_REMINDERS,PRIORITY_CATEGORY_EVENTS,PRIORITY_CATEGORY_MESSAGES,PRIORITY_CATEGORY_CALLS,PRIORITY_CATEGORY_REPEAT_CALLERS,priorityCallSenders=PRIORITY_SENDERS_STARRED,priorityMessageSenders=PRIORITY_SENDERS_STARRED,suppressedVisualEffects=SUPPRESSED_EFFECT_SCREEN_OFF]".
This unfortunately would mean that the String would have to be parsed on
the server-side, which kinda defeats the purpose of migrating to protos,
so I made a proto for this :)

BUG: 65750824
Test: flash device and check incident.proto output, comparing it to the previous output
Change-Id: I87607dc7b72ce3519132da23167b4bdce3b7ef4c
2017-09-25 16:33:44 -07:00
Wale Ogunwale
0d5609ba8c Added WindowConfigurationProto and friends
Also added WindowContainerProto and ConfigurationContainerProto
Will be used by cts tests in upcoming CLs that replace StackId APIs.

Test: adb shell dumpsys window --proto
Bug: 64146578
Change-Id: Id6ca2a93e3d15ac696ab54cb241870e973985967
2017-09-18 07:23:23 -07:00