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

Commit cd09f259 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 428c2dcb
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -1638,11 +1638,15 @@ public final class PowerManagerService extends SystemService
                        if (mButtonTimeout != 0 && now > mLastUserActivityTime + mButtonTimeout) {
                             mButtonsLight.setBrightness(0);
                        } else {
                            // The proximity sensor during a call may indicate positive,
                            // the screen & buttons should stay off until it indicates negative
                            if (!mProximityPositive) {
                                mButtonsLight.setBrightness(buttonBrightness);
                                if (buttonBrightness != 0 && mButtonTimeout != 0) {
                                    nextTimeout = now + mButtonTimeout;
                                }
                            }
                        }
                        mUserActivitySummary = USER_ACTIVITY_SCREEN_BRIGHT;
                    } else {
                        nextTimeout = mLastUserActivityTime + screenOffTimeout;