History log of /packages/apps/Settings/src/com/android/settings/dashboard/SummaryLoader.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
aeb94f0e5cd22a0e7b4ef1e3fe486375ea5b8c0c 05-Jul-2017 Fan Zhang <zhfan@google.com> 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
/packages/apps/Settings/src/com/android/settings/dashboard/SummaryLoader.java
f2cf2aea3777ef5298bb1131890552f5f619dd30 04-Mar-2017 Doris Ling <dling@google.com> Remove code that check for dashboard feature.

- remove DashboardFeatureProvider.isEnabled() and all relating code
and tests.

Bug: 35764802
Test: make RunSettingsRoboTests
Change-Id: If7796677abc8904b7436525836d50cdef38e37a4
/packages/apps/Settings/src/com/android/settings/dashboard/SummaryLoader.java
882d48fd46240047626ce8752280c3fad5602ec8 15-Nov-2016 jackqdyulei <jackqdyulei@google.com> Invoke notifySummaryChanged callback only when text changed.

Bug: 32905374
Test: make -j40 RunSettingsRoboTests
Change-Id: I709329d3024656080723383231a884f3cf8a9a43
/packages/apps/Settings/src/com/android/settings/dashboard/SummaryLoader.java
66b573ad5ac6782b0e65b3dd98037eae01b527e5 07-Oct-2016 Fan Zhang <zhfan@google.com> Add display settings dashboard to new IA.

- Added a activity-alias pointing to displaySettings as top level
setting item.
- Refactored all preference logic in DisplaySettings into
PreferenceControllers. During fragment onAttach it installs all
controllers, and during onResume it updates preference state. Each
controller listens to its own preference change event.

Bug: 31800242
Test: RunSettingsRoboTests
Change-Id: Ibc9bf200c5acce7c4ae9292340822afee27a3a28
/packages/apps/Settings/src/com/android/settings/dashboard/SummaryLoader.java
fabbfb435e4de239b31a5cd76f9e72d3b53ab8cf 07-Oct-2016 Fan Zhang <zhfan@google.com> Refactor SummaryLoader to set summary on subsetting pages.

- 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
/packages/apps/Settings/src/com/android/settings/dashboard/SummaryLoader.java
36924659f5ba108cdea323d15a4fbe97a9cca2e2 07-Oct-2016 Fan Zhang <zhfan@google.com> Refactor DashboardFragment.

Merged refreshAllPreferences into DashboardFragment. This hopefully
makes it more modular to manage preference display logic in each
dashboardFragment, and makes it more efficient to monitor category
changes.

Now subclasses needs to implement 2 methods:
- displayResourceTiles(): for 'static' preferences from xml
- getDashboardTiles(): returns a list of dashboard tiles and superclass
will wire it up to preference screen.

If getDashboardTiles() return null (aka no dashboardCategory available),
the fragment will not attempt to monitor category change. The edge case
is that if a package starts to provide a tile for this category, we will
not be notified. I have not seen this case coming up. If we indeed need
to handle this case, the category listener needs to have a way to
monitor specific category rather than globally.

Bug: 31781480
Test: make RunSettingsRoboTests -j40
Change-Id: Ia9f9541b95816214df0d0bb27e3e41078c36c5ca
/packages/apps/Settings/src/com/android/settings/dashboard/SummaryLoader.java
a96a2d8d60b56525875ce710a085c9360b93bcde 28-Sep-2016 Fan Zhang <zhfan@google.com> Use DashboardFeatureProvider to load homepage tiles.

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
/packages/apps/Settings/src/com/android/settings/dashboard/SummaryLoader.java
011362d9f15a3acb96b59e833059825a232db133 03-Aug-2016 Fan Zhang <zhfan@google.com> Update summary correctly in Settings dashboard.

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
/packages/apps/Settings/src/com/android/settings/dashboard/SummaryLoader.java
a8a029f8eb8ca51a19ce20206ce307761cfd86ba 03-May-2016 Jason Monk <jmonk@google.com> Try to fix receiver crash

Change-Id: I98fcde7f4595d0bf90bf2a2b8ba96cb96519a008
Fixes: 28554650
/packages/apps/Settings/src/com/android/settings/dashboard/SummaryLoader.java
8d8de1490536468bbc1061abca0f78ab0b682b3b 28-Apr-2016 Jason Monk <jmonk@google.com> Fix summary lifecycle

Once more and probably not for all

Don't let multiple listening state changes get queued, this can cause
rapid changes like listening->not listening->listening. Also store
listening state on the worker thread now that we drop some state
messages and only notify summaries when there is a state change.

