When the dashboard summary is being initialized, it will rebuild the UI
while the summary loader tries to to go through the tiles to update the
summary. Both is being done on a separate backgroud thread, and it will
run into concurrent modification issue if the thread is being swapped
while one is looping through the list.
Instead of letting clients access the list of tiles directly, add a
getter method in DashboardCategory to get a copy of the list of tiles
for all read-only operations.
Change-Id: I479669abd8d1d0a8ee9a4113d8ad2244da56f4d8
Fixes: 69677575
Test: make RunSettingsRoboTests
- if tile order is set in the metadata, it will be used as preference
order instead of the intent priority specified.
Change-Id: If1a09219ece7bb71fc476aad60dc66d7653dfd28
Fixes: 65172575
Test: make RunSettingsRoboTests
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
Once dashboard tile is displayed, the underlying intent can be disabled.
We will eventually hide the item from UI, but there can be a brief
moment before we are able to hide it. So to prevent user click and
launch a non-exist intent, we will try to resolve it first before
launching anything.
Change-Id: Ic8d790bf3c5d4d269eadb757f789a1641928a7b7
Fix: 36036097
Test: make RunSettingsRoboTests
- Create a summary placeholder for preferences with summary.
- Create a totally empty summary for prefernces without summary.
- For all dynamic prefs that has *no* SummaryLoader, add meta to set
their summary to empty.
- Other dynamic perfs has as initial summary.
By doing this, all dynamic pref's height is fixed and will not change as
we update summaries, thus eliminating jank during cold start in each
page.
Also removed DashboardAlias for notification preference and default apps as a side fix.
Change-Id: Iec98b7ffef4e920bf573b2244ad04124c1c5d154
Fix: 36414481
Test: make RunSettingsRoboTests
- remove DashboardFeatureProvider.isEnabled() and all relating code
and tests.
Bug: 35764802
Test: make RunSettingsRoboTests
Change-Id: If7796677abc8904b7436525836d50cdef38e37a4
This is needed to use logging from DashboardFragemnt.
This page is now a mixture of PrefernceController and non-controller
preferences.
Also permanently removed system update preference from xml to simplify
migration
Todo: convert the rest of preference into controller.
Bug: 34774945
Test: make RunSettingsRoboTests
Change-Id: Ie5130ea7377db2ccf2236cdf48e5cc26d1347d7a
- Add a method in VisibilityLoggerMixin to log visible event using
LogMaker, which allows logging additional FIELD_CONTEXT field.
- In Utils.startFragment, add current page's metricsCategory as an extra
to next page.
- In next page's onResume(), extract the previous page's metricsCategory
and send it to VisibilityLoggerMixin.visible()
- Update all caller with additional paramters
Change-Id: I8e1f2597fa465b7d3aa16fa1d21c052a3219694a
Fix: 35359289
Test: RunSettingsRoboTests
- Log when navigating from Settings to injected tiles.
- Log when user creates a new widget shortcut
Fix: 33209678
Fix: 30137094
Test: RunSettingsRoboTests
Change-Id: I1e0f4e00709c392cde2550fafe53890836387c99
Use DashboardFeatureProvider to open tile instead. This makes logic more
centralized in one place, and makes logging easier in the future.
Bug: 30137094
Test: RunSettingsRoboTests
Change-Id: I8a028bb7cac8f70f6c237f253be8668cc3ef257e
In constructor, use app context instead of fragment context
Change-Id: I24fbc457037c1d6854ecf0cb270110d73effb662
Fix: 35292764
Test: RunSettingsRoboTests
SearchFeatureProvider was holding on to a context and
outlived the SettingsActivity, thus leaking the activity.
The context was passed into most methods, and thus it
makes more sense to pass it in to every method.
Bug: 33677967
Test: Run MakeSettingsRoboTests
Change-Id: Ia82f30e7e0b83587b4baeef28e81da6b8e4303fe
Add a new method to get the extra intent-filter action to be used
to query the dynamic dashboard tiles.
Bug: 32739952
Test: make RunSettingsRoboTests
Change-Id: I96d9d8bd32ebe34b7c0df00c3fb4d8900b476c94
If intent action is provided in the metadata for the dynamic tiles, it
will be added to the launching intent when user selects the tile.
Fixes: 31801423
Test: make RunSettingsRoboTests
Change-Id: Ic3e583a578660f4d9c40feff1418e5e354ab8f60
Bug: 31002801
Test: make RunSettingsRoboTests
Reads in optional metadata field for specifying the key used for an
injected preference.
Change-Id: Ief2ff10c508d42f91906b531cf34906c1c42fdd4
Ideally a page should use DashboardFragment and it doesn't need to
handle adding dynamic tiles manually. This method is only designed for
page that are not fully migrated to DashboardFragment yet.
Bug: 32623105
Test: RunSettingsRoboTests
Change-Id: I0cafcddf9a43b164daea500bade869fada5b3f4e
Insteads of inserting tile onto screen using absolute priority values,
now each page can have a placeholder preference, and at run time we will
add dynamic dashboard tiles to placeholder's place.
Bug: 32827787
Test: RunSettingsRoboTests
Change-Id: I1fe9e11dce4eb6fb4a9b56af05a2b8e5cdae00d2