summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Hiroshi Sumita <hsumita@google.com> 2019-02-25 18:52:24 +0900
committer Hiroshi Sumita <hsumita@google.com> 2019-02-25 18:54:06 +0900
commit4a3beba5064eb97c1aea3de3ec320b241a3f646d (patch)
treee1e24dc2eb3d9111cbb36c19cec2630970c520de
parentc0c7f7560d5f7c301164a132909fc2b636516c83 (diff)
Fix Resources.ThemeKey.setTo() to fix memory leak.
mHashCode should be copied. Otherwise, the returned value of hashCode() is broken and it causes memory leak. Bug: http://b/113090317 Test: manually Change-Id: I89d89f06ea018d93f09eb2ac5f5e3a1b623750d2
-rw-r--r--core/java/android/content/res/Resources.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/java/android/content/res/Resources.java b/core/java/android/content/res/Resources.java
index a2ae994f7b0f..af78c164a5eb 100644
--- a/core/java/android/content/res/Resources.java
+++ b/core/java/android/content/res/Resources.java
@@ -1821,6 +1821,7 @@ public class Resources {
mResId = other.mResId == null ? null : other.mResId.clone();
mForce = other.mForce == null ? null : other.mForce.clone();
mCount = other.mCount;
+ mHashCode = other.mHashCode;
}
@Override