admin 管理员组文章数量: 1184232
代码路径:
frameworks/base/core/res/res/values-zh-rCN/strings.xml
frameworks/base/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
在strings.xml文件中有该字段android_checking_file_system_title
<string name="android_checking_file_system_title">"Android 正在检查文件系统..."</string>在PhoneWindowManager.java文件中showBootMessage()方法中isNormal字段表示是否是正常开机启动,如果是异常开机启动就会弹出该对话框 " Android 正在检查文件系统…"
publicvoidshowBootMessage(final CharSequence msg, final boolean always){if(mHeadless)return;
mHandler.post(newRunnable(){
@Override publicvoidrun(){if(mBootMsgDialog ==null){
mBootMsgDialog =newProgressDialog(mContext){// This dialog will consume all events coming in to// it, to avoid it trying to do things too early in boot.
@Override publicbooleandispatchKeyEvent(KeyEvent event){returntrue;}
@Override publicbooleandispatchKeyShortcutEvent(KeyEvent event){returntrue;}
@Override publicbooleandispatchTouchEvent(MotionEvent ev){returntrue;}
@Override publicbooleandispatchTrackballEvent(MotionEvent ev){returntrue;}
@Override publicbooleandispatchGenericMotionEvent(MotionEvent ev){returntrue;}
@Override publicbooleandispatchPopulateAccessibilityEvent(
AccessibilityEvent event){returntrue;}};/** SPRD: clear dalvik cache when last shutdown abnormal @{ *///mBootMsgDialog.setTitle(R.string.android_upgrading_title);boolean isNormal = SystemProperties.get("persist.sys.lastbootflagbak","unnormal").equals("normal");
mBootMsgDialog.setTitle(isNormal?R.string.android_upgrading_title:
R.string.android_checking_file_system_title);/** @} */
mBootMsgDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
mBootMsgDialog.setIndeterminate(true);
mBootMsgDialog.getWindow().setType(
WindowManager.LayoutParams.TYPE_BOOT_PROGRESS);
mBootMsgDialog.getWindow().addFlags(
WindowManager.LayoutParams.FLAG_DIM_BEHIND
| WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN);
mBootMsgDialog.getWindow().setDimAmount(1);WindowManager.LayoutParams lp = mBootMsgDialog.getWindow().getAttributes();
lp.screenOrientation = ActivityInfo.SCREEN_ORIENTATION_NOSENSOR;
mBootMsgDialog.getWindow().setAttributes(lp);
mBootMsgDialog.setCancelable(false);
mBootMsgDialog.show();}
mBootMsgDialog.setMessage(msg);}});}版权声明:本文标题:深入了解Android 4.4启动过程中的文件系统自检 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.roclinux.cn/b/1771761311a3548264.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论