Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit da3ce175 authored by Neil Fuller's avatar Neil Fuller
Browse files

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
parent 8b8f2d0e
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