We would like to remove all sub-text from Settings Search. But slice
view does not support API to configure the sub-text visibility.
Therefore, the only way is to remove the sub-text from slices directly.
Since Settings slices are also invoked by other apps, we can not
directly remove the sub-text.
Finally, we decide to check the caller's uid. If it comes from Settings
Search, we will return the slice without the sub-text.
Bug: 143118037
Test: visual, robotests
Change-Id: Iac72f1683a2c930592634e0599058890d86f669d
Consider subId when loading string resources in screen
WifiCallingSettingsForSub and Wi-Fi Calling slice.
This ensures that correct string resources is loaded in multi sim
scenario when operators are using customized strings.
Bug: 129893058
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiCallingPreferenceController
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiCallingSliceHelper
Change-Id: Ia5b763d4b59f7e738cb741b778bb859884a85198
- Replace new SliceAction with SliceAction.createDeeplink() or
SliceAction.create()
Test: make RunSettingsRoboTests
Change-Id: Ied34469d2220d8220a2dcc6c2fb4d32dd9cd9b8c
Fixes: 119879284
Having consistent import order will reduce chance of merge
conflict between internal and external master
Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
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
If a Slice cannot be changed, return null instead of
an error slice.
Bug: 80155832
Test: robotestst
Change-Id: Ib94136c449c6d9c1911f89833bba62fd2263daa4
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 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