We only ever display a single DashboardCategory in homepaeg, so the
category doesn't need to be a list in DashboardData/Adapter
Change-Id: I57db02bb45cbc511f0fce1bf33043b51ef9db15c
Fix: 33861822
Test: updated robotests
Change to always use the new UI that combines the suggestion and conditions,
and remove all codes relating to the old UI.
Bug: 37645754
Bug: 62621808
Test: make RunSettingsRoboTests
Change-Id: I3421a9e5182f6606843392d6fae8b9f07c5f2e46
In the new suggestion UI, the suggestions are listed inside the
suggestion container instead of individual dashboard items. When there
is only a single suggestion shown, and that is being swiped away, the
actual list for the suggestions will handle the swipe and remove that
list item from the list. However, the top level container will remain
until next time the dashboard list is being refreshed. Explicitly set
the suggestions to null to force refreshing of the dashboard UI.
Change-Id: I37f8c8f5a813a5c56f4f2f46103fdbb66ce97fcd
Fix: 62639824
Test: make RunSettingsRoboTests
- 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
- Add a flag in dashboard feature provider to specify whether to use the
combined UI for suggestions and conditions.
- Move Conditions below Suggestions.
- Add dashboard entity for condition and suggestion container, and
wrap the condition and suggestion list inside the container. The
container itself will be a single dashboard item, and within it will
be the list of suggestion or condition.
- Add suggestion/condition header that will show the combined info for
the conditions and suggestion data, and have the expand button to
control expanding both the suggestion and condition list.
- Change the individual condition card to be always expanded, and
remove the logic to collapse/expand individual condition card.
- Remove the divider between the action button and condition detail
within each condition card.
- Add suggestion/condition footer for collapsing the whole suggestion and
condition list.
Bug: 37645754
Test: make RunSettingsRoboTests
Change-Id: I86df75f7e4551778f79d730851c03121fd0dcbdf
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
1. Update the dnd receiver to listen when dashboard summary running.
- remove the dnd receiver from Android manifest, and create it inside
the dnd condition.
- add lifecycle implementation to condition manager, so that the dnd
condition can know when to register and unregister the receiver.
- remove getReceiverClass() from dnd condition so that its receiver will
not be disabled by the default condition handling when condition is
silenced.
2. Remove all other conditions receiver from Android manifest.
- the broadcast receivers for HotspotCondition, AirplaneModeCondition,
CellularDataCondition from the manifest and create them inside the
condition classes.
- update Condition.onSilenceChanged() to register/unregister the
receivers instead of enable/disable the receiver class.
Change-Id: Iea6288382680df2b02884d1934b8db85daae404c
Fix: 35968517
Test: make RunSettingsRoboTests
- Add fallback logic in WallpaperSuggestionActivity
- Move some classes around
- Delete some unused class
Change-Id: Ifc8864428647a94f3ecae50d193c2156b2592ff3
Fix: 36140287
Test: make RunSettingsRoboTests
And refactored the getIdent logic into feature provider.
Change-Id: Id6f66a6942cbaf6d26ae4dca62037a6cf01179a5
Fix: 36314240
Test: make RunSettingsRoboTests
- 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
- remove DashboardFeatureProvider.isEnabled() and all relating code
and tests.
Bug: 35764802
Test: make RunSettingsRoboTests
Change-Id: If7796677abc8904b7436525836d50cdef38e37a4
- 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
Previously if there was three suggestions in the suggestions view, all
three would be logged as shown, although by default only two of them are
shown and the third one is shown only if the view is expanded. Now, only
the actual shown items will be logged.
Test: RunSettingsRoboTests
Fixes: b/35348496
Change-Id: Ic3af7961b4713f48e63c51ac599cb55bf69975ff
- 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
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
The issue happens mainly because two animations(move + change) running
on the same view interrupt with each other. When ItemAnimator runs the
move animation, it will change the translationX&Y in a time period.
When the change animation occurs in this period, it gets this translation
value and calculates a non-zero deta, then it would run an unnecessary
move animation, which causes the strange reshuffling.
In this cl, I skip the translation value only for the tile view when
there is pending animation.
I also add scroll operation for conditions view to make it scroll to
top after condition change.
Bug: 33839777
Bug: 33839780
Test: make -j40 RunSettingsRoboTests
Change-Id: I2152f93f756ae20cf754d6fca3525119cb4ceb1f
- Programatically create SearchView to make it always expand across
entire action bar.
- Store current query text during screen rotation
- Restart loader when query text changes
Bug: 33354491
Test: RunSettingsRoboTests
Change-Id: I63838a38514569aac60c5d67ac52ac06a7acd5a3
This allows app fragment use a less heavyweight fragment as super class
if they don't need PreferenceFragment. Using this class as base is
generally easier to set up robolectric tests too.
Bug: 33354536
Test: RunSettingsRoboTests
Change-Id: I91c4d242ea0333c76c8767c03c3f18dee6b6e104
Sometimes the airplane mode banner will show up even
though airplane mode is not on. Logging has been added
to several areas around this condition in addition to
where the actual view is created. This will be used
to try and get a better handle on what the source of
the bug is.
Test: manual
Bug: 30860132
Change-Id: I7213aa7e187c5a8c0e94a5ce7a3269e6667cd61b
When there is no offset change for identical holder in
animateChange, simply return and don't invoke the
resetAnimation.
Bug: 33198024
Test: make RunSettingsRoboTests
Change-Id: Ib83363873bc5f51e5bd71af5a013ee0756728d1a
- Make a SummaryConsumer interface. Things that needs latest summary
should implement this interface (DashboardAdapter for homepage,
DashboardFragment for subsettings). This also decouples SummaryLoader
from relying on SettingsDrawerActivity.
- Make DashboardFeatureProvider more generic to load DashboardCategory
by key.
Bug: 31781480
Test: RunSettingsRoboTests
Change-Id: I9c65456fb433a74c352498251e0ccf65da0be1f0
Adding support to homepage category.
Test: SettingsRoboTests for regression. Will write tests for new feature
soon once we are set on the data structure.
Bug: 31781480
Change-Id: I25fa367fecb643f17e23f0182df7585bf1fcdd02
If loading suggestions takes too long (750ms)
settings will display just the categories
so the user does not get confused.
Test: Forthcoming
Bug: 31203004
Change-Id: Ic9866a5ccdcef965908db8c4592435a5d252f7b0
Bug: 31664539
Test: make RunSettingsRoboTests
This allows different metric clients to listen to these events.
Change-Id: Ib19c8099b16ff78d9aa4901278e0ff33eeefd4a8
In onSaveInstanceState(), move saving the suggestions logging lists to
the top so that it will be saved to the bundle even when layout manager
is null.
Test: run monkey
Change-Id: I248563a255158feadeb85898a920af96a1565fa9
Fixes:31111795
An async task was trying to get the context
in an InstrumentedFragment. This could return
null if the context disappears before the new
thread gets to that line. Logging will now
be aborted if context is null to avoid this.
Test: Manual/Monkey Stability Test
Bug: 31058928
Change-Id: Iae97d389e58a76b0f213a2749415501894ebf649
(cherry picked from commit 566b66e27c)
An async task was trying to get the context
in an InstrumentedFragment. This could return
null if the context disappears before the new
thread gets to that line. Logging will now
be aborted if context is null to avoid this.
Bug: 31058928
Change-Id: Iae97d389e58a76b0f213a2749415501894ebf649