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

Commit 6564036d authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge changes from topic "dmd_log_and_fix_rvc" into rvc-qpr-dev am: b72db4c5

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic87f4b68581208c48f3ee229adf978aeaee1d09e
parents 9471fe8d b72db4c5
Loading
Loading
Loading
Loading
+1 −12
Original line number Diff line number Diff line
@@ -1172,7 +1172,6 @@ public class DisplayModeDirector {
        // changeable and low power mode off. After initialization, these states will
        // be updated from the same handler thread.
        private int mDefaultDisplayState = Display.STATE_UNKNOWN;
        private boolean mIsDeviceActive = false;
        private boolean mRefreshRateChangeable = false;
        private boolean mLowPowerModeEnabled = false;

@@ -1362,7 +1361,6 @@ public class DisplayModeDirector {
            pw.println("    mAmbientLux: " + mAmbientLux);
            pw.println("    mBrightness: " + mBrightness);
            pw.println("    mDefaultDisplayState: " + mDefaultDisplayState);
            pw.println("    mIsDeviceActive: " + mIsDeviceActive);
            pw.println("    mLowPowerModeEnabled: " + mLowPowerModeEnabled);
            pw.println("    mRefreshRateChangeable: " + mRefreshRateChangeable);
            pw.println("    mShouldObserveDisplayLowChange: " + mShouldObserveDisplayLowChange);
@@ -1639,9 +1637,7 @@ public class DisplayModeDirector {
        }

        private boolean isDeviceActive() {
            mIsDeviceActive = mInjector.isDeviceInteractive(mContext);
            return (mDefaultDisplayState == Display.STATE_ON)
                    && mIsDeviceActive;
            return mDefaultDisplayState == Display.STATE_ON;
        }

        private final class LightSensorEventListener implements SensorEventListener {
@@ -1915,8 +1911,6 @@ public class DisplayModeDirector {

        void registerPeakRefreshRateObserver(@NonNull ContentResolver cr,
                @NonNull ContentObserver observer);

        boolean isDeviceInteractive(@NonNull Context context);
    }

    @VisibleForTesting
@@ -1947,11 +1941,6 @@ public class DisplayModeDirector {
            cr.registerContentObserver(PEAK_REFRESH_RATE_URI, false /*notifyDescendants*/,
                    observer, UserHandle.USER_SYSTEM);
        }

        @Override
        public boolean isDeviceInteractive(@NonNull Context ctx) {
            return ctx.getSystemService(PowerManager.class).isInteractive();
        }
    }

}
+0 −5
Original line number Diff line number Diff line
@@ -723,10 +723,5 @@ public class DisplayModeDirectorTest {
                        PEAK_REFRESH_RATE_URI);
            }
        }

        @Override
        public boolean isDeviceInteractive(@NonNull Context context) {
            return true;
        }
    }
}