- It retrieves the flashlight status from Settings.Secure.
- It uses the broadcast relay to update flashlight status
without action on the slice.
Test: robotests
Change-Id: Ib4d636541f5166b8634326cce76aed5665989b76
Fixes: 74913192
WifiCallingPreference Slice Provider:
1. If Wifi calling is not enabled - display message to user
to enable Wifi calling
2. Else if Wifi preference is not editable - return a null
Slice
3. Else provide a slice with rows - first row giving current pref
information, followed by preference items (in each row).
wifi_only is displayed only when it is allowed to display it.
Each row with preference item has specific intent action.
WifiCallingPreference Slice BroadcastReceiver:
1. If only Wifi calling is enabled & Wifi preference is editable &
there is a change in current value modify wifi pref setting
2. And Ask to re-query the slice in one second to display
updated settings if 1 is valid or display appropriate message.
Clean-up:
1. Return null instead of non-actionable slices.
2. Use getText to get string resources.
3. Remove unnecessary extra variables.
Bug: 79548264
Test: Use support-slices-demos-debug.apk to test on device
Change-Id: I186f19be2007c2331eaf6195e70b4a9c635adf9e
Add Slices for Enhanced 4G LTE
Enhanced 4G LTE Slice Provider:
Create slice to display appropriate message with further instructions
Enhanced 4G LTE Slice Broadcast Reciver:
1. Change the setting via ImsManager
2. Ask to requery the slice in one second to display updated settings if 1 is valid or display appropriate message
Bug: 79270171
Test: Robotests
Test: Use support-slices-demos-debug.apk to test on device
Change-Id: I48d412de94d5d9f1ad42a299691ec5cf8001c6a1
1. Use real BluetoothAdapter instead of settingslib version. The
settingslib version contains calls that violates strictmode rules.
2. Override StrictMode rules in SettingsSliceProvider when it's called
in background thread. When in background, the enforcement from Slice
framework (StrictMode#ThreadPolicy) is not useful and can be safely
ignored.
Change-Id: I68523148f4c1dc88a54e207447d21ec439478cdf
Bug: 79985175
Test: robotests
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
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
Bug: 79779103
Change-Id: Ib2b9690cdd0036b5cc4a1cb846c52bce7c824ab9
Bluetooth slice is added a special case, due to the migration of
bluetooth to a Switch Bar instead of a preference with a controller.
Change-Id: I8b70bb66c862255a4e8d2426ac09939ba6197624
Merged-In: Icfdcd77601ad1e64e0f6c352a8d691f0181515c8
Fixes: 67997327
Test: robotests
Bluetooth slice is added a special case, due to the migration of
bluetooth to a Switch Bar instead of a preference with a controller.
Bug: 67997327
Test: robotests
Change-Id: Icfdcd77601ad1e64e0f6c352a8d691f0181515c8
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
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
Bug: 78138654
Change-Id: Ifa05b651aaa3458c54866f71469964b1a070e458
Add DND Slice as a special case, since there is an existing
inheritance structures in the zen mode preference controllers which
would be too risky to change at this point in the release.
Change-Id: If4b7013be35c89695786af2dbbea2edcf7a189f3
Merged-In: Ice608b9a7bd6f38b73e581eb3723f0a2fae96f2b
Test: make RunSettingsRoboTests
Fixes: 67997377
Add DND Slice as a special case, since there is an existing
inheritance structures in the zen mode preference controllers which
would be too risky to change at this point in the release.
Test: make RunSettingsRoboTests
Bug: 67997377
Change-Id: Ice608b9a7bd6f38b73e581eb3723f0a2fae96f2b
Add a custom Wifi Slice to the Settings Slice Provider.
It needs a custom Slice because of the complicated listener logic
in the MasterSwitchPreferenceController, which makes it hard to
work-in synchronous set/get logic.
The one-off Slice requires extra changes, including:
- Including it in getDescendants
- Handling changes to wifi by the framework
This is the first change that uses SettingsLib's broadcast relay,
which allows settings to (un)register IntentFilters to a Uri,
allowing Settings Slices affected by the framework (quicksettings,
connectivity related, volume, etc) to be updated without action
on the Slice.
Bug: 70622039
Bug: 67997332
Test: robotests
Change-Id: Ibfe4736beecb833e3f6bb871b2eb5228a5fd3a34
Add a custom Wifi Slice to the Settings Slice Provider.
It needs a custom Slice because of the complicated listener logic
in the MasterSwitchPreferenceController, which makes it hard to
work-in synchronous set/get logic.
The one-off Slice requires extra changes, including:
- Including it in getDescendants
- Handling changes to wifi by the framework
This is the first change that uses SettingsLib's broadcast relay,
which allows settings to (un)register IntentFilters to a Uri,
allowing Settings Slices affected by the framework (quicksettings,
connectivity related, volume, etc) to be updated without action
on the Slice.
Fixes: 70622039
Fixes: 67997332
Test: robotests
Change-Id: Ia76738dd6baacd5522d52df2c61ebad86a600282
Merged-In: Ibfe4736beecb833e3f6bb871b2eb5228a5fd3a34
Add Slices for WifiCalling
WifiCalling Slice Provider:
1. If there is no activation needed or if the Wifi calling
is currently turned on - provide the slice to toggle the
value
2. Else display appropriate message with further instructions
WifiCalling Slice Broadcast Receiver:
1. If the action is turning off wifi or if there is no
activation needed. Change the setting with ImsManager.
2. And Ask to requery the slice in one second to display
updated settings if 1 is valid or display appropriate message
Bug: 63731862
Bug: 78192106
Test: Use support-slices-demos-debug.apk to test on device
Test: Robotests
Change-Id: I29e1822fd24ebcff575fa48ad93f84ed91bf4d87
Add Slices for WifiCalling
WifiCalling Slice Provider:
1. If there is no activation needed or if the Wifi calling
is currently turned on - provide the slice to toggle the
value
2. Else display appropriate message with further instructions
WifiCalling Slice Broadcast Receiver:
1. If the action is turning off wifi or if there is no
activation needed. Change the setting with ImsManager.
2. And Ask to requery the slice in one second to display
updated settings if 1 is valid or display appropriate message
Bug: 63731862
Bug: 78192106
Test: Use support-slices-demos-debug.apk to test on device
Test: Robotests
Change-Id: I29e1822fd24ebcff575fa48ad93f84ed91bf4d87
The keywords used for settings search are good when we are highly
confident the user is searching for as setting (settings search),
but not effective in a more general search setting (launcher,
an assistant). Thus, we should not index these keywords as Slice
keywords, and rely on the setting title and screen title as baseline
keywords.
Change-Id: I99e44834454b5949c4883f877e02be47498e06e2
Fixes: 78911847
Test: robotests
Previously if there were multiple clients it would trigger an infinite
loop as the cache gits dropped after the first bind, and the second
client would trigger another load. Instead now cache as long as slices
are pinned since thats the intended behavior of caching.
Test: make RunSettingsRoboTests
Change-Id: I7d29fab87573120b34cd55e1696c4c5b70fc891c
Fixes: 78471335
Allow things that can read the index to access slices too.
Test: existing tests unaffected
Bug: 77313888
Change-Id: I54c4b89eefb4354aa6b7dcafb7ac09dc96cbdbeb
getDescendants allows another app to collect a list
of all valid Uris for Settings Slices. Important for search,
assistant or launcher apps.
This means searching our database for all valid keys and building
a list of Uris for each of those keys.
Fixes: 77808328
Test: robotests
Change-Id: I3ae27e4661a7dcaab50b091ae2730013118af8a2
Add AccessibilityPreferenceController, which wraps all a11y settings
since they are share common infrastructure for enabling, current value,
and availability.
We add an overlay for OEMs to declare their bundled a11y services.
This is the only list of services that will be possible to enabled via
Settings slices.
Accessibility Slices are built by getting a list of valid services,
and indexing the service names as a key in the Slices DB. When they are
built at runtime, they use the generic A11yPrefController to get the status
and enable/disable the service.
Bug: 67997836
Bug: 67997672
Test: robotests
Change-Id: I66f905bf1c55eecb937945c4675c12bcbc96d698
When an inline slice is requested, and the setting is unavailable,
we should present more useful information to the user. This CL handles:
- Unsupported: return intent slice to Settings home page
- Disabled for user: intent to the setting page
- Unknown reason: intent to setting page
- Disabled dependency: Create intent-based Slice rather
than the requested inline slice.
Bug: 71640747
Test: robotests
Change-Id: I9c1a0ee36119d4f9f3b205e0824c251f4356db55
The index implementation is optional and left up to the OEM.
Test: Open settings, see content in index
Test: robo tests
Bug: 68378569
Bug: 76102600
Change-Id: Idb8bb1e0cabbbe92e7a852e2eadbdcd8c2ab7d56
Create the notion of an official platform slice.
This includes:
- Adding a second authority to the provider
- tagging slices in xml with a platform slice flag
- Including authority in the getUri method
Bug:73359139
Test: robotests
Change-Id: I5382be138a262dbc5a8324c34aab131c5d0d5516
Merged-In: I581ee6dfcdf935f452a15e89e5d055e375ff1877