Commit Graph

18 Commits

Author SHA1 Message Date
Doris Ling
f2cf2aea37 Remove code that check for dashboard feature.
- remove DashboardFeatureProvider.isEnabled() and all relating code
and tests.

Bug: 35764802
Test: make RunSettingsRoboTests
Change-Id: If7796677abc8904b7436525836d50cdef38e37a4
2017-03-07 11:15:03 -08:00
Fan Zhang
c1c708f979 Ensure DashboardFragment shares pref controlls with search
Test: make RunSettingsRoboTests
Change-Id: I48be270d9706539925d00874bae29d46406ac491
Fix: 35812240
2017-03-01 13:29:11 -08:00
Fan Zhang
ee45943177 Add logging whenever preference leads to intent.
Bug: 34774945
Test: make RunSettignsRoboTests
Change-Id: I694e5a0a2b614c695193c9c525991a1558e0a81a
2017-02-23 11:55:50 -08:00
Fan Zhang
c62e2f033d Convert DeviceInfoSettings into a dashboard fragment.
This is needed to use logging from DashboardFragemnt.
This page is now a mixture of PrefernceController and non-controller
preferences.

Also permanently removed system update preference from xml to simplify
migration

Todo: convert the rest of preference into controller.

Bug: 34774945
Test: make RunSettingsRoboTests
Change-Id: Ie5130ea7377db2ccf2236cdf48e5cc26d1347d7a
2017-02-23 09:42:57 -08:00
Fan Zhang
cb287cfcd2 Add source metrics when launching top level setting items.
Change-Id: Idca6e136747fb40ba962307abd2620cdd241c3b1
Fix: 35359289
Test: make RunSettingsRoboTests
2017-02-16 10:25:49 -08:00
Fan Zhang
c6ca314c0b Log source with visibility change
- 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
2017-02-15 17:17:19 -08:00
Fan Zhang
42aaa53e75 Add logging for settings
- Log when navigating from Settings to injected tiles.
- Log when user creates a new widget shortcut

Fix: 33209678
Fix: 30137094
Test: RunSettingsRoboTests
Change-Id: I1e0f4e00709c392cde2550fafe53890836387c99
2017-02-13 16:57:28 -08:00
Fan Zhang
628b3cb76e Deprecate SettingsDrawerActivity.openTile.
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
2017-02-13 14:41:27 -08:00
Fan Zhang
d69b443e35 Fix a memory leak caused by dashboard freature provider.
In constructor, use app context instead of fragment context

Change-Id: I24fbc457037c1d6854ecf0cb270110d73effb662
Fix: 35292764
Test: RunSettingsRoboTests
2017-02-11 16:57:31 -08:00
Matthew Fritze
9955db6360 SearchFeatureProvider's context field is removed
SearchFeatureProvider was holding on to a context and
outlived the SettingsActivity, thus leaking the activity.
The context was passed into most methods, and thus it
makes more sense to pass it in to every method.

Bug: 33677967
Test: Run MakeSettingsRoboTests
Change-Id: Ia82f30e7e0b83587b4baeef28e81da6b8e4303fe
2016-12-20 11:39:10 -08:00
Doris Ling
3d9224fd82 Add new method getExtraIntentAction() in DashboardFeatureProvider.
Add a new method to get the extra intent-filter action to be used
to query the dynamic dashboard tiles.

Bug: 32739952
Test: make RunSettingsRoboTests
Change-Id: I96d9d8bd32ebe34b7c0df00c3fb4d8900b476c94
2016-12-19 14:23:09 -08:00
Doris Ling
a155197d65 Add handling for tiles with intent-action metadata.
If intent action is provided in the metadata for the dynamic tiles, it
will be added to the launching intent when user selects the tile.

Fixes: 31801423
Test: make RunSettingsRoboTests
Change-Id: Ic3e583a578660f4d9c40feff1418e5e354ab8f60
2016-12-05 16:50:47 -08:00
Shahriyar Amini
6259129d69 Use preference key specified in injected settings.
Bug: 31002801
Test: make RunSettingsRoboTests

Reads in optional metadata field for specifying the key used for an
injected preference.

Change-Id: Ief2ff10c508d42f91906b531cf34906c1c42fdd4
2016-11-28 14:49:46 -08:00
Fan Zhang
16f5af6e84 Move ad-hoc dynamic tile injection into FeatureProvider.
Ideally a page should use DashboardFragment and it doesn't need to
handle adding dynamic tiles manually. This method is only designed for
page that are not fully migrated to DashboardFragment yet.

Bug: 32623105
Test: RunSettingsRoboTests
Change-Id: I0cafcddf9a43b164daea500bade869fada5b3f4e
2016-11-16 16:26:38 -08:00
Fan Zhang
9dc9c6174c Insert dynamic dashboard tiles into optional placeholders
Insteads of inserting tile onto screen using absolute priority values,
now each page can have a placeholder preference, and at run time we will
add dynamic dashboard tiles to placeholder's place.

Bug: 32827787
Test: RunSettingsRoboTests
Change-Id: I1fe9e11dce4eb6fb4a9b56af05a2b8e5cdae00d2
2016-11-14 17:09:18 -08:00
Fan Zhang
5482637f8b Refactor bindPreferenceToTile to properly handle multi-user
Change-Id: I751eb645663b3546c212925e2ba4a0a94714013b
Fixes: 32470791
Test: RunSettingsRoboTests
2016-11-01 12:06:38 -07:00
Fan Zhang
601fbec8e8 Show select user dialog if setting tile supports multi-user
Bug: 32470791
Test: RunSettingsRoboTests
Change-Id: I07a14c32a1b898467b03df09430038ac4a1a2aed
2016-10-31 16:55:12 -07:00
Fan Zhang
301fe80fa7 Add location to security settings.
Bug: 32437756
Test: RunSettingsRoboTests
Change-Id: I999669963801684eb2399f5e642159970727b3c4
2016-10-26 11:23:20 -07:00