Loading core/java/android/net/ConnectivityManager.java +64 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.os.Binder; import android.os.Build.VERSION_CODES; import android.os.Messenger; import android.os.RemoteException; import android.os.ResultReceiver; import android.provider.Settings; import java.net.InetAddress; Loading Loading @@ -1294,4 +1295,67 @@ public class ConnectivityManager { } catch (RemoteException e) { } } /** * The ResultReceiver resultCode for checkMobileProvisioning (CMP_RESULT_CODE) */ /** * No connection was possible to the network. * {@hide} */ public static final int CMP_RESULT_CODE_NO_CONNECTION = 0; /** * A connection was made to the internet, all is well. * {@hide} */ public static final int CMP_RESULT_CODE_CONNECTABLE = 1; /** * A connection was made but there was a redirection, we appear to be in walled garden. * This is an indication of a warm sim on a mobile network. * {@hide} */ public static final int CMP_RESULT_CODE_REDIRECTED = 2; /** * A connection was made but no dns server was available to resolve a name to address. * This is an indication of a warm sim on a mobile network. * * {@hide} */ public static final int CMP_RESULT_CODE_NO_DNS = 3; /** * A connection was made but could not open a TCP connection. * This is an indication of a warm sim on a mobile network. * {@hide} */ public static final int CMP_RESULT_CODE_NO_TCP_CONNECTION = 4; /** * Check mobile provisioning. The resultCode passed to * onReceiveResult will be one of the CMP_RESULT_CODE_xxxx values above. * This may take a minute or more to complete. * * @param sendNotificaiton, when true a notification will be sent to user. * @param suggestedTimeOutMs, timeout in milliseconds * @param resultReceiver needs to be supplied to receive the result * * @return time out that will be used, maybe less that suggestedTimeOutMs * -1 if an error. * * {@hide} */ public int checkMobileProvisioning(boolean sendNotification, int suggestedTimeOutMs, ResultReceiver resultReceiver) { int timeOutMs = -1; try { timeOutMs = mService.checkMobileProvisioning(sendNotification, suggestedTimeOutMs, resultReceiver); } catch (RemoteException e) { } return timeOutMs; } } core/java/android/net/IConnectivityManager.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.net.ProxyProperties; import android.os.IBinder; import android.os.Messenger; import android.os.ParcelFileDescriptor; import android.os.ResultReceiver; import com.android.internal.net.LegacyVpnInfo; import com.android.internal.net.VpnConfig; Loading Loading @@ -131,4 +132,6 @@ interface IConnectivityManager void supplyMessenger(int networkType, in Messenger messenger); int findConnectionTypeForIface(in String iface); int checkMobileProvisioning(boolean sendNotification, int suggestedTimeOutMs, in ResultReceiver resultReceiver); } core/java/android/net/MobileDataStateTracker.java +13 −0 Original line number Diff line number Diff line Loading @@ -493,6 +493,19 @@ public class MobileDataStateTracker implements NetworkStateTracker { } } /** * Eanble/disable FailFast * * @param enabled is DctConstants.ENABLED/DISABLED */ public void setEnableFailFastMobileData(int enabled) { if (DBG) log("setEnableFailFastMobileData(enabled=" + enabled + ")"); final AsyncChannel channel = mDataConnectionTrackerAc; if (channel != null) { channel.sendMessage(DctConstants.CMD_SET_ENABLE_FAIL_FAST_MOBILE_DATA, enabled); } } /** * carrier dependency is met/unmet * @param met Loading core/res/res/values/config.xml +9 −0 Original line number Diff line number Diff line Loading @@ -772,6 +772,15 @@ <!-- IP address of the dns server to use if nobody else suggests one --> <string name="config_default_dns_server" translatable="false">8.8.8.8</string> <!-- The default mobile provisioning url. Empty by default, maybe overridden by an mcc/mnc specific config.xml --> <string name="mobile_provisioning_url" translatable="false"></string> <!-- This url is used as the default url when redirection is detected. Any should work as all url's get redirected. But maybe overridden by if needed. --> <string name="mobile_redirected_provisioning_url" translatable="false">http://google.com</string> <!-- The default character set for GsmAlphabet --> <!-- Empty string means MBCS is not considered --> <string name="gsm_alphabet_default_charset" translatable="false"></string> Loading core/res/res/values/symbols.xml +2 −0 Original line number Diff line number Diff line Loading @@ -703,6 +703,8 @@ <java-symbol type="string" name="preposition_for_time" /> <java-symbol type="string" name="progress_erasing" /> <java-symbol type="string" name="progress_unmounting" /> <java-symbol type="string" name="mobile_provisioning_url" /> <java-symbol type="string" name="mobile_redirected_provisioning_url" /> <java-symbol type="string" name="reboot_safemode_confirm" /> <java-symbol type="string" name="reboot_safemode_title" /> <java-symbol type="string" name="relationTypeAssistant" /> Loading Loading
core/java/android/net/ConnectivityManager.java +64 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ import android.os.Binder; import android.os.Build.VERSION_CODES; import android.os.Messenger; import android.os.RemoteException; import android.os.ResultReceiver; import android.provider.Settings; import java.net.InetAddress; Loading Loading @@ -1294,4 +1295,67 @@ public class ConnectivityManager { } catch (RemoteException e) { } } /** * The ResultReceiver resultCode for checkMobileProvisioning (CMP_RESULT_CODE) */ /** * No connection was possible to the network. * {@hide} */ public static final int CMP_RESULT_CODE_NO_CONNECTION = 0; /** * A connection was made to the internet, all is well. * {@hide} */ public static final int CMP_RESULT_CODE_CONNECTABLE = 1; /** * A connection was made but there was a redirection, we appear to be in walled garden. * This is an indication of a warm sim on a mobile network. * {@hide} */ public static final int CMP_RESULT_CODE_REDIRECTED = 2; /** * A connection was made but no dns server was available to resolve a name to address. * This is an indication of a warm sim on a mobile network. * * {@hide} */ public static final int CMP_RESULT_CODE_NO_DNS = 3; /** * A connection was made but could not open a TCP connection. * This is an indication of a warm sim on a mobile network. * {@hide} */ public static final int CMP_RESULT_CODE_NO_TCP_CONNECTION = 4; /** * Check mobile provisioning. The resultCode passed to * onReceiveResult will be one of the CMP_RESULT_CODE_xxxx values above. * This may take a minute or more to complete. * * @param sendNotificaiton, when true a notification will be sent to user. * @param suggestedTimeOutMs, timeout in milliseconds * @param resultReceiver needs to be supplied to receive the result * * @return time out that will be used, maybe less that suggestedTimeOutMs * -1 if an error. * * {@hide} */ public int checkMobileProvisioning(boolean sendNotification, int suggestedTimeOutMs, ResultReceiver resultReceiver) { int timeOutMs = -1; try { timeOutMs = mService.checkMobileProvisioning(sendNotification, suggestedTimeOutMs, resultReceiver); } catch (RemoteException e) { } return timeOutMs; } }
core/java/android/net/IConnectivityManager.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.net.ProxyProperties; import android.os.IBinder; import android.os.Messenger; import android.os.ParcelFileDescriptor; import android.os.ResultReceiver; import com.android.internal.net.LegacyVpnInfo; import com.android.internal.net.VpnConfig; Loading Loading @@ -131,4 +132,6 @@ interface IConnectivityManager void supplyMessenger(int networkType, in Messenger messenger); int findConnectionTypeForIface(in String iface); int checkMobileProvisioning(boolean sendNotification, int suggestedTimeOutMs, in ResultReceiver resultReceiver); }
core/java/android/net/MobileDataStateTracker.java +13 −0 Original line number Diff line number Diff line Loading @@ -493,6 +493,19 @@ public class MobileDataStateTracker implements NetworkStateTracker { } } /** * Eanble/disable FailFast * * @param enabled is DctConstants.ENABLED/DISABLED */ public void setEnableFailFastMobileData(int enabled) { if (DBG) log("setEnableFailFastMobileData(enabled=" + enabled + ")"); final AsyncChannel channel = mDataConnectionTrackerAc; if (channel != null) { channel.sendMessage(DctConstants.CMD_SET_ENABLE_FAIL_FAST_MOBILE_DATA, enabled); } } /** * carrier dependency is met/unmet * @param met Loading
core/res/res/values/config.xml +9 −0 Original line number Diff line number Diff line Loading @@ -772,6 +772,15 @@ <!-- IP address of the dns server to use if nobody else suggests one --> <string name="config_default_dns_server" translatable="false">8.8.8.8</string> <!-- The default mobile provisioning url. Empty by default, maybe overridden by an mcc/mnc specific config.xml --> <string name="mobile_provisioning_url" translatable="false"></string> <!-- This url is used as the default url when redirection is detected. Any should work as all url's get redirected. But maybe overridden by if needed. --> <string name="mobile_redirected_provisioning_url" translatable="false">http://google.com</string> <!-- The default character set for GsmAlphabet --> <!-- Empty string means MBCS is not considered --> <string name="gsm_alphabet_default_charset" translatable="false"></string> Loading
core/res/res/values/symbols.xml +2 −0 Original line number Diff line number Diff line Loading @@ -703,6 +703,8 @@ <java-symbol type="string" name="preposition_for_time" /> <java-symbol type="string" name="progress_erasing" /> <java-symbol type="string" name="progress_unmounting" /> <java-symbol type="string" name="mobile_provisioning_url" /> <java-symbol type="string" name="mobile_redirected_provisioning_url" /> <java-symbol type="string" name="reboot_safemode_confirm" /> <java-symbol type="string" name="reboot_safemode_title" /> <java-symbol type="string" name="relationTypeAssistant" /> Loading