Change-Id: I93a5f364e9b35929f9088e044ebefd9be69740e6
Fixes: 28319383
/packages/apps/Settings/src/com/android/settings/dashboard/SummaryLoader.java
8b986f5f7345d2f012792634950669759b9be0dd 22-Apr-2016 Jason Monk <jmonk@google.com> Attempt to fix receiver registering problems

When in doubt, post to main thread.

Also clean up the listening state just in case there were any
doubts about it.

Change-Id: I9ab85781f38b0f694dc46ed5a953506ef10c5778
Fixes: 28319383 (Fingers crossed)
/packages/apps/Settings/src/com/android/settings/dashboard/SummaryLoader.java
0842797a25af0383b25b039f8d5436d861134157 21-Apr-2016 Jason Monk <jmonk@google.com> Fix summary loader lifecycle

Previous CL accidentally cleared the listening bit too early making
it never actually tell the SummaryProviders to stop listening.

Change-Id: I6af1acc861f6987b33641c40637354c75cf4d708
Fixes: 28306872
/packages/apps/Settings/src/com/android/settings/dashboard/SummaryLoader.java
8ab081e304b978602823b5f7fa81a673e98b4bb2 18-Apr-2016 Jason Monk <jmonk@google.com> Potential fix for receiver leak problem

The background thread is not stopping listening fast enough and is
resulting in first a receiver leak message followed by a crash when
trying to finally unregister the receiver.

Fix this by adding a registerReceiver to SummaryLoader that will
automatically unregister the receiver on the main thread to ensure
it happens in time.

Change-Id: I0104e929d5505eb53993f6765e4c90120df35cf6
Fixes: 28211606
/packages/apps/Settings/src/com/android/settings/dashboard/SummaryLoader.java
5673ced93cda4a48872c1452122ee278da3aa17a 12-Apr-2016 Jason Monk <jmonk@google.com> 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
/packages/apps/Settings/src/com/android/settings/dashboard/SummaryLoader.java
c06457326509ec625d90b26828d6cc1417f4d9a3 31-Mar-2016 Jason Monk <jmonk@google.com> Fix missing summaries

Handle non-cached tiles by doing lookup from component name.

Change-Id: I979e2df2eed4a065f290c5c0e66276d08b4fb0af
Fixes: 27942733
/packages/apps/Settings/src/com/android/settings/dashboard/SummaryLoader.java
9425839379d862604d4b5a7b9161540f598f64f6 08-Mar-2016 Jason Monk <jmonk@google.com> Fix SummaryLoader lifecycle second and for all

Mostly hypothetical fix for weird circumstance where listening
lifecycle gets broken. To fix this, track the current state
of listening in the SummaryLoader and force it into the non-listening
state when released.

Bug: 26027137
Bug: 26731143
Change-Id: I7299749230924eafa3e6e7d5b0de6e48ff014a38
/packages/apps/Settings/src/com/android/settings/dashboard/SummaryLoader.java
816959889ef41012c86fd76bfc173b75d7150158 02-Mar-2016 Jason Monk <jmonk@google.com> SummaryLoader: Make sure all messages are proccessed on release

Otherwise the receivers don't get unregistered, which causes a warning,
immediately followed by them actually getting unregistered, which
causes a crash.

Bug: 26027137
Change-Id: Ib55edb4490de960d10036c35d98b8a8e31e13ae1
/packages/apps/Settings/src/com/android/settings/dashboard/SummaryLoader.java
d4f03ec86f9e8b7b108fc63684e23f5c0fb2a864 07-Jan-2016 Jason Monk <jmonk@google.com> 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
/packages/apps/Settings/src/com/android/settings/dashboard/SummaryLoader.java
fd2c7224185bef301cfaa7de6fe1af22cab8df2f 02-Dec-2015 Jason Monk <jmonk@google.com> Work on settings launch speed

Move some stuff to the background, avoid doing other things.

Change-Id: I145172efa16f81c2f377f07744c8f88145e2ed1d
/packages/apps/Settings/src/com/android/settings/dashboard/SummaryLoader.java
8c4ca41d2595925d108dad82959faddb676a392d 30-Nov-2015 Jason Monk <jmonk@google.com> Make sure the dashboard is up to date

Bug: 25794089
Change-Id: I65eaa8e14b3c998ec122eaa9fc4dbbe3749c568c
/packages/apps/Settings/src/com/android/settings/dashboard/SummaryLoader.java
3069581512bcb9687cb8d79675f6c4950c9ac087 17-Nov-2015 Jason Monk <jmonk@google.com> Summary support for Settings Home

Also add summaries to a few of the major items.

Change-Id: I17924f14941fe095d819e142cdd21cf4b4e9ffd1
/packages/apps/Settings/src/com/android/settings/dashboard/SummaryLoader.java