Skip to content

feat(aws-datastore): Make the reachability component configurable #2307

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 8, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -755,8 +755,7 @@ Builder storageAdapter(LocalStorageAdapter storageAdapter) {
* @param reachabilityMonitor An instance that implements LocalStorageAdapter.
* @return Current builder instance, for fluent construction of plugin.
*/
@VisibleForTesting
Builder reachabilityMonitor(ReachabilityMonitor reachabilityMonitor) {
public Builder reachabilityMonitor(ReachabilityMonitor reachabilityMonitor) {
this.reachabilityMonitor = reachabilityMonitor;
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import java.util.concurrent.TimeUnit
* The network changes are debounced with a 250 ms delay to allow some time for one network to connect after another
* network has disconnected (for example, wifi is lost, then cellular connects) to reduce thrashing.
*/
internal interface ReachabilityMonitor {
public interface ReachabilityMonitor {
fun configure(context: Context)
@VisibleForTesting
fun configure(context: Context, connectivityProvider: ConnectivityProvider)
Expand Down Expand Up @@ -99,7 +99,7 @@ private class ReachabilityMonitorImpl constructor(val schedulerProvider: Schedul
* is a concrete class created within context.getSystemService() it can't be overridden with a test
* implementation, so this interface works around that issue.
*/
internal interface ConnectivityProvider {
public interface ConnectivityProvider {
val hasActiveNetwork: Boolean
fun registerDefaultNetworkCallback(context: Context, callback: NetworkCallback)
}
Expand Down