1 /* 2 * Copyright (c) 2023 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef OHOS_ABILITY_RUNTIME_UI_ABILITY_H 17 #define OHOS_ABILITY_RUNTIME_UI_ABILITY_H 18 19 #include "ability_context.h" 20 #include "ability_continuation_interface.h" 21 #include "ability_lifecycle_executor.h" 22 #include "ability_lifecycle_interface.h" 23 #include "ability_local_record.h" 24 #include "ability_transaction_callback_info.h" 25 #include "configuration.h" 26 #include "context.h" 27 #include "continuation_handler_stage.h" 28 #include "foundation/ability/ability_runtime/interfaces/kits/native/ability/ability_runtime/ability_context.h" 29 #include "resource_config_helper.h" 30 #include "iability_callback.h" 31 #include "want.h" 32 #ifdef SUPPORT_GRAPHICS 33 #include "display_manager.h" 34 #include "session_info.h" 35 #include "window_scene.h" 36 #include "window_manager.h" 37 #endif 38 39 namespace OHOS { 40 namespace AppExecFwk { 41 class AbilityHandler; 42 class AbilityRecovery; 43 class OHOSApplication; 44 class LifeCycle; 45 class ContinuationHandlerStage; 46 class ContinuationManagerStage; 47 class InsightIntentExecuteParam; 48 struct InsightIntentExecuteResult; 49 using InsightIntentExecutorAsyncCallback = AbilityTransactionCallbackInfo<InsightIntentExecuteResult>; 50 } // namespace AppExecFwk 51 namespace AbilityRuntime { 52 class Runtime; 53 using InsightIntentExecuteResult = AppExecFwk::InsightIntentExecuteResult; 54 using InsightIntentExecuteParam = AppExecFwk::InsightIntentExecuteParam; 55 using InsightIntentExecutorAsyncCallback = AppExecFwk::InsightIntentExecutorAsyncCallback; 56 class UIAbility : public AppExecFwk::AbilityContext, 57 public AppExecFwk::ILifeCycle, 58 public AppExecFwk::IAbilityCallback, 59 public AppExecFwk::IAbilityContinuation, 60 public std::enable_shared_from_this<UIAbility> { 61 public: 62 UIAbility() = default; 63 virtual ~UIAbility() = default; 64 65 /** 66 * @brief Create a UIAbility instance through the singleton pattern 67 * @param runtime the runtime pointer 68 * @return Returns the UIAbility object of the ability 69 */ 70 static UIAbility *Create(const std::unique_ptr<Runtime> &runtime); 71 72 /** 73 * @brief Obtains the Lifecycle object of the current ability 74 * @return Returns the Lifecycle object. 75 */ 76 std::shared_ptr<AppExecFwk::LifeCycle> GetLifecycle() override final; 77 78 /** 79 * Register lifecycle observer on UIAbility. 80 * 81 * @param observer the lifecycle observer to be registered on UIAbility. 82 */ 83 void RegisterAbilityLifecycleObserver( 84 const std::shared_ptr<AppExecFwk::ILifecycleObserver> &observer) override final; 85 86 /** 87 * Unregister lifecycle observer on UIAbility. 88 * 89 * @param observer the lifecycle observer to be unregistered on UIAbility. 90 */ 91 void UnregisterAbilityLifecycleObserver( 92 const std::shared_ptr<AppExecFwk::ILifecycleObserver> &observer) override final; 93 94 /** 95 * @brief Obtains the AbilityContext object of the ability. 96 * @return Returns the AbilityContext object of the ability. 97 */ 98 std::shared_ptr<AbilityRuntime::AbilityContext> GetAbilityContext(); 99 100 /** 101 * @brief Obtains the Want object that starts this ability. 102 * @return Returns the Want object that starts this ability. 103 */ 104 std::shared_ptr<AAFwk::Want> GetWant() override; 105 106 /** 107 * @brief Init the UIability 108 * @param abilityInfo Indicate the Ability information 109 * @param application Indicates the main process 110 * @param handler the UIability EventHandler object 111 * @param token the remote token 112 */ 113 virtual void Init(std::shared_ptr<AppExecFwk::AbilityLocalRecord> record, 114 const std::shared_ptr<AppExecFwk::OHOSApplication> application, 115 std::shared_ptr<AppExecFwk::AbilityHandler> &handler, const sptr<IRemoteObject> &token); 116 117 /** 118 * @brief Attach Ability Context 119 * @param abilityContext Indicate the AbilityContext 120 */ 121 void AttachAbilityContext(const std::shared_ptr<AbilityRuntime::AbilityContext> &abilityContext); 122 123 /** 124 * @brief Called when this ability is started. You must override this function if you want to perform some 125 * initialization operations during ability startup. 126 * This function can be called only once in the entire lifecycle of an ability. 127 * @param Want Indicates the {@link Want} structure containing startup information about the ability. 128 * @param sessionInfo Indicates the sessionInfo. 129 */ 130 virtual void OnStart(const AAFwk::Want &want, sptr<AAFwk::SessionInfo> sessionInfo = nullptr); 131 132 /** 133 * @brief Called when this ability enters the <b>STATE_STOP</b> state. 134 * The ability in the <b>STATE_STOP</b> is being destroyed. 135 * You can override this function to implement your own processing logic. 136 */ 137 virtual void OnStop(); 138 139 /** 140 * @brief Called when this ability enters the <b>STATE_STOP</b> state. 141 * The ability in the <b>STATE_STOP</b> is being destroyed. 142 * You can override this function to implement your own processing logic. 143 * @param callbackInfo Indicates the lifecycle transaction callback information 144 * @param isAsyncCallback Indicates whether it is an asynchronous lifecycle callback 145 */ 146 virtual void OnStop(AppExecFwk::AbilityTransactionCallbackInfo<> *callbackInfo, bool &isAsyncCallback); 147 148 /** 149 * @brief The callback of OnStop. 150 */ 151 virtual void OnStopCallback(); 152 153 /** 154 * @brief request a remote object of callee from this ability. 155 * @return Returns the remote object of callee. 156 */ 157 virtual sptr<IRemoteObject> CallRequest(); 158 159 /** 160 * @brief Called when the system configuration is updated. 161 * @param configuration Indicates the updated configuration information. 162 */ 163 void OnConfigurationUpdatedNotify(const AppExecFwk::Configuration &configuration); 164 165 /** 166 * @brief Update context.config when configuration is updated. 167 */ UpdateContextConfiguration()168 virtual void UpdateContextConfiguration() {} 169 170 /** 171 * @brief Called when the system configuration is updated. 172 * @param level Indicates the memory trim level, which shows the current memory usage status. 173 */ 174 virtual void OnMemoryLevel(int level); 175 176 /** 177 * @brief Obtains the class name in this ability name, without the prefixed bundle name. 178 * @return Returns the class name of this ability. 179 */ 180 std::string GetAbilityName(); 181 182 /** 183 * @brief Obtains the module name in this ability name, without the prefixed bundle name. 184 * @return Returns the module name of this ability. 185 */ 186 std::string GetModuleName(); 187 188 /** 189 * @brief Called when startAbilityForResult(ohos.aafwk.content.Want,int) is called to start an ability and the 190 * result is returned. This method is called only on Page abilities. You can start a new ability to perform some 191 * calculations and use setResult (int,ohos.aafwk.content.Want) to return the calculation result. Then the system 192 * calls back the current method to use the returned data to execute its own logic. 193 * @param requestCode Indicates the request code returned after the ability is started. You can define the request 194 * code to identify the results returned by abilities. The value ranges from 0 to 65535. 195 * @param resultCode Indicates the result code returned after the ability is started. You can define the result code 196 * to identify an error. 197 * @param want Indicates the data returned after the ability is started. You can define the data returned. The 198 * value can be null. 199 */ 200 virtual void OnAbilityResult(int requestCode, int resultCode, const AAFwk::Want &want); 201 202 /** 203 * @brief Called when the launch mode of an ability is set to singleInstance. This happens when you re-launch an 204 * ability that has been at the top of the ability stack. 205 * @param want Indicates the new Want containing information about the ability. 206 */ 207 virtual void OnNewWant(const AAFwk::Want &want); 208 209 /** 210 * @brief Restores data and states of an ability when it is restored by the system. This method should be 211 * implemented by a Page ability. This method is called if an ability was destroyed at a certain time due to 212 * resource reclaim or was unexpectedly destroyed and the onSaveAbilityState(ohos.utils.PacMap) method was called to 213 * save its user data and states. Generally, this method is called after the onStart(ohos.aafwk.content.Want) 214 * method. 215 * @param inState Indicates the PacMap object used for storing data and states. This parameter can not be null. 216 */ 217 virtual void OnRestoreAbilityState(const AppExecFwk::PacMap &inState); 218 219 /** 220 * @brief Sets the want object that can be obtained by calling getWant(). 221 * @param Want information of other ability 222 */ 223 void SetWant(const AAFwk::Want &want); 224 225 /** 226 * @brief dump ability info 227 * @param params dump params that indicate different dump targets 228 * @param info dump ability info 229 */ 230 virtual void Dump(const std::vector<std::string> ¶ms, std::vector<std::string> &info); 231 232 /** 233 * @brief Save user data of local Ability generated at runtime. 234 * @param saveData Indicates the user data to be saved. 235 * @return If the data is saved successfully, it returns true; otherwise, it returns false. 236 */ 237 bool OnSaveData(AAFwk::WantParams &saveData) override; 238 239 /** 240 * @brief After creating the Ability on the remote device, 241 * immediately restore the user data saved during the migration of the Ability on the remote device. 242 * @param restoreData Indicates the user data to be restored. 243 * @return If the data is restored successfully, it returns true; otherwise, it returns false . 244 */ 245 bool OnRestoreData(AAFwk::WantParams &restoreData) override; 246 247 /** 248 * @brief Obtains the lifecycle state of this ability. 249 * @return Returns the lifecycle state of this ability. 250 */ 251 virtual AppExecFwk::AbilityLifecycleExecutor::LifecycleState GetState() final; 252 253 /** 254 * @brief Release the ability instance. 255 */ 256 void DestroyInstance(); 257 258 /** 259 * @brief Update configuration 260 * @param configuration Indicates the updated configuration information. 261 */ 262 virtual void OnConfigurationUpdated(const AppExecFwk::Configuration &configuration); 263 264 /** 265 * @brief Prepare user data of local Ability. 266 * @param wantParams Indicates the user data to be saved. 267 * @return If the ability is willing to continue and data saved successfully, it returns 0; 268 * otherwise, it returns errcode. 269 */ 270 virtual int32_t OnContinue(AAFwk::WantParams &wantParams); 271 272 /** 273 * @brief Migrates this ability to the given device on the same distributed network. The ability to migrate and its 274 * ability slices must implement the IAbilityContinuation interface. 275 * @param deviceId Indicates the ID of the target device where this ability will be migrated to. 276 * @param versionCode Target bundle version. 277 */ 278 virtual void ContinueAbilityWithStack(const std::string &deviceId, uint32_t versionCode) final; 279 280 /** 281 * @brief Callback function to ask the user whether to start the migration . 282 * @return If the user allows migration, it returns true; otherwise, it returns false. 283 */ 284 bool OnStartContinuation() override; 285 286 /** 287 * @brief This function can be used to implement the processing logic after the migration is completed. 288 * @param result Migration result code. 0 means the migration was successful, -1 means the migration failed. 289 * @return None. 290 */ 291 void OnCompleteContinuation(int result) override; 292 293 /** 294 * @brief Used to notify the local Ability that the remote Ability has been destroyed. 295 * @return None. 296 */ 297 void OnRemoteTerminated() override; 298 299 /** 300 * @brief Prepare user data of local Ability. 301 * @param reason the reason why framework invoke this function 302 * @param wantParams Indicates the user data to be saved. 303 * @return result code defined in abilityConstants 304 */ 305 virtual int32_t OnSaveState(int32_t reason, AAFwk::WantParams &wantParams); 306 307 /** 308 * @brief enable ability recovery. 309 * @param abilityRecovery shared_ptr of abilityRecovery 310 * @param useAppSettedRecoveryValue Indicates use default recovery or not. 311 */ 312 void EnableAbilityRecovery(const std::shared_ptr<AppExecFwk::AbilityRecovery> &abilityRecovery, 313 bool useAppSettedRecoveryValue); 314 315 /** 316 * @brief Callback when the ability is shared.You can override this function to implement your own sharing logic. 317 * @param wantParams Indicates the user data to be saved. 318 * @return the result of OnShare 319 */ 320 virtual int32_t OnShare(AAFwk::WantParams &wantParams); 321 322 bool CheckIsSilentForeground() const; 323 324 void SetIsSilentForeground(bool isSilentForeground); 325 326 protected: 327 const AAFwk::LaunchParam &GetLaunchParam() const; 328 bool IsRestoredInContinuation() const; 329 void NotifyContinuationResult(const AAFwk::Want &want, bool success); 330 bool ShouldRecoverState(const AAFwk::Want &want); 331 bool ShouldDefaultRecoverState(const AAFwk::Want &want); 332 bool IsUseNewStartUpRule(); 333 334 std::shared_ptr<AbilityRuntime::AbilityContext> abilityContext_ = nullptr; 335 std::shared_ptr<AppExecFwk::AbilityStartSetting> setting_ = nullptr; 336 std::shared_ptr<AppExecFwk::AbilityRecovery> abilityRecovery_ = nullptr; 337 std::shared_ptr<AppExecFwk::AbilityInfo> abilityInfo_ = nullptr; 338 AAFwk::LaunchParam launchParam_; 339 bool securityFlag_ = false; 340 341 private: 342 friend class UIAbilityImpl; 343 void DispatchLifecycleOnForeground(const AAFwk::Want &want); 344 void HandleCreateAsRecovery(const AAFwk::Want &want); 345 void SetStartAbilitySetting(std::shared_ptr<AppExecFwk::AbilityStartSetting> setting); 346 void SetLaunchParam(const AAFwk::LaunchParam &launchParam); 347 void InitConfigurationProperties(const AppExecFwk::Configuration &changeConfiguration, 348 ResourceConfigHelper &resourceConfig); 349 350 std::shared_ptr<AppExecFwk::ContinuationHandlerStage> continuationHandler_ = nullptr; 351 std::shared_ptr<AppExecFwk::ContinuationManagerStage> continuationManager_ = nullptr; 352 std::shared_ptr<AppExecFwk::AbilityHandler> handler_ = nullptr; 353 std::shared_ptr<AppExecFwk::LifeCycle> lifecycle_ = nullptr; 354 std::shared_ptr<AppExecFwk::AbilityLifecycleExecutor> abilityLifecycleExecutor_ = nullptr; 355 std::shared_ptr<AppExecFwk::OHOSApplication> application_ = nullptr; 356 std::shared_ptr<AAFwk::Want> setWant_ = nullptr; 357 sptr<IRemoteObject> reverseContinuationSchedulerReplica_ = nullptr; 358 bool isNewRuleFlagSetted_ = false; 359 bool startUpNewRule_ = false; 360 bool isSilentForeground_ = false; 361 std::atomic<bool> useAppSettedRecoveryValue_ = false; 362 363 #ifdef SUPPORT_GRAPHICS 364 public: 365 uint32_t sceneFlag_ = 0; 366 367 /** 368 * @brief Called after instantiating WindowScene. 369 * You can override this function to implement your own processing logic. 370 */ 371 virtual void OnSceneCreated(); 372 373 /** 374 * @brief Called after ability stoped. 375 * You can override this function to implement your own processing logic. 376 */ 377 virtual void OnSceneWillDestroy(); 378 379 /** 380 * @brief Called after ability stoped. 381 * You can override this function to implement your own processing logic. 382 */ 383 virtual void onSceneDestroyed(); 384 385 /** 386 * @brief Called after ability restored. 387 * You can override this function to implement your own processing logic. 388 */ 389 virtual void OnSceneRestored(); 390 391 /** 392 * @brief Called when this ability enters the <b>STATE_FOREGROUND</b> state. 393 * The ability in the <b>STATE_FOREGROUND</b> state is visible. 394 * You can override this function to implement your own processing logic. 395 */ 396 virtual void OnForeground(const AAFwk::Want &want); 397 398 /** 399 * @brief Called when this ability enters the <b>STATE_BACKGROUND</b> state. 400 * The ability in the <b>STATE_BACKGROUND</b> state is invisible. 401 * You can override this function to implement your own processing logic. 402 */ 403 virtual void OnBackground(); 404 405 /** 406 * @brief Called when ability prepare terminate. 407 * @return Return true if ability need to stop terminating; return false if ability need to terminate. 408 */ 409 virtual bool OnPrepareTerminate(); 410 411 /** 412 * @brief Inflates UI controls by using windowOption. 413 * @param windowOption Indicates the window option defined by the user. 414 */ 415 virtual void InitWindow(int32_t displayId, sptr<Rosen::WindowOption> option); 416 417 /** 418 * @brief Get the window belong to the ability. 419 * @return Returns a Window object pointer. 420 */ 421 virtual const sptr<Rosen::Window> GetWindow(); 422 423 /** 424 * @brief get the scene belong to the ability. 425 * @return Returns a WindowScene object pointer. 426 */ 427 std::shared_ptr<Rosen::WindowScene> GetScene(); 428 429 /** 430 * @brief Called when this ability is about to leave the foreground and enter the background due to a user 431 * operation, for example, when the user touches the Home key. 432 */ 433 virtual void OnLeaveForeground(); 434 435 /** 436 * @brief Get page ability stack info. 437 * @return A string represents page ability stack info, empty if failed; 438 */ 439 virtual std::string GetContentInfo(); 440 virtual std::string GetContentInfoForRecovery(); 441 virtual std::string GetContentInfoForDefaultRecovery(); 442 443 /** 444 * @brief Set WindowScene listener 445 * @param listener WindowScene listener 446 * @return None. 447 */ 448 void SetSceneListener(const sptr<Rosen::IWindowLifeCycle> &listener); 449 450 /** 451 * @brief Called back at ability context. 452 * @return current window mode of the ability. 453 */ 454 int GetCurrentWindowMode() override; 455 456 /** 457 * @brief Set mission label of this ability. 458 * @param label the label of this ability. 459 * @return Returns ERR_OK if success. 460 */ 461 ErrCode SetMissionLabel(const std::string &label) override; 462 463 /** 464 * @brief Set mission icon of this ability. 465 * @param icon the icon of this ability. 466 * @return Returns ERR_OK if success. 467 */ 468 ErrCode SetMissionIcon(const std::shared_ptr<OHOS::Media::PixelMap> &icon) override; 469 470 /** 471 * @brief Get window rectangle of this ability. 472 * @param left the left position of window rectangle. 473 * @param top the top position of window rectangle. 474 * @param width the width position of window rectangle. 475 * @param height the height position of window rectangle. 476 */ 477 void GetWindowRect(int32_t &left, int32_t &top, int32_t &width, int32_t &height) override; 478 479 /** 480 * @brief Get ui content object. 481 * @return UIContent object of ACE. 482 */ 483 Ace::UIContent *GetUIContent() override; 484 485 /** 486 * @brief Call "onForeground" js function barely. 487 * 488 * @param want Want 489 */ 490 virtual void CallOnForegroundFunc(const AAFwk::Want &want); 491 492 /** 493 * @brief Request focus for current window, can be override. 494 * 495 * @param want Want 496 */ 497 virtual void RequestFocus(const AAFwk::Want &want); 498 499 /** 500 * @brief Execute insight intent when an ability is in foreground, schedule it to foreground repeatly. 501 * 502 * @param want Want. 503 * @param executeParam insight intent execute param. 504 * @param callback insight intent async callback. 505 */ 506 virtual void ExecuteInsightIntentRepeateForeground(const AAFwk::Want &want, 507 const std::shared_ptr<InsightIntentExecuteParam> &executeParam, 508 std::unique_ptr<InsightIntentExecutorAsyncCallback> callback); 509 510 /** 511 * @brief Execute insight intent when an ability didn't started or in background, schedule it to foreground. 512 * 513 * @param want Want. 514 * @param executeParam insight intent execute param. 515 * @param callback insight intent async callback. 516 */ 517 virtual void ExecuteInsightIntentMoveToForeground(const AAFwk::Want &want, 518 const std::shared_ptr<InsightIntentExecuteParam> &executeParam, 519 std::unique_ptr<InsightIntentExecutorAsyncCallback> callback); 520 521 /** 522 * @brief Execute insight intent when an ability didn't started, schedule it to background. 523 * 524 * @param want Want. 525 * @param executeParam insight intent execute param. 526 * @param callback insight intent async callback. 527 */ 528 virtual void ExecuteInsightIntentBackground(const AAFwk::Want &want, 529 const std::shared_ptr<InsightIntentExecuteParam> &executeParam, 530 std::unique_ptr<InsightIntentExecutorAsyncCallback> callback); 531 532 /** 533 * @brief create modal UIExtension. 534 * @param want Create modal UIExtension with want object. 535 */ 536 int CreateModalUIExtension(const AAFwk::Want &want); 537 538 /** 539 * @brief Update sessionToken. 540 * @param sessionToken The token of session. 541 */ 542 void UpdateSessionToken(sptr<IRemoteObject> sessionToken); 543 544 void EraseUIExtension(int32_t sessionId) override; 545 546 void SetIdentityToken(const std::string &identityToken); 547 std::string GetIdentityToken() const; 548 549 protected: 550 class UIAbilityDisplayListener : public OHOS::Rosen::IDisplayInfoChangedListener { 551 public: UIAbilityDisplayListener(const std::weak_ptr<UIAbility> & ability)552 explicit UIAbilityDisplayListener(const std::weak_ptr<UIAbility> &ability) 553 { 554 ability_ = ability; 555 } 556 OnDisplayInfoChange(const sptr<IRemoteObject> & token,Rosen::DisplayId displayId,float density,Rosen::DisplayOrientation orientation)557 void OnDisplayInfoChange(const sptr<IRemoteObject>& token, Rosen::DisplayId displayId, float density, 558 Rosen::DisplayOrientation orientation) override 559 { 560 auto sptr = ability_.lock(); 561 if (sptr != nullptr) { 562 sptr->OnDisplayInfoChange(token, displayId, density, orientation); 563 } 564 } 565 566 private: 567 std::weak_ptr<UIAbility> ability_; 568 }; 569 570 void OnCreate(Rosen::DisplayId displayId); 571 void OnDestroy(Rosen::DisplayId displayId); 572 void OnChange(Rosen::DisplayId displayId); 573 void OnDisplayInfoChange(const sptr<IRemoteObject>& token, Rosen::DisplayId displayId, float density, 574 Rosen::DisplayOrientation orientation); 575 576 class AbilityDisplayMoveListener : public OHOS::Rosen::IDisplayMoveListener { 577 public: AbilityDisplayMoveListener(std::weak_ptr<UIAbility> && ability)578 explicit AbilityDisplayMoveListener(std::weak_ptr<UIAbility> &&ability) : ability_(ability) {} 579 OnDisplayMove(Rosen::DisplayId from,Rosen::DisplayId to)580 void OnDisplayMove(Rosen::DisplayId from, Rosen::DisplayId to) override 581 { 582 auto sptr = ability_.lock(); 583 if (sptr != nullptr) { 584 sptr->OnDisplayMove(from, to); 585 } 586 } 587 588 private: 589 std::weak_ptr<UIAbility> ability_; 590 }; 591 592 void OnDisplayMove(Rosen::DisplayId from, Rosen::DisplayId to); 593 void UpdateConfiguration(Rosen::DisplayId to, float density, int32_t width, int32_t height); 594 virtual void DoOnForeground(const AAFwk::Want &want); 595 sptr<Rosen::WindowOption> GetWindowOption(const AAFwk::Want &want); 596 virtual void ContinuationRestore(const AAFwk::Want &want); 597 bool CheckRecoveryEnabled(); 598 bool CheckDefaultRecoveryEnabled(); 599 bool IsStartByScb(); 600 601 std::shared_ptr<Rosen::WindowScene> scene_ = nullptr; 602 sptr<Rosen::IWindowLifeCycle> sceneListener_ = nullptr; 603 sptr<UIAbilityDisplayListener> abilityDisplayListener_ = nullptr; 604 sptr<Rosen::IDisplayMoveListener> abilityDisplayMoveListener_ = nullptr; 605 private: 606 void OnStartForSupportGraphics(const AAFwk::Want &want); 607 void OnChangeForUpdateConfiguration(const AppExecFwk::Configuration &newConfig); 608 void SetSessionToken(sptr<IRemoteObject> sessionToken); 609 610 std::string identityToken_; 611 bool showOnLockScreen_ = false; 612 std::mutex wantMutexlock_; 613 #endif 614 }; 615 } // namespace AbilityRuntime 616 } // namespace OHOS 617 #endif // OHOS_ABILITY_RUNTIME_UI_ABILITY_H 618