/*********************************************************************** * Android隐藏虚拟按键,关闭开机动画、开机声音 * 声明: * 有时候,咱们可能会但愿隐藏掉android中的虚拟按键,固然,那个 * Android的开机动画,有时候也是挺讨人厌的,也是能够隐藏的。 * * 2016-1-7 深圳 南山平山村 曾剑锋 **********************************************************************/ 1、参考文档: 1. android4.2&android4.3去掉虚拟按键 http://blog.csdn.net/bzw073/article/details/22916505 2. android4.0.3 修改启动动画和开机声音 http://www.cnblogs.com/jqyp/archive/2012/03/07/2383973.html 2、虚拟按键解决方法: 隐藏所有虚拟按键,只须要在build.prop中增长qemu.hw.mainkeys=1便可。 3、关闭开机动画、开机声音解决方法: 1. cat frameworks/base/cmds/bootanimation/bootanimation_main.cpp ...... int main(int argc, char** argv) { #if defined(HAVE_PTHREADS) setpriority(PRIO_PROCESS, 0, ANDROID_PRIORITY_DISPLAY); #endif char value[PROPERTY_VALUE_MAX]; property_get("debug.sf.nobootanimation", value, "0"); int noBootAnimation = atoi(value); ALOGI_IF(noBootAnimation, "boot animation disabled"); if (!noBootAnimation) { sp<ProcessState> proc(ProcessState::self()); ProcessState::self()->startThreadPool(); // create the boot animation object sp<BootAnimation> boot = new BootAnimation(); IPCThreadState::self()->joinThreadPool(); } return 0; } ...... 2. 从上面可知只须要在在build.prop中增长debug.sf.nobootanimation=1便可。