您好,欢迎来到知库网。
搜索
您的当前位置:首页Android系统Setting CA证书安装流程

Android系统Setting CA证书安装流程

来源:知库网

安装路径

Setting - Security -install from stroage

1.打开setting源码,找到install from storage对应的代码

credentials_install.png

当点击“从存储设备安装证书”时,会通过intent进入CertInstallerMain中,这个类在系统app,CerInstaller中。

2.在CertInstallerMain的onCreate()方法,对相应action进行处理

CertInstallerMain的onCreate()方法.png

Credentials在framework层,对应的action如下:

public static final String INSTALL_ACTION = "android.credentials.INSTALL";

public static final String INSTALL_AS_USER_ACTION = "android.credentials.INSTALL_AS_USER";
判断bundle是否为空.png

如果bundle为空,这段代码将打开一个类似文件浏览器界面,在系统下为DocumentUI,可以点击安装外部存储中的证书。


Paste_Image.png

下面这段代码,最终会跳到CertInstaller中。


Paste_Image.png 进入CertInstaller.png

进入CertInstaller会首先提示设置锁屏密码或者pin

Paste_Image.png Paste_Image.png

最终安装证书的方法

Paste_Image.png

Copyright © 2019- zicool.com 版权所有 湘ICP备2023022495号-2

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务