- remove DashboardFeatureProvider.isEnabled() and all relating code
and tests.
Bug: 35764802
Test: make RunSettingsRoboTests
Change-Id: If7796677abc8904b7436525836d50cdef38e37a4
- 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
Use the centralized registry to look up category key instead.
Bug: 32936784
Test: make RunSettingsRoboTests -j40
Change-Id: I0b8c72d70f93e4b5c58871ac90de41f69ad15653
- use context instead of activity to retrieve resource details.
- revert the change previously made in getActivity() calls.
- add null checking in package name and tile intent.
Fix: 34396855
Test: make RunSettingsRoboTests
Change-Id: Ic853939fee3c381b663c0320354da51d3b2a0e11
Set the icon tint color to colorControlNormal for components not in
settings package.
Change-Id: I6b822b355eb706693a0af4e5832407064cd2b2c2
Fix: 34192209
Test: Visual
- Refresh connected state before setting summary text.
- Detect inconsistent state (BT manager says connected but doesn't
provide a connected device)
(This basically syncs implementation between settings and QS tile)
Change-Id: Id23138f8432b9aecd194f5016bf2576e33e8ca98
Fixes: 33341275
Test: RunSettingsRoboTests
(this is partially revert of ag/I0ce486f7ac6)
- Only draw divider lines on top of PreferenceCategory and
FooterPreference
Bug: 33601143
Test: make RunSettingsRoboTests
Change-Id: I26146dcae1603dc807e54ea431910685107be94c
- List individual account instead of account type under User & account
screen.
- Add handling to move account tiles with specific account type from
top level account dashboard to inside the corresponding account
preference.
- Rename settings.accounts.AccountPreference to
settings.accounts.AccountTypePreference to make it less confused
with settings.AccountPreference
Bug: 31801423
Test: make RunSettingsRoboTests
Change-Id: Iebe70a3c4230e8d979344f142a5c2a60945e552e
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
When updating preferences managed through PreferenceController, the
fragment should skip prefs that are not available.
Bug: 32255863
Test: RunSettingsRoboTests
Change-Id: I2f9b6ddf8c78d40068dc18f07e60672dcba4474a
Add the initial version for the User & accounts category and set the
tile's intent if it contains metadata but fragment is null.
Test: RunSettingsRoboTests
Bug: 31801423
Change-Id: Ic63bf8aeaf47f68a184af73c9a8a72b89b597a17
Instead of removing and re-adding all dashboard tiles, figure out a diff
and rebind/add/remove as necessary.
Bug: 32255863
Test: RunSettingsRoboTests
Change-Id: I9d87ba30ab746257d0ea71282951348ebc4e8965
This makes ProgressiveDisclosureMixin the authority for adding/removing
preferences so caller doesn't need to figure out if a preference is on
screen or collapsed.
Bug: 32255863
Test: make RunSettingsRoboTests -j40
Change-Id: I9bd69661b78efd4bb4913665f6ea09f6bdc231f5
- Add a ProgressiveDisclosureMixin that contains all logic for collapse
preference list when it's too long
- Refactored PreferenceController's updateState to take a preference
instead of PreferenceScreen, because with progressive disclosure the
preference can either be in screen or the mixin. DashboardFragment is
responsible finding the preference before passing it to controller.
Bug: 32255863
Test: RunSettingsRoboTests
Change-Id: I6713abd61c954ce12732902e5b3ca4d4c0b1563e
When launching internal setting activity from dynamic tiles and hit back
button, it goes back to settings homepage. Instead it should just go
back to the UI where startActivity is called.
This is caused by various activity flags set in manifest. Instead of
using startActivity, internal settings screen will just be launched
using SubSetting, which doesn't have this problem.
For external settings, still use startActivityForResult to maintain
backstack.
Test: manual
Change-Id: I07aa6ed932b9048375629d6ffd6ad1adfaba3fd3
Refactored getLocaleNames() into a FeatureProvider interface so it's
reusable and testable.
Bug: 31801428
Test: RunSettingsRoboTests
Change-Id: I2d31a66a4b32cfa7a364a4cfef1f6eea87084577
- Also made tiles refresh more efficient: when category changes, only
refresh dynamic tiles. Static tiles from xml will not change due to
category change.
Bug: 31799836
Test: RunSettingsRoboTests
Change-Id: I1e4c85f2c122c65ec99729e43a66c80acdd863c8
- 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
- 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
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
Also added a FakeFeatureFactory to make it easier to mock different
FeatureProviders.
Bug: 31781480
Test: make RunSettingsRoboTests
Change-Id: Ie45db601e0bec951d7ef983ec2e3ca747ec1c3af