Android Add never hibernate option

Source: Internet
Author: User

Many friends in the use of TQ210 do projects need to keep the screen long light, this article describes how to modify the TQ210 Android source code, so that the system can never hibernate, the codes are as follows:

1. Add English options

Modify the Packages/apps/settings/res/values/arrays.xml file

+ indicates add as Forward

    1. <item>30 minutes</item>
    2. +<item>never</item>
    3. <item>1800000</item>
    4. +<!--do not translate. -
    5. +<item>-1</item>

2. Add Chinese option

Modify the Packages/apps/settings/res/values-zh-rcn/arrays.xml file

+ indicates add as Forward

    1. <item msgid= "6864027152847611413" > "30 min" </item>
    2. +<item msgid= "1781492122915870416" > "Never Standby" </item>

3. Modify configuration options

Modify the Frameworks/base/packages/settingsprovider/res/values/defaults.xml file

    1. Will: <integer name= "Def_screen_off_timeout" >1800000</integer>
    2. Instead: <integer name= "Def_screen_off_timeout" >-1</integer

4. Modify system settings

Modify the Packages/apps/settings/src/com/android/settings/displaysettings.java file,

    1. Will: private static final int fallback_screen_timeout_value = 30000;
    2. Instead: private static final int fallback_screen_timeout_value =-1;

Re-yi the Settingsprovider and settings directories and copy the generated apk to the corresponding directory restart.

Android Add never hibernate option

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.