Remove unnecessary overriding capability
This change modifies the signature of several internal methods of ServiceStateTracker to remove the possibility of subclasses overriding them. Where possible the methods have been made private (thus implicitly final) and where not possible the methods have been left protected but made final. Only shared logging and time/time zone related methods have been changed to limit the scope. The use of protected is apparently a legacy of earlier Android releases where there were several subclasses of ServiceStateTracker. None of these methods are referenced in tests using mocking frameworks which might require the methods remain virtual and non-final. The use of protected for the log methods appears to be to increase visiblity to subclasses but not to allow overriding / redirection of logging to alternative log destinations. One subclass still existings in the codebase that relies on log() and loge(). The goal of this change is to reduce the possibility of unintended side effects from later time / time zone detection refactoring. Bug: 63743683 Test: make droid Change-Id: I57c9dd8d45fc4cfac8996c1879b93d3886be82a5
Loading
Please register or sign in to comment