public class IMMLeaks
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
IMMLeaks.LifecycleCallbacksAdapter
Helper to avoid implementing all lifecycle callback methods.
|
| Constructor and Description |
|---|
IMMLeaks() |
| Modifier and Type | Method and Description |
|---|---|
static void |
fixFocusedViewLeak(android.app.Application app)
Fix for https://code.google.com/p/android/issues/detail?id=171190 .
|
public static void fixFocusedViewLeak(android.app.Application app)
When a view that has focus gets detached, we wait for the main thread to be idle and then check if the InputMethodManager is leaking a view. If yes, we tell it that the decor view got focus, which is what happens if you press home and come back from recent apps. This replaces the reference to the detached view with a reference to the decor view.
Should be called from Activity.onCreate(android.os.Bundle) )}.