summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authordaqi <daqi@xiaomi.com>2018-09-19 15:51:22 +0800
committerdaqi <daqi@xiaomi.com>2018-09-20 08:30:40 +0800
commitdff365ef4dc61239fac70953b631e92972a9f41f (patch)
tree1a40bd84eafdd3c11615d27aecd3b787833472de /rs/java/android/renderscript/ProgramFragmentFixedFunction.java
parent69a13aded07cd28e3e1a09071cd7239cff3ba740 (diff)
Set InputMethoMananger#mCurRootView to null when window dismissed
InputMethodManager#sInstance is a long live static object so we have to set its field with right value, otherwise any object referenced by it cannot be gc including potential activity context. Now InputMethodManager#mCurRootView is set to null in InputMethodManager#onPreWindowFocus which is invoked when app's ViewRootImpl received ViewRootImpl#W#windowfocusChanged from WMS. However, in the ViewRootImpl#W#windowfocusChanged, mViewAncestor is a weak reference which get() may returns null sometimes. One scenario is the ViewRootImpl#W#windowfocusChanged is called after ActivityThread#handleDestroyActivity. The activity is destroyed and its ViewRootImpl get GC'd. Then InputMethodManager#onPreWindowFocus won't get called and InputMethodManager#mCurRootView won't be set to null. And it is a proper time to set InputMethodManager#mCurRootView to null when the window it served dismissed. Fix: 116078227 Test: Break at ActivityThread#handleDestroyActivity and ViewRootImpl#W#windowfocusChanged Change-Id: I8fabb30f14bcb2cd7019e29b6642b4562d49d248 Signed-off-by: daqi <daqi@xiaomi.com>
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions