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

Commit e08d6852 authored by Martijn Coenen's avatar Martijn Coenen Committed by Automerger Merge Worker
Browse files

Merge "Zygote: do not fail if CE app data dir not found." into udc-dev am: b5914f9e

parents fdff16ae b5914f9e
Loading
Loading
Loading
Loading
+10 −4
Original line number Original line Diff line number Diff line
@@ -1120,10 +1120,8 @@ static std::string getAppDataDirName(std::string_view parent_path, std::string_v
      }
      }
    }
    }
    // Fallback done
    // Fallback done

    ALOGW("Unable to find %s:%lld in %s", package_name.data(), ce_data_inode, parent_path.data());
    fail_fn(CREATE_ERROR("Unable to find %s:%lld in %s", package_name.data(),
    return "";
        ce_data_inode, parent_path.data()));
    return nullptr;
  }
  }
}
}


@@ -1144,11 +1142,19 @@ static void isolateAppDataPerPackage(int userId, std::string_view package_name,
                        true /*call_fail_fn*/);
                        true /*call_fail_fn*/);


  std::string ce_data_path = getAppDataDirName(mirrorCePath, package_name, ce_data_inode, fail_fn);
  std::string ce_data_path = getAppDataDirName(mirrorCePath, package_name, ce_data_inode, fail_fn);
  if (ce_data_path.empty()) {
    ALOGE("Ignoring missing CE app data dir for %s\n", package_name.data());
    return;
  }
  if (!createAndMountAppData(package_name, ce_data_path, mirrorCePath, actualCePath, fail_fn,
  if (!createAndMountAppData(package_name, ce_data_path, mirrorCePath, actualCePath, fail_fn,
                             false /*call_fail_fn*/)) {
                             false /*call_fail_fn*/)) {
    // CE might unlocks and the name is decrypted
    // CE might unlocks and the name is decrypted
    // get the name and mount again
    // get the name and mount again
    ce_data_path=getAppDataDirName(mirrorCePath, package_name, ce_data_inode, fail_fn);
    ce_data_path=getAppDataDirName(mirrorCePath, package_name, ce_data_inode, fail_fn);
    if (ce_data_path.empty()) {
      ALOGE("Ignoring missing CE app data dir for %s\n", package_name.data());
      return;
    }
    mountAppData(package_name, ce_data_path, mirrorCePath, actualCePath, fail_fn);
    mountAppData(package_name, ce_data_path, mirrorCePath, actualCePath, fail_fn);
  }
  }
}
}