Commit Graph

252839 Commits

Author SHA1 Message Date
Selim Cinek
c52edb4f24 Fixed a bug where the headsup would be stuck disappearing
am: a4155bb7c0

Change-Id: Ic82cbac42cf17427ca5d6675a63d6f914a87f6cb
2016-08-29 18:25:47 +00:00
Yohei Yukawa
8eb07090a4 Make sure IME focus is synced to View focus
This CL fixes an edge case that my previous CL [1] forgot to handle.

The goal of my previous CL was to avoid InputMethodManager from getting
confused by a false focus-in event from temporarily detached Views.
However, my CL forgot to take care of the case where the temporarily
detached View is still focused even after the temporary detach mode is
done.

The bad news is that such a situation is relatively easy to trigger by
having a ListView that has EditText as follows, which seems to be
known to be a common technique in Android developer community to put an
EditText in a ListView.
  ListView#listView.addHeaderView(new EditText(context), null, true);

If the ListView is initialized as above, and the EditText has input
focus, View focus and IME focus start to disagree immediatelly after the
ListView's layout is re-evaluated.  This is really easy to trigger, for
example just by dismissing the IME window.

In summary, the root cause is that InputMethodManager#focusIn(View) is
now always ignored as long as the View is temporarily detached, under an
assumption that IMM#focusIn(View) will be called back again with a View
that is not temporarily detached when everything is stable.  Hence the
fix is to do so by hooking up View#dispatchFinishTemporaryDetach() to
call IMM#focusIn(View) again when the View is actually focused in the
final state.

 [1]: Ia79bbd8468f768d546354382b47b39dd31ef7bb5
      a4ed0cfcb6

Bug: 30022872
Bug: 30578745
Bug: 30706985
Change-Id: Iecbdb00dcef8c72e4f7b31035c9bf0f4a40a578f
(cherry picked from commit dd228fbb4d)
2016-08-29 18:24:31 +00:00
Vineeta Srivastava
24b0486cdc Merge "whitelist sms code for TMO-DE and TMO-MK." into nyc-dr1-dev 2016-08-29 18:18:20 +00:00
Philip P. Moltmann
cb1926afba Size print destination to support font sizing
Fixes: 31152374
Change-Id: I1560d6d300174ec0665157fa4f2c485d64f871ad
2016-08-29 18:03:19 +00:00
Jason Monk
2b4e612b10 Merge "Fix double status bar icons" into nyc-dev 2016-08-29 18:00:02 +00:00
Greg Kaiser
4db7ca82d4 Merge "ContextHubService: Allow cancelling load/unload" into nyc-mr1-dev
am: 40e6194148

Change-Id: Idcb9f7a4f621f9dc2c66204ef9bd31b9a0649be0
2016-08-29 17:59:30 +00:00
Greg Kaiser
a0d483e410 ContextHubService: Allow cancelling load/unload
am: 29e868071d

Change-Id: I6c3b5130972907fae1849e596aec8c37ed47e65b
2016-08-29 17:59:28 +00:00
Greg Kaiser
2c168b28f9 Merge "ContextHubService: Hack in Google vendor value" into nyc-mr1-dev
am: 143aaa6d05

Change-Id: I9104870e67e6fe86f294be831575a8c79549fd45
2016-08-29 17:59:25 +00:00
Greg Kaiser
3d2f2a4305 ContextHubService: Hack in Google vendor value
am: 5817ce0c13

Change-Id: I168a2a2a50168f7590842b5c51fbc8a80842b00e
2016-08-29 17:59:23 +00:00
Amith Yamasani
5914b96565 Merge "Add logging to CursorWindow JNI code to track #31046363" into nyc-mr1-dev
am: 81f876e795

Change-Id: I42aac53add1740ee2253821099da7f9dc45f57d2
2016-08-29 17:59:21 +00:00
Amith Yamasani
99a6d16639 Add logging to CursorWindow JNI code to track #31046363
am: 0903ec5017

Change-Id: Idde495c1662be20d20a907521ae4e0dbaf5ad88c
2016-08-29 17:59:19 +00:00
Pablo Ceballos
ed8f06673a Merge "Fail createVirtualDisplay with single-buffered Surface" into nyc-mr1-dev
am: 23784fd6d9

Change-Id: Id5eb1742d13fda9ac1d8a1354e4dacd458f2949c
2016-08-29 17:59:16 +00:00
Pablo Ceballos
d387b20dcb Fail createVirtualDisplay with single-buffered Surface
am: aff2f94939

