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.


1 Answer 1


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
    Commented Jul 18, 2013 at 9:32
  • @DanHulme Updated.
    – geffchang
    Commented Jul 18, 2013 at 9:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .