Loading cmds/installd/InstalldNativeService.cpp +19 −0 Original line number Diff line number Diff line Loading @@ -1176,6 +1176,25 @@ binder::Status InstalldNativeService::destroyAppProfiles(const std::string& pack return res; } binder::Status InstalldNativeService::deleteReferenceProfile(const std::string& packageName, const std::string& profileName) { ENFORCE_UID(AID_SYSTEM); CHECK_ARGUMENT_PACKAGE_NAME(packageName); LOCK_PACKAGE(); // This function only supports primary dex'es. std::string path = create_reference_profile_path(packageName, profileName, /*is_secondary_dex=*/false); if (unlink(path.c_str()) != 0) { if (errno == ENOENT) { return ok(); } else { return error("Failed to delete profile " + profileName + " for " + packageName); } } return ok(); } binder::Status InstalldNativeService::destroyAppData(const std::optional<std::string>& uuid, const std::string& packageName, int32_t userId, int32_t flags, int64_t ceDataInode) { ENFORCE_UID(AID_SYSTEM); Loading cmds/installd/InstalldNativeService.h +2 −0 Original line number Diff line number Diff line Loading @@ -140,6 +140,8 @@ public: bool* _aidl_return); binder::Status clearAppProfiles(const std::string& packageName, const std::string& profileName); binder::Status destroyAppProfiles(const std::string& packageName); binder::Status deleteReferenceProfile(const std::string& packageName, const std::string& profileName); binder::Status createProfileSnapshot(int32_t appId, const std::string& packageName, const std::string& profileName, const std::string& classpath, bool* _aidl_return); Loading cmds/installd/binder/android/os/IInstalld.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,7 @@ interface IInstalld { @utf8InCpp String packageName, @utf8InCpp String profileName); void clearAppProfiles(@utf8InCpp String packageName, @utf8InCpp String profileName); void destroyAppProfiles(@utf8InCpp String packageName); void deleteReferenceProfile(@utf8InCpp String packageName, @utf8InCpp String profileName); boolean createProfileSnapshot(int appId, @utf8InCpp String packageName, @utf8InCpp String profileName, @utf8InCpp String classpath); Loading Loading
cmds/installd/InstalldNativeService.cpp +19 −0 Original line number Diff line number Diff line Loading @@ -1176,6 +1176,25 @@ binder::Status InstalldNativeService::destroyAppProfiles(const std::string& pack return res; } binder::Status InstalldNativeService::deleteReferenceProfile(const std::string& packageName, const std::string& profileName) { ENFORCE_UID(AID_SYSTEM); CHECK_ARGUMENT_PACKAGE_NAME(packageName); LOCK_PACKAGE(); // This function only supports primary dex'es. std::string path = create_reference_profile_path(packageName, profileName, /*is_secondary_dex=*/false); if (unlink(path.c_str()) != 0) { if (errno == ENOENT) { return ok(); } else { return error("Failed to delete profile " + profileName + " for " + packageName); } } return ok(); } binder::Status InstalldNativeService::destroyAppData(const std::optional<std::string>& uuid, const std::string& packageName, int32_t userId, int32_t flags, int64_t ceDataInode) { ENFORCE_UID(AID_SYSTEM); Loading
cmds/installd/InstalldNativeService.h +2 −0 Original line number Diff line number Diff line Loading @@ -140,6 +140,8 @@ public: bool* _aidl_return); binder::Status clearAppProfiles(const std::string& packageName, const std::string& profileName); binder::Status destroyAppProfiles(const std::string& packageName); binder::Status deleteReferenceProfile(const std::string& packageName, const std::string& profileName); binder::Status createProfileSnapshot(int32_t appId, const std::string& packageName, const std::string& profileName, const std::string& classpath, bool* _aidl_return); Loading
cmds/installd/binder/android/os/IInstalld.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -82,6 +82,7 @@ interface IInstalld { @utf8InCpp String packageName, @utf8InCpp String profileName); void clearAppProfiles(@utf8InCpp String packageName, @utf8InCpp String profileName); void destroyAppProfiles(@utf8InCpp String packageName); void deleteReferenceProfile(@utf8InCpp String packageName, @utf8InCpp String profileName); boolean createProfileSnapshot(int appId, @utf8InCpp String packageName, @utf8InCpp String profileName, @utf8InCpp String classpath); Loading