Commit Graph

18 Commits

Author SHA1 Message Date
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
James Lemieux
22a39c2b93 Use external/robolectric-shadows/run_robotests.mk
This allows Settings to test against the latest framework changes.

Also replaced TestConfig with traditional robolectric.properties.

Bug: 73173204
Bug: 73892008
Test: make -j56 RunSettingsRoboTests
Change-Id: I3135b4fa5f095ba79b282a76f45dd9baa2584bc7
2018-03-04 03:50:08 -08:00
Ben Lin
845e213514 Set categories to the adapter if suggestion is not available.
If there's no suggestion, we should set the category to the adapter
before returning.

Bug: none
Test: robotests
Change-Id: I73bb248d17edb3c398a9fb0a8f3913e7233fcc0b
2018-02-05 16:20:56 -08:00
Doris Ling
a5d0c3e36e Remove suggestion UI v1 codes.
- remove the check for feature flag for suggestion UI v2 and switch to
use the v2 codes.
- remove all code related to v1 of suggestion UI

Fixes: 70573674
Test: make RunSettingsRoboTests

Change-Id: I99ab318c1c0192508a9c5e9e708e86319120d55b
2018-01-31 10:59:40 -08:00
Fan Zhang
0ec6b02fe4 Re-add isSuggestionEnabled check
It was accidentally removed previously

Test: robotest
Change-Id: I5b7707e746d6b825d835a007727b29c9a81a7fc1
2018-01-30 15:41:33 -08:00
Fan Zhang
1e27d2b28e Remove Suggestion v1 code.
Change-Id: Ie6e9c8f2b1b5b609d44e287accb9fbbef9054d34
Fixes: 68719093
Test: robotests
2018-01-02 14:48:56 -08:00
jeffreyhuang
cbfb099a40 Rename SDK_VERSION_O to SDK_VERSION
Test: make RunSettingsRoboTests -j40
Change-Id: I6715062d8addadda441e32809db1af55f15e3a90
2017-12-05 16:43:54 -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
Doris Ling
5b01294d84 Fix jank in showing conditions and suggestions in cold start.
When we first initialize the dashboard view, and register the condition
listener, it will trigger the condition changed callback immediately.
This results in unnecessary refresh of the dashboard header. Add check
to not do the refresh when we first initialize the view.

Change-Id: If7c69637463734c150b7f5eb7f3c042cf73837fa
Fixes: 64811475
Test: make RunSettingsRoboTests
2017-08-24 13:53:30 -07:00
Doris Ling
4940539479 Limit the suggestions to be shown to 5.
- when creating the dashboard data, pass the sublist of suggestions to
cap the total number of suggestions to be shown to 5.
- if user swipe away the suggestion, it will only remove the suggestion
from the suggestion adapater, and will not trigger rebuilding the whole
UI.

Bug: 64072051
Change-Id: I1efabeb2a805c670007c631d3ccb0fdfbde7b55a
Fix: 63309218
Test: make RunSettingsRoboTests
2017-07-27 10:45:30 -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
Maurice Lam
cbf797e65c Rebuild suggestions when suggestions are dismissed
When suggestions are swiped away, refresh the suggestion categories
so that suggestions previously suppressed because it's lower priority
or because there is an exclusive suggestion now has a chance to be
shown.

Test: cd tests/robotests && mma
Bug: 36811621
Change-Id: I1a1ae1624c2f69153d95d238b2143ac9273e117d
2017-03-31 17:13:39 -07:00
Doris Ling
f2cf2aea37 Remove code that check for dashboard feature.
- remove DashboardFeatureProvider.isEnabled() and all relating code
and tests.

Bug: 35764802
Test: make RunSettingsRoboTests
Change-Id: If7796677abc8904b7436525836d50cdef38e37a4
2017-03-07 11:15:03 -08:00
Soroosh Mariooryad
9ca41dd89a Moving load of suggestions from onViewCreated to onCategoriesChanged.
- This is required when a suggestion is completed and it needs to be
removed from the list immediately.

Test: RunSettingsRoboTests
Fixes: b/35657186

Change-Id: I731bd1d4ef4a23a74cb4022513d0824ff5f74b2a
2017-02-27 10:30:55 -08:00
Fan Zhang
efba6b4e14 Skip redundant SuggestionLoader run during app start.
also skip DiffUtil when drawing first frame.


Fix: 34103984
Test: make RunSettingsRoboTests
Change-Id: I4891d1bca1f17c437444761eaf3002624934014d
2017-02-15 02:06:08 +00:00
jackqdyulei
0bb598c4d0 Fix the animation issue in DashboardSummary
1. When condition is inserted, only scroll to top when previous
position is at the top.

2. Clean condition status after it is removed. So the next time
you insert a condition view, it will always be collapsed.

Bug: 33839780
Bug: 34115341
Test: make -j40 RunSettingsRoboTests
Change-Id: I7f48524917c3119ec24b2f67ba506f381573a391
2017-01-09 12:30:57 -08:00
Fan Zhang
e8a77c551e Do not load old category when IA is enabled.
Bug: 34026031
Test: RunSettingsRoboTests
Change-Id: Ie4ede018c8e3e906093cba4b9d4bf9d75c0bd972
2017-01-05 17:20:59 -08:00