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

Commit f9551ba4 authored by Alex Salo's avatar Alex Salo Committed by Android (Google) Code Review
Browse files

Merge "Fix adaptive_sleep resetting after reboot" into rvc-dev

parents a1395679 e0d25ed3
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -165,7 +165,7 @@ public class AttentionManagerService extends SystemService {
     * Returns {@code true} if attention service is supported on this device.
     */
    private boolean isAttentionServiceSupported() {
        return isServiceEnabled() && isServiceAvailable();
        return isServiceEnabled() && isServiceConfigured(mContext);
    }

    @VisibleForTesting
@@ -210,6 +210,11 @@ public class AttentionManagerService extends SystemService {
            return false;
        }

        if (!isServiceAvailable()) {
            Slog.w(LOG_TAG, "Service is not available at this moment.");
            return false;
        }

        // don't allow attention check in screen off state
        if (!mPowerManager.isInteractive()) {
            return false;