Commit Graph

6887 Commits

Author SHA1 Message Date
Yigit Boyar
bf6d1ebc4b am 9b716793: Merge "Revert "Make VPA.setInterpolator(null) unset the interpolator."" into lmp-mr1-ub-dev
* commit '9b7167937ab5ea456c45e735d3bd749ccf49c432':
  Revert "Make VPA.setInterpolator(null) unset the interpolator."
2015-05-19 23:15:48 +00:00
Dianne Hackborn
2d9c6015b3 Merge "Fix issue #20679383: Add text style to assist.ViewNode..." into mnc-dev 2015-05-19 18:26:28 +00:00
Dianne Hackborn
02beb41c97 Fix issue #20679383: Add text style to assist.ViewNode...
...from text nodes in WebView

Add a new explicit API for setting the text style information associated
with a view structure.

Also, how about some documentation!

Change-Id: Ia948b2d66382b973d0d00a67172a281ad55ce592
2015-05-19 11:18:16 -07:00
Yohei Yukawa
c2cc6fff1b Merge "Keep IMM#mCurRootView synchronized with the actual window focus." into mnc-dev 2015-05-19 16:52:26 +00:00
Abodunrinwa Toki
1f21d2a8b1 Merge "Hide floating toolbar when user interacts with screen." into mnc-dev 2015-05-19 14:06:46 +00:00
Abodunrinwa Toki
fd3a3a1163 Hide floating toolbar when user interacts with screen.
- Adds an ActionMode.snooze(int) API.
- Clients call this to hide the floating toolbar on DOWN touch event.
- This is called repeatedly as a snooze timeout will re-show the
  toolbar.
- ActionMode.snooze(0) will "wake" the toolbar, reshowing it.
- Clients call this to re-show the toolbar on UP touch event.
- This CL also adds code to hide the toolbar when the "content rect"
  is changing.

Bug: 20148125
Change-Id: If5a9a15f72c73cad8ca01a4328a58570b3e29f66
2015-05-19 14:25:39 +01:00
Adam Powell
f9a0d44d2e Merge "Migrate uses of config_windowIsRound to Configuration.isScreenRound" into mnc-dev 2015-05-19 01:10:55 +00:00
Vladislav Kaznacheev
10e23977bd am d2368d07: Merge "Make VPA.setInterpolator(null) unset the interpolator." into lmp-mr1-ub-dev
* commit 'd2368d07a71fa77edc07be4ada89f70065bc940f':
  Make VPA.setInterpolator(null) unset the interpolator.
2015-05-18 23:54:08 +00:00
Yigit Boyar
21cdbd298d Revert "Make VPA.setInterpolator(null) unset the interpolator."
This reverts commit 58ae164100.

Change-Id: I6d9942b41694f6a5e6c211df839aa385eea0c496
2015-05-18 23:38:41 +00:00
Adam Powell
01f280d376 Migrate uses of config_windowIsRound to Configuration.isScreenRound
Move existing code that previously relied on config_windowIsRound to
use the new Configuration.isScreenRound() method. Also move the system
property override for emulators over to the initial setup of a Display
so that the configuration property is consistent with existing
expectations.

Remove config_windowIsRound from symbols.xml. The symbol now only
exists as a default value redirect for overlays already configured to
supply this value.

Change-Id: I24e6564030a6051c3ac7262868983b43e13eee65
2015-05-18 16:07:42 -07:00
Adam Powell
49e7ff9647 Add Configuration data for round displays
Add round values to the screenLayout field for Configuration
and a convenience method to check roundness.

Plumb this through the DisplayManager, making roundness the property
of a DisplayAdapter. The built-in main display will read the
configuration resource config_mainBuiltInDisplayIsRound to determine
its roundness. Device-specific resource overlays should set this to
true for devices with round primary displays.

By default, this config resource inherits from the existing
config_windowIsRound value currently used by some Android Wear
device configurations.

This change awaits another for aapt/native resources code to make the
resource filtering system aware of this property.

