Add Wifi calling Preference slice and other cleanup
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
7 files changed