Commit Graph

22 Commits

Author SHA1 Message Date
Fan Zhang
04f1423bfa Remove custom updateState() if it's just setting summary
Change-Id: I6311d67d6ba11961a6814b91dcd8e37a2e17df40
Fixes: 73950519
Test: rerun robotests
2018-02-28 15:22:09 -08:00
Fan Zhang
906572b127 Change PreferenceController#getSummary return type.
Return CharSequence instead of String.

All user visible string should be modeled as CharSequence.

Bug: 73950519
Test: robotest
Change-Id: I30befef0c33f94351d4a2774e283bd1ed804aa8b
2018-02-27 22:30:12 -08:00
Fan Zhang
f7843adabd More renaming in DashboardFragment
getPreferenceControllers() -> createPreferenceControllers() for the same
reason as in ag/3647936

Bug: 73668763
Test: robotests
Change-Id: I97670a91a2a38d1c844d1b9d37f4222c5e6f45a0
2018-02-23 16:56:30 -08:00
Fan Zhang
f11c885766 Pre-fixup for nav up button
- Remove SettingsDrawerActivity.EXTRA_SHOW_MENU and force up nav button
  to always show. The button doesn't do anything yet. It just finishes
  current activity.
- Remove dead code about suggestions

Change-Id: I61fa9fefbaa9bced841a05969544b1c824c564ce
Bug: 72337421
Test: rebuild
2018-02-07 10:27:18 -08:00
Matthew Fritze
c69f73f4d1 Support getDynamicSummary in BasePreferenceController
Adds dynamic summary getter in relevant BasePreferenceControllers.
Preferece controllers that don't have dynamic summaries or which
are not yet BasePreferenceControllers are not changed right now.

Change-Id: I435ccab7758d90515583fd8ca10a9b1ef0c858b9
Fixes: 71514936
Test: robotests
2018-01-04 13:58:01 -08:00
Matthew Fritze
7d2b4f5fc7 Add PrefController in XML support
Add the ability to define a Preference Controller
in xml using the 'controller' tag.

This is useful for two reasons:
- It allows the controllers to be instantiated via
reflection for Slices and Dashboard fragment
- Removes the requirement that controllers be defined manually
in Fragments

In order to be instantiable, they must have a unified construction
following either:

  ClassName(Context)
  ClassName(Context, String)

Also added a robotest that verifies that all controllers defined
in XML follow the constructor schema, and extend
BasePreferenceController.

Test: robotests
Bug: 67996923
Change-Id: I304b35dc666daebecf0c9e286696f3f2a510704a
2017-12-12 14:21:12 -08:00
jackqdyulei
5f21c6913b Add OWNERS for package backup
Bug: 65294119
Test: Manual
Change-Id: I804b50a38c877da80b5ef3251e16029259014152
2017-09-07 13:51:26 -07:00
Tony Mantler
1d583e125f Make PreferenceController a mixin
Bug: 62912136
Test: Existing tests in BaseSearchIndexProviderTest
Change-Id: Ieda359806c09a019840b2005446c7ec8b61fdb00
2017-06-26 10:58:36 -07:00
Fan Zhang
b47373014f Add search index for support dashboard activity.
Change-Id: Ie9cf20316f94454a3d41f76d05b662e398c2c2ea
Fix: 36005923
Test: make RunSettingsRoboTests
2017-05-31 14:15:14 -07:00
Fan Zhang
82be5f0c3f Misc fixes to search and UI.
- Use prefContext to create preference.
- rename "Gestures" to "Gesture shortcuts"
- Add search keyword to individual gesture settings so when search
  "gesture" they also show up.
- call super() for all getNonIndexableKeys() in search provider

Fix: 38327387
Fix: 36621897
Fix: 36685646
Test: make RunSettingsRoboTests

Change-Id: Ia5ddfeae08cb27c278dfb8d2376594e21d8f283c
2017-05-23 14:55:23 -07:00
Anton Philippov
ca5e1bd67b Add summary for Backup menu in Settings.
'On'/'Off' depending on whether the backup is enabled in settings.

