Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 964aa46a authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "PPPOE: Delay 5 seconds to start PPPOE"

parents a8bdca6e c775b9f6
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1461,7 +1461,11 @@
    <!-- Configuration that determines if ACTIVATE_REJECT_GGSN is to be treated as
         a permanent error -->
    <bool name="config_reject_ggsn_perm_failure">true</bool>

    <!-- Configuration that determines if PROTOCOL_ERRORS is to be treated as a
         permanent error -->
    <bool name="config_protocol_errors_perm_failure">true</bool>

    <!-- config delay timer to start PPPOE -->
    <integer name="config_delay_startPPPOE_timer" translatable="false">5000</integer>
</resources>
+3 −0
Original line number Diff line number Diff line
@@ -1834,4 +1834,7 @@
  <!-- Data Connectivity Error Configurations -->
  <java-symbol type="bool" name="config_reject_ggsn_perm_failure" />
  <java-symbol type="bool" name="config_protocol_errors_perm_failure" />

  <!-- config delay timer to start PPPOE -->
  <java-symbol type="integer" name="config_delay_startPPPOE_timer" />
</resources>
+17 −3
Original line number Diff line number Diff line
@@ -81,6 +81,10 @@ public class PPPOEService {

    public static final int CMD_START_PPPOE               = 0;
    public static final int CMD_STOP_PPPOE                = 1;
    public static final int CMD_START_PPPOE_DELAY         = 2;

    //default delay start PPPOE timer
    public static final int DELAY_START_PPPOE_TIMER       = 5 * 1000;

    /*
     * below ACTION and EXTRA definition are the requirement of China Telecom
@@ -222,12 +226,23 @@ public class PPPOEService {
            Log.i(TAG, "handleMessage msg is " + msg);
            switch(msg.what) {
                case CMD_START_PPPOE:
                    PPPOEConfig config = (PPPOEConfig) msg.obj;
                    startPPPOE(config);
                    long delayTimer = 0;
                    if (mContext == null) {
                        delayTimer = DELAY_START_PPPOE_TIMER;
                    } else {
                        delayTimer = mContext.getResources().getInteger(
                                com.android.internal.R.integer.config_delay_startPPPOE_timer);
                    }
                    mMainHandler.sendMessageDelayed(mMainHandler.obtainMessage(
                            CMD_START_PPPOE_DELAY, (PPPOEConfig) msg.obj), delayTimer);
                    break;
                case CMD_STOP_PPPOE:
                    stopPPPOE();
                    break;
                case CMD_START_PPPOE_DELAY:
                    PPPOEConfig config = (PPPOEConfig) msg.obj;
                    startPPPOE(config);
                    break;
                default:
                    break;
            }
@@ -235,7 +250,6 @@ public class PPPOEService {

    };


    private void startPPPOE(PPPOEConfig config) {
        NativeDaemonEvent event = null;
        try {