Name Description Size
Assert.kt A collection of assertion functions. We create our own assertion class because `assert` in Java is known to have problems: it is disabled by default and must be enabled as part of the compile stage, making it easy to forget. 686
BuildConstants.kt Provides constant values related to the build 1379
ColorUtils.java 1113
DeviceInfo.kt Contains information about the device the app is running on. 1219
Direction.kt 572
FileUtils.kt 1734
FormattedDomain.java Methods for formatting a domain URI. 5723
FormattedDomainWrapper.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 698
HtmlLoader.java Load a given (html or css) resource file into a String. The input can contain tokens that will be replaced with localised strings. @param substitutionTable A table of substitions, e.g. %shortMessage% -> "Error loading page..." Can be null, in which case no substitutions will be made. @return The file content, with all substitutions having being made. 1912
HttpUrlConnectionWrapper.kt A holder for the shared HttpClientConnection. 455
IntentUtils.kt Handles the boilerplate of construction, conversion, sending/receiving, etc of [Intent]s 1022
ObservableMutableSet.kt A [MutableSet] that, on mutation, calls the observer functions provided to [attachObserver]. This implementation is not thread safe. In general, using Rx Observables will produce more reliable code. However, when it's necessary to reduce allocations, this Set implementation is a good alternative. We should consider replacing this with an a-c solution or a third-party implementation (a-c #2845). 2280
OkHttpWrapper.kt A holder for the shared OkHttpClient. 575
OnUrlEnteredListener.kt 702
PicassoWrapper.kt A holder for the shared Picasso instance. All calls to Picasso should go through this class. 1360
publicsuffix
ServiceLocator.kt Implementation of the Service Locator pattern. Use this class to provide dependencies without making client code aware of their specific implementations (i.e., make it easier to program to an interface). This also makes it easier to mock out dependencies during testing. See: https://en.wikipedia.org/wiki/Service_locator_pattern ### Dependencies can be defined as follows: #### Lazy, app-wide Singleton: ``` open val pocket by lazy { Pocket() } ``` #### Eager, app-wide singleton: ``` open val pocket = Pocket() ``` #### New value each time: ``` open val pocket: Pocket get() = Pocket() ``` #### Concrete value for interface: ``` open val telemetry: TelemetryInterface by lazy { SentryWrapper() } ``` 4340
SetOnlyLiveData.kt Used in situations where postValue should not be used 484
Settings.kt A simple wrapper for SharedPreferences that makes reading preference a little bit easier. 4693
SupportUtils.java 1799
TurboMode.kt Facade hiding the ceremony needed to setEnabled Turbo Mode. We are trying to keep our setting and the state of the engine synchronized. 1623
URLs.kt Provides URL constants 806
UrlUtils.kt Is the given string a URL or should we perform a search? TODO: This is a super simple and probably stupid implementation. 5519
ViewUtils.java Runnable to show the keyboard for a specific view. 4810