Home
last modified time | relevance | path

Searched refs:appStateData (Results 1 – 25 of 113) sorted by relevance

12345

/ohos5.0/foundation/communication/wifi/wifi/test/wifi_standard/wifi_framework/wifi_manage/unittest/common/
H A Dwifi_app_state_aware_test.cpp75 appStateData->bundleName = "";
76 appStateData->isFocused = true;
78 appStateData->uid = -1;
110 appStateData.bundleName = "";
111 appStateData.isFocused = true;
113 appStateData.uid = -1;
147 appStateData->bundleName = "";
150 appStateData->uid = -1;
162 appStateData->uid = -1;
174 appStateData->uid = -1;
[all …]
/ohos5.0/foundation/resourceschedule/resource_schedule_service/cgroup_sched/framework/sched_controller/
H A Dapp_state_observer.cpp34 if (!ValidateAppStateData(appStateData)) { in OnForegroundApplicationChanged()
176 if (!ValidateAppStateData(appStateData)) { in OnApplicationStateChanged()
183 auto uid = appStateData.uid; in OnApplicationStateChanged()
184 auto pid = appStateData.pid; in OnApplicationStateChanged()
186 auto state = appStateData.state; in OnApplicationStateChanged()
199 ResSchedUtils::GetInstance().ReportAppStateInProcess(appStateData.state, appStateData.pid); in OnApplicationStateChanged()
204 payload["pid"] = appStateData.pid; in MarshallingAppStateData()
205 payload["uid"] = appStateData.uid; in MarshallingAppStateData()
214 if (!ValidateAppStateData(appStateData)) { in OnAppStateChanged()
223 ResSchedUtils::GetInstance().ReportAppStateInProcess(appStateData.state, appStateData.pid); in OnAppStateChanged()
[all …]
/ohos5.0/base/security/access_token/services/common/app_manager/src/
H A Dapp_state_data.cpp33 if (appStateData == nullptr) { in Unmarshalling()
36 appStateData->bundleName = parcel.ReadString(); in Unmarshalling()
37 appStateData->uid = parcel.ReadInt32(); in Unmarshalling()
38 appStateData->state = parcel.ReadInt32(); in Unmarshalling()
39 appStateData->pid = parcel.ReadInt32(); in Unmarshalling()
40 appStateData->accessTokenId = parcel.ReadUint32(); in Unmarshalling()
41 appStateData->isFocused = parcel.ReadBool(); in Unmarshalling()
42 appStateData->extensionType = parcel.ReadInt32(); in Unmarshalling()
43 parcel.ReadInt32Vector(&appStateData->renderPids); in Unmarshalling()
47 appStateData->appIndex = parcel.ReadInt32(); in Unmarshalling()
[all …]
/ohos5.0/base/useriam/user_auth_framework/test/unittest/services/src/
H A Dcontext_appstate_observer_test.cpp95 AppStateData appStateData; variable
97 appStateData.bundleName = "com.homs.settings";
106 AppStateData appStateData; variable
108 appStateData.bundleName = "com.homs.settings";
117 AppStateData appStateData; variable
119 appStateData.bundleName = "com.homs.settings";
128 AppStateData appStateData; variable
130 appStateData.bundleName = "com.homs.settings";
139 AppStateData appStateData; variable
141 appStateData.bundleName = "com.homs.settings";
[all …]
/ohos5.0/base/security/access_token/interfaces/innerkits/privacy/test/unittest/app_manager_client/
H A Dapp_state_data.cpp33 if (appStateData == nullptr) { in Unmarshalling()
36 appStateData->bundleName = parcel.ReadString(); in Unmarshalling()
37 appStateData->uid = parcel.ReadInt32(); in Unmarshalling()
38 appStateData->state = parcel.ReadInt32(); in Unmarshalling()
39 appStateData->pid = parcel.ReadInt32(); in Unmarshalling()
40 appStateData->accessTokenId = parcel.ReadUint32(); in Unmarshalling()
41 appStateData->isFocused = parcel.ReadBool(); in Unmarshalling()
42 appStateData->extensionType = parcel.ReadInt32(); in Unmarshalling()
43 parcel.ReadInt32Vector(&appStateData->renderPids); in Unmarshalling()
45 appStateData->isSplitScreenMode = parcel.ReadBool(); in Unmarshalling()
[all …]
/ohos5.0/foundation/communication/wifi/wifi/services/wifi_standard/wifi_framework/wifi_manage/wifi_common/
H A Dwifi_app_state_aware.cpp136 …WifiProtectManager::GetInstance().OnAppForegroudChanged(appStateData.bundleName, appStateData.stat… in OnForegroundAppChanged()
140 mWifiAppStateAwareCallbacks.OnForegroundAppChanged(appStateData, mInstId); in OnForegroundAppChanged()
221 void AppStateObserver::OnAppStarted(const AppExecFwk::AppStateData &appStateData) in OnAppStarted() argument
224 __func__, appStateData.bundleName.c_str(), appStateData.uid, in OnAppStarted()
225 appStateData.state, appStateData.isFocused); in OnAppStarted()
231 __func__, appStateData.bundleName.c_str(), appStateData.uid, in OnAppStopped()
232 appStateData.state, appStateData.isFocused); in OnAppStopped()
234 if (appStateData.bundleName.empty()) { in OnAppStopped()
238 WifiProtectManager::GetInstance().OnAppDied(appStateData.bundleName); in OnAppStopped()
245 …__func__, appStateData.bundleName.c_str(), appStateData.uid, appStateData.state, appStateData.isFo… in OnForegroundApplicationChanged()
[all …]
H A Dwifi_app_state_aware.h31 std::function<void(const AppExecFwk::AppStateData &appStateData,
45 … void OnForegroundAppChanged(const AppExecFwk::AppStateData &appStateData, const int mInstId = 0);
65 void OnAppStarted(const AppExecFwk::AppStateData &appStateData) override;
72 void OnAppStopped(const AppExecFwk::AppStateData &appStateData) override;
79 void OnForegroundApplicationChanged(const AppExecFwk::AppStateData &appStateData) override;
/ohos5.0/docs/zh-cn/application-dev/reference/apis-ability-kit/
H A Djs-apis-inner-application-applicationStateObserver.md27 | appStateData | [AppStateData](js-apis-inner-application-appStateData.md) | 是 | 应用状态信息。 |
87 onAppStarted(appStateData: AppStateData): void
97 | appStateData | [AppStateData](js-apis-inner-application-appStateData.md) | 是 | 应用状态信息。 |
101 onAppStopped(appStateData: AppStateData): void
111 | appStateData | [AppStateData](js-apis-inner-application-appStateData.md) | 是 | 应用状态信息。 |
130 onForegroundApplicationChanged(appStateData) {
131 console.log(`onForegroundApplicationChanged appStateData: ${JSON.stringify(appStateData)}`);
145 onAppStarted(appStateData) {
146 console.log(`onAppStarted appStateData: ${JSON.stringify(appStateData)}`);
148 onAppStopped(appStateData) {
[all …]
H A Djs-apis-inner-application-appStateData.md34 onForegroundApplicationChanged(appStateData) {
35 console.log(`[appManager] onForegroundApplicationChanged: ${JSON.stringify(appStateData)}`);
36 console.log(`appStateData.bundleName: ${appStateData.bundleName}`);
37 console.log(`appStateData.uid: ${appStateData.uid}`);
38 console.log(`appStateData.state: ${appStateData.state}`);
39 console.log(`appStateData.isSplitScreenMode: ${appStateData.isSplitScreenMode}`);
40 console.log(`appStateData.isFloatingWindowMode: ${appStateData.isFloatingWindowMode}`);
54 onAppStarted(appStateData) {
55 console.log(`[appManager] onAppStarted: ${JSON.stringify(appStateData)}`);
57 onAppStopped(appStateData) {
[all …]
H A Djs-apis-inner-application-processData.md33 onForegroundApplicationChanged(appStateData) {
34 console.log(`onForegroundApplicationChanged appStateData: ${JSON.stringify(appStateData)}`);
52 onAppStarted(appStateData) {
53 console.log(`onAppStarted appStateData: ${JSON.stringify(appStateData)}`);
55 onAppStopped(appStateData) {
56 console.log(`onAppStopped appStateData: ${JSON.stringify(appStateData)}`);
/ohos5.0/foundation/ability/ability_runtime/frameworks/js/napi/app/js_app_manager/
H A Djs_app_state_observer.cpp35 appStateData.bundleName.c_str(), appStateData.uid, appStateData.state); in OnForegroundApplicationChanged()
41 auto asyncTask = [jsObserver, appStateData, env = env_]() { in OnForegroundApplicationChanged()
59 appStateData.bundleName.c_str(), appStateData.uid, appStateData.state); in HandleOnForegroundApplicationChanged()
241 appStateData.bundleName.c_str(), appStateData.uid, appStateData.state); in OnAppStarted()
247 auto asyncTask = [jsObserver, appStateData, env = env_]() { in OnAppStarted()
254 jsObserverSptr->HandleOnAppStarted(appStateData); in OnAppStarted()
266 appStateData.bundleName.c_str(), appStateData.uid, appStateData.state); in HandleOnAppStarted()
281 appStateData.bundleName.c_str(), appStateData.uid, appStateData.state); in OnAppStopped()
287 auto asyncTask = [jsObserver, appStateData, env = env_]() { in OnAppStopped()
294 jsObserverSptr->HandleOnAppStopped(appStateData); in OnAppStopped()
[all …]
H A Djs_app_state_observer.h33 void OnForegroundApplicationChanged(const AppStateData &appStateData) override;
39 void HandleOnForegroundApplicationChanged(const AppStateData &appStateData);
51 void OnAppStarted(const AppStateData &appStateData) override;
52 void OnAppStopped(const AppStateData &appStateData) override;
53 void HandleOnAppStarted(const AppStateData &appStateData);
54 void HandleOnAppStopped(const AppStateData &appStateData);
/ohos5.0/foundation/resourceschedule/device_standby/services/core/src/
H A Dapp_state_observer.cpp60 void AppStateObserver::OnApplicationStateChanged(const AppExecFwk::AppStateData &appStateData) in OnApplicationStateChanged() argument
62 if (!(appStateData.uid > 0 && appStateData.bundleName.size() > 0)) { in OnApplicationStateChanged()
66 auto uid = appStateData.uid; in OnApplicationStateChanged()
67 auto bundleName = appStateData.bundleName; in OnApplicationStateChanged()
68 auto state = appStateData.state; in OnApplicationStateChanged()
78 void AppStateObserver::OnForegroundApplicationChanged(const AppExecFwk::AppStateData &appStateData) in OnForegroundApplicationChanged() argument
80 if (!(appStateData.uid > 0 && appStateData.bundleName.size() > 0)) { in OnForegroundApplicationChanged()
84 auto pid = appStateData.pid; in OnForegroundApplicationChanged()
85 auto bundleName = appStateData.bundleName; in OnForegroundApplicationChanged()
86 auto state = appStateData.state; in OnForegroundApplicationChanged()
[all …]
/ohos5.0/docs/en/application-dev/reference/apis-ability-kit/
H A Djs-apis-inner-application-appStateData.md34 onForegroundApplicationChanged(appStateData) {
35 console.log(`[appManager] onForegroundApplicationChanged: ${JSON.stringify(appStateData)}`);
36 console.log(`appStateData.bundleName: ${appStateData.bundleName}`);
37 console.log(`appStateData.uid: ${appStateData.uid}`);
38 console.log(`appStateData.state: ${appStateData.state}`);
39 console.log(`appStateData.isSplitScreenMode: ${appStateData.isSplitScreenMode}`);
40 console.log(`appStateData.isFloatingWindowMode: ${appStateData.isFloatingWindowMode}`);
54 onAppStarted(appStateData) {
55 console.log(`[appManager] onAppStarted: ${JSON.stringify(appStateData)}`);
57 onAppStopped(appStateData) {
[all …]
H A Djs-apis-inner-application-applicationStateObserver.md21 …hanges. The parameter type passed in is [AppStateData](js-apis-inner-application-appStateData.md).|
26 …ed. The parameter type passed in is [AppStateData](js-apis-inner-application-appStateData.md). |
27 …ed. The parameter type passed in is [AppStateData](js-apis-inner-application-appStateData.md). |
34 onForegroundApplicationChanged(appStateData) {
35 console.log(`onForegroundApplicationChanged appStateData: ${JSON.stringify(appStateData)}`);
49 onAppStarted(appStateData) {
50 console.log(`onAppStarted appStateData: ${JSON.stringify(appStateData)}`);
52 onAppStopped(appStateData) {
53 console.log(`onAppStopped appStateData: ${JSON.stringify(appStateData)}`);
H A Djs-apis-inner-application-processData.md33 onForegroundApplicationChanged(appStateData) {
34 console.log(`onForegroundApplicationChanged appStateData: ${JSON.stringify(appStateData)}`);
52 onAppStarted(appStateData) {
53 console.log(`onAppStarted appStateData: ${JSON.stringify(appStateData)}`);
55 onAppStopped(appStateData) {
56 console.log(`onAppStopped appStateData: ${JSON.stringify(appStateData)}`);
/ohos5.0/foundation/resourceschedule/resource_schedule_service/cgroup_sched/framework/sched_controller/include/
H A Dapp_state_observer.h31 void OnForegroundApplicationChanged(const AppStateData &appStateData) override;
36 void OnApplicationStateChanged(const AppStateData &appStateData) override;
38 void OnAppStateChanged(const AppStateData &appStateData) override;
39 void OnAppCacheStateChanged(const AppStateData &appStateData) override;
40 void OnAppStopped(const AppStateData &appStateData) override;
43 inline bool ValidateAppStateData(const AppStateData &appStateData) const in ValidateAppStateData() argument
45 return appStateData.uid > 0 in ValidateAppStateData()
46 && appStateData.bundleName.size() > 0; in ValidateAppStateData()
63 void MarshallingAppStateData(const AppStateData &appStateData, nlohmann::json &payload);
/ohos5.0/foundation/ability/ability_runtime/interfaces/inner_api/app_manager/src/appmgr/
H A Dapplication_state_observer_proxy.cpp48 data.WriteParcelable(&appStateData); in OnForegroundApplicationChanged()
54 ret, appStateData.bundleName.c_str()); in OnForegroundApplicationChanged()
177 data.WriteParcelable(&appStateData); in OnApplicationStateChanged()
183 ret, appStateData.bundleName.c_str()); in OnApplicationStateChanged()
196 data.WriteParcelable(&appStateData); in OnAppStateChanged()
202 ret, appStateData.bundleName.c_str()); in OnAppStateChanged()
215 data.WriteParcelable(&appStateData); in OnAppStarted()
221 ret, appStateData.bundleName.c_str()); in OnAppStarted()
234 data.WriteParcelable(&appStateData); in OnAppStopped()
240 ret, appStateData.bundleName.c_str()); in OnAppStopped()
[all …]
H A Dapp_state_data.cpp53 AppStateData *appStateData = new (std::nothrow) AppStateData(); in Unmarshalling() local
54 if (appStateData && !appStateData->ReadFromParcel(parcel)) { in Unmarshalling()
56 delete appStateData; in Unmarshalling()
57 appStateData = nullptr; in Unmarshalling()
59 return appStateData; in Unmarshalling()
/ohos5.0/foundation/resourceschedule/background_task_mgr/services/common/src/
H A Dapp_state_observer.cpp68 void AppStateObserver::OnAppStopped(const AppExecFwk::AppStateData &appStateData) in OnAppStopped() argument
70 BGTASK_LOGD("app stopped, uid : %{public}d", appStateData.uid); in OnAppStopped()
71 if (!ValidateAppStateData(appStateData)) { in OnAppStopped()
75 auto uid = appStateData.uid; in OnAppStopped()
76 auto bundleName = appStateData.bundleName; in OnAppStopped()
88 inline bool AppStateObserver::ValidateAppStateData(const AppExecFwk::AppStateData &appStateData) in ValidateAppStateData() argument
90 return appStateData.uid > 0 && appStateData.bundleName.size() > 0; in ValidateAppStateData()
/ohos5.0/base/hiviewdfx/hiview/plugins/unified_collector/test/unittest/common/
H A Duc_state_observer_test.cpp41 AppStateData appStateData; variable
42 appStateData.pid = 100; // 100 : test pid
43 appStateData.state = static_cast<int32_t>(ApplicationState::APP_STATE_FOREGROUND);
44 appStateObserver.OnForegroundApplicationChanged(appStateData);
46 appStateData.state = static_cast<int32_t>(ApplicationState::APP_STATE_BACKGROUND);
47 appStateObserver.OnForegroundApplicationChanged(appStateData);
/ohos5.0/foundation/ability/ability_runtime/interfaces/inner_api/app_manager/include/appmgr/
H A Diapplication_state_observer.h37 virtual void OnForegroundApplicationChanged(const AppStateData &appStateData) = 0;
80 virtual void OnApplicationStateChanged(const AppStateData &appStateData) = 0;
88 virtual void OnAppStateChanged(const AppStateData &appStateData) {} in OnAppStateChanged() argument
97 virtual void OnAppStarted(const AppStateData &appStateData) {}; in OnAppStarted() argument
104 virtual void OnAppStopped(const AppStateData &appStateData) {}; in OnAppStopped() argument
125 virtual void OnAppCacheStateChanged(const AppStateData &appStateData) {}; in OnAppCacheStateChanged() argument
H A Dapplication_state_observer_proxy.h36 virtual void OnForegroundApplicationChanged(const AppStateData &appStateData) override;
79 virtual void OnApplicationStateChanged(const AppStateData &appStateData) override;
87 virtual void OnAppStateChanged(const AppStateData &appStateData) override;
96 virtual void OnAppStarted(const AppStateData &appStateData) override;
103 virtual void OnAppStopped(const AppStateData &appStateData) override;
124 virtual void OnAppCacheStateChanged(const AppStateData &appStateData) override;
/ohos5.0/foundation/resourceschedule/memmgr/services/memmgrservice/src/event/
H A Dapp_state_observer.cpp31 void AppStateObserver::OnForegroundApplicationChanged(const AppExecFwk::AppStateData &appStateData) in OnForegroundApplicationChanged() argument
35 appStateData.uid, appStateData.bundleName.c_str(), appStateData.state); in OnForegroundApplicationChanged()
37 …PurgeableMemManager::GetInstance().ChangeAppState(appStateData.pid, appStateData.uid, appStateData in OnForegroundApplicationChanged()
/ohos5.0/base/useriam/user_auth_framework/services/context/src/
H A Dcontext_appstate_observer.cpp162 void ContextAppStateObserver::OnAppStateChanged(const AppStateData &appStateData) in OnAppStateChanged() argument
165 auto bundleName = appStateData.bundleName; in OnAppStateChanged()
166 auto state = static_cast<ApplicationState>(appStateData.state); in OnAppStateChanged()
167 int32_t userId = appStateData.uid / CONVERT_UID_TO_USERID; in OnAppStateChanged()
177 void ContextAppStateObserver::OnForegroundApplicationChanged(const AppStateData &appStateData) in OnForegroundApplicationChanged() argument
180 auto bundleName = appStateData.bundleName; in OnForegroundApplicationChanged()
181 auto state = static_cast<ApplicationState>(appStateData.state); in OnForegroundApplicationChanged()
182 int32_t userId = appStateData.uid / CONVERT_UID_TO_USERID; in OnForegroundApplicationChanged()

12345