Fixes AOSP EmergencyDialer failing to occlude Keyguard

On rapid double tap to bouncer's emergency button, Keyguard would
show over EmergencyDialer as it launched. This was due to the old
EmergencyDialer used in AOSP not having showWhenLocked=true attribute,
instead setting it directly on creation. When the dialer activity was
launched the second time due to the second button press, mShowWhenLocked
was set to false again when its ActivityRecord was created, leading to
the occluded state being set to false and
KeyguardController.handleOccludedChanged being called again with this
bad state. It then asked the windowManager for the transition for
unoccluding the keyguard since it believed keyguard had gone from
occluded = true to occluded = false, overriding the occluding transition
set by the initial touch and causing the visible symptoms.

Setting the showWhenLocked attribute prevents the issue by ensuring the
activity is constructed with the correct state, and seems to be the way
modern dialer does it (this is why the bug was only repro'able on AOSP).

Bug: 238644172
Test: manual
Change-Id: I1d8dc6e9562f8989fe5a70fff2214627dd09c06b
2 files changed