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

Commit e6bde5aa authored by Wei Sheng Shih's avatar Wei Sheng Shih Committed by Android (Google) Code Review
Browse files

Merge "Skip writing item during shutdown process if the user is locked." into main

parents b39c34c2 193cd618
Loading
Loading
Loading
Loading
+6 −1
Original line number Original line Diff line number Diff line
@@ -231,8 +231,13 @@ class SnapshotPersistQueue {
                            if (next.isReady(mUserManagerInternal)) {
                            if (next.isReady(mUserManagerInternal)) {
                                isReadyToWrite = true;
                                isReadyToWrite = true;
                                next.onDequeuedLocked();
                                next.onDequeuedLocked();
                            } else {
                            } else if (!mShutdown) {
                                mWriteQueue.addLast(next);
                                mWriteQueue.addLast(next);
                            } else {
                                // User manager is locked and device is shutting down, skip writing
                                // this item.
                                next.onDequeuedLocked();
                                next = null;
                            }
                            }
                        }
                        }
                    }
                    }