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
- <item>30 minutes</item>
- +<item>never</item>
- <item>1800000</item>
- +<!--do not translate. -
- +<item>-1</item>
2. Add Chinese option
Modify the Packages/apps/settings/res/values-zh-rcn/arrays.xml file
+ indicates add as Forward
- <item msgid= "6864027152847611413" > "30 min" </item>
- +<item msgid= "1781492122915870416" > "Never Standby" </item>
3. Modify configuration options
Modify the Frameworks/base/packages/settingsprovider/res/values/defaults.xml file
- Will: <integer name= "Def_screen_off_timeout" >1800000</integer>
- 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,
- Will: private static final int fallback_screen_timeout_value = 30000;
- 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