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

Commit b849ed50 authored by Felipe Leme's avatar Felipe Leme
Browse files

Check for wallpaper service on DozeWallpaperState.

It's disabled by default on automotive builds.

Bug: 146157808
Test: check logcat while running 'adb shell dumpsys car_service suspend'

Change-Id: Ifb0815f260d61bb8307f4b7c7798d9a5684d0d20
(cherry picked from commit 6844c394fbb6e0170f893de58520a73fabaa1229)
parent f275d96b
Loading
Loading
Loading
Loading
+13 −8
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.systemui.doze;

import android.annotation.Nullable;
import android.app.IWallpaperManager;
import android.content.Context;
import android.os.RemoteException;
@@ -37,6 +38,7 @@ public class DozeWallpaperState implements DozeMachine.Part {
    private static final String TAG = "DozeWallpaperState";
    private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);

    @Nullable
    private final IWallpaperManager mWallpaperManagerService;
    private final DozeParameters mDozeParameters;
    private final BiometricUnlockController mBiometricUnlockController;
@@ -88,6 +90,7 @@ public class DozeWallpaperState implements DozeMachine.Part {

        if (isAmbientMode != mIsAmbientMode) {
            mIsAmbientMode = isAmbientMode;
            if (mWallpaperManagerService != null) {
                try {
                    long duration = animated ? StackStateAnimator.ANIMATION_DURATION_WAKEUP : 0L;
                    if (DEBUG) {
@@ -101,10 +104,12 @@ public class DozeWallpaperState implements DozeMachine.Part {
                }
            }
        }
    }

    @Override
    public void dump(PrintWriter pw) {
        pw.println("DozeWallpaperState:");
        pw.println(" isAmbientMode: " + mIsAmbientMode);
        pw.println(" hasWallpaperService: " + (mWallpaperManagerService != null));
    }
}