Add helper functions to S2CellIdUtils.
These methods are required for the density-based coarse location feature. They match the implementation of the S2 lib in google3. As per the code owners request, since this lib will now be used both by the altitude module and our coarse locations, it is moved outside of the altitude/ folder, into a new s2/ folder. As a result, four methods have to become public. For location coarsening, we add the following methods: - In S2CellIdUtils, add a method toLatLngDegrees(s2cellId, latlng) which sets latlng to the center of the cell - In S2CellIdUtils, add a method containsLatLng(s2cellId, latlng) -> Boolean Tests: - atest FrameworksMockingServicesTests:S2CellIdUtilsTest NB: as discussed with the code owners, these are non-API changes that shouldn't be flagged. If need be, it could be gated behind the feature flag for the larger change (see other CLs) Test: manual atest on Pixel 7 pro (see above) Bug: 376198890 Flag: EXEMPT non-AI changes Change-Id: If1ec4b05b97e1916ce988264e6110102b60e19a9
Loading
Please register or sign in to comment