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

Commit 43b5ea4a authored by Sudheer Shanka's avatar Sudheer Shanka
Browse files

Check and block for network connectivity in onStart as well.

Bug: 62065876
Test: manual
Change-Id: I75d982ef3cfd1e0a4e944614bbf8667a8835c61a
parent ea2945f4
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2956,6 +2956,7 @@ public final class ActivityThread {
            r.activity.mTemporaryPause = true;
            mInstrumentation.callActivityOnPause(r.activity);
        }
        checkAndBlockForNetworkAccess();
        deliverNewIntents(r, intents);
        if (resumed) {
            r.activity.performResume();
@@ -3585,6 +3586,7 @@ public final class ActivityThread {
            try {
                r.activity.onStateNotSaved();
                r.activity.mFragments.noteStateNotSaved();
                checkAndBlockForNetworkAccess();
                if (r.pendingIntents != null) {
                    deliverNewIntents(r, r.pendingIntents);
                    r.pendingIntents = null;
@@ -4340,6 +4342,7 @@ public final class ActivityThread {
                    }
                }
            }
            checkAndBlockForNetworkAccess();
            deliverResults(r, res.results);
            if (resumed) {
                r.activity.performResume();
+1 −1
Original line number Diff line number Diff line
@@ -24189,7 +24189,7 @@ public class ActivityManagerService extends IActivityManager.Stub
                record.networkStateLock.wait(mWaitForNetworkTimeoutMs);
                record.waitingForNetwork = false;
                final long totalTime = SystemClock.uptimeMillis() - startTime;
                if (totalTime >= mWaitForNetworkTimeoutMs) {
                if (totalTime >= mWaitForNetworkTimeoutMs || DEBUG_NETWORK) {
                    Slog.wtf(TAG_NETWORK, "Total time waited for network rules to get updated: "
                            + totalTime + ". Uid: " + callingUid + " procStateSeq: "
                            + procStateSeq + " UidRec: " + record