栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

FBE中的Home界面FallbackHome

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

FBE中的Home界面FallbackHome

FallbackHome

FallbackHome继承Activity,是安卓系统启动后未解锁时的home界面。

Settings程序AndroidManifest.xml中定义了FallbackHome的intent-filter,可以看到Action:“android.intent.category.HOME”。

        
        
            
                
                
                
            
        
FBE (File-based Encryption)

安卓7.0后开始支持FBE,安卓10后FBE必须被支持。

FEB定义了两个存储位置供应用程序使用:

Credential Encrypted (CE) storage, which is the default storage location and only available after the user has unlocked the device.Device Encrypted (DE) storage, which is a storage location available both during Direct Boot mode and after the user has unlocked the device.

Direct Boot

因为许多应用程序需要在为解锁的状态下使用,比如闹钟,电话,SystemUI,Settings等,这些程序就需要Direct Boot特性,在AndroidManifest.xml的application标签中添加如下属性以支持Direct Boot。


defaultToDeviceProtectedStorage仅对system app可用,使其数据存储到Device Encrypted (DE) storage,而不是Credential Encrypted (CE) storage。

directBootAware对所有app都可用,使其所有组件都标记为加密感知。

The directBootAware attribute at the application level is shorthand for marking all components in the app as being encryption aware.

The defaultToDeviceProtectedStorage attribute redirects the default app storage location to point at DE storage instead of pointing at CE storage.

系统中存在2个接收"android.intent.category.HOME"的Activity,启动时处于加密状态,只能启动支持Direct Boot的FallbackHome,而不是熟悉的Launcher界面,FallbackHome判断用户是否解锁:

if (getSystemService(UserManager.class).isUserUnlocked()) {
	...
    getSystemService(PowerManager.class).userActivity(
                        SystemClock.uptimeMillis(), false);
    finish();
}

如果解锁,通过PowerManagerService.userActivity()重置timeout时间,关闭当前FallbackHome。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/760354.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号