Validate Computer functions
Bug: 186654390
Add a validation function to perform some basic checks on the
structure of functions that are part of the Computer interface. The
checks are:
1. Every function in Computer must have an @Live annotation. The
annotation indicates if the function is locked or not.
2. If function is locked then there must be an override in
ComputerLocked.
3. If the function is not locked then there may not be an override in
ComputerLocked.
4. Every function in ComputerLocked must be an override of a function
declared in Computer.
Test: atest
* PackageManagerServiceTests#testComputerStructure
The test is run once on the candidate image - no failures are
reported. The test is then run on modified builds, exercising the
following five cases, to verify that errors are properly detected.
Manual testing with the following three cases:
1. A function in Computer that does not have an @LiveImplementation
annotation.
2. A function in Computer that has an invalid
LiveImplementation.override annotation.
3. A locked function that is not overridden in ComputerLocked.
4. A not-locked function that is is overridden in ComputerLocked.
5. A function that is defined for the first time in ComputerLocked.
Change-Id: Ic34aac67fe40aa4fec2d343fe4babdf1c565ce85
2 files changed