Can apps modify the system-level "Display->Auto-rotation" setting? 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.

Excerpt:  

public static void setAutoOrientationEnabled(ContentResolver resolver, boolean enabled)  
{  
   Settings.System.putInt(resolver, Settings.System.ACCELEROMETER_ROTATION, enabled ? 1 : 0);  
}