Loading packages/VpnServices/src/com/android/server/vpn/AndroidServiceProxy.java +2 −1 Original line number Diff line number Diff line Loading @@ -84,6 +84,7 @@ public class AndroidServiceProxy extends ProcessProxy { throw new RuntimeException(e); } } Log.d(mTag, "----- Stop: " + mServiceName); SystemProperties.set(SVC_STOP_CMD, mServiceName); } Loading @@ -105,7 +106,7 @@ public class AndroidServiceProxy extends ProcessProxy { @Override protected void performTask() throws IOException { String svc = mServiceName; Log.d(mTag, "+++++ Execute: " + svc); Log.d(mTag, "+++++ Start: " + svc); SystemProperties.set(SVC_START_CMD, svc); boolean success = blockUntil(SVC_STATE_RUNNING, WAITING_TIME); Loading packages/VpnServices/src/com/android/server/vpn/VpnService.java +6 −4 Original line number Diff line number Diff line Loading @@ -299,12 +299,12 @@ abstract class VpnService<E extends VpnProfile> { private void saveVpnDnsProperties() { mOriginalDns1 = mOriginalDns2 = ""; for (int i = 0; i < 10; i++) { for (int i = 0; i < 5; i++) { mVpnDns1 = SystemProperties.get(VPN_DNS1); mVpnDns2 = SystemProperties.get(VPN_DNS2); if (mOriginalDns1.equals(mVpnDns1)) { Log.d(TAG, "wait for vpn dns to settle in..." + i); sleep(500); sleep(200); } else { mOriginalDns1 = SystemProperties.get(DNS1); mOriginalDns2 = SystemProperties.get(DNS2); Loading @@ -317,7 +317,9 @@ abstract class VpnService<E extends VpnProfile> { return; } } Log.e(TAG, "saveVpnDnsProperties(): DNS not updated??"); Log.d(TAG, "saveVpnDnsProperties(): DNS not updated??"); mOriginalDns1 = mVpnDns1 = SystemProperties.get(DNS1); mOriginalDns2 = mVpnDns2 = SystemProperties.get(DNS2); } private void saveAndSetDomainSuffices() { Loading Loading @@ -374,7 +376,7 @@ abstract class VpnService<E extends VpnProfile> { private void checkDnsProperties() { String dns1 = SystemProperties.get(DNS1); if (!mVpnDns1.equals(dns1)) { Log.w(TAG, " @@ !!! dns being overridden"); Log.w(TAG, " dns being overridden by: " + dns1); onError(); } } Loading vpn/java/android/net/vpn/VpnState.java +6 −1 Original line number Diff line number Diff line Loading @@ -26,8 +26,13 @@ package android.net.vpn; * {@link DISCONNECTING} and then {@link IDLE}. * {@link CANCELLED} is a state when a VPN connection attempt is aborted, and * is in transition to {@link IDLE}. * The {@link UNUSABLE} state indicates that the profile is not in a state for * connecting due to possibly the integrity of the fields or another profile is * connecting etc. * The {@link UNKNOWN} state indicates that the profile state is to be * determined. * {@hide} */ public enum VpnState { CONNECTING, DISCONNECTING, CANCELLED, CONNECTED, IDLE CONNECTING, DISCONNECTING, CANCELLED, CONNECTED, IDLE, UNUSABLE, UNKNOWN } Loading
packages/VpnServices/src/com/android/server/vpn/AndroidServiceProxy.java +2 −1 Original line number Diff line number Diff line Loading @@ -84,6 +84,7 @@ public class AndroidServiceProxy extends ProcessProxy { throw new RuntimeException(e); } } Log.d(mTag, "----- Stop: " + mServiceName); SystemProperties.set(SVC_STOP_CMD, mServiceName); } Loading @@ -105,7 +106,7 @@ public class AndroidServiceProxy extends ProcessProxy { @Override protected void performTask() throws IOException { String svc = mServiceName; Log.d(mTag, "+++++ Execute: " + svc); Log.d(mTag, "+++++ Start: " + svc); SystemProperties.set(SVC_START_CMD, svc); boolean success = blockUntil(SVC_STATE_RUNNING, WAITING_TIME); Loading
packages/VpnServices/src/com/android/server/vpn/VpnService.java +6 −4 Original line number Diff line number Diff line Loading @@ -299,12 +299,12 @@ abstract class VpnService<E extends VpnProfile> { private void saveVpnDnsProperties() { mOriginalDns1 = mOriginalDns2 = ""; for (int i = 0; i < 10; i++) { for (int i = 0; i < 5; i++) { mVpnDns1 = SystemProperties.get(VPN_DNS1); mVpnDns2 = SystemProperties.get(VPN_DNS2); if (mOriginalDns1.equals(mVpnDns1)) { Log.d(TAG, "wait for vpn dns to settle in..." + i); sleep(500); sleep(200); } else { mOriginalDns1 = SystemProperties.get(DNS1); mOriginalDns2 = SystemProperties.get(DNS2); Loading @@ -317,7 +317,9 @@ abstract class VpnService<E extends VpnProfile> { return; } } Log.e(TAG, "saveVpnDnsProperties(): DNS not updated??"); Log.d(TAG, "saveVpnDnsProperties(): DNS not updated??"); mOriginalDns1 = mVpnDns1 = SystemProperties.get(DNS1); mOriginalDns2 = mVpnDns2 = SystemProperties.get(DNS2); } private void saveAndSetDomainSuffices() { Loading Loading @@ -374,7 +376,7 @@ abstract class VpnService<E extends VpnProfile> { private void checkDnsProperties() { String dns1 = SystemProperties.get(DNS1); if (!mVpnDns1.equals(dns1)) { Log.w(TAG, " @@ !!! dns being overridden"); Log.w(TAG, " dns being overridden by: " + dns1); onError(); } } Loading
vpn/java/android/net/vpn/VpnState.java +6 −1 Original line number Diff line number Diff line Loading @@ -26,8 +26,13 @@ package android.net.vpn; * {@link DISCONNECTING} and then {@link IDLE}. * {@link CANCELLED} is a state when a VPN connection attempt is aborted, and * is in transition to {@link IDLE}. * The {@link UNUSABLE} state indicates that the profile is not in a state for * connecting due to possibly the integrity of the fields or another profile is * connecting etc. * The {@link UNKNOWN} state indicates that the profile state is to be * determined. * {@hide} */ public enum VpnState { CONNECTING, DISCONNECTING, CANCELLED, CONNECTED, IDLE CONNECTING, DISCONNECTING, CANCELLED, CONNECTED, IDLE, UNUSABLE, UNKNOWN }