mirror of
https://github.com/openharmony/bundlemanager_bundle_framework_lite.git
synced 2026-07-22 00:26:09 -04:00
fix problem
Signed-off-by: shilei <shilei91@huawei.com> Change-Id: I0d10f5de264235f1eaafa5f0563098c67d43370a
This commit is contained in:
@@ -41,7 +41,7 @@ public:
|
|||||||
int32_t MoveFile(const char *oldFile, const char *newFile);
|
int32_t MoveFile(const char *oldFile, const char *newFile);
|
||||||
int32_t RemoveFile(const char *file);
|
int32_t RemoveFile(const char *file);
|
||||||
int32_t RemoveInstallDirectory(const char *codePath, const char *dataPath, bool keepData);
|
int32_t RemoveInstallDirectory(const char *codePath, const char *dataPath, bool keepData);
|
||||||
int32_t CallClientInvoke(int32_t funcId, const char *firstPath, const char *secondPath);
|
int32_t CallClientInvoke(int32_t funcId, const char *firstPath, const char *secondPath, bool keepData = false);
|
||||||
static int32_t BundleDaemonCallback(uint32_t code, IpcIo* data, IpcIo* reply, MessageOption option);
|
static int32_t BundleDaemonCallback(uint32_t code, IpcIo* data, IpcIo* reply, MessageOption option);
|
||||||
static void DeathCallback(void* arg);
|
static void DeathCallback(void* arg);
|
||||||
static int Notify(IOwner owner, int code, IpcIo *reply);
|
static int Notify(IOwner owner, int code, IpcIo *reply);
|
||||||
|
|||||||
@@ -204,7 +204,8 @@ int32_t BundleDaemonClient::RegisterCallback()
|
|||||||
return WaitResultSync(EC_SUCCESS);
|
return WaitResultSync(EC_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t BundleDaemonClient::CallClientInvoke(int32_t funcId, const char *firstPath, const char *secondPath)
|
int32_t BundleDaemonClient::CallClientInvoke(int32_t funcId, const char *firstPath, const char *secondPath,
|
||||||
|
bool keepData)
|
||||||
{
|
{
|
||||||
IpcIo request;
|
IpcIo request;
|
||||||
char data[MAX_IO_SIZE];
|
char data[MAX_IO_SIZE];
|
||||||
@@ -215,6 +216,10 @@ int32_t BundleDaemonClient::CallClientInvoke(int32_t funcId, const char *firstPa
|
|||||||
|
|
||||||
WriteUint16(&request, strlen(firstPath));
|
WriteUint16(&request, strlen(firstPath));
|
||||||
|
|
||||||
|
if (funcId == REMOVE_INSTALL_DIRECTORY) {
|
||||||
|
WriteBool(&request, keepData);
|
||||||
|
}
|
||||||
|
|
||||||
Lock<Mutex> lock(mutex_);
|
Lock<Mutex> lock(mutex_);
|
||||||
#ifdef __LINUX__
|
#ifdef __LINUX__
|
||||||
return WaitResultSync(bdsClient_->Invoke(bdsClient_, funcId, &request, this, Notify));
|
return WaitResultSync(bdsClient_->Invoke(bdsClient_, funcId, &request, this, Notify));
|
||||||
@@ -366,6 +371,6 @@ int32_t BundleDaemonClient::RemoveInstallDirectory(const char *codePath, const c
|
|||||||
return EC_INVALID;
|
return EC_INVALID;
|
||||||
}
|
}
|
||||||
|
|
||||||
return CallClientInvoke(REMOVE_INSTALL_DIRECTORY, codePath, dataPath);
|
return CallClientInvoke(REMOVE_INSTALL_DIRECTORY, codePath, dataPath, keepData);
|
||||||
}
|
}
|
||||||
} // OHOS
|
} // OHOS
|
||||||
|
|||||||
Reference in New Issue
Block a user