/frameworks/base/packages/SettingsProvider/res/values/defaults.xml
- < integer name= "def_screen_off_timeout" > 60000 < / integer>
+ < integer name= "def_screen_off_timeout" > 0 < ! -- 60000 -- > < / integer>
- < bool name= "def_lockscreen_disabled" > false < / bool>
+ < bool name= "def_lockscreen_disabled" > true < / bool>
/frameworks/base/services/core/java/com/android/server/policy/PhoneWindowManager.java
if ( enable) {
if ( localLOGV) Log . v ( TAG , "setting lockscreen timer" ) ;
mHandler. removeCallbacks ( mScreenLockTimeout) ;
- mHandler. postDelayed ( mScreenLockTimeout, mLockScreenTimeout) ;
+ if ( mLockScreenTimeout != 0 ) {
+ mHandler. postDelayed ( mScreenLockTimeout, mLockScreenTimeout) ;
+ }
} else {
if ( localLOGV) Log . v ( TAG , "clearing lockscreen timer" ) ;
mHandler. removeCallbacks ( mScreenLockTimeout) ;
/frameworks/base/services/core/java/com/android/server/power/PowerManagerService.java
private void updateUserActivitySummaryLocked ( long now, int dirty) {
. . .
- if ( ( groupUserActivitySummary & USER_ACTIVITY_SCREEN_BRIGHT ) != 0
- && ( mDisplayGroupPowerStateMapper. getWakeLockSummaryLocked ( groupId)
- & WAKE_LOCK_STAY_AWAKE ) == 0 ) {
- groupNextTimeout = mAttentionDetector. updateUserActivity ( groupNextTimeout,
- screenDimDuration) ;
- }
+ if ( mScreenOffTimeoutSetting != 0 ) {
+ if ( ( groupUserActivitySummary & USER_ACTIVITY_SCREEN_BRIGHT ) != 0
+ && ( mDisplayGroupPowerStateMapper. getWakeLockSummaryLocked ( groupId)
+ & WAKE_LOCK_STAY_AWAKE ) == 0 ) {
+ groupNextTimeout = mAttentionDetector. updateUserActivity ( groupNextTimeout,
+ screenDimDuration) ;
+ }
- hasUserActivitySummary |= groupUserActivitySummary != 0 ;
+ hasUserActivitySummary |= groupUserActivitySummary != 0 ;
- if ( nextTimeout == - 1 ) {
- nextTimeout = groupNextTimeout;
- } else if ( groupNextTimeout != - 1 ) {
- nextTimeout = Math . min ( nextTimeout, groupNextTimeout) ;
+ if ( nextTimeout == - 1 ) {
+ nextTimeout = groupNextTimeout;
+ } else if ( groupNextTimeout != - 1 ) {
+ nextTimeout = Math . min ( nextTimeout, groupNextTimeout) ;
+ }
+ } else {
+ groupUserActivitySummary |= USER_ACTIVITY_SCREEN_BRIGHT ;
}
+
+
+
+
+
+
+
/packages/apps/Settings/res/values-zh-rCN/arrays.xml
< string- array name= "screen_timeout_entries" >
+ < item > "永不" < / item>
< item msgid= "8386012403457852396" > "15 秒" < / item>
< item msgid= "4572123773028439079" > "30 秒" < / item>
< item msgid= "7016081293774377048" > "1 分钟" < / item>
/packages/apps/Settings/res/values/arrays.xml
< ! -- Display settings. The delay in inactivity before the screen is turned off. These are shown in a list dialog. -- >
< string- array name= "screen_timeout_entries" >
+ < item> never< / item>
< item> 15 seconds< / item>
< item> 30 seconds< / item>
< item> 1 minute< / item>
@@ - 52 , 6 + 53 , 8 @@
< ! -- Do not translate. -- >
< string- array name= "screen_timeout_values" translatable= "false" >
+ < ! -- Do not translate. -- >
+ < item> 0 < / item>
< ! -- Do not translate. -- >
< item> 15000 < / item>
< ! -- Do not translate. -- >
/packages/apps/Settings/src/com/android/settings/display/ScreenTimeoutPreferenceController.java
private CharSequence getTimeoutSummary ( long maxTimeout) {
final long currentTimeout = getCurrentScreenTimeout ( ) ;
final CharSequence description = getTimeoutDescription ( currentTimeout, maxTimeout) ;
+ if ( currentTimeout == 0 && description != null ) {
+ return description. toString ( ) ;
+ }
return mContext. getString ( R . string. screen_timeout_summary, description) ;
}