Skip to content
Commit 4d56d13e authored by Suprabh Shukla's avatar Suprabh Shukla
Browse files

Add a metrics reason code for USE_EXACT_ALARM

Updating the reason code logging to better differentiate between usage
of both the permissions.
The only functional changes expected from this change are the values of
exactAllowReason in an alarm:

- Prioritized alarms change from "Permission" to "Not applicable"
- When crashing is turned off, reason code changes from "Permission" to
  "Not applicable"
- When the caller has USE_EXACT_ALARM, reason code changes from
  "Permission" to "Policy Permission".

Also updating the error message to include USE_EXACT_ALARM.

Test: atest FrameworksMockingServicesTests:AlarmManagerServiceTest
atest CtsStatsdAtomHostTestCases:AlarmStatsTest

Existing tests should pass:
atest CtsAlarmManagerTestCases

Manually test output of `./out/host/linux-x86/bin/statsd_testdrive 368`
and `adb shell dumpsys alarm`

Bug: 231661615
Change-Id: I13239c300cfb468e7fc2df21fccb494fdf8c80ac
parent 92e59dde
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment