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
Loading
Please register or sign in to comment