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

Commit b4f5987d authored by Arthur Ishiguro's avatar Arthur Ishiguro Committed by Brian Duddie
Browse files

Disable verbose logs from Context Hub Service

Bug: 112049817
Test: Compile only
Change-Id: I31329753946d2c26f71eaaefcfb3c0b6fc1a2346
parent 024059cf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ import java.util.function.Consumer;
    /*
     * Local flag to enable debug logging.
     */
    private static final boolean DEBUG_LOG_ENABLED = true;
    private static final boolean DEBUG_LOG_ENABLED = false;

    /*
     * The context of the service.
+13 −4
Original line number Diff line number Diff line
@@ -77,6 +77,11 @@ public class ContextHubService extends IContextHubService.Stub {

    private static final int OS_APP_INSTANCE = -1;

    /*
     * Local flag to enable debug logging.
     */
    private static final boolean DEBUG_LOG_ENABLED = false;

    private final Context mContext;

    private final Map<Integer, ContextHubInfo> mContextHubIdToInfoMap;
@@ -779,12 +784,16 @@ public class ContextHubService extends IContextHubService.Stub {

        int msgVersion = 0;
        int callbacksCount = mCallbacksList.beginBroadcast();
        Log.d(TAG, "Sending message " + msgType + " version " + msgVersion + " from hubHandle " +
                contextHubHandle + ", appInstance " + appInstance + ", callBackCount "
        if (DEBUG_LOG_ENABLED) {
            Log.v(TAG, "Sending message " + msgType + " version " + msgVersion + " from hubHandle "
                    + contextHubHandle + ", appInstance " + appInstance + ", callBackCount "
                    + callbacksCount);
        }

        if (callbacksCount < 1) {
            if (DEBUG_LOG_ENABLED) {
                Log.v(TAG, "No message callbacks registered.");
            }
            return 0;
        }