Asynchronously inflate the bouncer.
As we are lazily inflating the bouncer every time we show it, we can get huge performance gains from AsyncInflater. From the class documentation "This is intended for parts of the UI that are created lazily or in response to user interactions. This allows the UI thread to continue to be responsive & animate while the relatively heavy inflate is being performed." it seems that this is the perfect use case. I've added the AsyncInflater in a dagger module for testing purposes. I also moved the handler constructrion in KeyguardMessageArea to its corresponding view controller to conform to the AsynInflater requirements. Interestingly this also fixes b/265384692 as it seemed like the bouncer was being inflated before the onclicklisteners were added. Fixes: 269522372 Fixes: 265384692 Test: Test for talk back to ensure that it announces the text view. Test: open scrimmed and non scrimmed bouncer. Test: Pin, Password, pattern, simpin, simpuk Test: modified unit tests. Change-Id: Ic65af22da9f6822e5137aae3cfee03a6e819ab94
Loading
Please register or sign in to comment