OSDN Git Service

Fix a bunch of repeated reads of a ro.* property
authorJohn Reck <jreck@google.com>
Tue, 20 Sep 2016 21:24:21 +0000 (14:24 -0700)
committerAndreas Gampe <agampe@google.com>
Fri, 27 Jan 2017 19:04:39 +0000 (11:04 -0800)
commited065024a59cf008ba711ff79e223ed99cb8b7c5
tree51fdf7f20900320af88559c6710e5980aac0089f
parentb8bbd302030253dc860df69406403e4e06e84da5
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)
core/java/android/app/ActivityManager.java
core/java/android/net/SSLCertificateSocketFactory.java
core/java/android/os/FactoryTest.java
core/java/android/os/SystemProperties.java
core/java/android/os/UserManager.java
core/java/android/os/storage/StorageManager.java
core/java/com/android/internal/os/RoSystemProperties.java [new file with mode: 0644]
core/java/com/android/internal/os/ZygoteConnection.java
preloaded-classes