This takes care of allowing us to cancel the back button. The
back button is a bear because it is strewn all over the place --
everywhere you can close something, there is some code looking
for the back button that now needs to deal with being canceled.
The main things changed are activity (of course), dialog,
input method, search dialog. There are some other misc places
in the framework (and some I missed here that I will get in a
second pass).
To facility all of this, the key dispatching APIs now provide
a lot more support for dealing with looking for cancelled keys,
and incidentally also provide an actual API for catching long
key presses. This also helped clean up the code in PhoneWindow
where it deals with all of the combinations of key pressed and
releases. (And also allows people to override
Activity.onKeyLongPress() to provide a different long press
action for a standard key like search.)
And while I was doing this, I reworked how we detect long
presses by having this be part of the key event delivered by
the window manager. This should greatly reduce (hopefully
outright eliminate) the problems with long presses being
mis-detected when an application is being slow.
Change-Id: Ia19066b8d588d573df3eee6d96e1c90fdc19f57d
Now that we are using preloaded drawables in compatibilty mode, when
constructing them from their constant state we need to set the new
drawable's target density appropriately.
Change-Id: I3665cbea09d38b9ac5f45f8c380dc8641f86b266
First, fix some issues with the final wallpaper bitmap
we use: ensure it is always 16bpp, and make sure dithering
of its bitmap is turned off. We take of dithering
when loading, to make sure we don't use it when drawing.
Also add new APIs to return the wallpaper with the equivalent
of Launcher's old FastBitmapDrawable. As doing this, also load
the default wallpaper the same way as custom ones, taking care to
resize it as needed at load time.
Finally implement a mechanism for the window manager to wait
for the wallpaper to redraw at its new position before returning
from the application's call to change the offset. This ensures
that the wallpaper better tracks the application. Note that there
is a timeout in this wait that is relatively short, and if it
expires we will run for a while without waiting.
Change-Id: Ife449437746da85958bd447e0a6cf3d2223b398c
Dragging and flinging have different minimums for the max Y
value. Allow the fling to have the title height instead of zero
for the minimum max Y so the title can always be removed via
fling.
This fixes http://b/issue?id=2109006
Turn off keyboard backlight immediately when keyboard is closed.
Changing keyboard visibility state signals user activity except in the case
where the keyboard is closed and the screen is already off.
Fixes bugs b/1351141 and b/1319625
Change-Id: If4bf2c1dd8e0c2bc08196e443b6103a6041f27e1
Signed-off-by: Mike Lockwood <lockwood@android.com>
The underlying ProgressBar implementation doesn't know how
to correctly update the thumb graphic, so AbsSeekBar must
call invalidate() at key moments to ensure things look
correct. This bug is one such instance: when you pick your
finger up off the seekbar, the "value" of the progressbar
appears not to change, so ProgressBar feels no compunction
to repaint. AbsSeekBar now invalidate()s on ACTION_UP and
ACTION_CANCEL to ensure that the thumb is correctly drawn.
* changes:
Use floor to calculate the range to avoid the rounding error triggered scrollbar. The worst case is that you can never scroll down to the last pixel. The old special case can cause problem when getViewWidth/Height have changed which do not match mLastXXSent any more.
mlebeau says:
"Basically, because we now show the app icon for in-app
search, showSearchIconAsBadge is a bit unnecessary, but it does in
fact still work. Basically if either showSearchIconAsBadge or
showSearchLabelAsBadge are specified, we grow the height of the search
bar and place the provided icon or the provided label, respectively,
above the text field and app icon. But we do not remove the app icon
if the developer specifies showSearchIconAsBadge - it's still just the
'badge area' above the icon."
Fixes:
http://b/issue?id=2105329
"Deprecate searchable attributes 'showSearchIconAsBadge' and 'icon'"
Change-Id: Ie2976aafe42b4ab870be9e64b34eb0ed441ebbb0