Merge "Fix race condition triggered by quick stop/start of Dream" into sc-dev

This commit is contained in:
Sean Stout
2021-04-14 14:29:02 +00:00
committed by Android (Google) Code Review

View File

@@ -394,7 +394,8 @@ public final class DreamManagerService extends SystemService {
private void startDreamLocked(final ComponentName name,
final boolean isTest, final boolean canDoze, final int userId) {
if (Objects.equals(mCurrentDreamName, name)
if (!mCurrentDreamIsWaking
&& Objects.equals(mCurrentDreamName, name)
&& mCurrentDreamIsTest == isTest
&& mCurrentDreamCanDoze == canDoze
&& mCurrentDreamUserId == userId) {