Merge "Fix bug #5344067 android.text.DynamicLayout.sStaticLayout can hold onto an Activity, potential memory leak"
This commit is contained in:
committed by
Android (Google) Code Review
commit
8eb34ed88c
@@ -275,7 +275,7 @@ extends Layout
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (reflowed == null) {
|
if (reflowed == null) {
|
||||||
reflowed = new StaticLayout(getText());
|
reflowed = new StaticLayout(null);
|
||||||
} else {
|
} else {
|
||||||
reflowed.prepare();
|
reflowed.prepare();
|
||||||
}
|
}
|
||||||
@@ -488,7 +488,7 @@ extends Layout
|
|||||||
|
|
||||||
private int mTopPadding, mBottomPadding;
|
private int mTopPadding, mBottomPadding;
|
||||||
|
|
||||||
private static StaticLayout sStaticLayout = null;
|
private static StaticLayout sStaticLayout = new StaticLayout(null);
|
||||||
|
|
||||||
private static final Object[] sLock = new Object[0];
|
private static final Object[] sLock = new Object[0];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user