Skip to content
Commit 5f5321d8 authored by Evan Laird's avatar Evan Laird
Browse files

Set up demo mode repository for mobile icons

This CL is the sketch of how we can achieve demo mode using the modern
architecture that makes up the new data pipelines. The basic idea is to
put a `RepositorySwitcher` in between the real repository impl and the
demo mode repository.

RealRepository
              │
              ├──►RepositorySwitcher──►RealInteractor──►RealViewModel
              │
DemoRepository

In this case, we have a `IRepository` interface which both the demo and
fake repositories implement, and the switcher decides which
implementation to connect to the (real) downstream classes based on
whether or not demo mode is active.

Note that this CL does not hook up the demo mode repository properly,
since the old data pipeline uses a demo icon group layered on top of the
real one to achieve fake icons. That makes things kind of a mess and so
will be implemented in its own CL

Test: DemoMobileConnectionParameterizedTest
Test: DemoMobileConnectionsRepositoryTest
Test: MobileRepositorySwitcherTest
Bug: 249790009
Change-Id: I9ad6bab6dd0ab6eadf43232e3bea0f4fa3116a17
parent d6def5a6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment