Commit Graph

64 Commits

Author SHA1 Message Date
Peter Wang
ecd856eeeb Added an option in reset menu in Settings to enable resetting Euicc data
only

Bug: 159650638
Fix: 159650638
Test: Local
Change-Id: Ia260b47a4dd0ddf0363740891b5e1d818c8631b7
2020-12-15 18:27:34 -08:00
Hiroki Sato
0e75d475ec Hide Bluetooth, Reset, Accessibility Settings in ARC
This is an upstreaming change of http://ag/8541963 and
http://ag/10296201 to hide some items from settings search.

This CL also adds javadoc to some settings classes to fix pre-upload
warnings.

Bug: 153704887
Test: Manual. In ARC build, "bluetooth" and "accessibility" no longer shows related settings.
Change-Id: Ic3e9217944251adbea1bdd67baf66d3a9e89583a
2020-04-10 16:00:57 +09:00
Narayan Kamath
50487c4595 Merge "Reland: Rework platform version to hide codenames." 2020-02-10 10:01:25 +00:00
Dianne Hackborn
95108c4b38 Reland: Rework platform version to hide codenames.
The public platform version no longer can be a codename, it is
always the most recently released platform.  A new build property
and API provides either the offical version or the current codename
as appropriate.  This will avoid breaking apps that look at the
platform version while development is under a codename.

Bug:  143175463
Test: manual
Exempt-From-Owner-Approval: Previously approved, no new changes.
Change-Id: Ifb6f6236aab2c40fd51abb9c6587eafcc8983857
2020-02-06 11:07:11 +00:00
Edgar Wang
0934babbfc Make the fragment title can’t searchable
we shouldn't take users so deep into the settings IA because it's easy
to feel lost in settings after clicking on a result without additional
context.

Bug: 143055215
Test: robotest & manual
Change-Id: I337cb5ead31e1e4e7bf9be78132e90630f83ee43
2020-02-06 19:07:11 +08:00
Edgar Wang
fee49421c7 Update Reset options summary
- Update summary when user does not have permission to reset network or factory reset

Fixes: 126295214
Test: rototest & manual
Change-Id: I710f0abcd3df1560eb3e7bc53a7427d7a6a5aad7
2019-12-23 13:47:46 +08:00
Kevin Lau Fang
40dd1e2183 Revert submission
Reason for revert: This causes a boot issue on Taimen (b/144480969). It wasn't caught by TreeHugger due to Taimen tests being disabled due to a different lab outage (b/144350336).

Change-Id: I490dc6c933c08c3c83b962786df11bd2da66b28a
2019-11-14 20:07:38 +00:00
Dianne Hackborn
cdbc0dfa6a Rework platform version to hide codenames.
The public platform version no longer can be a codename, it is
always the most recently released platform.  A new build property
and API provides either the offical version or the current codename
as appropriate.  This will avoid breaking apps that look at the
platform version while development is under a codename.

Bug:  143175463
Test: manual
Change-Id: I711ca20c4c8ce389697e940696051a336f5fd808
2019-11-12 15:55:59 -08:00
Raff Tsai
966fa01423 Use SettingsLib Indexable
- Use SettingsLib Indexable
- Directly use resource id in getPreferenceScreenResId

Bug: 135053028
Test: roboletric
Change-Id: I05f493b55e8b6e2091301e9231ba5615215618e6
2019-09-25 18:24:56 +08:00
Raff Tsai
ac3e0d0988 Directly use BaseIndexableProvider
- Add function getXmlResourceId, Fragments don't need to write
xml resource id twice.
- Remove getPreferenceControllers from Indexable.java. Because it will
move to SettingsLib later for other apps which don't need this function

Bug: 135053028
Test: robolectric
Change-Id: I1e74519aecdea3dde64a5aea79f08d766dbc0003
2019-09-24 00:35:52 +08:00
Raff Tsai
1f30b1cd67 Merge similar BaseSearchIndexProvider code together
Bug: 135053028
Test: robolectric, check search_index.db contains the same items
Change-Id: If3c18a170b0e671690df1fdf26e59a421d2c48cd
2019-09-12 11:09:09 +08:00
Naina Nalluri
dfbe891e39 Add background flag to CI system update intent
Add flag to allow KEY_CI_ACTION_ON_SYS_UPDATE_INTENT_STRING
intent. This is needed
as the receiver service is modified to use
latest target version SDK which introduces Background
broadcast limitations.

Bug: 78634470
Test: On Device, verified that the intents are
      received by the service