Change-Id: I1daced7ca6d6e172789e7c32bebfd43753bfa2ae
2015-05-18 14:13:33 -07:00
Alan Viverette
2a576d9ec1 Merge "Invalidate old accessibility bounds on CONTENT_CHANGE" into mnc-dev 2015-05-15 20:11:20 +00:00
Vladislav Kaznacheev
58ae164100 Make VPA.setInterpolator(null) unset the interpolator.
Bug:21199392
Change-Id: Iae4b82254ddf6b60d442258e79ff0ea4d54c0a4d
2015-05-15 13:01:32 -07:00
Alan Viverette
2cc4a4755f Merge "Adjust light source for window position" into mnc-dev 2015-05-15 18:31:54 +00:00
Alan Viverette
a7ea65e239 Invalidate old accessibility bounds on CONTENT_CHANGE
Bug: 20950124
Change-Id: Id19924358b538f9b7754de3a0c019433817dc1fc
2015-05-15 11:30:21 -07:00
Yohei Yukawa
5f05965f54 Keep IMM#mCurRootView synchronized with the actual window focus.
Currently IMM#mCurRootView is always cleared every time when
IMM#finishInputLocked() is called.  We have been doing this since
Iad09cf5dbb7f6f156fd39ed243431432e00f8945 so as not to hold the
strong reference to a DecorView so long time (Bug 6413553).

Strictly speaking, the attached window may continue holding
input focus even after IMM#finishInputLocked() is called.
In this state IMM#focusIn() might have unexpectedly rejected
focus-in event but presumably this might not be obvious, or might
not occur at all because in some situations IMM#finishInputLocked()
has never been called even when the attached view loses input
focus.

In order to fix Issue 20820914, however, we need to call
IMM#finishInputLocked() exactly when the attached view loses
input focus.  To make it easier to diagnose any unexpected
regressions, this CL only changes the handling of
IMM#mCurRootView, while the next CL Id6afc8fc64512225578c62557b96
plumbs IMM#focusOut() to IMM#finishInputLocked().

Manually tested following scenarios.
- Repro steps in Bug 6413553.  Made sure that IMM#mCurRootView
  is cleared after switching back from the current application to
  the previous application with back key.
- Test application that calls WebView#showFindDialog(). Made sure
  that LatinIME works fine when switching text fields.  This is
  non-trivial because android.webkit.FindActionModeCallback is
  changed in this CL.
- Repro steps in Bug 21144633.  Made sure that we can enter
  recipient's name in the messaging app.

Bug: 20820914
Change-Id: I219394178e4172bc47864297f1418e677dba25e5
2015-05-15 10:22:23 -07:00
George Mount
b1f1293355 Merge "Remove hidden/deleted APIs." into mnc-dev 2015-05-15 14:08:19 +00:00
Alan Viverette
50210d9129 Adjust light source for window position
Bug: 16523629
Change-Id: I2f3fed1edcac0a3cfd5034aded45e08ececfebaf
2015-05-14 18:05:36 -07:00
John Reck
0e4a2b5ff0 Merge "Check for setting to already set" into mnc-dev 2015-05-14 23:27:49 +00:00
John Reck
6d8371e73f Check for setting to already set
Bug: 20105644
Change-Id: Ia79d2ae5c725c139d2b7c423a899be625cb8f14f
2015-05-14 16:06:12 -07:00
George Mount
5aec62eae1 Remove hidden/deleted APIs.
Change-Id: Iabeaac2c9b485f1f25fb2fcc3193610b0d6478c4
2015-05-14 14:12:16 -07:00
Alan Viverette
f93d16bc70 Merge "Avoid sealed check when unparceling AccessibilityNodeInfo" into mnc-dev 2015-05-14 20:20:48 +00:00
Alan Viverette
c921f27694 Avoid sealed check when unparceling AccessibilityNodeInfo
Previously the unparceling code relied on addAction(), which would
incorrectly crash if the node was sealed.

Bug: 21135077
Change-Id: I773ac27b2dee501ffea0a0587536a192af402c32
2015-05-14 12:26:49 -07:00
Wale Ogunwale
159c3d8a8b Revert "Update IME focus when the active view is losing the focus."
This reverts commit 97c3813042.

This causes issue with the right IME window getting focus.

