SlimKatXperia/frameworks_base — pull request #20 by alwaysadeel (2014-07-09 05:59:01+00:00)
Title: Slim Heads up: change behaviour of back key

Currently back key hides the heads up. We change it that the back key is still
working for the app which has focus and not for the heads up at all.

Reasons:

1. A lot user requested this due that they often hide the heads up during they work
on the phone, simply due that the back button is often pressed on a normal workflow.
The results is indeed that a lot heads up windows are missed excidentaly.

2. First I thought to make it optional. But there is another big reason to do it this way. Current
behaviour is that the heads up view gets focus...and that we dispatch the back key only. Thing is
that other key events are still rooted to the heads up window. Well most things a user will not see.
But eg on apps with input field some keys on the IME keyboard do not work during the heads up is showing
which is a big no go when we assume that heads up needs to be as much non intrusive as possible.

That being said we remove the dispatch override and give the heads up window FLAG_NOT_FOCUSABLE flag
which will bypass any key events to the window behind which had focus before the heads up showed up.

FLAG_NOT_TOUCH_MODAL we can remove due that FLAG_NOT_FOCUSABLE automatically enables the FLAG_NOT_TOUCH_MODAL flag.

Change-Id: Ied4c7d2dd5b99f89af958f01db980a36d431bbc3