Change-Id: I5cfcbd0352240d7ac2a9bb0804896cae5396450e
2016-08-29 17:59:07 +00:00
TreeHugger Robot
4226dcef1e Merge "Fixed a bug where notifications could reappear" into nyc-dev 2016-08-29 17:58:31 +00:00
Sudheer Shanka
234d1afd79 Allow apps with CREATE_USERS permission to create demo users.
Bug: 31092477
Test: adb shell am create-user --ephemeral --demo <user-name>
Change-Id: Ia08a50ec4371466c62cdc9f5391e298a666b5081
2016-08-29 10:49:03 -07:00
Greg Kaiser
40e6194148 Merge "ContextHubService: Allow cancelling load/unload" into nyc-mr1-dev 2016-08-29 17:48:48 +00:00
Greg Kaiser
143aaa6d05 Merge "ContextHubService: Hack in Google vendor value" into nyc-mr1-dev 2016-08-29 17:43:31 +00:00
Amith Yamasani
81f876e795 Merge "Add logging to CursorWindow JNI code to track #31046363" into nyc-mr1-dev 2016-08-29 17:42:40 +00:00
Pablo Ceballos
23784fd6d9 Merge "Fail createVirtualDisplay with single-buffered Surface" into nyc-mr1-dev 2016-08-29 17:42:00 +00:00
Greg Kaiser
29e868071d ContextHubService: Allow cancelling load/unload
As a minimal risk improvement for Android N, we allow a new
load/unload transaction request to cancel a currently pending
one if enough time has passed since starting the current
transaction.

Bug: 30111539
Change-Id: Ide958c2454b88529305443fb789b8ae5af18c642
2016-08-29 10:16:27 -07:00
Jason Monk
12124d7eca Fix double status bar icons
Don't allow the status bar icon slot list to be changed because
it confuses the relationship between StatusBarIconList and
StatusBarIconController.  Set it in the constructor to enforce
this.

Change-Id: Ieeea0a9efad88179d1cccc0e5702899333de2e72
Fixes: 28524184
(cherry picked from commit c6fe61c59c)
2016-08-29 13:26:18 +00:00
Narayan Kamath
2cf3cc82e3 Fix clang build breakage (-Werror -Wformat).
am: b334c33d65

Change-Id: I36f6e388d8294d5650c2bcc1ab2eaec81e09a263
2016-08-29 11:43:01 +00:00
Narayan Kamath
b334c33d65 Fix clang build breakage (-Werror -Wformat).
Use %zd for size_t. Note that this will break only on (-plus-)aosp because
clang is disabled on the N development branches.

bug: 30963384
Change-Id: I4b5ba7caf15bc2ebf5bb3395d82170ec786ed50c
2016-08-29 12:35:05 +01:00
Narayan Kamath
c94d2ddf2b Reopen whitelisted zygote file descriptors after a fork.
am: c5f27a7cb2

Change-Id: If8294753c0c78620cde80a76389022684110ddd0
2016-08-29 10:42:24 +00:00
Narayan Kamath
c5f27a7cb2 Reopen whitelisted zygote file descriptors after a fork.
We don't want these descriptors to be shared post-fork, so we'll
have to close and reopen them when the zygote forks. The set of
open descriptors is checked against a whitelist and it is a fatal
error if a non whitelisted FD is opened. It is also a fatal error
if anything other than a regular file / character device or socket
is opened at the time of forking.

This work is done in two stages :
- An initial list of FDs is constructed and cached prior to the
  first zygote fork.

- On each subsequent fork, we check whether the list of open FDs
  has changed. We are currently tolerant of changes, but in the
  longer term, it should be a fatal error if the set of open file
  descriptors in the zygote changes.

- Post fork, we traverse the list of open descriptors and reopen
  them if necessary.

bug: 30963384
Change-Id: Icfd45c96c660491b554d146a9d70d97dbcc712bc
2016-08-29 08:40:00 +00:00
Lorenzo Colitti
c2e10bb074 Don't notify on network switch if source network is validated.
Sometimes we switch away from a network to another (e.g., wifi to
cell data) not because the old network is unvalidated, but
because the score is lowered by a low signal strength.

In this case, don't notify the user of a network switch.

Bug: 31132499
Change-Id: I996a6e00096f8cb864fa9b00b36921725a4edb53
2016-08-29 16:30:21 +09:00
Felipe Leme
2c6a1fb0e1 Removed screen on/off callbacks from NPMS. am: b79f06a476
am: a4defc17c7

Change-Id: I044cb8bba3fba37cd8bb29961feeab3e279f9e08
2016-08-28 22:33:42 +00:00
Felipe Leme
a4defc17c7 Removed screen on/off callbacks from NPMS.
am: b79f06a476

