title: Android: How to prevent developer options from resetting upon the next boot?
body: <p>This is my first post so bear with me. I'm a maintainer for the Paranoid Android ROM and very new to Java. Basically my devices require the "Disable HW overlays" option in "Settings>Developer options" to be permanently enabled in order to prevent screen flickering. The thing is it is normal AOSP behaviour for some "dangerous" developer options to reset at the next boot (although I personally do not believe the said setting is dangerous).</p>
  
  <p>I would be extremely grateful if someone could tell me how to change the code to make this particular setting's state permanent upon the next boot.</p>
  
  <p>Here is the java file:
  <a href="https://github.com/AOSPA-legacy/android_packages_apps_Settings/blob/kitkat/src/com/android/settings/DevelopmentSettings.java" rel="nofollow">DevelopmentSettings.java</a></p>
  
  <p>The string I am interested in is "DisableOverlays"</p>
  
  <p>I am a total newbie when it comes to this sort of stuff so any help is much appreciated.</p>
  
  <p>Thanks.</p>
  
  <p>EDIT: This is the file that is called upon when disable hw overlays is enabled (stated as DebugDisableHWC):
  <a href="https://github.com/AOSPA-legacy/android_frameworks_native/blob/kitkat/services/surfaceflinger/SurfaceFlinger.cpp#L3077-Lundefined" rel="nofollow">SurfaceFlinger.cpp</a></p>