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

Commit 9611c18a authored by T.J. Mercier's avatar T.J. Mercier
Browse files

Don't use android::base::StartsWith / EndsWith

These libbase functions now directly pass through to the standard
library. [1] Use the standard library directly, and eliminate this
dependency on libbase.

[1] https://r.android.com/c/platform/system/libbase/+/3315082

Change-Id: I83d79ffa2658f30ae09a7f27cedf14e62b5df41d
parent 07e913e8
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -37,19 +37,18 @@
#include <mutex>
#include <set>
#include <string>
#include <string_view>
#include <thread>

#include <android-base/file.h>
#include <android-base/logging.h>
#include <android-base/properties.h>
#include <android-base/stringprintf.h>
#include <android-base/strings.h>
#include <cutils/android_filesystem_config.h>
#include <processgroup/processgroup.h>
#include <task_profiles.h>

using android::base::GetBoolProperty;
using android::base::StartsWith;
using android::base::StringPrintf;
using android::base::WriteStringToFile;

@@ -255,7 +254,7 @@ static bool RemoveEmptyUidCgroups(const std::string& uid_path) {
                continue;
            }

            if (!StartsWith(dir->d_name, "pid_")) {
            if (!std::string_view(dir->d_name).starts_with("pid_")) {
                continue;
            }

@@ -296,7 +295,7 @@ void removeAllEmptyProcessGroups() {
                    continue;
                }

                if (!StartsWith(dir->d_name, "uid_")) {
                if (!std::string_view(dir->d_name).starts_with("uid_")) {
                    continue;
                }