Change-Id: If17367db296e3f8c90dddd9dce445a7068320a14
2016-08-28 22:27:12 +00:00
Felipe Leme
b79f06a476 Removed screen on/off callbacks from NPMS.
NetworkPolicyManagerService (NPMS) used to depend on screen on/off
changes to determine if a foreground activity should have network
restrictions, but such check is now redundant since ActivityManager
already changes the proper UID state (like going from TOP to
TOP_SLEEPING) when the screen status is changed.

Removing such code decreases the NPMS lock contention when the screen is
turned on in about 3-5ms.

Change-Id: I2853443efedbf14961ae9a5b2e72689d4d1a646c
BUG: 30785671
(cherry picked from commit 88f40ad9a7)
(cherry picked from commit f8dd7b4e8d)
2016-08-28 02:24:42 +00:00
Adam Powell
00c4f7ba65 Force AlertDialogLayout to have gravity start|top
AlertDialogLayout overrides LinearLayout#onMeasure but not onLayout,
meaning that some state initialized for the handling of gravity may
not be valid in LinearLayout#onLayout. As this is an internal class
never used directly by apps, explicitly specify the default gravity of
start|top in @layout/alert_dialog_material to avoid this bug. Apps
that do things like set gravity in their theme (for whatever reason)
could otherwise change its behavior.

Bug 30494039

Change-Id: I71a8be1829a7fe24cf7714a3bd5ed732f85eb887
(cherry picked from commit 39e0bf23f5)
2016-08-27 16:44:10 +00:00
Tao Bao
8abcfed8a4 Bump up the uncrypt timeout to 30 min.
Bug: 30490464
Change-Id: I9b65afb10134d79b2f5b5275a6d81065a04e91b9
2016-08-26 20:52:41 -07:00
Jorim Jaggi
9cb567c9ad Merge "Fix invalid divider state while rotating" into nyc-mr1-dev
am: a2316b3041

Change-Id: Iacaaae092285b09290a99a009a86b81434031dae
2016-08-27 01:42:06 +00:00
Jorim Jaggi
4472858029 Fix invalid divider state while rotating
am: 160a3c578c

Change-Id: I9ddd0ea9b17b1efa30db044dc1a822980d3dcfab
2016-08-27 01:42:04 +00:00
TreeHugger Robot
a2316b3041 Merge "Fix invalid divider state while rotating" into nyc-mr1-dev 2016-08-27 01:37:09 +00:00
Yuichi Biwa
cb3e1237b5 ChooserActivity: Cannot start app that the icon overflows the layout
Symptom:
When sharing an image from Album, ChooserActivity can be shown.
But then the app to be located to the bottom part of the list may not
be started even if user tap it.

Root cause:
ChooserActivity uses ResolverDrawerLayout. And ResolverDrawerLayout
can display only some items on the list (known as "Collapse mode").
When the item clipping along the bottom edge is tapped by the user,
ResolverDrawerLayout tries to expand the list and scroll it to a
better position, instead of starting an application.
In this problem case, ResolverDrawerLayout continues to try to expand
the list whenever tapping, so an application will never start.

Solution:
Change a condition so that mOpenOnClick becomes true only when the list
has been collapsed (mCollapseOffset > 0).

Bug: 30153542

Change-Id: I576fb6c8b6a91d79c1e0d46d069146779f4dbd17
(cherry picked from commit 4f3a843ea9)
2016-08-27 01:36:44 +00:00
Abodunrinwa Toki
99c340cad9 FloatingActionMode: Fix screen coordinates.
Use application context to get the screen's display metrics.

Bug: 30127070
Change-Id: I2c453c494ef210c12d89fc7e3ff026728f9ecb0f
(cherry picked from commit afb38c5cc4)
2016-08-27 01:27:28 +00:00
Daniel Chapin
38fef6a38b Merge "Fixes for ImageView drawable visibility dispatch" into nyc-dr1-dev am: 7c02d7adaa
am: 26aec7300d

Change-Id: I352e41cf2de7c4106e0fe4887ebd0f17b695f55b
2016-08-27 01:25:07 +00:00
Adam Powell
ee2f4d890e Fixes for ImageView drawable visibility dispatch am: 06f9eb8b62
am: fd86f7fdfd

Change-Id: I155ed970c7f58895419778f01eebc5babb141c33
2016-08-27 01:25:05 +00:00
Daniel Chapin
26aec7300d Merge "Fixes for ImageView drawable visibility dispatch" into nyc-dr1-dev
am: 7c02d7adaa

