展会信息港展会大全

Android开机向导后notification应为不可点击状态
来源:互联网   发布日期:2015-10-02 21:47:49   浏览:1352次  

导读:notification为SystemUI部分,控制notification的状态是在如下文件中frameworks\base\packages\SystemUI\src\com\andro...

notification为SystemUI部分,控制notification的状态是在如下文件中

frameworks\base\packages\SystemUI\src\com\android\systemui\statusbar\tablet\TabletStatusBar.java

TabletStatusBar.java文件中的disable()方法是禁止点击的

想要禁止notification的响应,就要知道开机向导(SetupWizard)的状态

boolean provisioned = Settings.Secure.getInt(mContext.getContentResolver(),

Settings.Secure.DEVICE_PROVISIONED, 0) != 0;// !=0的值为fasle说明开机向导已经完成,!=0的值为true说明正在执行开机向导

Slog.i(TAG, "provisioned = " + provisioned);

if(!provisioned){

mDisabled = mDisabled | StatusBarManager.DISABLE_EXPAND | StatusBarManager.DISABLE_NOTIFICATION_TICKER;

}

赞助本站

人工智能实验室

相关热词: android开发 教程

AiLab云推荐
展开

热门栏目HotCates

Copyright © 2010-2024 AiLab Team. 人工智能实验室 版权所有    关于我们 | 联系我们 | 广告服务 | 公司动态 | 免责声明 | 隐私条款 | 工作机会 | 展会港