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

Commit fb1e50f9 authored by Alex Salo's avatar Alex Salo Committed by Automerger Merge Worker
Browse files

Merge "Fix adaptive_sleep resetting after reboot" into rvc-dev am: f9551ba4...

Merge "Fix adaptive_sleep resetting after reboot" into rvc-dev am: f9551ba4 am: ca31f89c am: 445ae78b

Change-Id: I349122a4112625df74a80bd226ce703b8d514a19
parents e229b0bb 445ae78b
Loading
Loading
Loading
Loading
+6 −1
Original line number Original line 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.
     * Returns {@code true} if attention service is supported on this device.
     */
     */
    private boolean isAttentionServiceSupported() {
    private boolean isAttentionServiceSupported() {
        return isServiceEnabled() && isServiceAvailable();
        return isServiceEnabled() && isServiceConfigured(mContext);
    }
    }


    @VisibleForTesting
    @VisibleForTesting
@@ -210,6 +210,11 @@ public class AttentionManagerService extends SystemService {
            return false;
            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
        // don't allow attention check in screen off state
        if (!mPowerManager.isInteractive()) {
        if (!mPowerManager.isInteractive()) {
            return false;
            return false;