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

Commit b5d7cf8e authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "AutoBrightness: Remove handler's messages before send." am: b3230cd6

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1456125

Change-Id: I1619a994ebcffca22281aeaeb2347c0dabb240a7
parents 35a2a4c3 b3230cd6
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -259,10 +259,12 @@ public class BrightnessSynchronizer{
            }
            if (BRIGHTNESS_URI.equals(uri)) {
                int currentBrightness = getScreenBrightnessInt(mContext);
                mHandler.removeMessages(MSG_UPDATE_FLOAT);
                mHandler.obtainMessage(MSG_UPDATE_FLOAT, currentBrightness, 0).sendToTarget();
            } else if (BRIGHTNESS_FLOAT_URI.equals(uri)) {
                float currentFloat = getScreenBrightnessFloat(mContext);
                int toSend = Float.floatToIntBits(currentFloat);
                mHandler.removeMessages(MSG_UPDATE_INT);
                mHandler.obtainMessage(MSG_UPDATE_INT, toSend, 0).sendToTarget();
            }
        }