mirror of
https://github.com/openharmony/ability_ability_runtime.git
synced 2026-08-24 22:21:36 -04:00
!10192 备份恢复删除页面栈默认值修复
Merge pull request !10192 from sodanotgreen/master
This commit is contained in:
@@ -844,7 +844,7 @@ private:
|
||||
ThrowInvalidParamError(env, "Parse param bundleName failed, must be a string.");
|
||||
return CreateJsUndefined(env);
|
||||
}
|
||||
bool clearPageStack = false;
|
||||
bool clearPageStack = true;
|
||||
bool hasClearPageStack = false;
|
||||
if (argc > ARGC_ONE && ConvertFromJsValue(env, argv[INDEX_ONE], clearPageStack)) {
|
||||
hasClearPageStack = true;
|
||||
@@ -974,7 +974,7 @@ private:
|
||||
ThrowTooFewParametersError(env);
|
||||
return CreateJsUndefined(env);
|
||||
}
|
||||
|
||||
|
||||
int32_t missionId = 0;
|
||||
if (!ConvertFromJsValue(env, argv[INDEX_ZERO], missionId)) {
|
||||
TAG_LOGE(AAFwkTag::APPMGR, "get missionId wrong");
|
||||
@@ -1073,7 +1073,7 @@ private:
|
||||
ThrowInvalidParamError(env, "Parse param accountId failed, must be a number.");
|
||||
return CreateJsUndefined(env);
|
||||
}
|
||||
bool clearPageStack = false;
|
||||
bool clearPageStack = true;
|
||||
bool hasClearPageStack = false;
|
||||
if (argc > ARGC_TWO && ConvertFromJsValue(env, argv[INDEX_TWO], clearPageStack)) {
|
||||
hasClearPageStack = true;
|
||||
|
||||
@@ -595,7 +595,7 @@ napi_value JsApplicationContextUtils::OnKillProcessBySelf(napi_env env, NapiCall
|
||||
return CreateJsUndefined(env);
|
||||
}
|
||||
|
||||
bool clearPageStack = false;
|
||||
bool clearPageStack = true;
|
||||
bool hasClearPageStack = false;
|
||||
if (info.argc > ARGC_ZERO && ConvertFromJsValue(env, info.argv[0], clearPageStack)) {
|
||||
hasClearPageStack = true;
|
||||
|
||||
@@ -614,7 +614,7 @@ public:
|
||||
* @param clearPageStack.
|
||||
* @return Returns ERR_OK on success, others on failure.
|
||||
*/
|
||||
ErrCode KillProcess(const std::string &bundleName, const bool clearPageStack = true);
|
||||
ErrCode KillProcess(const std::string &bundleName, const bool clearPageStack = false);
|
||||
|
||||
#ifdef ABILITY_COMMAND_FOR_TEST
|
||||
/**
|
||||
|
||||
@@ -749,7 +749,7 @@ public:
|
||||
* @param bundleName.
|
||||
* @return Returns ERR_OK on success, others on failure.
|
||||
*/
|
||||
virtual int KillProcess(const std::string &bundleName, const bool clearPageStack = true) = 0;
|
||||
virtual int KillProcess(const std::string &bundleName, const bool clearPageStack = false) = 0;
|
||||
|
||||
#ifdef ABILITY_COMMAND_FOR_TEST
|
||||
/**
|
||||
|
||||
@@ -130,7 +130,7 @@ public:
|
||||
* @return ERR_OK, return back success, others fail.
|
||||
*/
|
||||
virtual int KillProcessWithAccount(
|
||||
const std::string &bundleName, const int accountId, const bool clearPageStack = true) = 0;
|
||||
const std::string &bundleName, const int accountId, const bool clearPageStack = false) = 0;
|
||||
|
||||
/**
|
||||
* UpdateApplicationInfoInstalled, call UpdateApplicationInfoInstalled() through proxy object,
|
||||
@@ -148,7 +148,7 @@ public:
|
||||
* @param bundleName, bundle name in Application record.
|
||||
* @return ERR_OK, return back success, others fail.
|
||||
*/
|
||||
virtual int KillApplication(const std::string &bundleName, const bool clearPageStack = true) = 0;
|
||||
virtual int KillApplication(const std::string &bundleName, const bool clearPageStack = false) = 0;
|
||||
|
||||
/**
|
||||
* ForceKillApplication, call ForceKillApplication() through proxy object, force kill the application.
|
||||
@@ -183,7 +183,7 @@ public:
|
||||
*
|
||||
* @return Returns ERR_OK on success, others on failure.
|
||||
*/
|
||||
virtual int KillApplicationSelf(const bool clearPageStack = true)
|
||||
virtual int KillApplicationSelf(const bool clearPageStack = false)
|
||||
{
|
||||
return ERR_OK;
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ public:
|
||||
* @return ERR_OK, return back success, others fail.
|
||||
*/
|
||||
virtual int32_t KillProcessWithAccount(
|
||||
const std::string &bundleName, const int accountId, const bool clearPageStack = true) override;
|
||||
const std::string &bundleName, const int accountId, const bool clearPageStack = false) override;
|
||||
|
||||
/**
|
||||
* UpdateApplicationInfoInstalled, call UpdateApplicationInfoInstalled() through proxy object,
|
||||
@@ -138,7 +138,7 @@ public:
|
||||
* @param bundleName, bundle name in Application record.
|
||||
* @return ERR_OK, return back success, others fail.
|
||||
*/
|
||||
virtual int32_t KillApplication(const std::string &bundleName, const bool clearPageStack = true) override;
|
||||
virtual int32_t KillApplication(const std::string &bundleName, const bool clearPageStack = false) override;
|
||||
|
||||
/**
|
||||
* ForceKillApplication, call ForceKillApplication() through proxy object, force kill the application.
|
||||
@@ -169,7 +169,7 @@ public:
|
||||
*/
|
||||
virtual int32_t KillApplicationByUid(const std::string &bundleName, const int uid) override;
|
||||
|
||||
virtual int KillApplicationSelf(const bool clearPageStack = true) override;
|
||||
virtual int KillApplicationSelf(const bool clearPageStack = false) override;
|
||||
|
||||
virtual int GetApplicationInfoByProcessID(const int pid, AppExecFwk::ApplicationInfo &application,
|
||||
bool &debug) override;
|
||||
|
||||
@@ -161,7 +161,7 @@ public:
|
||||
* @param bundleName, bundle name in Application record.
|
||||
* @return ERR_OK, return back success, others fail.
|
||||
*/
|
||||
virtual AppMgrResultCode KillApplication(const std::string &bundleName, const bool clearPageStack = true);
|
||||
virtual AppMgrResultCode KillApplication(const std::string &bundleName, const bool clearPageStack = false);
|
||||
|
||||
/**
|
||||
* ForceKillApplication, call ForceKillApplication() through proxy object, force kill the application.
|
||||
@@ -197,7 +197,7 @@ public:
|
||||
*
|
||||
* @return Returns ERR_OK on success, others on failure.
|
||||
*/
|
||||
virtual AppMgrResultCode KillApplicationSelf(const bool clearPageStack = true);
|
||||
virtual AppMgrResultCode KillApplicationSelf(const bool clearPageStack = false);
|
||||
|
||||
/**
|
||||
* ClearUpApplicationData, call ClearUpApplicationData() through proxy project,
|
||||
|
||||
@@ -120,7 +120,7 @@ public:
|
||||
void AppHasDarkRes(bool &darkRes);
|
||||
std::string GetBaseDir() const override;
|
||||
Global::Resource::DeviceType GetDeviceType() const override;
|
||||
void KillProcessBySelf(const bool clearPageStack = true);
|
||||
void KillProcessBySelf(const bool clearPageStack = false);
|
||||
int32_t GetProcessRunningInformation(AppExecFwk::RunningProcessInfo &info);
|
||||
int32_t RestartApp(const AAFwk::Want& want);
|
||||
|
||||
|
||||
@@ -342,7 +342,7 @@ public:
|
||||
*
|
||||
* @return error code
|
||||
*/
|
||||
void KillProcessBySelf(const bool clearPageStack = true);
|
||||
void KillProcessBySelf(const bool clearPageStack = false);
|
||||
|
||||
/**
|
||||
* @brief Get running informationfor cuirrent process
|
||||
|
||||
@@ -62,7 +62,7 @@ public:
|
||||
* @param bundleName.
|
||||
* @return Returns ERR_OK on success, others on failure.
|
||||
*/
|
||||
int KillProcessesByBundleName(const std::string &bundleName, const bool clearPageStack = true);
|
||||
int KillProcessesByBundleName(const std::string &bundleName, const bool clearPageStack = false);
|
||||
};
|
||||
} // namespace AppExecFwk
|
||||
} // namespace OHOS
|
||||
|
||||
@@ -590,7 +590,7 @@ public:
|
||||
* @param bundleName.
|
||||
* @return Returns ERR_OK on success, others on failure.
|
||||
*/
|
||||
virtual int KillProcess(const std::string &bundleName, const bool clearPageStack = true) override;
|
||||
virtual int KillProcess(const std::string &bundleName, const bool clearPageStack = false) override;
|
||||
|
||||
#ifdef ABILITY_COMMAND_FOR_TEST
|
||||
/**
|
||||
|
||||
@@ -839,7 +839,7 @@ public:
|
||||
* @param bundleName.
|
||||
* @return Returns ERR_OK on success, others on failure.
|
||||
*/
|
||||
virtual int KillProcess(const std::string &bundleName, const bool clearPageStack = true) override;
|
||||
virtual int KillProcess(const std::string &bundleName, const bool clearPageStack = false) override;
|
||||
|
||||
/**
|
||||
* Uninstall app
|
||||
|
||||
@@ -231,7 +231,7 @@ public:
|
||||
*
|
||||
* @param bundleName.
|
||||
*/
|
||||
int KillApplication(const std::string &bundleName, const bool clearPageStack = true);
|
||||
int KillApplication(const std::string &bundleName, const bool clearPageStack = false);
|
||||
|
||||
/**
|
||||
* ForceKillApplication, force kill the application.
|
||||
|
||||
@@ -133,7 +133,7 @@ public:
|
||||
* @return ERR_OK, return back success, others fail.
|
||||
*/
|
||||
virtual int32_t KillProcessWithAccount(
|
||||
const std::string &bundleName, const int accountId, const bool clearPageStack = true) override;
|
||||
const std::string &bundleName, const int accountId, const bool clearPageStack = false) override;
|
||||
|
||||
/**
|
||||
* UpdateApplicationInfoInstalled, call UpdateApplicationInfoInstalled() through proxy object,
|
||||
@@ -151,7 +151,7 @@ public:
|
||||
* @param bundleName, bundle name in Application record.
|
||||
* @return ERR_OK, return back success, others fail.
|
||||
*/
|
||||
virtual int32_t KillApplication(const std::string &bundleName, const bool clearPageStack = true) override;
|
||||
virtual int32_t KillApplication(const std::string &bundleName, const bool clearPageStack = false) override;
|
||||
|
||||
/**
|
||||
* ForceKillApplication, force kill the application.
|
||||
@@ -181,7 +181,7 @@ public:
|
||||
*/
|
||||
virtual int KillApplicationByUid(const std::string &bundleName, const int uid) override;
|
||||
|
||||
virtual int KillApplicationSelf(const bool clearPageStack = true) override;
|
||||
virtual int KillApplicationSelf(const bool clearPageStack = false) override;
|
||||
|
||||
int GetApplicationInfoByProcessID(const int pid, AppExecFwk::ApplicationInfo &application, bool &debug) override;
|
||||
|
||||
|
||||
@@ -271,7 +271,7 @@ public:
|
||||
*
|
||||
* @return ERR_OK, return back success, others fail.
|
||||
*/
|
||||
virtual int32_t KillApplication(const std::string &bundleName, const bool clearPageStack = true);
|
||||
virtual int32_t KillApplication(const std::string &bundleName, const bool clearPageStack = false);
|
||||
|
||||
/**
|
||||
* ForceKillApplication, force kill the application.
|
||||
@@ -301,7 +301,7 @@ public:
|
||||
*/
|
||||
virtual int32_t KillApplicationByUid(const std::string &bundleName, const int uid);
|
||||
|
||||
virtual int32_t KillApplicationSelf(const bool clearPageStack = true);
|
||||
virtual int32_t KillApplicationSelf(const bool clearPageStack = false);
|
||||
|
||||
/**
|
||||
* KillApplicationByUserId, kill the application by user ID.
|
||||
@@ -313,7 +313,7 @@ public:
|
||||
* @return ERR_OK, return back success, others fail.
|
||||
*/
|
||||
virtual int32_t KillApplicationByUserId(const std::string &bundleName, int32_t appCloneIndex, int userId,
|
||||
const bool clearPageStack = true);
|
||||
const bool clearPageStack = false);
|
||||
|
||||
/**
|
||||
* ClearUpApplicationData, clear the application data.
|
||||
@@ -1255,7 +1255,7 @@ private:
|
||||
* @return ERR_OK, return back success, others fail.
|
||||
*/
|
||||
int32_t KillApplicationByUserIdLocked(const std::string &bundleName, int32_t appCloneIndex, int32_t userId,
|
||||
const bool clearPageStack = true);
|
||||
const bool clearPageStack = false);
|
||||
|
||||
/**
|
||||
* WaitForRemoteProcessExit, Wait for the process to exit normally.
|
||||
@@ -1389,7 +1389,7 @@ private:
|
||||
bool CheckGetRunningInfoPermission() const;
|
||||
|
||||
int32_t KillApplicationByBundleName(
|
||||
const std::string &bundleName, const bool clearPageStack = true);
|
||||
const std::string &bundleName, const bool clearPageStack = false);
|
||||
|
||||
bool SendProcessStartEvent(const std::shared_ptr<AppRunningRecord> &appRecord);
|
||||
|
||||
|
||||
@@ -170,7 +170,7 @@ public:
|
||||
* @return Return true if found, otherwise return false.
|
||||
*/
|
||||
bool ProcessExitByBundleName(
|
||||
const std::string &bundleName, std::list<pid_t> &pids, const bool clearPageStack = true);
|
||||
const std::string &bundleName, std::list<pid_t> &pids, const bool clearPageStack = false);
|
||||
/**
|
||||
* Get Foreground Applications.
|
||||
*
|
||||
@@ -254,7 +254,7 @@ public:
|
||||
int32_t ProcessUpdateApplicationInfoInstalled(const ApplicationInfo &appInfo);
|
||||
|
||||
bool ProcessExitByBundleNameAndUid(
|
||||
const std::string &bundleName, const int uid, std::list<pid_t> &pids, const bool clearPageStack = true);
|
||||
const std::string &bundleName, const int uid, std::list<pid_t> &pids, const bool clearPageStack = false);
|
||||
bool GetPidsByUserId(int32_t userId, std::list<pid_t> &pids);
|
||||
|
||||
void PrepareTerminate(const sptr<IRemoteObject> &token, bool clearMissionFlag = false);
|
||||
|
||||
+1
-1
@@ -168,7 +168,7 @@ public:
|
||||
return releaseDataAbility_;
|
||||
}
|
||||
|
||||
int KillProcess(const std::string& bundleName, const bool clearPageStack = true) override;
|
||||
int KillProcess(const std::string& bundleName, const bool clearPageStack = false) override;
|
||||
|
||||
int UninstallApp(const std::string& bundleName, int32_t uid) override;
|
||||
|
||||
|
||||
+1
-1
@@ -123,7 +123,7 @@ public:
|
||||
* @param bundleName, bundle name in Application record.
|
||||
* @return ERR_OK, return back success, others fail.
|
||||
*/
|
||||
virtual AppMgrResultCode KillApplication(const std::string& bundleName, const bool clearPageStack = true);
|
||||
virtual AppMgrResultCode KillApplication(const std::string& bundleName, const bool clearPageStack = false);
|
||||
|
||||
/**
|
||||
* ClearUpApplicationData, call ClearUpApplicationData() through proxy project,
|
||||
|
||||
+1
-1
@@ -78,7 +78,7 @@ AppMgrResultCode AppMgrClient::KillProcessesByUserId(int32_t userId)
|
||||
}
|
||||
|
||||
AppMgrResultCode AppMgrClient::KillApplication(
|
||||
const std::string& bundleName, const bool clearPageStack = true)
|
||||
const std::string& bundleName, const bool clearPageStack = false)
|
||||
{
|
||||
return AppMgrResultCode::RESULT_OK;
|
||||
}
|
||||
|
||||
@@ -418,7 +418,7 @@ HWTEST_F(AppMgrServiceModuleTest, KillApplication_001, TestSize.Level1)
|
||||
Semaphore sem(0);
|
||||
|
||||
auto mockHandler = [&testResult, testBundleName, &sem](
|
||||
const std::string& bundleName, const bool clearPageStack = true) {
|
||||
const std::string& bundleName, const bool clearPageStack = false) {
|
||||
testResult = (bundleName == testBundleName);
|
||||
sem.Post();
|
||||
return 0;
|
||||
|
||||
@@ -142,7 +142,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual int KillProcess(const std::string& bundleName, const bool clearPageStack = true) override
|
||||
virtual int KillProcess(const std::string& bundleName, const bool clearPageStack = false) override
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
+1
-1
@@ -200,7 +200,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual int KillProcess(const std::string& bundleName, const bool clearPageStack = true)
|
||||
virtual int KillProcess(const std::string& bundleName, const bool clearPageStack = false)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual int KillProcess(const std::string& bundleName, const bool clearPageStack = true)
|
||||
virtual int KillProcess(const std::string& bundleName, const bool clearPageStack = false)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -210,7 +210,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual int KillProcess(const std::string& bundleName, const bool clearPageStack = true)
|
||||
virtual int KillProcess(const std::string& bundleName, const bool clearPageStack = false)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -215,7 +215,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual int KillProcess(const std::string& bundleName, const bool clearPageStack = true)
|
||||
virtual int KillProcess(const std::string& bundleName, const bool clearPageStack = false)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual int KillProcess(const std::string& bundleName, const bool clearPageStack = true)
|
||||
virtual int KillProcess(const std::string& bundleName, const bool clearPageStack = false)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual int KillProcess(const std::string& bundleName, const bool clearPageStack = true)
|
||||
virtual int KillProcess(const std::string& bundleName, const bool clearPageStack = false)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user