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

Commit 97bdd391 authored by Piotr Wilczyński's avatar Piotr Wilczyński Committed by Android (Google) Code Review
Browse files

Merge "Don't log BrightnessEvent if only lastReadLux different" into main

parents 45e280df 4318a39c
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -182,9 +182,11 @@ public final class BrightnessEvent {
    }
    }


    /**
    /**
     * A utility to compare two BrightnessEvents. This purposefully ignores comparing time as the
     * A utility to compare two BrightnessEvents. This purposefully ignores comparing time and last
     * two events might have been created at different times, but essentially hold the same
     * read lux because:
     * - the two events might have been created at different times, but essentially hold the same
     * underlying values
     * underlying values
     * - new lux readings arrive often
     *
     *
     * @param that The brightnessEvent with which the current brightnessEvent is to be compared
     * @param that The brightnessEvent with which the current brightnessEvent is to be compared
     * @return A boolean value representing if the two events are same or not.
     * @return A boolean value representing if the two events are same or not.
@@ -200,8 +202,6 @@ public final class BrightnessEvent {
                && mDisplayStateReason == that.mDisplayStateReason
                && mDisplayStateReason == that.mDisplayStateReason
                && mDisplayPolicy == that.mDisplayPolicy
                && mDisplayPolicy == that.mDisplayPolicy
                && Float.floatToRawIntBits(mLux) == Float.floatToRawIntBits(that.mLux)
                && Float.floatToRawIntBits(mLux) == Float.floatToRawIntBits(that.mLux)
                && Float.floatToRawIntBits(mLastReadLux) == Float.floatToRawIntBits(
                that.mLastReadLux)
                && Float.floatToRawIntBits(mPreThresholdLux)
                && Float.floatToRawIntBits(mPreThresholdLux)
                == Float.floatToRawIntBits(that.mPreThresholdLux)
                == Float.floatToRawIntBits(that.mPreThresholdLux)
                && Float.floatToRawIntBits(mNits) == Float.floatToRawIntBits(that.mNits)
                && Float.floatToRawIntBits(mNits) == Float.floatToRawIntBits(that.mNits)