Commit Graph

6 Commits

Author SHA1 Message Date
Fan Zhang
dff6dd687e Move away from deprecated FakeFeatureFactory.setupForTest()
Test: rerun
Change-Id: I896ba414315ddb1664c0499264f4992f0554ef98
2017-12-05 10:12:10 -08:00
jeffreyhuang
e4a2f95cbd Move dashboard test package to sdk 26
Test: make RunSettingsRoboTests -j40
Change-Id: Icae52730bb12abcabb42d7e0a905c2b9108c3e28
2017-11-27 17:00:56 -08:00
Fan Zhang
f0b027f4ce Improve settings cold start latency.
- Move view initialization from onViewCreated to onCreateView. This
  doesn't really improve anything, it simply aligns the code more
  with view's lifecycle management.
- Move dashboard category init into background. The init contains logic
  invoking packageManager, which can be very expensive.
  - Remove any call to DashboardFeatureProvider from SummaryLoader, and
    delay the getCategory call until someone calls setListener().
  - call updateCategory() from background thread.

Test: rerun app launch test. Avg latency drops back to pre-suggestion-v2
      level.
Test: robotest
Fixes: 68761512

Change-Id: I5ec85af08e7b610786e439bda93b3651f5975593
2017-11-01 17:24:53 -07:00
Fan Zhang
aeb94f0e5c Fix race condition and optimize categoryUpdater refresh
- In SettingsActivity, do not call updateCategories() if nothing
  changed.
- In SummaryLoader, create a mapping between tile key and summary. This
  is necessary to handle a race condition where category is refreshed
  after summary load.
- In DashboardSummary, refresh Tile's summary to latest cache value
  everytime category is refreshed.

Change-Id: I61389b8ba614ba7e34939325bada6e1bd6fa6709
Fix: 63149109
Test: robotests
2017-07-06 10:13:58 -07:00
Andrew Sapperstein
9f1e911759 Refactor test runner to use static list of resource paths
Previously everything lived in an inner class method of
SettingsRobolectricTestRunner. That method has now been turned into
a static method so that it can be called by other runners.

Bug: 62460102
Test: robotests
Change-Id: I6612b1f26404587301c534c8ba60e39d59d6c840
2017-06-09 09:21:26 -07:00
jackqdyulei
882d48fd46 Invoke notifySummaryChanged callback only when text changed.
Bug: 32905374
Test: make -j40 RunSettingsRoboTests
Change-Id: I709329d3024656080723383231a884f3cf8a9a43
2016-11-16 17:34:09 -08:00