import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.SystemProperties;
-import android.telephony.Rlog;
import com.android.internal.telephony.IPhoneSubInfo;
import com.android.internal.telephony.ITelephony;
private static ITelephonyRegistry sRegistry;
private final Context mContext;
+ /**
+ * The allowed states of Wi-Fi calling.
+ *
+ * @hide
+ */
+ public interface WifiCallingChoices {
+ /** Always use Wi-Fi calling */
+ static final int ALWAYS_USE = 0;
+ /** Never use Wi-Fi calling */
+ static final int NEVER_USE = 1;
+ /** Ask the user whether to use Wi-Fi on every call */
+ static final int ASK_EVERY_TIME = 2;
+ }
+
/** @hide */
public TelephonyManager(Context context) {
Context appContext = context.getApplicationContext();
return mContext.getResources().getString(
com.android.internal.R.string.config_mms_user_agent_profile_url);
}
+
+ /**
+ * Obtain the current state of Wi-Fi calling.
+ *
+ * @hide
+ * @see android.telephony.TelephonyManager.WifiCallingChoices
+ */
+ public int getWhenToMakeWifiCalls() {
+ try {
+ return getITelephony().getWhenToMakeWifiCalls();
+ } catch (RemoteException ex) {
+ return WifiCallingChoices.NEVER_USE;
+ }
+ }
+
+ /**
+ * Set the current state of Wi-Fi calling.
+ *
+ * @hide
+ * @see android.telephony.TelephonyManager.WifiCallingChoices
+ */
+ public void setWhenToMakeWifiCalls(int state) {
+ try {
+ getITelephony().setWhenToMakeWifiCalls(state);
+ } catch (RemoteException ex) {
+ }
+ }
}
*/
void newIncomingThirdPartyCall(in ComponentName component, String callId,
String callerDisplayName);
+
+ /**
+ * Obtain the current state of Wi-Fi calling.
+ *
+ * @see android.telephony.TelephonyManager.WifiCallingChoices
+ */
+ int getWhenToMakeWifiCalls();
+
+ /**
+ * Set the current state of Wi-Fi calling.
+ *
+ * @see android.telephony.TelephonyManager.WifiCallingChoices
+ */
+ void setWhenToMakeWifiCalls(int state);
}