History log of /packages/apps/Settings/src/com/android/settings/core/BasePreferenceController.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
6719a9b73e7b72292a98db322a26396da6385db7 29-Mar-2018 Chihhang Chuang <chihhangchuang@google.com> Refactor nfc preference controller

- Remove BaseNfcPreferenceController.
- NfcPreferenceController inherit from TogglePreferenceController.
- AndroidBeamPreferenceController inherit from BasePreferenceController.
- Override getIntentFilter in NfcPreferenceController to listen changes.
- Add an API (hasAsyncUpdate) into BasePreferenceController to
distinguish the setting which is updated asynchronously.

Change-Id: I1abe4410169e305a0d6106e24c54e7f2e763fc91
Merged-In: I7c9c48ea7f1ad01a02524beabf9d30baa3db891f
Fixes: 67997761
Fixes: 74887543
Test: RunSettingsRoboTests
/packages/apps/Settings/src/com/android/settings/core/BasePreferenceController.java
1dd25fd87c727fbf175027faf6a9a533c5cf7220 19-May-2018 Matthew Fritze <mfritze@google.com> Add isSliceable API to BasePrefController

Only support explicitly approved Settings Slices,
dictated by controllers which return true for the new
method isSliceable.

Updating the supported settings to a whitelist means that
the method to return all available slices must be updated,
and checking slicability when we index slices.

Test: robotests
Change-Id: I85848c2cdf3e151fa94b33dd1dc5c0374ef94b5b
Merged-In: Ib2b9690cdd0036b5cc4a1cb846c52bce7c824ab9
Fixes: 79779103
/packages/apps/Settings/src/com/android/settings/core/BasePreferenceController.java
4a6f058552f85727f0d55d73e76a6031dc62717f 11-May-2018 Matthew Fritze <mfritze@google.com> Add Intentfilter BasePreferenceController

For settings which can change in the framework, outside of
the settings app and a slice, a Slice needs to be able to
register a listener for these changes.

Adding a getter for an IntentFilter in BasePreferenceControllers
allows us to use the SliceBroadcastRelay in SysUi to listen for
these changes.

Test: robotests
Fixes: 78138654

Change-Id: I579375069ca98fd21b60cd3a69c1a122cabf96e2
Merged-In: Ifa05b651aaa3458c54866f71469964b1a070e458
/packages/apps/Settings/src/com/android/settings/core/BasePreferenceController.java
bd376296cd5b5a41c421b4d831036957915336ce 04-May-2018 Matthew Fritze <mfritze@google.com> 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
Fixes: 79245656
Test: robotests
Change-Id: I42c2cedab66be2d76999795f46470a079cc1ec71
Merged-In: I58821a6cfd6134b3b351657b6edf5f74ead00643
/packages/apps/Settings/src/com/android/settings/core/BasePreferenceController.java
8c48defb521d82d9c08320a950f8306dc833ee57 30-Mar-2018 Matthew Fritze <mfritze@google.com> Expand isAvailable to include DISABLED_DEPENDENT

isAvailable will now return true when getAvailabilityStatus
returns DISABLED_DEPENDENT_SETTING. This is because the setting
should be displayed in the Fragment even if it has a dependent setting,
which matches existing behaviour. Slices will still display the warning
slice without inline content, where the main action brings you to the
setting page. For now, we have to assume the user will be able to figure
out how to enable the setting. In Q, we would like to build a more
intelligent flow so that we can prompt or even help the user fix the
dependency (we just ran out of time in P).

The only setting that had previously used DISABLE_DEPENDENT_SETTING
was a developer option.

Change-Id: I1f774a2e09cb60de01388cf6c35785c8b5dea176
Fixes: 77334915
Test: robotests
/packages/apps/Settings/src/com/android/settings/core/BasePreferenceController.java
4092b2193c0dbe26e6e6a89fdd2ecd2d2f0f0ae7 23-Mar-2018 Jan Nordqvist <jannq@google.com> Entity header: When screen scrolls, there should be shadow under the header.

Bug: 70950124

Test: manual
Test: make RunSettingsRoboTests

Change-Id: I5c1d9f463a57d48e258d67602fc4d1fbbdfaad60
/packages/apps/Settings/src/com/android/settings/core/BasePreferenceController.java
9c18ac05545b9cba674a732d6e5effabba971a88 07-Mar-2018 Fan Zhang <zhfan@google.com> Clean up comment

