Commit Graph

6246 Commits

Author SHA1 Message Date
TreeHugger Robot
c295a4b23d Merge "Remove framework dependencies on Support* demos" into nyc-mr1-dev 2016-06-29 20:31:03 +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
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
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
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
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
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
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
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
dc42d7dd13 Merge "Add InputMethodService#exposeContent()" into nyc-mr1-dev 2016-06-23 01:25:39 +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
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
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
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
a804fae3be Merge \"BatteryStats: record best estimated battery capacity\" into nyc-dev
am: c2e06a55f9

Change-Id: I4f590635c720ddbb6dfac292753606b9d3fe16e0
2016-06-20 19:55:37 +00:00
TreeHugger Robot
c2e06a55f9 Merge "BatteryStats: record best estimated battery capacity" into nyc-dev 2016-06-20 19:49:46 +00:00
Adam Lesinski
f9b20a9ec4 BatteryStats: record best estimated battery capacity
Using the coulomb counter, record the estimated max battery
capacity.

Bug:28743761
Change-Id: I1270b062cf4a1e6fd69ea1da3de11a85a81b3663
2016-06-20 10:58:37 -07:00
Roozbeh Pournader
e977b0ae59 Mark Serbian in Latin script as non-localized [DO NOT MERGE]
Serbian in Latin script is only partially localized in Android N. We
should not show it as localized in either Setup Wizard or Settings.

Bug: 29460424
Change-Id: I6829a89c49c1b5e8768b1527daa3aa9508deb491
2016-06-17 17:34:13 -07:00
TreeHugger Robot
4828bb9330 Merge "Catch throwable exceptions." into nyc-mr1-dev 2016-06-18 00:26:43 +00:00
Christopher Ferris
ea8b5de33d Catch throwable exceptions.
If the zygote dies early enough, certain exceptions disappear and never
result in an error message in the log. Fix the code to catch all
Throwable exceptions so that an error message does not result in a
silent restart of the zygote.

Bug: 29400363
Change-Id: Ib044006629ea4441728921f3c587d0cb295ec745
2016-06-17 15:29:58 -07: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
Selim Cinek
447ee99755 Merge \"Added dismiss, expand, and collapse accessibility actions\" into nyc-dev
am: c1720dce1b

Change-Id: I14674254eb79fef58e4dcb1a8d7ecaab24831691
2016-06-16 04:25:26 +00:00
TreeHugger Robot
c1720dce1b Merge "Added dismiss, expand, and collapse accessibility actions" into nyc-dev 2016-06-16 04:19:48 +00:00
Mihai Nita
44080ac5bf Merge \"Fix for NullPointerException in SuggestedLocaleAdapter\" into nyc-dev
am: c8c9afeacb

Change-Id: Iaa4df1af4a18ad0bc4e99a5bd47aa8f6c1357e50
2016-06-16 00:34:30 +00:00
Mihai Niță
c8c9afeacb Merge "Fix for NullPointerException in SuggestedLocaleAdapter" into nyc-dev 2016-06-16 00:28:37 +00:00
Mihai Nita
1711d430cb Fix for NullPointerException in SuggestedLocaleAdapter
Bug: 28748150
Change-Id: Ide2d176d3bc0bb7529bf831b553db3ade37ddb69
2016-06-15 17:07:10 -07:00
Selim Cinek
e9bad242f3 Added dismiss, expand, and collapse accessibility actions
Fixes: 20343017
Fixes: 29368014
Change-Id: Ib571242aac04c67aea2f3c3ce76139eaedc1f3f1
2016-06-15 16:30:09 -07:00
Todd Kennedy
a97045b245 New API w/ multiple prefixes
Use the new API that contains multiple hash prefixes and a mask. Also
do some small refactoring necessary to handle multiple prefixes and
use a common implementation of the hash generation

Change-Id: Ib52f767ea6aadc30c67c5bdee949e9f9c5f04e44
2016-06-14 16:01:05 -07:00
Yohei Yukawa
cb2c497230 Merge \"Quick workaround for a performance regression in IME APIs.\" into nyc-dev
am: 6fe4865e85

