diff options
| author | 2019-02-25 18:52:24 +0900 | |
|---|---|---|
| committer | 2019-02-25 18:54:06 +0900 | |
| commit | 4a3beba5064eb97c1aea3de3ec320b241a3f646d (patch) | |
| tree | e1e24dc2eb3d9111cbb36c19cec2630970c520de | |
| parent | c0c7f7560d5f7c301164a132909fc2b636516c83 (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.java | 1 |
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 |