commit | ed065024a59cf008ba711ff79e223ed99cb8b7c5 | [log] [tgz] |
---|---|---|
author | John Reck <jreck@google.com> | Tue Sep 20 14:24:21 2016 -0700 |
committer | Andreas Gampe <agampe@google.com> | Fri Jan 27 11:04:39 2017 -0800 |
tree | 51fdf7f20900320af88559c6710e5980aac0089f | |
parent | b8bbd302030253dc860df69406403e4e06e84da5 [diff] |
Fix a bunch of repeated reads of a ro.* property SystemProperties.get() is not particularly fast, especially if a string is returned. Since ro.* values are unable to be changed, there's no need to continously re-query them. Cache the value at static init time to trivially fix this. Test: refactoring CL. Change-Id: Iccb021d3cb2ba3a4a1d0048ddec6811bb7409eec (cherry picked from commit aa67f684ff43c81e3280c846245ec6ebe907787e)