Revert "Revert "Fix a bootloop problem when /data/system/usagestats/usage-history.xml is empty. This often occurs after an incomplete reboot/shutdown or battery pull.""

This reverts commit b28b54dde33859ddcbf6bb1ab37f1d4315133207.