Commit Graph

17 Commits

Author SHA1 Message Date
Fan Zhang
0cb4c86f4a Clean up logic for dismissing suggestion
We no longer bring suggestions back after dismissing, so some logic is
no longer necessary.

Change-Id: I9d931fbbbc79bade191bebf6d057870d088a5fde
Fixes: 64297191
Test: robotests
2017-08-04 11:16:17 -07:00
Fan Zhang
e651ddf9e6 Add shadow to searchbar when user scrolls vertically
Bug: 63528057
Test: robotests

Change-Id: Ib85676d78b43be38aab1eacd0820d0755a601f60
2017-07-20 20:32:09 +00:00
Fan Zhang
1e0b51218b Disable suggestion on low memory devices
Change-Id: I9d22170845661fc8b48b116c9b09f758926c096f
Fix: 63157777
Test: make RunSettingsRoboTests
2017-07-06 16:13:28 -07:00
Daniel Sheng
20d5588a27 Added suggestions for gestures.
Bug: 30986021
Test: manual + make RunSettingsRoboTests + adb shell am instrument -w
com.android.settings.tests.unit /android.support.test.runner.AndroidJUnitRunner

Change-Id: I7aed110c81ca2fb6b90e2f359b4bb941c02bc1c3
2017-07-05 09:05:11 -07:00
Fan Zhang
e199f50d65 Disable SmartSuggestion conditionally
The smart suggestion flag should be treated as false when dismissing
first impression type suggestions. Smart suggestion and first impression
suggestions have different dismiss rules.

Change-Id: Ia99d310ddea7baf58b6eadacee8ccda5bf33f311
Fix: 63094854
Test: robotests
2017-06-28 14:58:29 -07:00
Sean Stout
2bc94d6271 Add Night Light Suggestion and tests
Night Light settings suggestion will only show when the user
has not previously interacted with Night Light.

Bug: 37207263
Test: make ROBOTEST_FILTER=\
"(SettingsSuggestionsTest|SuggestionFeatureProviderImplTest)"\
RunSettingsRoboTests
Change-Id: I432d5fef19f5e4a52503da136b044598cb82164a
2017-06-20 09:22:56 -07:00
Fan Zhang
9011a67431 Add a suggestion: showing new device features
- New suggestion activity
- Removed useless api SuggestionFeatureProvider.isPresent().

- Also updated support activity search indexing icon and summary

Change-Id: Ib52cf26a985f57bf0aac918606b10f75bd024639
Fix: 62034077
Fix: 62196070
Test: make RunSettingsRoboTests
2017-06-03 14:51:09 -07:00
Maurice Lam
7551c80bc8 Pass component name into SuggestionFeatureProvider
So that the provider can be used for more than one suggestion.

Test: Robolectric test for implementation of the provider
Bug: 62039057
Change-Id: Ibea41ea6d98e67c55ec157556675e854f3ea31c4
2017-05-30 13:07:51 -07:00
Fan Zhang
59fd017ce5 Revert "Revert "Filter and display top 3 suggestions for exclusive type""
This reverts commit 184ae963e7.

Change-Id: Iac60fc52a5b0c153945c22b97394546a529d3bb4
2017-05-12 18:12:58 +00:00
Fan Zhang
184ae963e7 Revert "Filter and display top 3 suggestions for exclusive type"
This reverts commit 70b634adcf.

Change-Id: I6de213d4c276696c6ccc9e992ff088cf507aa7ce
2017-05-12 18:03:58 +00:00
Fan Zhang
70b634adcf Filter and display top 3 suggestions for exclusive type
Change-Id: Ief4c2f02fcf1064dac3659502bd7511b09a2a7df
Fix: 37947647
Test: make RunSettingsRoboTests
2017-05-12 08:47:39 -07:00
Fan Zhang
7afbf0f3a2 Add support to show first impression type suggestions
- Add FIRST_IMPRESSION type in suggestion order list.
- Make rule changes for a few suggestions.

Bug: 37947647
Test: manual

Change-Id: I2101f5e0f6424723bacc9f5febf2ffaab9398896
2017-05-09 14:20:43 -07:00
Doris Ling
ae53f97650 Fix null pointer on dismissing suggestion.
Add null check for context when getting the suggestion identifier, since
this is called from async task and context might becomes null.

Change-Id: If17036803de1634891b659a4fc6bd4b8a76ef5fb
Fix: 36605386
Test: make RunSettingsRoboTests
2017-03-28 17:53:52 +00:00
Fan Zhang
8c8c4077fe Fix a monkey crash when it dismisses suggestion.
Change-Id: I300a49ed75381795b6532388f770847ed39a4c8c
Fix: 36509330
Test: make RunSettingsRoboTests
2017-03-22 10:04:39 -07:00
Fan Zhang
264c0c2bbe Fix NPE when building suggestion identifier.
And refactored the getIdent logic into feature provider.

Change-Id: Id6f66a6942cbaf6d26ae4dca62037a6cf01179a5
Fix: 36314240
Test: make RunSettingsRoboTests
2017-03-16 17:12:22 -07:00
Fan Zhang
a5b620e738 Swipe to dismiss suggestions
- Move dismiss suggestion logic into feature provider
- In DashboardData, use hashcode as suggestion's stable id. This is much
  more likely to provide a truely stable id for each suggestion card.
  Eventually I want to use hash for all tiles to provide stable id.
- Add a SuggestionDismissionController to handle swipe to dismiss
  callbacks

Change-Id: If3770f07a90c5469a0b86fc28f3eb5e4c17227cd
Fix: 35159816
Test: make RunSettingsRoboTests
2017-03-13 14:39:00 -07:00
Soroosh Mariooryad
5f375a2776 Move suggestions package to dashboard.suggestions
Test: RunSettingsRoboTests

Change-Id: I4f9af27767c8e55d3b1a16e77c099da52d40aab5
2017-02-24 11:04:41 -08:00