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

Commit e9e0f070 authored by Jungshik Jang's avatar Jungshik Jang
Browse files

More tweaks for recording

1. Mask TimerClearedStatus message result.
2. Use proper mask for media info.

Change-Id: I7ed6f6839c333460a7bef5e5a84af2a9a34c6d97
parent f128dbf0
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ public abstract class HdmiRecordListener {
            // Timer Overlap Warning - 1 bit
            data.mOverlapped = ((result >> 31) & 0x1) != 0;
            // Media Info - 2 bits;
            data.mMediaInfo = (result >> 29) & 0x7;
            data.mMediaInfo = (result >> 29) & 0x3;
            // Programmed Indicator - 1 bit;
            data.mProgrammed = ((result >> 28) & 0x1) != 0;
            if (data.mProgrammed) {
@@ -88,12 +88,13 @@ public abstract class HdmiRecordListener {
                data.mDurationHour = bcdByteToInt((byte) ((result >> 16) & 0xFF));
                data.mDurationMinute = bcdByteToInt((byte) ((result >> 8) & 0xFF));
            } else {
                // Programmed Info - 4 bits
                data.mNotProgrammedError = (result >> 24) & 0xF;
                data.mDurationHour = bcdByteToInt((byte) ((result >> 16) & 0xFF));
                data.mDurationMinute = bcdByteToInt((byte) ((result >> 8) & 0xFF));
            }

            // Programmed Info - 4 bits
            // The last byte is used for extra error.
            data.mExtraError = result & 0xFF;
            return data;
        }
+1 −1
Original line number Diff line number Diff line
@@ -887,7 +887,7 @@ final class HdmiCecLocalDeviceTv extends HdmiCecLocalDevice {
    @Override
    protected boolean handleTimerClearedStatus(HdmiCecMessage message) {
        byte[] params = message.getParams();
        int timerClearedStatusData = params[0];
        int timerClearedStatusData = params[0] & 0xFF;
        announceTimerRecordingResult(timerClearedStatusData);
        return true;
    }