1 package com.android.settings.slices; 2 3 import android.content.Context; 4 import android.net.Uri; 5 6 import com.android.settings.network.telephony.Enhanced4gLteSliceHelper; 7 import com.android.settings.wifi.calling.WifiCallingSliceHelper; 8 9 /** 10 * Manages Slices in Settings. 11 */ 12 public interface SlicesFeatureProvider { 13 14 boolean DEBUG = false; 15 getSliceDataConverter(Context context)16 SliceDataConverter getSliceDataConverter(Context context); 17 18 /** 19 * Starts a new UI session for the purpose of using Slices. 20 * 21 * A UI session is defined as a duration of time when user stays in a UI screen. Screen rotation 22 * does not break the continuation of session, going to a sub-page and coming out does not break 23 * the continuation either. Leaving the page and coming back breaks it. 24 */ newUiSession()25 void newUiSession(); 26 27 /** 28 * Returns the token created in {@link #newUiSession}. 29 */ getUiSessionToken()30 long getUiSessionToken(); 31 32 /** 33 * Asynchronous call to index the data used to build Slices. 34 * If the data is already indexed, the data will not change. 35 */ indexSliceDataAsync(Context context)36 void indexSliceDataAsync(Context context); 37 38 /** 39 * Indexes the data used to build Slices. 40 * If the data is already indexed, the data will not change. 41 */ indexSliceData(Context context)42 void indexSliceData(Context context); 43 44 45 /** 46 * Return a {@link CustomSliceable} associated to the Uri. 47 * <p> 48 * Do not change this method signature to accommodate for a special-case sliceable - a context 49 * is the only thing that should be needed to create the object. 50 */ getSliceableFromUri(Context context, Uri uri)51 CustomSliceable getSliceableFromUri(Context context, Uri uri); 52 53 /** 54 * Gets new WifiCallingSliceHelper object 55 */ getNewWifiCallingSliceHelper(Context context)56 WifiCallingSliceHelper getNewWifiCallingSliceHelper(Context context); 57 58 /** 59 * Gets new Enhanced4gLteSliceHelper object 60 */ getNewEnhanced4gLteSliceHelper(Context context)61 Enhanced4gLteSliceHelper getNewEnhanced4gLteSliceHelper(Context context); 62 } 63 64