Fixed issue with associating WindowToken with null binder.
App don't have to specify a LayoutParams.token when adding a window to the system, however when they don't WM maps all the windows to a single WindowToken mapped to a null IBinder. This isn't correct since the windows can be coming from different apps and also null binder shouldn't be used to map tokens. We now: 1. Associate the WindowToken with the IWindow client for bookkeeping in WM if the app didn't specify LayoutParams.token for the window it is adding. 2. Throw an illegal argumenet exception we we try to associate a null binder with a window token or null window token with a binder on a display. Fixes: 38021710 Test: Start an alert window, lock and unlock the phone, long press to bring up power dialog, and tap outside it to make sure it goes away. Change-Id: I6816b7fb9b9a0a8f5387062bada862eb75004e4f
Loading
Please register or sign in to comment