Commit Graph

6688 Commits

Author SHA1 Message Date
Yohei Yukawa
359acdee5f Merge \"Revert \"Remove InputContentInfo#requestPermission()\"\" into nyc-mr1-dev
am: 8acb1a7570

Change-Id: If7fab0527a3d4f671985a663fc6aaf808d527ace
2016-06-30 19:37:35 +00:00
Yohei Yukawa
8acb1a7570 Merge "Revert "Remove InputContentInfo#requestPermission()"" into nyc-mr1-dev 2016-06-30 19:30:21 +00:00
Yohei Yukawa
79d1c75a3f Revert "Remove InputContentInfo#requestPermission()"
This reverts commit c4b8f36de5.

Having InputContentInfo#requestPermission() should not hurt developers,
but we can polish the behavior in a subsequent CL without changing
the API.

Bug: 29450031
Bug: 29892936
Change-Id: I1b43c19417b643d0c269af860db2d309b73a90d5
2016-06-30 19:24:43 +00:00
Yohei Yukawa
854e6f8501 Merge \"Remove InputContentInfo#requestPermission()\" into nyc-mr1-dev
am: c80c64a97b

Change-Id: Iaaf2b610852510e604c482568c0ef1dc6495e179
2016-06-30 18:35:39 +00:00
Yohei Yukawa
c80c64a97b Merge "Remove InputContentInfo#requestPermission()" into nyc-mr1-dev 2016-06-30 18:21:48 +00:00
Yohei Yukawa
c4b8f36de5 Remove InputContentInfo#requestPermission()
It turns out that requiring editor authors to call
InputContentInfo#requestPermission() as needed is just confusing and can
cause compatibility issues, because if an editor author forgot to call
that method then there would be no way for IME developers to prevent
permission denial except for relaxing the default permission of the
ContentProvider just because of such an application. This is not what we
want to see.

My conclusion is that the system should automatically call
InputContentInfo#requestPermission() (or do any equivalent operation)
when InputConnection#INPUT_CONTENT_GRANT_READ_URI_PERMISSION is
specified, like we have done in Context#startActivity().

With this CL, the system automatically grants a temporary URI permission
to the target application when the IME calls
InputConnection#commitContent() with
InputConnection#INPUT_CONTENT_GRANT_READ_URI_PERMISSION, and the
temporary permission will be revoked by any of the following events:
 - InputContentInfo#releasePermission() is explicitly called by the
   target application.
 - The target application returned false in
   InputConnection#commitContent().
 - All the InputContentInfo instances copied from the original one are
   GC-ed.

Bug: 29450031
Bug: 29892936
Change-Id: I37fb744e4d3d1c59177fb0a9be4ef5c325c9a39f
2016-06-30 09:32:54 -07:00
Alan Viverette
9d2328e57c Merge \"Remove framework dependencies on Support* demos\" into nyc-mr1-dev
am: c295a4b23d

Change-Id: Icd4eac0fafdae01d95910dc084787350168a8688
2016-06-29 20:34:47 +00:00
TreeHugger Robot
c295a4b23d Merge "Remove framework dependencies on Support* demos" into nyc-mr1-dev 2016-06-29 20:31:03 +00:00
Rebecca Silberstein
62cb9dbf47 Merge changes from topic \'cherrypickWifiWatchdogResetOnTrigger\' into nyc-mr1-dev
am: b2f17f1bbb

Change-Id: Ic723498b7b486edd8f63822cb86127486a5c4657
2016-06-29 20:23:09 +00:00
Rebecca Silberstein
0dbeb9e01a DO NOT MERGE StateMachine: remove final from SendMessage
Removed final from public sendMessage and sendMessageDelayed commands to
unblock unittest development.  This allows tests to verify calls to
sendMessage and sendMessageDelayed.

Also fixed one checkstyle error with import order.

BUG: 28593024
Change-Id: I26e02c3d75049d385ded7891c4fc9967273c27be
TEST: builds
TEST: runtest frameworks-wifi
2016-06-28 16:07:23 -07:00
Alan Viverette
3c5a1c8124 Remove framework dependencies on Support* demos
Required on nyc-mr1-dev since support library branch was reset.

Change-Id: I5b3ba0e7a17ee5ccd93e97b3bd9c519cb8641d97
(cherry picked from commit 80bf1f8a3c)
2016-06-28 19:26:36 +00:00
Dan Sandler
5643d0a5f8 One final tweak to the platlogo. am: 4b7e415803
am: 3fae8ae0c6

Change-Id: Icf198e2c7d34703a4cd8856bc08f31925a20b622
2016-06-28 07:14:54 +00:00
Dan Sandler
3fae8ae0c6 One final tweak to the platlogo.
am: 4b7e415803

Change-Id: Ieef461bb4c1b59fd22e5f830b2b25311422cedae
2016-06-28 07:07:31 +00:00
Dan Sandler
d930306e13 One final tweak to the platlogo.
am: 4b7e415803

Change-Id: Ibbe66c569c0be5fc1801d8af9b5810ac997854d8
2016-06-28 07:07:22 +00:00
Dan Sandler
4b7e415803 One final tweak to the platlogo.
Bug: 27376882
Change-Id: Ie60600018204f48593975b947d6fc10f4dd8a69f
2016-06-27 22:59:24 -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
Ricky Wai
1481cd53bf Hide superfluous \'Android system\' header in Quite mode dialog
am: 7f1ca4fe67

Change-Id: If290b51864e27f08a604b6cae103450305e90299
2016-06-27 14:27:17 +00:00
Ricky Wai
7f1ca4fe67 Hide superfluous 'Android system' header in Quite mode dialog
Bug: 28390642
Change-Id: Ief678e35a0d9e4a37f4499c307ceb928e179cac8
2016-06-27 14:05:01 +00:00
Dan Sandler
b6d9598690 Cats are not, technically, tasty treats. am: 27a9fcc618
am: fadfc8e5e5

Change-Id: Id974d6c8f76e4f94f2ad1c88383f4a43060fe859
2016-06-26 23:03:39 +00:00
Dan Sandler
fadfc8e5e5 Cats are not, technically, tasty treats.
am: 27a9fcc618

Change-Id: I04dd4cf9573e88635e814d75162b742fe19b316d
2016-06-26 22:56:01 +00:00
Dan Sandler
1b2ed4394c Cats are not, technically, tasty treats.
am: 27a9fcc618

Change-Id: I6ffdf66c9ef70052b7ba5ac5d926b32eae633fde
2016-06-26 22:55:59 +00:00
Dan Sandler
27a9fcc618 Cats are not, technically, tasty treats.
Bug: 27376882
Change-Id: I97183339e51c5d07fe6e9404bbcc5178ca605c05
Copilot: Jason Monk <jmonk@google.com>
2016-06-26 15:00:11 +00: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
Roozbeh Pournader
345f70e949 Merge \"Revert \"Revert \"Mark Serbian in Latin script as non-localized [DO NOT MERGE]\"\"\" into nyc-mr1-dev
am: 60882f517d

Change-Id: Ic0efed4a1c500fe021ee4244708bcda99f91f68e
2016-06-23 22:09:03 +00:00
Roozbeh Pournader
60882f517d Merge "Revert "Revert "Mark Serbian in Latin script as non-localized [DO NOT MERGE]""" into nyc-mr1-dev 2016-06-23 21:58:57 +00:00
Roozbeh Pournader
51a760a0f2 Revert "Revert "Mark Serbian in Latin script as non-localized [DO NOT MERGE]""
This reverts commit ad48dc18a5. sr-Latn is no
longer planned for MR1.

Bug: 29455508
Bug: 29601930
Change-Id: I1922ef649aab36be6ba3b94e3fd79a71a14acdff
2016-06-23 20:01:01 +00:00
John Reck
bcc1353019 Merge \\"Remove FD from the right Looper\\" into nyc-dev am: db13dd41a9
am: c86a2e325e

Change-Id: I85ed478cf265fbc1857b08b89f32fb2aa358e284
2016-06-23 18:45:16 +00:00
John Reck
50e952fe74 Merge \"Remove FD from the right Looper\" into nyc-dev
am: db13dd41a9

Change-Id: I590fa2c47bcc90ee5b269fde5cdac9557206ed88
2016-06-23 18:44:16 +00:00
John Reck
c86a2e325e Merge \"Remove FD from the right Looper\" into nyc-dev
am: db13dd41a9

Change-Id: I451ef3649426d9b8ea1bf15e388d0efa82dae442
2016-06-23 18:39:44 +00:00
John Reck
ac04f4e69a Remove FD from the right Looper
Bug: 29586513

Also gives BackdropFrameRenderer a direct-destroy
of Choreographer since it's hammering on new Threads
and we don't want to wait for the GC to release
FDs.

Change-Id: Id2ec0af2ee4d5304961c4ab87a104ccb92f35fc2
2016-06-23 11:00:00 -07:00
Yohei Yukawa
d02470f5a8 Merge \"Add InputMethodService#exposeContent()\" into nyc-mr1-dev
am: dc42d7dd13

Change-Id: Icf3ca0403c7dee26a3083ca98ca1239887d471bc
2016-06-23 01:29:58 +00:00
Yohei Yukawa
dc42d7dd13 Merge "Add InputMethodService#exposeContent()" into nyc-mr1-dev 2016-06-23 01:25:39 +00:00
Jim Miller
0a7efa1e47 Merge \"Enable fingerprint sensor navigation to invoke QuickSettings - rename \"FP_NAV\" to more generic \"SYSTEM_NAVIGATION\"\" into nyc-mr1-dev
am: 0520091641

Change-Id: I285f751bd449c89685a88ad30073cd011dfe5061
2016-06-23 00:20:57 +00:00
Yohei Yukawa
25e0813e6e Add InputMethodService#exposeContent()
This is a follow up CL to my previous CLs [1][2] that introduced
InputConnection#commitContent(InputContentInfo, Bundle) API to enable
IMEs to send a content to the target application.

With this CL, IME developers are able to temporarily expose
InputContentInfo object to the target package without permanently
granting URI permission.  Although calling IMS#exposeContent() is
allowed only for the IME that is currently selected, the client is able
to request a temporary read-only access even after the current IME is
switched to any other IME as long as the client keeps InputContentInfo
object.

Here is a sample code snippet about how to use this mechanism.

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

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

 [1]: Iaadf934a997ffcd6000a516cc3c1873db56e60ad
      152944f490
 [2]: Ica1ba3154795c1bf44e140dfe639b299f83cd8af
      adebb52588

Bug: 29450031
Change-Id: I2772889ca01f2ecb2cdeed4e04a9319bdf7bc5a6
2016-06-22 16:31:41 -07:00
Jim Miller
07e0384a4e Enable fingerprint sensor navigation to invoke QuickSettings
- rename "FP_NAV" to more generic "SYSTEM_NAVIGATION"

Fixes bug 28869612

Change-Id: I321240ee54506633d63a29e987b8d8638c652391
2016-06-22 15:18:13 -07:00
Adam Lesinski
965ed1170b Merge \\"Prevent early boot crash reading PowerProfile\\" into nyc-dev am: ec6db57ac7
am: 31ef27c249

Change-Id: I370e3d0caacae88865ad26d0ef6049ba2abd774c
2016-06-22 17:41:15 +00:00
Adam Lesinski
31ef27c249 Merge \"Prevent early boot crash reading PowerProfile\" into nyc-dev
am: ec6db57ac7

Change-Id: I6366fcaa2b1a85b271d74df321100d590fd258a1
2016-06-22 17:37:41 +00:00
Adam Lesinski
21ce707021 Merge \"Prevent early boot crash reading PowerProfile\" into nyc-dev
am: ec6db57ac7

Change-Id: Id0327572c549eff30dfe0a8fd70007bcaccf7a32
2016-06-22 17:37:41 +00:00
Adam Lesinski
ec6db57ac7 Merge "Prevent early boot crash reading PowerProfile" into nyc-dev 2016-06-22 17:31:35 +00:00
Adam Lesinski
1a76a62b8d Prevent early boot crash reading PowerProfile
The PowerProfile in BatteryStatsImpl may not be ready when
resetting stats early in the boot sequence.

Bug:29559031
Change-Id: I51bba762231a08804f1b68505bb1b0523476081d
2016-06-22 10:28:47 -07:00
Roozbeh Pournader
2704d4ead1 Merge \"Revert \"Mark Serbian in Latin script as non-localized [DO NOT MERGE]\"\" into nyc-mr1-dev
am: 55d9051e58

Change-Id: I91e077b159c8830af38d608855b5cc6310e7f2d6
2016-06-20 22:33:29 +00:00
Roozbeh Pournader
ad48dc18a5 Revert "Mark Serbian in Latin script as non-localized [DO NOT MERGE]"
This reverts commit e977b0ae59 for MR1.
The original commit is only intended for N, not MR1.
2016-06-20 14:59:29 -07:00
Roozbeh Pournader
a1de63c871 Merge \\"Mark Serbian in Latin script as non-localized [DO NOT MERGE]\\" into nyc-dev am: 160126e2d8
am: 73939d8a60

Change-Id: Ib8af2e151d29b17a8492fe00cd0b1b5e412ca5f5
2016-06-20 21:51:12 +00:00
Roozbeh Pournader
1f2f328025 Merge \"Mark Serbian in Latin script as non-localized [DO NOT MERGE]\" into nyc-dev
am: 160126e2d8

Change-Id: I0897fc904264955dddf459c893bd774fb1ff74e1
2016-06-20 21:44:50 +00:00
Roozbeh Pournader
73939d8a60 Merge \"Mark Serbian in Latin script as non-localized [DO NOT MERGE]\" into nyc-dev
am: 160126e2d8

Change-Id: I9e26a77ba4e186a9e3fd59b9618b3eb36127178f
2016-06-20 21:44:42 +00:00
Roozbeh Pournader
160126e2d8 Merge "Mark Serbian in Latin script as non-localized [DO NOT MERGE]" into nyc-dev 2016-06-20 21:39:22 +00:00
Adam Lesinski
0f7b0a8cc6 Merge \\"BatteryStats: record best estimated battery capacity\\" into nyc-dev am: c2e06a55f9
am: a804fae3be

Change-Id: I3caa53d3b065bfe67af7f0ca0878c5801d1b6967
2016-06-20 20:00:07 +00:00
Adam Lesinski
145e50243e Merge \"BatteryStats: record best estimated battery capacity\" into nyc-dev
am: c2e06a55f9

Change-Id: Ifb3d993b085040c17f136dd0f91433762d3d548f
2016-06-20 19:55:37 +00:00
Adam Lesinski
a804fae3be Merge \"BatteryStats: record best estimated battery capacity\" into nyc-dev
am: c2e06a55f9

Change-Id: I4f590635c720ddbb6dfac292753606b9d3fe16e0
2016-06-20 19:55:37 +00:00