/************************************************************************
* I.MX6 android 移除shutdown功能
* 说明:
* 有时候,我们可能会只是不需要android中的shutdown功能。
*
* 2016-3-17 深圳 南山平山村 曾剑锋
***********************************************************************/ cat frameworks/base/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
......
public class PhoneWindowManager implements WindowManagerPolicy {
......
private final Runnable mPowerLongPress = new Runnable() {
@Override
public void run() {
// The context isn't read
if (mLongPressOnPowerBehavior < ) {
mLongPressOnPowerBehavior = mContext.getResources().getInteger(
com.android.internal.R.integer.config_longPressOnPowerBehavior);
}
int resolvedBehavior = mLongPressOnPowerBehavior;
if (FactoryTest.isLongPressOnPowerOffEnabled()) {
resolvedBehavior = LONG_PRESS_POWER_SHUT_OFF_NO_CONFIRM;
} switch (resolvedBehavior) {
case LONG_PRESS_POWER_NOTHING:
break;
case LONG_PRESS_POWER_GLOBAL_ACTIONS:
mPowerKeyHandled = true;
if (!performHapticFeedbackLw(null, HapticFeedbackConstants.LONG_PRESS, false)) {
performAuditoryFeedbackForAccessibilityIfNeed();
}
sendCloseSystemWindows(SYSTEM_DIALOG_REASON_GLOBAL_ACTIONS);
// modify by zengjf 2016-3-17
//showGlobalActionsDialog();
//mWindowManagerFuncs.shutdown(resolvedBehavior == LONG_PRESS_POWER_SHUT_OFF);
break;
case LONG_PRESS_POWER_SHUT_OFF:
case LONG_PRESS_POWER_SHUT_OFF_NO_CONFIRM:
mPowerKeyHandled = true;
performHapticFeedbackLw(null, HapticFeedbackConstants.LONG_PRESS, false);
sendCloseSystemWindows(SYSTEM_DIALOG_REASON_GLOBAL_ACTIONS);
mWindowManagerFuncs.shutdown(resolvedBehavior == LONG_PRESS_POWER_SHUT_OFF);
break;
}
}
};
......
}
......

I.MX6 android 移除shutdown功能的更多相关文章

  1. I.MX6 Android 移除 Settings wifi功能

    /********************************************************************* * I.MX6 Android 移除 Settings w ...

  2. I.MX6 android shutdown 内核崩溃

    /**************************************************************************** * I.MX6 android shutdo ...

  3. I.MX6 Android shutdown shell command

    /******************************************************************************* * I.MX6 Android shu ...

  4. I.MX6 android 禁止低电量自动关机

    /************************************************************************ * I.MX6 android 禁止低电量自动关机 ...

  5. I.MX6 Android 5.1 快速合成系统

    /**************************************************************************** * I.MX6 Android 5.1 快速 ...

  6. I.MX6 Android netperf

    /***************************************************************************** * I.MX6 Android netpe ...

  7. I.MX6 Android 永不休眠

    /************************************************************************* * I.MX6 Android 永不休眠 * 说明 ...

  8. Android 6.0 新功能及主要 API 变更

    运行时权限 这个版本中引入了新的权限模型,现在用户可以在运行时直接管理应用程序的权限.这个模型基于用户对权限控制的更多可见性,同时为应用程序的开发者提供更流畅的应用安装和自动升级.用户可以为已安装的每 ...

  9. Android Webview实现文件下载功能

        在做美图欣赏Android应用的时候,其中有涉及到Android应用下载的功能,这个应用本身其实也比较简单,就是通过WebView控制调用相应的WEB页面进行展示.刚开始以为和普通的文件下载实 ...

随机推荐

  1. 在制作joomla模板过程中遇到的问题

    '''问题1.'''在jjc首页中两个通知公告和基建首页的两个模块中,当我点击查看文章标题是,而通知公告和最新动态页一直都还显示,发现文章一直在网站的下部,而不显示在它应该显示的main_rigth模 ...

  2. SPI协议及其工作原理详解

    一.概述. SPI, Serial Perripheral Interface, 串行外围设备接口, 是 Motorola 公司推出的一种同步串行接口技术. SPI 总线在物理上是通过接在外围设备微控 ...

  3. linux 加载驱动后有permanent的解决办法

    参考http://blog.csdn.net/zmnqazqaz/article/details/38058713解决 原因是系统默认内核使用gcc与当前编译模块gcc版本不同导致的. 查看内核默认使 ...

  4. IOS9中出现的错误

    1,Bitcode 错误提示: ld: '/Applications/Cocos/frameworks/cocos2d-x-3.8.1/prebuilt/ios/libcocos2d iOS.a(CC ...

  5. Increase SharePoint Execution Timeout

    <system.web> <compilation batch="false" batchTimeout="600" maxBatchSize ...

  6. jsf2入门视频 教程

    jsf2.0 入门视频 教程   需要的看下.初次录视频.还有很多需要完善. JSF交流QQ群84376982 JSF入门视频下载地址  http://pan.baidu.com/s/1jG3y4T4 ...

  7. C#和Js 编码和解码方法

    Server.UrlDecode(); Server.UrlEncode(); Server.HtmlDecode(); Server.HtmlEncode();

  8. jquery中json数据转换为字典

    首先在前台页面中的json数据为 var recipe = {}; recipe["name"] = $("#name").val(); recipe[&quo ...

  9. centos最小安装 setuptools安装

    centos运行不了setup?那安装setuptool吧,可以节省很多系统管理的时间. #安装setuptoolyum install setuptool#可以发现执行setup后不全,再安装一个用 ...

  10. DataGridView 列自适应宽度 设置

    代码: Columns[i].AutoSizeMode = DataGridViewAutoSizeColumnMode.AllCells; 或者设置DataGridView的AutoSizeColu ...