Merge "KillZramBackingDevice: Return immediately if backing_dev is none."

This commit is contained in:
David Anderson 2021-05-26 03:29:05 +00:00 committed by Gerrit Code Review
commit 7e2d32bc06

View file

@ -478,6 +478,11 @@ static Result<void> KillZramBackingDevice() {
// cut the last "\n" // cut the last "\n"
backing_dev.erase(backing_dev.length() - 1); backing_dev.erase(backing_dev.length() - 1);
if (android::base::StartsWith(backing_dev, "none")) {
LOG(INFO) << "No zram backing device configured";
return {};
}
// shutdown zram handle // shutdown zram handle
Timer swap_timer; Timer swap_timer;
LOG(INFO) << "swapoff() start..."; LOG(INFO) << "swapoff() start...";