Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(466)

Unified Diff: build/android/pylib/device/device_utils.py

Issue 1275263004: Fix device_utils.SetProp not properly clearing cached value (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/device/device_utils.py
diff --git a/build/android/pylib/device/device_utils.py b/build/android/pylib/device/device_utils.py
index 2d9671d01034f64873c5c0ebd2b889f0e896703c..0ea9a264ed900f81307d96d3905b376c867167cf 100644
--- a/build/android/pylib/device/device_utils.py
+++ b/build/android/pylib/device/device_utils.py
@@ -1558,8 +1558,9 @@ class DeviceUtils(object):
assert isinstance(value, basestring), "value is not a string: %r" % value
self.RunShellCommand(['setprop', property_name, value], check_return=True)
- if property_name in self._cache:
- del self._cache[property_name]
+ cache_key = '_prop:' + property_name
jbudorick 2015/08/11 00:47:54 optional nit: wdyt about a _PropertyCacheKey funct
agrieve 2015/08/11 13:51:56 If we're going to go with having sub-caches for AP
jbudorick 2015/08/11 13:53:18 Hmm, good point.
+ if cache_key in self._cache:
+ del self._cache[cache_key]
# TODO(perezju) remove the option and make the check mandatory, but using a
# single shell script to both set- and getprop.
if check and value != self.GetProp(property_name):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698