BrightnessTracker: don't create stuff directly in /data/system_de
/data/system_de is only for per-user data; it *must* only contain per-user encrypted directories. Only vold should ever create anything directly in this directory. In preparation for removing system_server's write access to this directory (https://r.android.com/2078213), make BrightnessTracker store its brightness_events.xml file at /data/system/brightness_events.xml instead of /data/system_de/brightness_events.xml, and likewise for ambient_brightness_stats.xml. Migration happens lazily, except that the old files aren't ever deleted since the SELinux policy will no longer allow system_server to do that; the old files just stop being used. vold will need to handle the cleanup instead, or we could just leave the files around. Test: Flashed new build without wiping userdata. Log shows "Reading ambient_brightness_stats.xml from old location" as expected. Rebooted. Log message no longer appears, as expected. File /data/system/ambient_brightness_stats.xml exists, as expected. Bug: 156305599 Change-Id: I6e0948ac54ec9183348943234d505e7466042963
Loading
Please register or sign in to comment