Change-Id: I140c1988b241885a737413bd5f0b9c3cc63c4ea8
2019-04-10 22:12:10 +00:00
Edgar Wang
59d4681253 Handle When received intent extra in System settings need show dialog
Bug: 128853573
Test: visual, robotest
Change-Id: I92337e26f51c3f7ef4033d424ddcf07c6da6805d
2019-03-28 22:49:09 +08:00
Fan Zhang
31b210017b Migrate all MetricsProto enums to SettingsEnums
Bug: 122855168
Test: rebuild
Change-Id: I962d9a71179f86b7cae9dc5e9a00e0aa1557dc76
2019-01-17 14:55:42 -08:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
Fan Zhang
9ce4a1fcde Use searchable="false" to suppress nonIndexables.
When possible, remove or simplify getNonIndexable() logic in fragments,
and use searchable="false" in xml to suppress index.

Change-Id: I5bdf5bc7d5494a64cdd9e230a51321a4b210af69
Fixes: 112608186
Test: robotest and manual search
2018-08-17 09:21:05 -07:00
Fan Zhang
a79c377fbc Declare "searchable" attribute for preferences.
Now we can easily mark a preference nonIndexable in xml instead of
adding key into searchIndexProvider.

Bug: 112608186
Test: robotests
Change-Id: I0ff16d44bb7b6ad148d3d35f09ca0da0163f73f4
2018-08-16 09:06:39 -07:00
tmfang
27c84de325 Settings Fragment Migration (Build pass app)
This patch focused on fixing compile errors and some runtime errors.

Test: We can't test it now. But we will have an integration test later.
Bug: 110259478
Change-Id: I16c471ddcd0fa1460c665b7f74d86fcace5ee67b
2018-07-11 18:24:51 -07:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
Fan Zhang
93d3b5174d Fix a strict mode violation in SystemUpdatePrefController
Change-Id: I4770b878b6f69318f08f8974c5c4d2690c5611d4
Bug: 78626509
Test: robotests
2018-05-11 03:45:48 +00:00
Matthew Fritze
f87a1f3f41 Establish permanently unavailable settings
Distinguish between settings which are permanently unavailable on
the device, and temporarily unavailable. This enables us to restrict
which setting slices are exposed in onSliceGetDescendants.

The primary changes in this CL are renaming:
"DISABLED_UNSUPPORTED" -> "UNSUPPORTED_ON_DEVICE"
to be more clear the the setting will cannot be accessed on the device, and,
adding a new enum to encapsulate settings which are currently unavailable, but
could be enabled in the future.

Also remove UNAVAILABLE_UNKNOWN. Devs should never need this enum.

Bug: 78910582
Bug: 79245656
Test: robotests
Change-Id: I58821a6cfd6134b3b351657b6edf5f74ead00643
2018-05-09 08:36:59 -07:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
Tony Mantler
0fcd6cbaa8 Autogenerate SearchIndexableResources subclass
Bug: 77148954
Test: RunSettingsLibRoboTests RunSettingsRoboTests RunSettingsGoogleRoboTests RunArcSettingsRoboTests
Change-Id: I842c42c55014c3310070ef22bd4f0d9a70dfd804
2018-04-03 10:26:55 -07:00
Ben Lin
bd180a62ec Introduce boolean flag to show/hide Reset Options.
This adds one new flag:
config_show_reset_dashboard

Which when set to false, will hide Reset Options from System settings.

Bug: 74127210
Test: Updated robotests
Change-Id: I42b14a0abde575f5c4e51985125e8543716d206a
2018-03-08 10:44:48 -08:00
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
aed8994f6f Rename Indexable::getAllPreferenceControllers.
To getPreferenceControllers. "all" is redundant. Then internally, the
old getPreferenceControllers() is renamed to
createPreferenceControllers() to emphasize the controllers are created
from code (versus the ones created from xml).

Bug: 73668763
Test: robotest
Change-Id: Ifec46aefdc2a418031c8e152028b30bdcd396fc7
2018-02-23 16:37:28 -08:00
Fan Zhang
917f101899 Instantiate pref controllers from xml if it's defined.
- If a <preference> tag also defines a controller, we will try to
  instantiate it before displaying the UI. The same logic is shared by
  BaseSearchIndexProvider so it also drives search suppression.

- If user also defines a list of controllers programatically, the
  programatically created ones takes precedence.

Bug: 73668763
Test: WIP
Change-Id: I7aecec270bcd3af261e012ef1f6995d2a523cfa1
2018-02-23 14:08:51 -08:00
Fan Zhang
5c2699962b Use SystemUpdateManager to provide system update info.
Change-Id: I38b631cda8aa63e478c74625eba3d18f9a5723bd
Fixes: 36874007
Test: robotests
2018-01-31 12:16:17 -08:00
Fan Zhang
0ec6b02fe4 Re-add isSuggestionEnabled check
It was accidentally removed previously

