DO NOT MERGE Add Slices for WifiCalling

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
This commit is contained in:
Naina Nalluri
2018-05-02 14:30:11 -07:00
parent 26453818b9
commit e6bf71abed
7 changed files with 725 additions and 7 deletions

View File

@@ -21,6 +21,7 @@ import static com.android.settings.slices.SettingsSliceProvider.ACTION_TOGGLE_CH
import static com.android.settings.slices.SettingsSliceProvider.ACTION_WIFI_CHANGED;
import static com.android.settings.slices.SettingsSliceProvider.EXTRA_SLICE_KEY;
import static com.android.settings.slices.SettingsSliceProvider.EXTRA_SLICE_PLATFORM_DEFINED;
import static com.android.settings.wifi.calling.WifiCallingSliceHelper.ACTION_WIFI_CALLING_CHANGED;
import android.app.slice.Slice;
import android.content.BroadcastReceiver;
@@ -79,6 +80,12 @@ public class SliceBroadcastReceiver extends BroadcastReceiver {
context.getContentResolver().notifyChange(uri, null);
}, 1000);
break;
case ACTION_WIFI_CALLING_CHANGED:
FeatureFactory.getFactory(context)
.getSlicesFeatureProvider()
.getNewWifiCallingSliceHelper(context)
.handleWifiCallingChanged(intent);
break;
}
}