- 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
- 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
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