Commit Graph

23 Commits

Author SHA1 Message Date
Fan Zhang
d9057df872 Remove spacer above dashboard tiles.
Bug: 30467152

- UX is better without the spacer.
- It also causes animation issues in recycler view during cold start.

Change-Id: I3aab330ea60bba69962132a54e432943e81ff985
2016-07-28 12:51:44 -07:00
Doris Ling
38d8582abe Combine setCategories() and setSuggestions() in DashboardAdapter.
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
2016-07-15 13:08:56 -07:00
Doris Ling
08d34b6a99 Revert equal check in DashboardAdapter.setCondition().
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
2016-07-13 16:17:13 -07:00
Doris Ling
b76de265a2 Reduce the number of times that dataset changed is triggerd in DashboardAdapter
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
2016-07-12 18:02:22 -07:00
Adrian Roos
1d1ca8e590 Merge "Allow DPMs to restrict Remote Input on Keyguard" into nyc-dev
am: ef505d628a

* commit 'ef505d628ae96f175fca871013da8c24271667dc':
  Allow DPMs to restrict Remote Input on Keyguard

Change-Id: I5746a924564e8eb866b0c0e0a1e0205a38896f89
2016-05-12 20:59:47 +00:00
Adrian Roos
ef505d628a Merge "Allow DPMs to restrict Remote Input on Keyguard" into nyc-dev 2016-05-12 20:52:25 +00:00
Adrian Roos
059b0fa060 Allow DPMs to restrict Remote Input on Keyguard
Change-Id: I84b90b4047129794f1397351f9c8624f0048ad41
Fixes: 26981262
2016-05-12 19:12:17 +00:00
Fan Zhang
50cde75ef7 Update suggestion/support UI to use more negative space.
Bug: 28435214

-- Tweaked layout and padding in suggestions and support tab.
-- Added support to show different text color in SlidingTabLayout.

Change-Id: If5d90ec5360e35565176aae7475e355c27fcef7c
2016-05-12 11:14:59 -07:00
Jason Monk
a41a8d05ab Make sure TileAdapter always has a SuggestionParser
Since it expects to have one

Change-Id: Ic0dccd2271c011cf7dc877e341af5a8bfea90c37
Fixes: 28689801
2016-05-10 13:03:35 -04:00
Jason Monk
2386dfc18d Dashboard performance work
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
2016-05-06 13:17:47 -04:00
Jason Monk
5673ced93c Work on settings startup speed
- Cut down on amount stored in conditions xml
 - Remove extra work from dashboard startup
 - Move summary to min priority

Change-Id: I51ca3828e4446632d6faa60dcfbab3446d19d335
Fixes: 28134360
2016-04-12 15:19:50 -04:00
Jason Monk
c064573265 Fix missing summaries
Handle non-cached tiles by doing lookup from component name.

Change-Id: I979e2df2eed4a065f290c5c0e66276d08b4fb0af
Fixes: 27942733
2016-03-31 13:59:46 -04:00
Jason Monk
45fda2734a Add metrics for suggestions
Bug: 27851236
Change-Id: Ia5aa1d42a40ba09a19db3c3790f0a7342660e613
2016-03-30 16:05:29 -04:00
Jason Monk
f20c718f19 Add metrics for settings conditionals
Bug: 27851236
Change-Id: I400716457d3f628419410a02c2a457d41d19a067
2016-03-30 15:46:26 -04:00
Ido Ofir
3867df4256 mark categories as complete when disabled.
Change-Id: I0a50adf254d28653c8740ad892507db29cd9b0a8
2016-03-03 14:21:22 -08:00
Jason Monk
322cfe8be0 Settings Visuals
Update the layouts to be more final, and support tablets better.

Move about to always be last.

Always see everything.

Change-Id: I4b804c9bfcd4d3b7f978a2617d5c2c2b1cdfa6e4
2016-02-04 14:37:35 -05:00
Jason Monk
4a60c8876e Add DND Suggestion after 30 days
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
2016-01-26 17:29:59 -05:00
Jason Monk
91ca519a0f Support changes to SuggestionParser
Change-Id: I002e10cfe2a058f934d2c6218c88c2588654733f
2016-01-26 13:58:25 -05:00
Jason Monk
d4f03ec86f Add suggestions to settings
Use an XML to define the categories that Settings will look for,
and surface enabled activities under those categories as suggestions.

When clicked on the activity will be started for result.  If the result
is not cancelled, then the operation is assumed successful and the
suggestion is disabled.  Users can also use an overflow -> remove
flow to get rid of unwanted suggestions.

Change-Id: I767abf8efe103af0509bc6b6b55888ae82643512
2016-01-07 16:25:34 -05:00
Jason Monk
fa4813783f Avoid RecyclerView causing items to blink on update
Change-Id: Ic0bd70ec3f2a5e195cc0924c98c589f90e27afe9
2015-12-16 16:43:02 -05:00
Jason Monk
db4ed191de Add conditionals to Settings
Also add Airplane Mode and Hotspot conditionals (more to come soon)

Change-Id: I11f206db59f7c715f416fb5852b8f0fcb857a247
2015-12-14 10:29:12 -05:00
Jason Monk
8c4ca41d25 Make sure the dashboard is up to date
Bug: 25794089
Change-Id: I65eaa8e14b3c998ec122eaa9fc4dbbe3749c568c
2015-11-30 15:43:34 -05:00
Jason Monk
3069581512 Summary support for Settings Home
Also add summaries to a few of the major items.

Change-Id: I17924f14941fe095d819e142cdd21cf4b4e9ffd1
2015-11-17 13:51:45 -05:00