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

Commit d4fc4c7f authored by Sudheer Shanka's avatar Sudheer Shanka
Browse files

Reduce the timeout for waiting for the network state update.

Also add more info to wtf log.

Bug: 27803922
Test: manual
Change-Id: I746c7814a77eccc9206c36fa1fb5114a6baa3735
parent ad4c31fe
Loading
Loading
Loading
Loading
+4 −7
Original line number Diff line number Diff line
@@ -572,11 +572,10 @@ public class ActivityManagerService extends IActivityManager.Stub
    // Determines whether to take full screen screenshots
    static final boolean TAKE_FULLSCREEN_SCREENSHOTS = true;
    // STOPSHIP: Update default to a smaller value.
    /**
     * Default value for {@link Settings.Global#NETWORK_ACCESS_TIMEOUT_MS}.
     */
    private static final long NETWORK_ACCESS_TIMEOUT_DEFAULT_MS = 2000; // 2 sec
    private static final long NETWORK_ACCESS_TIMEOUT_DEFAULT_MS = 200; // 0.2 sec
    /**
     * State indicating that there is no need for any blocking for network.
@@ -4332,6 +4331,7 @@ public class ActivityManagerService extends IActivityManager.Stub
                        validateUid.idle = false;
                    }
                    validateUid.curProcState = validateUid.setProcState = item.processState;
                    validateUid.lastDispatchedProcStateSeq = item.procStateSeq;
                }
            }
        }
@@ -23800,11 +23800,8 @@ public class ActivityManagerService extends IActivityManager.Stub
                if (totalTime >= mWaitForNetworkTimeoutMs) {
                    Slog.wtf(TAG_NETWORK, "Total time waited for network rules to get updated: "
                            + totalTime + ". Uid: " + callingUid + " procStateSeq: "
                            + procStateSeq);
                } else if (DEBUG_NETWORK ||  totalTime >= mWaitForNetworkTimeoutMs / 2) {
                    Slog.d(TAG_NETWORK, "Total time waited for network rules to get updated: "
                            + totalTime + ". Uid: " + callingUid + " procStateSeq: "
                            + procStateSeq);
                            + procStateSeq + " UidRec: " + record
                            + " validateUidRec: " + mValidateUids.get(callingUid));
                }
            } catch (InterruptedException e) {
                Thread.currentThread().interrupt();