Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 3d9c19f2 authored by Eric Biggers's avatar Eric Biggers
Browse files

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
parent 3c7a3e39
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment