Commit Graph

6508 Commits

Author SHA1 Message Date
Alan Viverette
1f53395128 Ensure forwarding listener target is long-clickable
am: 11ace9eedb

Change-Id: I182f933b35aef0da062bf6e7d4c485d681d50258
2016-07-22 21:18:43 +00:00
Selim Cinek
3f769aba2a Changed the appearance of fullscreen intent notifications again
am: 981962e6ad

Change-Id: Ib26d711e48aaff99a4e64e86feb67dbf987d67e2
2016-07-22 19:29:52 +00:00
Selim Cinek
981962e6ad Changed the appearance of fullscreen intent notifications again
Change-Id: I511356a8dc0fe253541c625fb7b43ed0c7bafaca
Fixes: 28269355
2016-07-22 12:13:11 -07:00
Alan Viverette
db59530cf9 Better docs for ImageView legacy tint
am: 2b4e14cfcc

Change-Id: I72f67ee9c67501ba9ea827f0068186673f59d852
2016-07-22 03:02:39 +00:00
Yigit Boyar
b3c380ace7 Resolve ListView children\'s RTL properties when added
am: 4d827aafad

Change-Id: I7ec85d33656cd1c7246c844e87143dcf3f4af57d
2016-07-22 02:26:58 +00:00
Alan Viverette
2b4e14cfcc Better docs for ImageView legacy tint
Bug: 30283225
Change-Id: Ic748c2cc341edf44aed0202aa55a57584bd928c1
2016-07-21 16:25:13 -04:00
Alan Viverette
11ace9eedb Ensure forwarding listener target is long-clickable
Bug: 28550349
Change-Id: Id9bb74eee0c91919e3167e3a8a316e3921652df5
2016-07-21 16:04:33 -04:00
Svetoslav Ganov
d6c4cf03e3 Merge \"Revert \"Prevent apps to overlay other apps via toast windows\"\" into nyc-mr1-dev
am: 78fa7a1b3f

Change-Id: I30b84189b2c2c4566c837cd1b8837053d6944988
2016-07-20 01:12:15 +00:00
Svetoslav Ganov
f1395d730a Revert "Prevent apps to overlay other apps via toast windows"
This reverts commit b3b22cba86.

Change-Id: I905e7435893fab49f03fdb708f4ab5a9d2c9cbae
2016-07-20 01:00:51 +00:00
Yigit Boyar
4d827aafad Resolve ListView children's RTL properties when added
ListView adds children without requesting a layout for them.
This creates a problem if the child does not request a
layout because we reset the child's RTL properties when
addViewInner is called.

A proper solution would be to call resolve when child is
being measured (and ignore cache if it resolves) but
a change like that is too risky for MR1. This CL will
fix ListView portion of the issue.

On master, we'll solve this in View level.
Bug: 30132566

Change-Id: I0b131ac1086b1d32146f3c93d1323050873293d3
2016-07-19 15:32:09 -07:00
Svet Ganov
cd263d56d2 Merge \"Prevent apps to overlay other apps via toast windows\" into nyc-mr1-dev
am: e2d148b008

Change-Id: I73f802b9b1c4acd5b17c706372f42c9e5d388840
2016-07-15 20:03:33 +00:00
Svet Ganov
b3b22cba86 Prevent apps to overlay other apps via toast windows
It was possible for apps to put toast type windows
that overlay other apps which toast winodws aren't
removed after a timeout like toasts are.

Now to add a toast window one needs to have a special
token. The token is added by the notificatoion manager
service only for the lifetime of the shown toast and
is then removed including all windows associated with
this token.

This prevents apps to add arbitrary toast windows. The
token is passed in the app domain in the request to
construt and add the toast window which allows a bad
app to add arbitrary toast windows. However, this is
fine since the token will be invalided and all of its
windows removed after the toast for which it was
create times out.

We do not care of braking apps that add toast windows
directly due to the security and privacy implications
of arbitrary UI redressing. Also we have dedicated
Toast APIs which are the way to add this time of UI.

bug:30150688

Change-Id: I65372c81a791489de89fb2886cc96392c28680bb
2016-07-14 19:16:42 -07:00
Alan Viverette
10d3f9850b Merge \"Set up view state before attaching, jump drawables if needed\" into nyc-mr1-dev
am: 2c5da6668c

Change-Id: I1377f24fbf1a9f95072c14c9518261ad3591323f
2016-07-12 18:23:01 +00:00
Alan Viverette
26489e1688 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
2016-07-07 16:39:27 -04:00
Alan Viverette
bb3fc63947 Merge \\"Only clip PopupWindow in the vertical direction\\" into nyc-dev am: 4b736ea56d
am: a2beb44834

Change-Id: I554dcbd9eb011d84a61d49b0d48818d1e9905c00
2016-06-30 17:43:46 +00:00
Alan Viverette
a2beb44834 Merge \"Only clip PopupWindow in the vertical direction\" into nyc-dev
am: 4b736ea56d

Change-Id: Idf5aedfb2f19595b8317c7dca1640ff0caf31696
2016-06-30 17:35:52 +00:00
Alan Viverette
0c359bad53 Merge \\"Exclude children from excess space distribution when using largest child\\" into nyc-dev am: 7705d5fd6e
am: 650cc68f10

Change-Id: I490421dd7f13deda634b669ca7b7bd7a51d2bfdf
2016-06-30 17:31:11 +00:00
Alan Viverette
4b736ea56d Merge "Only clip PopupWindow in the vertical direction" into nyc-dev 2016-06-30 17:24:22 +00:00
Alan Viverette
650cc68f10 Merge \"Exclude children from excess space distribution when using largest child\" into nyc-dev
am: 7705d5fd6e

Change-Id: I747b4dab5bfc31b2461b445d1d983ac95a05693d
2016-06-30 17:19:41 +00:00
Alan Viverette
9705fa0602 Only clip PopupWindow in the vertical direction
Bug: 29865091
Change-Id: Ic4e3b50571034f341aff2c2fbf2c349342622448
2016-06-30 13:17:26 -04:00
TreeHugger Robot
7705d5fd6e Merge "Exclude children from excess space distribution when using largest child" into nyc-dev 2016-06-30 17:07:07 +00:00
Alan Viverette
070b22bdee Exclude children from excess space distribution when using largest child
Preserves API 23 behavior.

Bug: 29872769
Change-Id: I514cde81dcca4d78238f407251805cced4c0bea1
2016-06-30 11:15:36 -04:00
Yohei Yukawa
badcecb2aa Merge \"Use a flag to grant a temporary URI permission.\" into nyc-mr1-dev
am: cb56978912

Change-Id: I20e1481c6f68a5af4f33e699f5bc505b3a4c1457
2016-06-27 20:30:49 +00:00
Yohei Yukawa
cb56978912 Merge "Use a flag to grant a temporary URI permission." into nyc-mr1-dev 2016-06-27 20:18:51 +00:00
Robert Carr
e1eba6c1b7 Merge \\"PopupWindow: Use DISPLAY_CLIP_VERTICAL/HORIZONTAL.\\" into nyc-dev am: 8afc1f70f0
am: be87ca9efa

Change-Id: I1d06d427c3679d83d55038f999b75c26d5c8ecc6
2016-06-24 22:54:53 +00:00
Robert Carr
be87ca9efa Merge \"PopupWindow: Use DISPLAY_CLIP_VERTICAL/HORIZONTAL.\" into nyc-dev
am: 8afc1f70f0

Change-Id: Ifcc58b9c6a4bdaf3df0dc49ac963bdc7e32aa409
2016-06-24 22:50:45 +00:00
Robert Carr
c6413cc919 Merge \"PopupWindow: Use DISPLAY_CLIP_VERTICAL/HORIZONTAL.\" into nyc-dev
am: 8afc1f70f0

Change-Id: Iabd270da70c540b9da38a72895adc6904bbb41cd
2016-06-24 22:50:39 +00:00
Robert Carr
489c39d2db PopupWindow: Use DISPLAY_CLIP_VERTICAL/HORIZONTAL.
When we want the WindowManager to clip our requested width/height
to the display frame, we need to pass DISPLAY_CLIP_VERTICAL/HORIZONTAL.
It seems this behavior was unintentionally applied without this flag
in previous releases.

Bug: 29602363
Change-Id: Ib98060e36efde0dbaabb59a758da5374035dbb62
2016-06-24 14:07:20 -07:00
Yohei Yukawa
45700fa135 Use a flag to grant a temporary URI permission.
It turns out that we can let the system to call
InputMethodService#exposeContent(InputContentInfo, EditorInfo), which
added in my previous CL [1], during the IME is calling
InputConnection#commitContent() as follows.

  [IME]
  InputContentInfo contentInfo = new InputContentInfo(
          contentUri,
          new ClipDescription(description, new String[]{mimeType}),
          linkUrl);
  getCurrentInputConnection().commitContent(
          inputContentInfo,
          InputConnection.INPUT_CONTENT_GRANT_READ_URI_PERMISSION,
          null);

  [App]
  try {
      contentInfo.requestPermission();
      // Load inputContentInfo.getContentUri() here.
  } finally {
      contentInfo.releasePermission();
  }

This gives us flexibility to let InputConnection#commitContent() do all
the magic for IME developers like other APIs such as
Context#startActivity(), rather than asking them to call one more API to
grant a temporary URI permission like a scenario where
Context#grantUriPermission() is used.

 [1]: I2772889ca01f2ecb2cdeed4e04a9319bdf7bc5a6
      25e0813e6e

Bug: 29450031
Change-Id: I99536cd58c9984af30b0bafb4a1dd25a26634a2d
2016-06-23 17:12:59 -07:00
Alan Viverette
23f6f62ea4 Merge \\"Clarify docs for PopupWindow width/height parameters\\" into nyc-dev am: 22f887a014
am: 483a8dc097

Change-Id: I906d49ae22e3368792928910310f5ddc341edf8f
2016-06-23 01:06:15 +00:00
Alan Viverette
54e12ac7f5 Merge \"Clarify docs for PopupWindow width/height parameters\" into nyc-dev
am: 22f887a014

Change-Id: I7311e8cb98da040148e961734646251949975270
2016-06-23 01:00:32 +00:00
Alan Viverette
483a8dc097 Merge \"Clarify docs for PopupWindow width/height parameters\" into nyc-dev
am: 22f887a014

Change-Id: I84d345cde0d16e98ce3fefa703929f243a5fdced
2016-06-23 01:00:18 +00:00
Alan Viverette
22f887a014 Merge "Clarify docs for PopupWindow width/height parameters" into nyc-dev 2016-06-23 00:55:52 +00:00
Robert Carr
b964f26d7a Merge \\"Don\\'t try and resolve WRAP_CONTENT too early.\\" into nyc-dev am: 72ce991692
am: 5a35355364

Change-Id: I80c0d1fc372efcff69b49ac485bce460d542c044
2016-06-21 23:40:26 +00:00
Robert Carr
d748b54615 Merge \"Don\'t try and resolve WRAP_CONTENT too early.\" into nyc-dev
am: 72ce991692

Change-Id: I277968e2a48ac5647db0f03877ab168afc245a6c
2016-06-21 23:35:11 +00:00
Robert Carr
5a35355364 Merge \"Don\'t try and resolve WRAP_CONTENT too early.\" into nyc-dev
am: 72ce991692

Change-Id: Id020f8282da4b13da91921c459b1b65d6fa8552d
2016-06-21 21:30:53 +00:00
Alan Viverette
c129b58ad1 Clarify docs for PopupWindow width/height parameters
Bug: 29496188
Change-Id: I1e9b74880f4ea0454971f0d7d6eb4765b64db98f
2016-06-21 11:09:03 -04:00
Chris Banes
09bf9e69bc Fix NPE in Toolbar - framework edition
am: 3b925c1ab0

Change-Id: I340ddff981e938bf6f9bd3f1392eec03f25f3e5d
2016-06-21 08:16:28 +00:00
Chris Banes
3b925c1ab0 Fix NPE in Toolbar - framework edition
Caused by super constructor calling non-final methods
which Toolbar overrides, and then tries to reference
final variables.

BUG: 28806107
Change-Id: Ieaf5f7611dbbf954e49c31e604aa2f7627248615
2016-06-21 08:09:24 +00:00
Robert Carr
07421cb9bb Don't try and resolve WRAP_CONTENT too early.
At the point of showDropDownPosition measure
may have not yet been called and we can't try
and resolve WRAP_CONTENT. ViewRoot will do it for us
and set requestedWidth/Height at an appropriate point.

Bug: 29496188
Change-Id: I99f26612bec800f3e321495b3df3e37b5ffb3152
2016-06-20 15:55:02 -07:00
Yohei Yukawa
0d7dcf7bc3 Merge \"API Rename: IC#inputContent to IC#commitContent.\" into nyc-mr1-dev
am: 01e7c10d37

Change-Id: I5aa903ee453a3945d3f2710d2b6734443fcbd972
2016-06-17 23:31:12 +00:00
Yohei Yukawa
adebb52588 API Rename: IC#inputContent to IC#commitContent.
As shown in below, we have already used commit* naming convention in
InputConnection.

 - InputConnection#commitCompletion(CompletionInfo);
 - InputConnection#commitCorrection(CorrectionInfo);
 - InputConnection#commitText(CharSequence, int);

Hence renaming IC#inputContent() to IC#commitContent() would make the
new method more consistent.

Bug: 29450024
Change-Id: Ica1ba3154795c1bf44e140dfe639b299f83cd8af
2016-06-17 10:10:39 -07:00
Robert Carr
4bcb7f52ee Merge \\"PopupWindow: Resolve measure specs before passing to WM.\\" into nyc-dev am: 4a284be41d
am: 7b2a3cebf6

Change-Id: I7c89cc83d9a73ab8a9761a11f6f5cbb018fe1a56
2016-06-15 16:55:03 +00:00
Robert Carr
33809d724e Merge \"PopupWindow: Resolve measure specs before passing to WM.\" into nyc-dev
am: 4a284be41d

Change-Id: I3716c7a67310d3f1dea47db0da8db7915610345a
2016-06-15 16:52:07 +00:00
Robert Carr
7b2a3cebf6 Merge \"PopupWindow: Resolve measure specs before passing to WM.\" into nyc-dev
am: 4a284be41d

Change-Id: I356e7202bd8939eb5543190f17893abd43c0a0a6
2016-06-15 16:47:54 +00:00
TreeHugger Robot
4a284be41d Merge "PopupWindow: Resolve measure specs before passing to WM." into nyc-dev 2016-06-15 16:41:51 +00:00
Adrian Roos
eac63514e4 Merge \\"Make RemoteView margins density-change safe\\" into nyc-dev am: 26e864c398
am: 06976edc0b

Change-Id: I2f59abdfcfd28876995b98b13ce15a40d601ca3f
2016-06-14 19:53:25 +00:00
Adrian Roos
06976edc0b Merge \"Make RemoteView margins density-change safe\" into nyc-dev
am: 26e864c398

Change-Id: I9fb7b321751443c750ee8acb0190a79dd8669941
2016-06-14 19:41:59 +00:00
Adrian Roos
ba38cc6992 Merge \"Make RemoteView margins density-change safe\" into nyc-dev
am: 26e864c398

Change-Id: I3098eb8a803de7bc471bb362a2eb01b7f6d473ce
2016-06-14 19:41:54 +00:00
Robert Carr
cb8dcec66a PopupWindow: Resolve measure specs before passing to WM.
For the setClipToScreen case we need constraint to
the available display area, but not to the parent window.
If we don't pass FLAG_LAYOUT_NO_LIMITS, we will be constrained
to the parent window. However when we do pass it, we will
not be constrained to the system insets. So, we can pass
FLAG_LAYOUT_NO_LIMITS and constrain ourselves to the insets
via getWindowVisibleDisplayFrame. We also need to avoid
calling setWidth/Height with these resolved values
so we can preserve the indeterminate values in case
layout changes (e.g. rotation).

Bug: 29166136
Change-Id: I4c7c6204e6bc1cdcf4ad86f7e99e3511d4312ae4
2016-06-13 20:23:14 -07:00