Test: robotest
Change-Id: I5b7707e746d6b825d835a007727b29c9a81a7fc1
2018-01-30 15:41:33 -08:00
TreeHugger Robot
84e8c795b1 Merge "Add PrefController in XML support" 2017-12-13 00:02:35 +00: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
jeffreyhuang
251407a3a4 Do not show advanced dropdown if only one setting
Change-Id: I56eff1198636d0f0b95f4aa58eb90efc346c3f65
Fixes: 69402845
Test: make RunSettingsRoboTests -j40
2017-12-12 10:32:58 -08:00
Fan Zhang
e0b0e9f902 Refactor help menu stuff into a controller
This is a clean up to action bar menu item pattern, we will use the same
pattern to build search icon on all pages in a later change.

Bug: 68814716
Test: robotests
Change-Id: Iedd3ec263e8ccb63ed75ec7a95b28c00878b1de4
2017-11-29 15:51:04 -08:00
Fan Zhang
a8cac7a409 Move ManageApplications to sub package and remove dead code
Bug: 64804294
Test: rerun test
Change-Id: I23cbd8da9b65f52470030ba3b9b676ece2bada11
2017-10-12 13:48:54 -07:00
Fan Zhang
8722509eb9 Misc tweaks in settings
- Tweak layout for default sms picker icon. Now icons are aligned
  and forced to be in the same size
- Update string to use correct double-quote symbol
- Multiline title for some user & account setting

Change-Id: I27c1ed6459c5cd919778d535ab846b148a3f91b6
Fixes: 64285520
Fixes: 62891178
Fixes: 62265094
Fixes: 64363209
Test: robotests
Test: visual
2017-08-04 10:42:27 -07:00
Christine Franks
c6890ab6c5 Move logic for FR in demo mode out of Settings
Bug: 62712426
Test: make \
ROBOTEST_FILTER="(MasterClearTest|FactoryResetPreferenceControllerTest
|UtilsTest)" \
RunSettingsRoboTests -j100
Change-Id: I5e287c3d4a6a7050bda78187c52aec19e90b50bc
2017-07-21 19:19:19 +00:00
Doris Ling
204ca74397 Move Gesture settings up one level.
Move System->Languages, input & gestures->Gestures to System->Gestures.

Change-Id: Ie81876208383f69ebf1a0465d76c760d7dd9d95d
Fix: 62276882
Test: make RunSettingsRoboTests
(cherry picked from commit 55ce7de7d0)
2017-07-20 16:46:44 +00: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
179645eecd Add help url placeholders for new pages
Bug: 38412798
Test: visual
Change-Id: I4ede523cb13790ea05309279f80a778b2086f850
2017-06-05 14:50:01 -07:00
Christine Franks
c101dda9f7 Merge "Allow FR in carrier demo mode" into oc-dev am: 9ef166a578
am: d974ccb625

Change-Id: I8d693fd2d41f73b53416ee83d7b289496765c660
2017-05-31 22:54:31 +00:00
Christine Franks
2d0293951a Allow FR in carrier demo mode
Bug: 62133292
Test: make RunSettingsRoboTests -j100, and manually verified FR is
available in carrier demo mode.

Change-Id: Ia793bf234b229da0490accfea6d44b72395a04bc
2017-05-31 12:04:01 -07:00
Matthew Fritze
8cd0562bd6 Merge "Remove Backup and Reset duplicates from Settings search" into oc-dev am: 4bd0f411ce
am: af054e63e0

Change-Id: I35667061a61fd66e8ab8acafccffb53f00f15149
2017-05-17 19:06:59 +00:00
Matthew Fritze
6fe35bb031 Remove Backup and Reset duplicates from Settings search
Bug: 33701673
Test: make RunSettingsRoboTests
Change-Id: I3539f9581939255d94ccf04134278414fbe9c72b
2017-05-16 15:43:21 -07:00
Juan Lang
777ed2535a Depend on SettingsLib's version of lifecycle and FooterMixin.
The implementations have been imported into SettingsLib. Setting's copy
can now be removed, which this change also does.

Test: Manually check battery status, which uses FooterMixin, looks OK.
make RunSettingsLibRobotTests && make RunSettingsRoboTests
     && make RunSettingsGoogleRoboTests
Change-Id: I6539605fdad80d156ff5ff249e68df4a1c412067
2017-05-12 11:10:46 -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
Fan Zhang
51059c5c91 Move reset options to one place
Change-Id: I419c16cbfc69861e01f28c14abdde137bd78f0bb
Fix: 36458355
Test: make RunSettingsRoboTests
2017-03-24 17:26:33 -07:00
Anton Philippov
a540a978bc Merge "Hide "Factory reset" item for secondary users" 2017-03-10 19:05:19 +00:00
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