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

Commit ecb46f77 authored by Erica Chang's avatar Erica Chang Committed by Gerrit Code Review
Browse files

services: button brightness should check proximity

Change-Id: I10a72fa6d8b520e86cfef3d7ded489fd7fa936d2
parent 8e037a51
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -1651,12 +1651,14 @@ public final class PowerManagerService extends SystemService
                                    && now > mLastUserActivityTime + mButtonTimeout) {
                                mButtonsLight.setBrightness(0);
                            } else {
                                if (!mProximityPositive) {
                                    mButtonsLight.setBrightness(buttonBrightness);
                                    if (buttonBrightness != 0 && mButtonTimeout != 0) {
                                        nextTimeout = now + mButtonTimeout;
                                    }
                                }
                            }
                        }
                    } else {
                        nextTimeout = mLastUserActivityTime + screenOffTimeout;
                        if (now < nextTimeout) {