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

Commit 967c4354 authored by Eino-Ville Talvala's avatar Eino-Ville Talvala Committed by Android (Google) Code Review
Browse files

Merge "CameraDevice: Make sure log tags are within length bounds."

parents 2e9c300b b72d1efd
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -157,7 +157,14 @@ public class CameraDevice implements android.hardware.camera2.CameraDevice {
        mCameraId = cameraId;
        mDeviceListener = listener;
        mDeviceHandler = handler;
        TAG = String.format("CameraDevice-%s-JV", mCameraId);

        final int MAX_TAG_LEN = 23;
        String tag = String.format("CameraDevice-JV-%s", mCameraId);
        if (tag.length() > MAX_TAG_LEN) {
            tag = tag.substring(0, MAX_TAG_LEN);
        }
        TAG = tag;

        DEBUG = Log.isLoggable(TAG, Log.DEBUG);
    }