当前位置: 首页 > ops >正文

Android开机向导定制(2)开机向导配置

先贴lineage_wizard_script_user.xml的代码:

<WizardScript xmlns:wizard="http://schemas.android.com/apk/res/com.google.android.setupwizard"wizard:firstAction="welcome"><WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_WELCOME;end" id="welcome"><result wizard:action="locale"/></WizardAction><WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_LOCALE;end" id="locale"><result wizard:action="location_settings" /></WizardAction><WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_LOCATION_SETTINGS;end" id="location_settings"><result wizard:action="biometric_settings"/></WizardAction><WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_BIOMETRIC_SETTINGS;end" id="biometric_settings"><result wizard:action="lockscreen_settings"/></WizardAction><WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_LOCKSCREEN_SETTINGS;end" id="lockscreen_settings"><result wizard:action="restore"/></WizardAction><WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_RESTORE_BACKUP;end" id="restore"><result wizard:action="finish"/></WizardAction><WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.LINEAGE_SETUP_COMPLETE;end" id="finish"><result wizard:action="exit" /></WizardAction><WizardAction wizard:uri="intent:#Intent;action=org.lineageos.setupwizard.EXIT;end" id="exit" /></WizardScript>

在SetupWizardActivity后,正式按WizardScript启动配置向导,wizard:firstAction="welcome",指定第一个要运行的配置向导id,查找WizardAction配置,id="welcome"的intent action是org.lineageos.setupwizard.LINEAGE_WELCOME,打开AndroidManifest.xml,看这个配置:

<activity android:name=".WelcomeActivity"android:label="@string/activity_label_empty"android:excludeFromRecents="true"android:configChanges="mcc|mnc"android:immersive="true"android:exported="false"android:windowSoftInputMode="stateAlwaysHidden"><intent-filter><action android:name="org.lineageos.setupwizard.LINEAGE_WELCOME" /><category android:name="android.intent.category.DEFAULT" /></intent-filter></activity>

看到的是启动的WelcomeActivity。

<result wizard:action="locale"/>指向下一个配置向导,依次类推,一直到<result wizard:action="exit" />,标志配置结束,进入系统。

  如果想省去卡机向导的麻烦,直接将wizard:firstAction="welcome",改成wizard:firstAction="exit"

http://www.xdnf.cn/news/9197.html

相关文章:

  • 【免费】【无需登录/关注】多点矩阵计算器,计算任何坐标系转换
  • 【无标题】C++单例模式详解
  • 二次封装 Vuex for Uniapp 微信小程序开发
  • linux如何查看网络设备类型
  • 学者观察 | Web3.0的技术革新与挑战——北京理工大学教授沈蒙
  • 机器学习中的关键术语及其含义
  • 打造自己的开源组件:如何将 Starter 发布到 Maven Central?
  • 人工智能100问☞第34问:什么是语音识别与合成?
  • xilinx 7系列底层可配置逻辑块CLB资源简介
  • js 实现多并发任务处理
  • AI时代的弯道超车之第二十一章:AI会颠覆哪些行业?
  • 什么是MCP技术,跟http技术有什么区别
  • Excel 统计某个字符串在指定区域出现的次数
  • 低空经济管理系统设计方案
  • Spring Boot 3.4.6 中文文档上线
  • 深入理解 JDK、JRE 和 JVM 的区别
  • CellularPro 1.8.6.1 | 提升网络速度,抢到更多基站的速度
  • Netty创新架构突破链接数瓶颈技术,如何应用于新能源汽车智慧充电桩?
  • Redis 容器启动失败Fatal error loading the DB, check server logs. Exiting.的解决方法
  • 使用 ssld 提取CMS 签名并重签名
  • 在PyTorch中,有了y = x + y,为什么还需要y += x,有什么好处呢?
  • 九级融智台阶的要素协同跃迁框架
  • 6个月Python学习计划 Day 6 - 综合实战:学生信息管理系统
  • ai写歌平台:AnKo开启音乐创作的智能时代!
  • java类加载器
  • 树莓派超全系列教程文档--(50)如何查找树莓派的IP地址
  • 计算机组成与体系结构:硬盘驱动器(Hard Disk Drives)
  • OpenGL Chan视频学习-9 Index Buffers inOpenGL
  • STM32F407VET6学习笔记6:定时器TIM2的配置使用
  • MPLS实验复现