Skip to content
Commit a93eb57e authored by Max Spencer's avatar Max Spencer
Browse files

Improve error messages from RequireSafetyCenterRule

The attached bug was caused by certain devices/configurations
lacking the Safety Center shell commands that this rule uses to
determine whether SC is enabled.

For the time being these mis-configurations seem to have been
fixed so I'm using this CL to change the error message so
that in the future it is easier to figure out what the problem
is, if something similar happens.

The stack traces we see saw said:

`java.io.IOException: cmd safety_center supported exited with status 255`

and a status code of 255 is the unsigned equivalent of the -1 status
code returned by the base shell command handler
[here](https://source.corp.google.com/h/googleplex-android/platform/superproject/+/master:frameworks/libs/modules-utils/java/com/android/modules/utils/BasicShellCommandHandler.java;l=306)

Bug: 289978570
Test: Re-run the test procedure in the above bug
Relnote: N/A
Change-Id: I19ca8830c657146f43d8df2dc6e4600301781654
parent 4ea1e618
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