Change-Id: Iea12e62f45fb097507282d461be69d1dd83fd5a0
2016-08-27 01:19:31 +00:00
Adam Powell
fd86f7fdfd Fixes for ImageView drawable visibility dispatch
am: 06f9eb8b62

Change-Id: I8b7d8c73f0a718963a191fd5460517e5a7445974
2016-08-27 01:19:28 +00:00
Alan Viverette
c328f042a6 Set up view state before attaching, jump drawables if needed
View attachment calls jumpDrawablesToCurrentState(), so the view state
needs to be set up prior to attachment. For views that are already
attached but are being moved to a new position, manually jump.

Cleans up comments in methods that were modified.

Bug: 29978498
Change-Id: Ica27b2c60ad7ee98b9d1e4912c4f8b8c248af88d
(cherry picked from commit 26489e1688)
2016-08-27 01:17:22 +00:00
Daniel Chapin
7c02d7adaa Merge "Fixes for ImageView drawable visibility dispatch" into nyc-dr1-dev 2016-08-27 01:14:34 +00:00
Jorim Jaggi
77cbe79b74 Fix flicker while booting
There was a short period of time where KeyguardScrim already went
away but status bar wasn't drawn yet, so we didn't consider it as
a wallpaper target so the wallpaper was invisible for a couple of
frames. Now only remove the scrim after the status bar has fully
drawn.

Change-Id: Ibf23b9e1277b6ce06e4ce70c9b7a5db9cbefce00
Fixes: 29643498
2016-08-26 17:49:50 -07:00
Selim Cinek
f3b64692a3 Fixed a bug where notifications could reappear
With sensitive notifications a user could get into
a situation where the groupsummary would not be cleared
because its dismissability was never updated and based
on the visibility of the veto button. This is now corrected.

This Cl also cleans up the veto button handling overall and
ensures that there's no stale state arond it.

Change-Id: Ic7df8d382146d7863ee551c1daa8ba5ed384c7b5
Fixes: 30056258
(cherry picked from commit 9e624e732a)
2016-08-27 00:38:03 +00:00
Selim Cinek
a4155bb7c0 Fixed a bug where the headsup would be stuck disappearing
Change-Id: I56d6be69f6e59c1bec647e7e70e50a36b793f895
Fixes: 30120962
2016-08-27 00:33:49 +00:00
Raph Levien
9cde7244b6 Enforce consistent sizes for arrays in SpannableStringInternal
The grow logic in SpannableStringInternal#setSpan assumes that the
size of mSpanData is consistent with that of mSpans, in particular
that if the latter doesn't need to grow, neither does the former.
The copySpans() method didn't enforce this, creating an mSpanData
array only big enough to hold the data.

This patch documents the invariant in a comment and enforces it.

Bug: 30359314
Change-Id: Ie25db70a76836e97af8476a7f5c10cb4b976c1cf
(cherry picked from commit 83549088c6)
2016-08-26 23:44:47 +00:00
Jorim Jaggi
160a3c578c Fix invalid divider state while rotating
- Sometimes there is no window attached to the app token during a
rotation. In this case, we also want to return a valid dock side, so
we check for hiddenRequested instead of traversing the windows
of an app window token.
- The logic to notify SystemUI about rotation changes never really
worked. Remove the dock side check as the dock side is guaranteed
to change if we change the screen rotation
- Also clean up visibility methods a bit.

Test: Manually tested the interaction when in docked state landscape,
and going home with locked home rotation like 20 times. Also tested
multi-user interaction with docking.

Change-Id: Ibcd181cadc9bc5a97dbd20e67d15bb1c88de5b97
Fixes: 29569499
2016-08-26 23:38:33 +00:00
smain@google.com
99e44c903c add a notice that Work profiles are not compatible with Instant Run
Also includes the redirect for links from the Studio UI
bug: 31098748

Change-Id: Ief7296e512ccf387d738426026413dfe19785ff7
2016-08-26 16:37:16 -07:00
Chong Zhang
233b85b79b Merge "DO NOT MERGE -- Only use saved surface if started by launcher or moved to front" into nyc-dr1-dev am: 19628b251d
am: 80c031cbd4

Change-Id: Id647b704035509a3b2bd0611a0efe78da3ede668
2016-08-26 23:33:30 +00:00
Chong Zhang
8673e303a7 DO NOT MERGE -- Only use saved surface if started by launcher or moved to front am: 813be138ae
am: 9f92bc2602

Change-Id: I94e29886a23fc829b4608a908df90746a4d794e5
2016-08-26 23:33:27 +00:00