Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
zhangbo1_wd
2024-06-04 16:48:40 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
946ddacf673895de3111a51a377f0e130f54142a
946ddacf
1 parent
91fe3202
意图框架拉起,需要网络库的初始化。这里调整下相关初始化位置。
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
5 deletions
sight_harmony/products/phone/src/main/ets/entryability/EntryAbility.ets
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchPage.ets
sight_harmony/products/phone/src/main/ets/startupmanager/StartupManager.ets
sight_harmony/products/phone/src/main/ets/entryability/EntryAbility.ets
View file @
946ddac
...
...
@@ -4,7 +4,7 @@ import UIAbility from '@ohos.app.ability.UIAbility';
import Want from '@ohos.app.ability.Want';
import window from '@ohos.window';
import { BusinessError } from '@ohos.base';
import { DeviceUtil, EmitterEventId, EmitterUtils, Logger, WindowModel } from 'wdKit';
import { DeviceUtil, EmitterEventId, EmitterUtils, Logger,
SPHelper,
WindowModel } from 'wdKit';
import { ConfigurationConstant } from '@kit.AbilityKit';
import { StartupManager } from '../startupmanager/StartupManager';
...
...
@@ -14,6 +14,10 @@ const TAG = 'EntryAbility'
export default class EntryAbility extends UIAbility {
onCreate(want: Want, launchParam: AbilityConstant.LaunchParam): void {
StartupManager.sharedInstance().appOnCreate(want, launchParam, this.context)
if (SPHelper.default.getSync('isPrivacy', true)) {
// 同意隐私协议,这里直接初始化。TODO 耗时梳理
StartupManager.sharedInstance().appAgreedProtocol()
}
Logger.info(TAG, 'Ability onCreate');
// 还没深色模式需求,暂直接不跟随系统。
...
...
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchPage.ets
View file @
946ddac
...
...
@@ -97,8 +97,8 @@ struct LaunchPage {
this.dialogController.open();
// }
} else {
StartupManager.sharedInstance().appAgreedProtocol()
// 挪到ability里处理了。
// StartupManager.sharedInstance().appAgreedProtocol()
//需要根据请求数据判断是否需要进入广告页,广告数据为nil则直接跳转到首页
//获取本地存储的启动页数据
...
...
sight_harmony/products/phone/src/main/ets/startupmanager/StartupManager.ets
View file @
946ddac
...
...
@@ -90,13 +90,14 @@ export class StartupManager {
Logger.debug(TAG, "App 已同意隐私等协议,开始必要初始化")
this.initCheckDeviceId()
this.initNetwork()
this.initMpaas()
this.initSensorData()
this.initTingyun()
this.initNetwork()
this.initGeTuiPush()
this.initUmengStat()
...
...
Please
register
or
login
to post a comment