Refactors BackupSettingsActivity to be shown on System fragment via
xml/PreferenceController instead of category in the manifest.

Bug: 36891827
Test: make RunSettingsRoboTests
Change-Id: I61425fed4d63055c6c386be38792ae074aa72679
2017-04-27 22:33:52 +01:00
Anton Philippov
9a5220e7c3 Fix search results for backup settings.
Make BackupSettingsAcitivity searchable and remove PrivacySettings from
the search index.

Bug: 35720213
Test: make RunSettingsRoboTests -j40
Change-Id: Id2e091c978e4da078dcc6bc57760ec830e439c0c
2017-03-03 12:49:40 +00:00
Anton Philippov
f8b3154586 Add tests for BackupSettingsActivity
Bug: 34925593
Test: make RunSettingsRoboTests
Change-Id: I539d417ca70224e3c7554abc097868ca366de89c
2017-02-14 11:02:40 +00:00
Anton Philippov
18dd11f54c Enable the backup settings activity before launching
Bug: 34925593
Test: Manual
Change-Id: Ib27efa2138f56af37fe83376496a0d4c7a494e5b
2017-02-03 19:01:26 +00:00
Anton Philippov
adfec5563e Add a screen to show OEM backup settings.
Moves the backup settings logic to BackupSettingsHelper and
BackupSettingsActivity:
- If the manufacturer provides the intent and the label for their backup
settings in the config.xml, a new intermediate fragment is shown for
Backup settings to let the user pick either standard backup settings or
OEM provided backup settings.
- If config.xml doesn't contain the intent, BackupSettingsActivity is
used as a trampoline activity to launch backup settings provided by the
backup transport of the default backup settings activity, i.e.
PrivacySettingsActivity.

Bug: 34700410
Bug: 33655074
Bug: 33654991
Test: make RunSettingsRoboTests
Change-Id: I78e340fbf926b2a9dc2c4e3942f9337c3c7a933c
2017-01-30 16:17:28 +00:00
Tamas Berghammer
265d3c2a0c Update package names to work with the proto3 compiler
Bug: b/28974522
Change-Id: I5f3adf4946ee4ba1e09e4f40afe83c151405972a
2016-11-08 14:06:17 +00:00
Fan Zhang
6507613ebc Log visibility change for all fragments.
Bug: 30681771
Test: SettingsUnitTests

Refactor visibility logging from InstrumentedFragment into a mixin. And
apply mixin in remaining fragments.

Change-Id: Ibbb59904336254a3e4bb9e8c7d0b36e5a6bc2622
2016-08-18 14:04:13 -07:00
Chris Wren
9d1bfd1e8d port settings over to new metrics enum
Change-Id: I0b3efd2f4db773ccbc52bfe59ee8eb0dab9584fb
2016-01-27 10:58:58 -05:00
Jason Monk
39b467482d Depend on support lib preferences
Bug: 24576551
Change-Id: Ic6190bacd3f7582c9bbc8de972da4612bd92421e
2015-10-13 10:12:20 -04:00
Sean Francis-Lyon
c44d0ef1dc show old legal text in backup settings if full data backup is disabled
Change-Id: Ifc4fa5c4a6180fd4ceb41ca66dc2dd6a58f4f086
2015-06-15 18:11:41 -07:00
Sean Francis-Lyon
8452a62216 DO NOT MERGE show correct backup status
show correct backup status after dismissing are-you-sure dialog
for turnning off backup and restore in settings

Change-Id: I31c4106cab58f84b77568356188e5ce49ca3430b
(cherry picked from commit f833588dae)
2015-05-21 22:42:56 +00:00
Matthew Williams
6ee5a4d0ef Update Backup/reset UI
BUG: 20489775
Change-Id: I2c97fdf240ddd3e9f0a518478d5da91b91abe394
2015-05-18 18:16:09 -07:00