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

Commit 39e51723 authored by Austin Borger's avatar Austin Borger
Browse files

Unhide some camera2 data class constructors to tests.

Currently, if apps want to make functionality involving these classes
testable, they need to copy contents out of them / use proxy classes /
wrappers, since they cannot create instances of these (their
constructors are hidden), and also cannot mock them (they're final).

There is already precedent for keeping constructors of similar classes
available (see e.g. TonemapCurve or RggbChannelVector). Un-hiding more
of them would make the API more consistent, easier to test, and I'm not
aware of any major downsides of doing so.

We might also consider unhiding some more of them (e.g. ones about
stream configurations) in the future; these four seem to be the easiest
choices though.

(We're also adding some NonNull / Nullable annotations to make lint
happy.)

Test: Ran GCA
Bug: 202059787
Change-Id: Ie143d1b349e15510fd4d0058dfa9077a613836e4
parent 83a3a1f8
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