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

Commit 1cf3f1bb authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Disable verbose logs from Context Hub Service"

parents 70b9e55e b4f5987d
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;
        }