title: programmatically setting screen timeout with Settings.System.putInt()
body: <p>I know there are multiple questions that are similar. </p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/1114270/android-screen-timeout">Android Screen Timeout</a></li>
  <li><a href="https://stackoverflow.com/questions/10748861/how-to-change-screen-timeout-programmatically">How to change screen timeout programmatically?</a></li>
  </ul>
  
  <hr>
  
  <p>The requirement is to switch screen timeout between "never" and the original setting.
  When I do <code>Settings.System.putInt(getContentResolver(), Settings.System.SCREEN_OFF_TIMEOUT, -1);</code>, screen doesn't dim on emulator (4.0 Ice Cream Sandwich) and Samsung Galaxy SII (4.1.2 Jelly Bean) but when someone installed on 4.4 KitKat, screen dimmed immediately. </p>
  
  <p>Did something change in OS? Is there a way to set it never to time out on KitKat?</p>
  
  <p>Since I was having trouble setting it never to time out, I was going to set it to 120minutes instead.
  When I try to set it to a specific time (eg. 60minutes, 120minutes, etc) it is set to 30minutes. Other values seem to get rounded up/down as well. 
  Is it not possible to set it to something that's not the figure listed in Android Setting app? (15sec, 30sec, 1min, 2min, 5min, 10min, 30min)</p>
  
  <p>I am hoping someone can enlighten me. Thanks in advance.</p>