Commit Graph

10 Commits

Author SHA1 Message Date
Daniel Nishi
b465005c29 Update the storage summary header.
This changes it to now have a donut graph and reflects the new UI.
Finalized redlines are still pending, so there will be a follow
up patch to get everything aligned as per the mocks.

Bug: 33199077
Test: Settings Robo Tests
Change-Id: Ic12a77bd9be335af14f80886d1ecc24c82940e9b
2017-01-11 12:37:33 -08:00
Daniel Nishi
884809199f Hook up the storage item preferences to actual data.
This uses the same storage query implementation as the previous
iteration of the Storage Settings. In b/32206268, a new API for
querying this information will be added for querying this info.

Once the new API has landed, a future patch will swap out the
impl, but this should work for today.

Bug: 33199077
Test: Settings Robo Tests
Change-Id: I58763e8ee38aabbea533bc614268288e854ff8d4
2017-01-10 17:52:52 -08:00
Daniel Nishi
8cc6f9f718 Add click behavior to the storage item preferences.
This currently imitates the previous implementation behavior.
The new mocks have a new intermediate view for some of these
behaviors, but this view isn't ready yet.
This patch should bring parity for the click functionality
for the storage line item preferences.

Bug: 33199077
Test: Settings Robo Tests

Change-Id: I4f654d30add92e4eec721c36b2801f9af9824e78
2017-01-10 16:46:44 -08:00
Daniel Nishi
ec89a3f57f Add first pass at a new Storage screen.
This patch begins setting up the structure for the screen.
The functionality for populating the data in the preferences
is coming in a later patch.

Bug: 33199077
Test: Settings Robo Tests
Change-Id: I9ebad9d3896501e31ac715704ca986eceb36877d
2017-01-05 11:54:56 -08:00
Fan Zhang
8f057ca3d4 Use MetricsEvent to log page views for new IA pages.
Bug: 33812754
Test: RunSettingsRoboTests
Change-Id: Ib49daa1078df44f50ecfa351c061d36849708fd7
2016-12-21 12:12:32 -08:00
Fan Zhang
66b573ad5a 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
2016-10-10 18:26:29 -07:00
Fan Zhang
fabbfb435e 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
2016-10-07 14:52:06 -07:00
Fan Zhang
36924659f5 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
2016-10-07 11:55:43 -07:00
Fan Zhang
31a285387d Add search provider for storage dashboard.
Bug: 31800690
Test: manual
Change-Id: Icb906bf3b3698c1379e10cf6e346d489675ad940
2016-10-04 17:52:05 -07:00
Fan Zhang
bb6d2608e9 Add storage dashborad page.
Refactor shared dashboard page display logic between storage and
system page.

Bug: 31800690
Test: RunSettingsRoboTests

Change-Id: I7eb86f590b79ab871bdb383fb2f5326790beb193
2016-10-04 14:06:57 -07:00