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

Commit fc6627a8 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 9054

* changes:
  Increase waiting time for data disable action in setPowerStateToDesired().
parents 79ef673d 6afac8b2
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -77,7 +77,6 @@ public abstract class ServiceStateTracker extends Handler {
    // waiting period before recheck gprs and voice registration
    public static final int DEFAULT_GPRS_CHECK_PERIOD_MILLIS = 60 * 1000;

    public static final int MAX_NUM_DATA_STATE_READS = 15;
    public static final int DATA_STATE_POLL_SLEEP_MS = 100;

    //*****GSM events
+4 −3
Original line number Diff line number Diff line
@@ -504,9 +504,10 @@ final class CdmaServiceStateTracker extends ServiceStateTracker {
            msg.obj = CDMAPhone.REASON_RADIO_TURNED_OFF;
            dcTracker.sendMessage(msg);

            // Poll data state up to 15 times, with a 100ms delay
            // totaling 1.5 sec. Normal data disable action will finish in 100ms.
            for (int i = 0; i < MAX_NUM_DATA_STATE_READS; i++) {
            // Poll data state up to 50 times, with a 100ms delay
            // totaling 5 sec.
            // TODO: change the 5 seconds wait from blocking to non-blocking.
            for (int i = 0; i < 50; i++) {
                DataConnectionTracker.State currentState = dcTracker.getState();
                if (currentState != DataConnectionTracker.State.CONNECTED
                        && currentState != DataConnectionTracker.State.DISCONNECTING) {
+2 −0
Original line number Diff line number Diff line
@@ -151,6 +151,8 @@ final class GsmServiceStateTracker extends ServiceStateTracker {
    static final int PS_NOTIFICATION = 888; //id to update and cancel PS restricted
    static final int CS_NOTIFICATION = 999; //id to update and cancel CS restricted

    static final int MAX_NUM_DATA_STATE_READS = 15;

    private ContentObserver mAutoTimeObserver = new ContentObserver(new Handler()) {
        @Override
        public void onChange(boolean selfChange) {