Fix DecorView error about non-visual context
This error showed because DecorContext uses application context to get WindowManager. This CL changes to use context to do so. Also rename fields in DecorContext because we actually can pass any context in "activityContext." Note that most cases of misuse WindowManager is covered by [1]. We can guarantee that WindowManager can be obtained by mContext. [1]:I52aa0c4a02b7da018aa10f1473e1616564296e41 Bug: 150632074 Test: manual - enable strict mode and check the error log not shown. Test: atest DecorContextTest Change-Id: I558a2819e5928a802b897a130cfc3262115b9935
Loading
Please register or sign in to comment