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

Commit 23037435 authored by Santos Cordon's avatar Santos Cordon
Browse files

Remove unused BootCompletedRunnables

Test: Rebuilt, reran Android.

Change-Id: I1999dd32fe0517e747d24ba6bbdc65df335db691
parent e074ef59
Loading
Loading
Loading
Loading
+0 −21
Original line number Diff line number Diff line
@@ -334,9 +334,6 @@ public final class PowerManagerService extends SystemService
    // True if boot completed occurred.  We keep the screen on until this happens.
    private boolean mBootCompleted;

    // Runnables that should be triggered on boot completed
    private Runnable[] mBootCompletedRunnables;

    // True if auto-suspend mode is enabled.
    // Refer to autosuspend.h.
    private boolean mHalAutoSuspendModeEnabled;
@@ -732,14 +729,6 @@ public final class PowerManagerService extends SystemService
                userActivityNoUpdateLocked(
                        now, PowerManager.USER_ACTIVITY_EVENT_OTHER, 0, Process.SYSTEM_UID);
                updatePowerStateLocked();

                if (!ArrayUtils.isEmpty(mBootCompletedRunnables)) {
                    Slog.d(TAG, "Posting " + mBootCompletedRunnables.length + " delayed runnables");
                    for (Runnable r : mBootCompletedRunnables) {
                        BackgroundThread.getHandler().post(r);
                    }
                }
                mBootCompletedRunnables = null;
            }
        }
    }
@@ -954,16 +943,6 @@ public final class PowerManagerService extends SystemService
        mDirty |= DIRTY_SETTINGS;
    }

    private void postAfterBootCompleted(Runnable r) {
        if (mBootCompleted) {
            BackgroundThread.getHandler().post(r);
        } else {
            Slog.d(TAG, "Delaying runnable until system is booted");
            mBootCompletedRunnables = ArrayUtils.appendElement(Runnable.class,
                    mBootCompletedRunnables, r);
        }
    }

    private void handleSettingsChangedLocked() {
        updateSettingsLocked();
        updatePowerStateLocked();