Merge "Add a lock when writing temporary files in BootReceiver" into main