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

Commit 538dffe8 authored by Matthew DeVore's avatar Matthew DeVore
Browse files

CD settings: clean up null handling

Keep a non-null injector in the ExternalDisplayPreferenceFragment so
that we don't need to check it whenever it is used.

This makes the wrappers in ExternalDisplaySettingsConfiguration
redundant, since their main purpose was to check for a null injector.

Stop passing a Context object around several methods. Instead, just use
requireContext() whenever we need a context. Only a fraction of the
methods actually need to use the context directly. getPrefContext() does
not work because it cannot be overridden in tests (it is final) and
requires PreferenceFragmentCompat.mPreferenceManager to be set.

Bug: b/352648432
Flag: EXEMPT refactor
Test: ExternalDisplayUpdaterTest
Test: ExternalDisplayPreferenceFragmentTest
Change-Id: I5aa3703c2646fc12fb9b77661fc2f3c35388f61b
parent 52e9b923
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment