Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeScrimController.java +16 −6 Original line number Original line Diff line number Diff line Loading @@ -23,14 +23,11 @@ import android.annotation.NonNull; import android.content.Context; import android.content.Context; import android.os.Handler; import android.os.Handler; import android.util.Log; import android.util.Log; import android.view.View; import android.view.animation.Interpolator; import android.view.animation.Interpolator; import com.android.keyguard.KeyguardStatusView; import com.android.systemui.Interpolators; import com.android.systemui.Interpolators; import com.android.systemui.doze.DozeHost; import com.android.systemui.doze.DozeHost; import com.android.systemui.doze.DozeLog; import com.android.systemui.doze.DozeLog; import com.android.systemui.doze.DozeTriggers; /** /** * Controller which handles all the doze animations of the scrims. * Controller which handles all the doze animations of the scrims. Loading Loading @@ -341,18 +338,31 @@ public class DozeScrimController { if (!mDozing) return; if (!mDozing) return; startScrimAnimation(true /* inFront */, 1, startScrimAnimation(true /* inFront */, 1, mDozeParameters.getPulseOutDuration(), mDozeParameters.getPulseOutDuration(), Interpolators.ALPHA_IN, mPulseOutFinished); Interpolators.ALPHA_IN, mPulseOutFinishing); } } }; }; private final Runnable mPulseOutFinished = new Runnable() { private final Runnable mPulseOutFinishing = new Runnable() { @Override @Override public void run() { public void run() { if (DEBUG) Log.d(TAG, "Pulse out finished"); if (DEBUG) Log.d(TAG, "Pulse out finished"); DozeLog.tracePulseFinish(); DozeLog.tracePulseFinish(); if (mDozeParameters.getAlwaysOn() && mDozing) { // Setting power states can block rendering. For AOD, delay finishing the pulse and // setting the power state until the fully black scrim had time to hit the // framebuffer. mHandler.postDelayed(mPulseOutFinished, 30); } else { mPulseOutFinished.run(); } } }; private final Runnable mPulseOutFinished = new Runnable() { @Override public void run() { // Signal that the pulse is all finished so we can turn the screen off now. // Signal that the pulse is all finished so we can turn the screen off now. pulseFinished(); DozeScrimController.this.pulseFinished(); if (mDozeParameters.getAlwaysOn()) { if (mDozeParameters.getAlwaysOn()) { mScrimController.setDozeInFrontAlpha(mAodFrontScrimOpacity); mScrimController.setDozeInFrontAlpha(mAodFrontScrimOpacity); } } Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeScrimController.java +16 −6 Original line number Original line Diff line number Diff line Loading @@ -23,14 +23,11 @@ import android.annotation.NonNull; import android.content.Context; import android.content.Context; import android.os.Handler; import android.os.Handler; import android.util.Log; import android.util.Log; import android.view.View; import android.view.animation.Interpolator; import android.view.animation.Interpolator; import com.android.keyguard.KeyguardStatusView; import com.android.systemui.Interpolators; import com.android.systemui.Interpolators; import com.android.systemui.doze.DozeHost; import com.android.systemui.doze.DozeHost; import com.android.systemui.doze.DozeLog; import com.android.systemui.doze.DozeLog; import com.android.systemui.doze.DozeTriggers; /** /** * Controller which handles all the doze animations of the scrims. * Controller which handles all the doze animations of the scrims. Loading Loading @@ -341,18 +338,31 @@ public class DozeScrimController { if (!mDozing) return; if (!mDozing) return; startScrimAnimation(true /* inFront */, 1, startScrimAnimation(true /* inFront */, 1, mDozeParameters.getPulseOutDuration(), mDozeParameters.getPulseOutDuration(), Interpolators.ALPHA_IN, mPulseOutFinished); Interpolators.ALPHA_IN, mPulseOutFinishing); } } }; }; private final Runnable mPulseOutFinished = new Runnable() { private final Runnable mPulseOutFinishing = new Runnable() { @Override @Override public void run() { public void run() { if (DEBUG) Log.d(TAG, "Pulse out finished"); if (DEBUG) Log.d(TAG, "Pulse out finished"); DozeLog.tracePulseFinish(); DozeLog.tracePulseFinish(); if (mDozeParameters.getAlwaysOn() && mDozing) { // Setting power states can block rendering. For AOD, delay finishing the pulse and // setting the power state until the fully black scrim had time to hit the // framebuffer. mHandler.postDelayed(mPulseOutFinished, 30); } else { mPulseOutFinished.run(); } } }; private final Runnable mPulseOutFinished = new Runnable() { @Override public void run() { // Signal that the pulse is all finished so we can turn the screen off now. // Signal that the pulse is all finished so we can turn the screen off now. pulseFinished(); DozeScrimController.this.pulseFinished(); if (mDozeParameters.getAlwaysOn()) { if (mDozeParameters.getAlwaysOn()) { mScrimController.setDozeInFrontAlpha(mAodFrontScrimOpacity); mScrimController.setDozeInFrontAlpha(mAodFrontScrimOpacity); } } Loading