Bug: 21144633
Change-Id: I4c75b6e7dd87c10f008444d2059164b52a8f4335
2015-05-14 12:25:24 -07:00
Michael Wright
1b2e5c11b6 Merge "Revert "Revert "Add new MotionEvent actions for button press and release.""" into mnc-dev 2015-05-14 15:31:14 +00:00
Michael Wright
5bd69e6e61 Revert "Revert "Add new MotionEvent actions for button press and release.""
This reverts commit 9623805162.
2015-05-14 14:48:08 +01:00
Michael Wright
3d52869834 Merge "Revert "Add new MotionEvent actions for button press and release."" into mnc-dev 2015-05-14 13:47:10 +00:00
Michael Wright
9623805162 Revert "Add new MotionEvent actions for button press and release."
This reverts commit ec0ce51b73.
2015-05-14 14:46:25 +01:00
Michael Wright
07b83f1c9e Merge "Add new MotionEvent actions for button press and release." into mnc-dev 2015-05-14 13:31:29 +00:00
Michael Wright
ec0ce51b73 Add new MotionEvent actions for button press and release.
Introduce ACTION_BUTTON_PRESS and ACTION_BUTTON_RELEASE as actions to
signal a button press or release. If these actions happen
simulanteously with a DOWN or UP event then they're explicitly
ordered to happen after the DOWN or preceding the UP in order to send
them to the most recently targeted view.

Also, introduce new stylus button constants that differ from the
constants we use for mouse buttons.

Bug: 20704355
Change-Id: I5b75e5c5e692171c1c117ee687dd185a0d9dd15c
2015-05-14 14:18:05 +01:00
Jorim Jaggi
645edef483 Merge "Make sure the app can draw a frame before unlocking" into mnc-dev 2015-05-13 22:13:27 +00:00
Yohei Yukawa
5ad7fe4930 Merge "Update IME focus when the active view is losing the focus." into mnc-dev 2015-05-13 22:10:37 +00:00
Jorim Jaggi
827e0facfe Make sure the app can draw a frame before unlocking
- The mechanism to stop windows drawing while window animator was
animating was somehow flaky. It relied on the fact that the client
would call relayout() whenever the animating state changed. This is
mostly the case, but not for lockscreen animations. Instead, we now
use a push model, where window manager tells the app that the state
has changed.
- In addition, it only stopped drawing if that window was animating,
but then only resumed drawing after all windows have finished
animating. Now, we do this per window, so we only stop drawing for
windows that are currently animating.
- We resume the top activity now at the very beginning of the
unlocking sequence. This gives the app a chance to draw a frame
before the user sees anything. If it's to slow, then we just use the
outdated framebuffer.

Bug: 19964562
Change-Id: Ifef8abd189a3146d854b81b9b948861e4d38c155
2015-05-13 14:23:05 -07:00
Alan Viverette
a789325a0f Update scrollIndicators XML enums to match View constants
Bug: 21027462
Change-Id: I41e503e218253cf63bc44a82345f8b086261e379
2015-05-12 16:25:47 -07:00
Yohei Yukawa
6d090c42a7 Remove obsolete fields from InputMethodManager.
IMM#mViewTopLeft and IMM#mViewToScreenMatrix are no longer used.
They should have not been removed in
I4a577bfd02b37b9e56c80b8b41bb25afa95dd8ef.

Change-Id: Ia685956c8f7dda1143135345ee9a3873705975ef
2015-05-12 11:11:27 -07:00
P.Y. Laligand
e6c47686f6 Merge "DO NOT MERGE - Display mode switches." into mnc-dev 2015-05-12 17:39:57 +00:00
Michael Wright
6959865fb0 Merge "Remove SLEEP and POWER from wake key list." into mnc-dev 2015-05-12 12:12:50 +00:00
Yohei Yukawa
97c3813042 Update IME focus when the active view is losing the focus.
Despite the fact that IMM#focusOut() are called from many focus
mangement logics, the reality is that IMM#focusOut() has done
nothing more than 6 years.  This would not a big problem as long
as IMM#focusIn() is called immediately after IMM#focusOut().

However, situations where only IMM#focusOut() is called,
following fields continue keeping object references.
- IMM#mServedView
- IMM#mNextServedView
- IMM#mServedInputConnection
- IMM#mServedInputConnectionWrapper

Even worse, if the IME is showing software keyboard, it will not
be dismissed.

With this CL, IMM#focusOut() starts cleaning up the active IME
session when the associated view loses focus.

This CL also removes IMM#mCurRootView because it is indeed
necessary for above change.  The problem when only introducing
above change can be understood as follows.

