Name Description Size
PinnedTile.kt Unique id used to identify specific home tiles, e.g. for deletion, etc. * 4297
PinnedTileImageUtilWrapper.kt Wraps an instance of [Application]. We then store this class put this in the service locator, allowing us to keep context out of ViewModels 1269
PinnedTilePlaceholderGenerator.kt Get a representative character for the given URL. For example this method will return "f" for "http://m.facebook.com/foobar". 3301
PinnedTileRepo.kt Pinned Tile Repository. This class manages and persists pinned tiles data. It should not be aware of View scope. @property applicationContext used to access [SharedPreferences] and [assets] for bundled tiles @constructor loads the initial [_pinnedTiles] (a combination of custom and bundled tiles) 6404
PinnedTileScreenshotStore.kt The format with which to compress on disk. Our goals for storage: - Store full resolution, with minimal artifacting: we don't know how we'll display the images in future redesigns so we want to preserve them as best as possible. - Take up minimal space: we don't have how many tiles the user will store. WebP was chosen through testing: it produces the smallest file sizes with the least amount of visual artifacting but is the most computationally expensive to save (2000ms WebP vs. 200ms JPEG), which is irrelevant for our infrequent screenshots. For file size comparisons, at 1080p, quality 50 on IMDB (a dense page): - WebP is ~65 KiB with almost no artifacts - JPEG is ~130 KiB with noticeable artifacts up close - PNG is ~1.6MiB with no artifacts (it is lossless) 6927