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

Commit d66ad88b authored by Milo Sredkov's avatar Milo Sredkov
Browse files

Remove the boot completed check from libbinder

Checking for sys.boot_completed in libbinder is not necessary since
IStatsBootstrapAtomService won't be present before boot anyway.

Remove the checks to avoid having SELinux problems.

Bug: 429018661
Bug: 429062529
Bug: 299356196
Test: atest binderUnitTest
Flag: build.RELEASE_LIBBINDER_BINDER_OBSERVER
Change-Id: Ie06974a633ebe1d90a4e69c3af8ac1dde85697f4
parent b18c8f50
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -40,14 +40,6 @@ sp<os::IStatsBootstrapAtomService> BinderStatsPusher::getBootstrapAtomServiceLoc
    if (!mLastServiceCheckSucceeded && (mServiceCheckTimeSec + kCheckServiceTimeoutSec > nowSec)) {
        return nullptr;
    };
    if (!mBootComplete) {
        // TODO(b/299356196): use gSystemBootCompleted instead
        if (android::base::GetIntProperty("sys.boot_completed", 0) == 0) {
            return nullptr;
        }
    }
    // store a boolean to reduce GetProperty calls
    mBootComplete = true;
    auto sm = defaultServiceManager();
    if (!sm) {
        LOG_ALWAYS_FATAL("defaultServiceManager() returned nullptr.");
+0 −2
Original line number Diff line number Diff line
@@ -83,8 +83,6 @@ private:
                               SpamStatsKeyHash,   // Hash
                               SpamStatsKeyEqual>; // KeyEqual

    // TODO(b/299356196): replace with gSystemBootCompleted
    bool mBootComplete = false;
    // If last service check was a success.
    bool mLastServiceCheckSucceeded = true;
    // time of last check