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

Commit b6bfc063 authored by Jonathan Klee's avatar Jonathan Klee
Browse files

Add logs for system properties access

parent e93b54fa
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ import java.util.HashMap;
@SystemApi
public class SystemProperties {
    private static final String TAG = "SystemProperties";
    private static final boolean TRACK_KEY_ACCESS = false;
    private static final boolean TRACK_KEY_ACCESS = true;

    /**
     * Android O removed the property name length limit, but com.amazon.kindle 7.8.1.5
@@ -77,6 +77,8 @@ public class SystemProperties {
    private static void onKeyAccess(String key) {
        if (!TRACK_KEY_ACCESS) return;

        Log.i(TAG, "jklee key=" + key);

        if (key != null && key.startsWith("ro.")) {
            synchronized (sRoReads) {
                MutableInt numReads = sRoReads.getOrDefault(key, null);