Change-Id: I96bef7f47729282a57b6acc11c8bf4ada42c6a06
2016-06-14 22:48:35 +00:00
Yohei Yukawa
6fe4865e85 Merge "Quick workaround for a performance regression in IME APIs." into nyc-dev 2016-06-14 22:43:19 +00:00
Yohei Yukawa
ccb024aa2b Quick workaround for a performance regression in IME APIs.
It turns out that the performance of
InputMethodManager#getCurrentInputMethodSubtype() is regressed from ~1ms
to ~20ms when
 - Settings.Secure.SELECTED_INPUT_METHOD_SUBTYPE == -1 and
 - The active IME supports many subtypes (~100)
because we try to find a fallback subtype based on the system locales
every time when IMM#getCurrentInputMethodSubtype() is called.

This could be contributing UI janks because spell checker clients
running in the UI thread indirectly depend on that method.

Fortunatelly the critical path is in
InputMethodUtils#getImplicitlyApplicableSubtypesLockedImpl(), which is
basically a state-less method. We can easily and safely cache its
result by using LocaleList and InputMethod as cache keys.

With this CL the performance basically recovers to the Android M level.

Bug: 28889203
Change-Id: I5ed16c7f14cc18052854f4fd6c9bae8550c332ee
2016-06-14 21:01:41 +00:00
Yohei Yukawa
03f759e87e Merge "Add InputConnection#insertContent()." into nyc-mr1-dev 2016-06-14 00:26:39 +00:00
Adrian Roos
c8649b381d Merge \"Add MessagingStyle transitions\" into nyc-dev
am: a5e2aa99c0

Change-Id: Ib667411e14309d38f60b254178d7fc7d71eedde0
2016-06-13 21:55:06 +00:00
Adrian Roos
a5e2aa99c0 Merge "Add MessagingStyle transitions" into nyc-dev 2016-06-13 21:45:08 +00:00
Adrian Roos
feafa052f3 Add MessagingStyle transitions
Fixes a particularly bad transition in the case where there
is one incoming message to a group.

Change-Id: Ieddece4a496292a69e14cdcd74d94986938d8223
Fixes: 29043489
2016-06-13 14:31:51 -07:00
Yohei Yukawa
152944f490 Add InputConnection#insertContent().
Providing an official protocol for IMEs to insert an image to the
application is something that has been requested from many IME
developers to Android OS.  With this CL, IMEs are able to ask
applications to insert a content including image files as follows.

 1. An application that opts in to this protocol specifies a list of
    supported content MIME types in EditorInfo#contentMimeTypes.
 2. When an IME is actively interacting with such an application, the
    IME can call InputConnection#insertContent() with a InputContentInfo
    that contains content URI, metadata (ClipDescription), and an
    optional link URI.
 3. The application can read the stream data from the given content URI
    to insert the content into somewhere in the application.

Detailed design background can be found in the JavaDoc of
InputConnection#insertContent().

Bug: 22830793
Change-Id: Iaadf934a997ffcd6000a516cc3c1873db56e60ad
2016-06-10 19:04:34 -07:00
Andrii Kulian
a9b59e9cf2 Merge \"Reinflate primary action mode view after detach\" into nyc-dev
am: 82f2df6108

Change-Id: Ic6def2b3eb5e654b028d11773a9527f01943289d
2016-06-11 01:38:36 +00:00
TreeHugger Robot
82f2df6108 Merge "Reinflate primary action mode view after detach" into nyc-dev 2016-06-11 01:31:15 +00:00
TreeHugger Robot
5985e3f92f Merge "Temp fix to split header and position count behaviour for watches." into nyc-mr1-dev 2016-06-11 00:06:56 +00:00
Andrii Kulian
8d6ac26504 Reinflate primary action mode view after detach
When app is resized in multi-window mode we preserve the window along
with the decor view. If action mode view was shown before such config
change, its view is detached, but the mPrimaryActionModeView variable
is not cleared. So when action mode view is shown again after that it
thinks that its view is still alive.
This CL adds additional check to inflate new mPrimaryActionModeView
if it is not attached to any window.

Bug: 28971666
Change-Id: Ia8c24d4322be32e8b2c8967301beb3a4d889d501
2016-06-10 16:07:43 -07:00
Adam Lesinski
860e09ddce Merge \"BatteryStats: Fix read/write parcel order\" into nyc-dev
am: e8a442ccd6

Change-Id: I08f02adc6014ff9bcae60f60a091bba74695488d
2016-06-10 22:43:45 +00:00