Only replace new line characters if the wakelock name contains one
The original operation creates new string everytime which is expensive

Bug: 64272195
Test: NA
Change-Id: Id93d588a7d5a6b6c192a057fcd4296bd1c508516
(cherry picked from commit 85291508602120e78918e69f760182d1233df789)
1 file changed