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

Commit b033e8e6 authored by Jack Richardson's avatar Jack Richardson
Browse files

Add better debug logs in Latency Tracker.

If we fail to start listening to config changes log an error as this is not recoverable.

Also add a warning if you try check the properties map before its populated as this should not happen.

Change-Id: Ie38c004d0bf55c2cd2e6e103647df1c2ad2a57a6
BUG: b/382116130
parent 2692358b
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -435,9 +435,11 @@ public class LatencyTracker {
    public void startListeningForLatencyTrackerConfigChanges() {
        final Context context = ActivityThread.currentApplication();
        if (context == null) {
            if (DEBUG) {
                Log.d(TAG, "No application for package: " + ActivityThread.currentPackageName());
            }
            Log.e(
                    TAG,
                    String.format(
                            "No application for package: %s. Latency Tracker Disabled",
                            ActivityThread.currentPackageName()));
            return;
        }
        if (context.checkCallingOrSelfPermission(READ_DEVICE_CONFIG) != PERMISSION_GRANTED) {