Android开机向导后notification应为不可点击状态
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 ,