I've noticed in the last couple weeks that my Nexus 4 (stock rooted, with franco.Kernel) will seemingly at random lose the ability to auto-rotate the display. If I go into the Display settings and check the box, it works again, but that setting is invariably disabled again through no action of my own (or even a reboot) within a day or two.

Can apps, either in the foreground or the background, modify this setting? If so, I'll have to start keeping really good track of what I open to try and track down the culprit so I can complain to its developer.


According to this StackOverflow question, YES.


public static void setAutoOrientationEnabled(ContentResolver resolver, boolean enabled)  
   Settings.System.putInt(resolver, Settings.System.ACCELEROMETER_ROTATION, enabled ? 1 : 0);  
  • @DanHulme The link I provided has the full answer. :) – geffchang Jul 18 '13 at 9:32
  • @DanHulme Updated. – geffchang Jul 18 '13 at 9:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.