DashboardCategory is no longer rendered in the dashboard ui
Bug: 33861822
Test: make RunSettingsRoboTests existing tests still pass
Change-Id: I0479967b0099f76f8c0c7894643d50b655de2892
- 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
Replaces the default Toolbar in SettingsActivity with one that looks
like a search bar. It uses a Toolbar inside a CardView with some custom
styling.
Since the search bar is a floating element, the new toolbar lives in the
content frame of the dashboard. A FrameLayout is used to provide the
layering that is desired.
Since the search bar is on top, an additional spacer view is added to
the list of items in the dashboard. Its color changes based on what
the first view is so that it always matches.
Adds android-support-v7-cardview as a dependency (and reorders the
other deps to be in alphabetical order).
Remaining work (in future CLs):
- remove search menu option?
- clean up initial window
- remove the line between the header and the first condition
when there's a condition
Bug: 37477506
Test: make RunSettingsRoboTests
Change-Id: Id7477b90fbaf30eb5cac1ee244c847bddb95b3fd
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
Remove all the views before adding the remote views again, so the
card will not have multiple custom views on top of each other.
Test: cd tests/robotests && mma
Change-Id: Id41bfb962c08e8d1ee6534e0cf44d173a1f1910f
If a suggeested action Tile has a remote view defined, inflate a card
layout to contain the remote view, instead of showing the default
title-summary layout.
Additionally, if the remote view has a view with ID
@android:id/primary, that will be used as the click target rather
than the entire card.
Test: cd tests/robotests && mma
Bug: 35668836
Change-Id: I0fd1b9c637b6d7a3d7d2f6268669917408a882eb
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
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
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
Set the icon tint color to colorControlNormal for components not in
settings package.
Change-Id: I6b822b355eb706693a0af4e5832407064cd2b2c2
Fix: 34192209
Test: Visual
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
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
Since the method parameter tile and tile in adpater is the same
instance, it is useless to check whether summary has changed.
Test: Run SettingsRoboTests
The function used in notifySummaryChanged already has testcases
in DashboardDataTest
Change-Id: I8c8969fcd2c89f368ca507808910fc7a9852f192
The position(used to find the tile) is not up-to-date when recyclerview
changes, so store tile instead.
Bug: 32370624
Test: make -j40 SettingsTests
Change-Id: I10d29b3137ecb1c37b6a8468c6f2709b8497caa6
In the previous version, when there is a minor change in data, we
will refresh the whole screen(and data) by invoking "recountItems"
and "notifyDataSetChanged", which did lots of unnecessary works.
In this new cl, I elicit ItemsData class, which encapsulates the list
data used in adapter. When data changed, I build another ItemsData and
use the DiffUtil.Callback to calculate diffs between ItemsDatas. In
this way we can only refresh the items that changed in adapter.
Since I cannot find usage of see_all.xml anymore, I delete the relevant
code as well as the resource files.
Bug: 30319913
Test: make RunSettingsRoboTests
Change-Id: I4f753a26f624affea6c6c35d49cfb9c43fb74fe6
- 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
Bug: 31664539
Test: make RunSettingsRoboTests
This allows different metric clients to listen to these events.
Change-Id: Ib19c8099b16ff78d9aa4901278e0ff33eeefd4a8
Bug: 30490325
SummaryLoader needs DashboardCategory to update summary and it currently
ask for it from DashboardAdapter. But DashboardCategory is not always
available in DashboardAdapter. When SummaryLoader wants to get category
from adapter before adapter is ready, it won't have it, causing summary
to appear blank sometimes.
The fix is to get category from data source directly.
Change-Id: I9d7f676954d1cece42d6e03748ab7aa35357f8b7
Bug: 30467152
- UX is better without the spacer.
- It also causes animation issues in recycler view during cold start.
Change-Id: I3aab330ea60bba69962132a54e432943e81ff985
In DashboardSummary.rebuildUI(), we first update the adapter with the
current categories, then run the async task to update the adapter with
the suggestions. This causes the adapter to first layout the existing
categories, and relayout when the suggestions is available. This causes
the suggestions view and categories view to overlap before the
relayout is complete.
Since categories and suggestions are borh set each time we try to
rebuild the UI, delaying the update for categories until the suggestions
are ready will avoid the unnecessary relayout of the list elements.
Ran app launch test for Settings app with the change and launch time is
between 412ms and 486ms in 10 runs, which does not show much delay in
app launch time with delaying updating the categories.
Bug: 29318104
Change-Id: I03ae2386392315f28fe2c361682f2f3252e9f827
1. Remove the equality check for the conditions list which causes
"Airplane mode is on" to be shown always even when airplane mode is
turned off.
2. Also add mIsShowingAll and mSuggestionMode to instance state.
Bug: 30055644
Change-Id: I0709e9a1b0139e80cdb834cb76a9334dce753e14
1. Save the suggestion list and the category list into the instance
state so that it will be available on warm start, and avoid the need
to reload the data.
2. Add the condition list to the constructor parameters for
DashboardAdapter, so that it does not need to setConditions()
separately which will trigger notifyDataSetChanged()
Bug: 30055644
Change-Id: Ia04fa3a25b13d2dacf6baf5f412d662a595fb6dd
Bug: 28435214
-- Tweaked layout and padding in suggestions and support tab.
-- Added support to show different text color in SlidingTabLayout.
Change-Id: If5d90ec5360e35565176aae7475e355c27fcef7c
Push more stuff to backround threads (this will cause conditions/suggestions
to load slightly slower than normal content) and cache more info.
Fixes: 28613950
Bug: 28435146
Change-Id: I1080930e8f31c7f12a2d89f266bfd3236979cf40
- Cut down on amount stored in conditions xml
- Remove extra work from dashboard startup
- Move summary to min priority
Change-Id: I51ca3828e4446632d6faa60dcfbab3446d19d335
Fixes: 28134360
Update the layouts to be more final, and support tablets better.
Move about to always be last.
Always see everything.
Change-Id: I4b804c9bfcd4d3b7f978a2617d5c2c2b1cdfa6e4
Suggest users setup automatic rules if they haven't after 30 days
Also fix the id labeling for the RV adapter, so that it can handle
removing of suggestions properly.
Change-Id: I0cce76f3db1d444011f7d8a31348714d102650cf