Bug: 73074893
Test: none
Change-Id: If7dcfcbb2e943d5734239ddb51c0e6ac798b641b
/packages/apps/Settings/src/com/android/settings/core/BasePreferenceController.java
1e9d9c7054270f92b4b7db4d3f405cb9ed38c051 28-Feb-2018 Matthew Fritze <mfritze@google.com> Support Slice type in SliceData

Add a getter for Slice type for BasePreferenceController.
This facilitates the generation of all possible Slices for Settings
search and discovery for AGSA.

Bug: 62807132
Test: robotests
Change-Id: I2cba1fc72c95769ecc26c76d1f2faa49a285d077
/packages/apps/Settings/src/com/android/settings/core/BasePreferenceController.java
917f101899e0584edde44567f7939a563cc2dc05 22-Feb-2018 Fan Zhang <zhfan@google.com> 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
/packages/apps/Settings/src/com/android/settings/core/BasePreferenceController.java
fc520ee38a4df4119e41fb28a9a7864c447f7ad2 21-Feb-2018 Fan Zhang <zhfan@google.com> Move instantiation-through-reflection method to controller

Bug: 73668763
Test: rerun robotest
Change-Id: If1b263dfd6a8c40f563ce53ce3f368aef5ca5a9f
/packages/apps/Settings/src/com/android/settings/core/BasePreferenceController.java
2edbaa7062aa1988fc1f8b60566c53eaa4f3f891 10-Feb-2018 Fan Zhang <zhfan@google.com> Change print setting from a dynamic tile to static pref

...because dynamic tile is a lot harder to index correctly.

- Removed metadata that makes PrintSettings a dynamic tile.
- Added PrintSettings into connected_device xml.
- Added a new PreferenceController - all summary updating logic is
copied from PrintSettingsFragment

Change-Id: I41e7c9d23e97ecd5a043ac7c33f2d404260c92e7
Fixes: 73128944
Test: robotests
/packages/apps/Settings/src/com/android/settings/core/BasePreferenceController.java
700c113218b9f360e47dd8631ee0a62ef7ef8e0f 26-Jan-2018 Matthew Fritze <mfritze@google.com> Add Toggle Controllers to XML

Autobrightness preference controller was accidentally removed from
display_settings.xml. Given that no tests were broken and this would
be a disaster for phone buddy & inline actions, I have added another
test which keeps a list of valid controllers that should exist in xml.

When more inline controllers types are added, they will be included
in this test.

Fixes: 72564979
Test: robotests
Change-Id: I40fe18f9118af9cec1c201632742d2949ff64be5
/packages/apps/Settings/src/com/android/settings/core/BasePreferenceController.java
f5276841838f4a05c079457ecf7739b0822e9deb 05-Dec-2017 Matthew Fritze <mfritze@google.com> Remove Slice getter from BasePreferenceController

After working through a prototype here: (ag/3324435)
it is clear that we don't need the controller to
provider the slice. We will build an index that
will contain sufficent UI information, and a reference
to the controller.

At Slice Bind time, we can get the curret value from the
controller, and the UI information from the Index.

Bug: 67996923
Test: robotests
Change-Id: Id43a51bcd73051bc719cd5829907583e0edf23b2
/packages/apps/Settings/src/com/android/settings/core/BasePreferenceController.java
6eb88778484fde825092e8b880dda7948fbdb042 23-Nov-2017 Doris Ling <dling@google.com> Convert install app detail to dashboard fragment.

- first round for changing AppInfoDashboardFragment to inherits from
DashboardFragment instead.
- add controller for Battery, DataUsage, Memory, Notification, Storage,
Permission, Version, and Open by Default settings.

Bug: 69384089
Test: make RunSettingsRoboTests
Change-Id: I60079e5442b4eef46a178e27de96a8635e15ebde
/packages/apps/Settings/src/com/android/settings/core/BasePreferenceController.java
3a4168360b94ac3fdefeafa2f4a39169b6905c1b 16-Nov-2017 Matthew Fritze <mfritze@google.com> Add SettingsPrefController for Slices

Adds a new abstraction layer between preference controllers
and the AbstractPreferenceController. The layer is used to
consolidate the logic for each the setting type for getting
and setting values. This will be extended to support UI
information for Slices.

For reference how this fits into Slices, look at the
like-named classes added in this prototype:
ag/3221891

The changes in Search are as a transition into deprecation.
The code for Search in Settings is out-of-date from the
unbundled counterpart, and this change is made so that the
current code behaves as normal.

Test: robotests
Bug: 67996707
Change-Id: Ib1faab706485039edad66119a27a3fd5cabe6009
/packages/apps/Settings/src/com/android/settings/core/BasePreferenceController.java