Create a RoleManagerWrapper in BugreportManagerServiceImpl.Injector
to allow for overriding the behaviour in tests. The allowBypassingQualification attribute of the SYSTEM_AUTOMOTIVE_PROJECTION role has been removed, so BugreportManagerServiceImplTest#testCancelBugreportWithRole can no longer add itself to the role using the real RoleManager. Instead, a wrapper is used to allow the test to override the RoleManager behaviour. Note that RoleManager cannot be mocked because it is final. Flag: EXEMPT bugfix Bug: 337386451 Test: Verified that BugreportManagerServiceImplTest#testCancelBugreportWithRole now passes, and also checked that Android Auto bug reporting still works. Change-Id: I6d2505969fbfb486df8770ed8c097d81600f01c7
Loading
Please register or sign in to comment