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

Commit 0ac72cff authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

resolve merge conflicts of d77e675d to master

Change-Id: I211db442e0081ee51f889b1fe788dad08889c2ec
parents e8a23195 d77e675d
Loading
Loading
Loading
Loading
+9 −1420

File changed.

Preview size limit exceeded, changes collapsed.

+1418 −1

File changed.

Preview size limit exceeded, changes collapsed.

+22 −0
Original line number Diff line number Diff line
@@ -19,9 +19,31 @@

#include <sys/types.h>

#include <cutils/multiuser.h>

namespace android {
namespace installd {

/* dexopt needed flags matching those in dalvik.system.DexFile */
static constexpr int DEX2OAT_FROM_SCRATCH        = 1;
static constexpr int DEX2OAT_FOR_BOOT_IMAGE      = 2;
static constexpr int DEX2OAT_FOR_FILTER          = 3;
static constexpr int DEX2OAT_FOR_RELOCATION      = 4;
static constexpr int PATCHOAT_FOR_RELOCATION     = 5;

typedef int fd_t;

bool clear_reference_profile(const char* pkgname);
bool clear_current_profile(const char* pkgname, userid_t user);
bool clear_current_profiles(const char* pkgname);

bool move_ab(const char* apk_path, const char* instruction_set, const char* output_path);

bool analyse_profiles(uid_t uid, const char* pkgname);
bool dump_profiles(int32_t uid, const char* pkgname, const char* code_paths);

bool delete_odex(const char* apk_path, const char* instruction_set, const char* output_path);

int dexopt(const char *apk_path, uid_t uid, const char *pkgName, const char *instruction_set,
        int dexopt_needed, const char* oat_dir, int dexopt_flags, const char* compiler_filter,
        const char* volume_uuid, const char* shared_libraries);
+7 −0
Original line number Diff line number Diff line
@@ -216,6 +216,13 @@ std::string create_data_ref_profile_package_path(const char* package_name) {
    return StringPrintf("%s/ref/%s", android_profiles_dir.path, package_name);
}

// Keep profile paths in sync with ActivityThread.
constexpr const char* PRIMARY_PROFILE_NAME = "primary.prof";

std::string create_primary_profile(const std::string& profile_dir) {
    return StringPrintf("%s/%s", profile_dir.c_str(), PRIMARY_PROFILE_NAME);
}

std::vector<userid_t> get_known_users(const char* volume_uuid) {
    std::vector<userid_t> users;

+2 −0
Original line number Diff line number Diff line
@@ -93,6 +93,8 @@ std::string create_data_user_profiles_path(userid_t userid);
std::string create_data_user_profile_package_path(userid_t user, const char* package_name);
std::string create_data_ref_profile_package_path(const char* package_name);

std::string create_primary_profile(const std::string& profile_dir);

std::vector<userid_t> get_known_users(const char* volume_uuid);

int create_user_config_path(char path[PKG_PATH_MAX], userid_t userid);