1. IMM#mCurRootView is correctly set from ViewRootImpl.
2. IMM#focusIn() is called. InputConnection is established.
3. IMM#focusOut() is called, which triggers
   IMM#finishInputLocked() because of above change, which
   internally clears IMM#mCurRootView.
4. IMM#focusIn() is called but IMM#mCurRootView is still null.
   Because of this the focus-in event is ignored and the
   software keyboard does not show up anymore.

In this CL, we simply check view.hasWindowFocus() instead.
As far as I've tested, this change looks to be working well.

Bug: 20820914
Change-Id: Ib4bd70ce0305a6bde6a929bcc6ad20a2b8402a97
2015-05-12 01:43:27 -07:00
Chris Craik
f6ce8fd4f3 Fix ViewGroup caching defaults
bug:20718535

Revert to established defaults of these two properties.

Change-Id: I798cfa2e53b26eafd30b191ad6e3b721fe6bd249
2015-05-11 15:33:12 -07:00
P.Y. Laligand
b3b9eb3cfc DO NOT MERGE - Display mode switches.
Knowledge of the various modes of a display is now available to apps, and they can request a specific mode for their windows.

b/18241736

Change-Id: I8eb16ff713e878512faca3ca6662254f08a9be7f
(cherry picked from commit 5c7773d864)
2015-05-11 15:02:07 -07:00
George Mount
3dec0d4721 Merge "Disable input during Activity Transition." into mnc-dev 2015-05-11 17:19:03 +00:00
Alan Viverette
f93bba5b79 Merge "Allow ContextImpl.setTheme(int) to be called after getTheme()" into mnc-dev 2015-05-08 21:10:03 +00:00
Dianne Hackborn
ed9af066b2 Merge "Fix issue #20655182: API Review: ViewAssistStructure" into mnc-dev 2015-05-08 20:42:12 +00:00
George Mount
180fd27832 Merge "Don't call updateDisplayListIfDirty outside draw." into mnc-dev 2015-05-08 20:30:08 +00:00
George Mount
0006e88863 Don't call updateDisplayListIfDirty outside draw.
Bug 20909826

Change-Id: If332319ba192606cc30fc8d0de00086fc5135deb
2015-05-08 07:51:44 -07:00
Selim Cinek
03fdca1b29 Merge "Fixed a bug where the heads-up would not show when full screen" into mnc-dev 2015-05-08 02:04:52 +00:00
Siva Velusamy
94a6d15ede Use new hierarchy viewer protocol in all View subclasses
A previous CL introduced a new way of encoding view properties for
use by heirarchy viewer. This CL updates all views using the old
@ExportedProperty annotation to use this new method. The older
mechanism will be removed in a subsequent CL.

Change-Id: I6cc23b90cd9da1c6ce89b4caffe54874db203452
2015-05-07 18:44:21 -07:00
Siva Velusamy
0d857b9028 Improve hierarchy viewer dump hierarchy latency
Hierarchy Viewer obtains the properties for each view by using
reflection and looking for fields and methods that have the
@ExportedProperty annotation. Using reflection made it quite slow
for large view hierarchies.

This CL adds a new method (encode) to each class that wishes to
export data to hiererachy viewer. Inside this method, the object
can write a sequence of key, value pairs corresponding to the
values it wants exported.

With this change, the dump hierarchy operation that used to take
more than 10 seconds can be performed in a few hundred milliseconds.

Change-Id: I199ac2e7ca3c59ebcfec7e6bd201e134c41fd583
2015-05-07 18:44:15 -07:00
Selim Cinek
4a4a2bddc4 Fixed a bug where the heads-up would not show when full screen
Bug: 20728541
Change-Id: I74bc74c4936b003a4c0c37b7c7da2d1fa138c077
2015-05-07 16:54:05 -07:00
Dianne Hackborn
49b043f37d Fix issue #20655182: API Review: ViewAssistStructure
Fix the various view assist related APIs.

Also remove the blockAssist view attribute, and instead use
the window's FLAG_SECURE to drive blocking of the entire
hierarchy (which is semantically correct, and will protect
existing apps that have already indicated they need it).

Change-Id: I6beebc86b202809cba0a356cae9607d8d0fb5e78
2015-05-07 16:30:52 -07:00