6414 Commits

Author SHA1 Message Date
Michael Kwan
55e4030f77 Add top and bottom panel overlay to lists in AlertDialog for watch.
For watch devices, AlertDialogs added the title and button bar as header and
footer views in the ListView. This broke compatibility, hence a solution to
overlay the panels instead with a wrapper layout.

Bug: 27482353
Bug: 30075032
Bug: 29833395
Bug: 29277843

Change-Id: I2ecbe56ae8f7d7e99c7ca2dad2a2092499212199
2016-07-22 13:04:42 -07:00
Dianne Hackborn
ca37695ebc Merge "Add reporting of long wake locks." into nyc-mr1-dev 2016-07-20 15:45:36 +00:00
Dianne Hackborn
d0db6f0043 Add reporting of long wake locks.
These appear as a new event in the battery stats history,
"longwake" in the long version and "Elw" in the checkin.

The power manager keeps track of which wake locks are held
for a long time and reports them to battery stats.  Long
is currently considered 1 minute or more.  Once it is long,
the start event will appear, and once if is released the
event will end.

In the case of a wake lock changing (typically its work
source changing), for purposes of this accounting this is
considering a pure release of the old state and start of
the new state...  so the timer will reset back to one
minute until the wake lock is considered long.  This is done
to prevent things that make lots of changes to wake lock
work sources from spamming the log.

Bug: 28753137

Change-Id: I33b6168c57a7ea6ea558273dec731704123124a5
2016-07-19 14:16:50 -07:00
TreeHugger Robot
0cd4addd36 Merge "Fix padding on round devices for AlertDialogs." into nyc-mr1-dev 2016-07-19 18:48:31 +00:00
Michael Kwan
814508166c Fix padding on round devices for AlertDialogs.
Bug: 27482353
Change-Id: Ic9ee4abe84f9172db64dba398af2c0058921fa3f
2016-07-19 10:18:41 -07:00
Yuichi Biwa
4f3a843ea9 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
2016-07-19 10:04:41 -07:00
TreeHugger Robot
117cf8de91 Merge "Record UID of wakeup packets" into nyc-mr1-dev 2016-07-18 20:58:15 +00:00
TreeHugger Robot
6ad9c16ffd Merge "Fix vulnerability in LockSettings service" into nyc-mr1-dev 2016-07-18 20:54:45 +00:00
Adam Lesinski
5f056f6d87 Record UID of wakeup packets
Bug:28931278
Change-Id: I50a3b6a8026b4d06aaa2730cd531658d280ddb73
2016-07-18 12:30:46 -07:00
Abodunrinwa Toki
97dd8eee10 DO NOT MERGE: FloatingToolbar - Check that app supports RTL.
Port I36c0d72984e0abc7c6430cc7d52d8efd7341820e to nyc-mr1-dev.

Bug: 29932935
Change-Id: Icd085508f7d1dd412f4d0805e8fd01734743648e
2016-07-17 19:25:27 +01:00
Jim Miller
29d157bf05 Fix vulnerability in LockSettings service
Fixes bug 30003944

Change-Id: I8700d4424c6186c8d5e71d2fdede0223ad86904d
2016-07-15 17:28:53 -07:00
Abodunrinwa Toki
afb38c5cc4 FloatingActionMode: Fix screen coordinates.
Use application context to get the screen's display metrics.

Bug: 30127070
Change-Id: I2c453c494ef210c12d89fc7e3ff026728f9ecb0f
2016-07-15 14:40:26 +01:00
TreeHugger Robot
a7ebd4f4bb Merge changes I56d6be69,Ibf8f9b26 into nyc-mr1-dev
* changes:
  Fixed a bug where the headsup would be stuck disappearing
  Changed the appearance of phone call notifications
2016-07-14 01:38:53 +00:00
Selim Cinek
06e9e1fe00 Changed the appearance of phone call notifications
Change-Id: Ibf8f9b266428fdd5374ee824ec4c2df10daeb9a7
Fixes:28269355
2016-07-13 14:56:05 -07:00
Adrian Roos
7a3bf7c46e Allow LockPatternUtils usage on non-looper threads
Fixes an issue where LPU could no longer
be used on a non-looper thread even though
the looper is only used for a certain callback.

Now only using that callback mechanism is fatal
on a non-looper thread.

Change-Id: I2d766bd6c913e345ed6a3500b486263c8bc12b07
Fixes: 30076804
2016-07-12 15:32:04 -07:00
TreeHugger Robot
165b011a74 Merge "Improve initial unlock delay (1/2)" into nyc-mr1-dev 2016-07-08 22:03:49 +00:00
Jorim Jaggi
e8fde5d966 Improve initial unlock delay (1/2)
When checking for the credentials, we add a new callback
onEarlyVerified which gets called as soon as we know that the
credential was correct.

In KeyguardUpdateMonitor, we track the unlocked state of the user,
and if it's still locked, we slow down all the transitions to allow
for a more gradual unlock experience.

Bug: 29007436

Change-Id: I406d228f9f3e41e07fe3292a61df175a7f579e4d
2016-07-08 11:50:54 -07:00
Justin Klaassen
911e88939c Add Night display feature
Bug: 28615069

Tints the display at night automatically according to your schedule or
using the sunrise/sunset corresponding to your current location.

Change-Id: Ie56b4eed88cc2fcbae88002492b1edad5820b6b1
2016-07-08 11:47:50 -07:00
Annie Chin
d58f07f58a Merge "Add callbacks to VoiceInteractionManagerService" into nyc-mr1-dev 2016-07-06 23:22:10 +00:00
Daniel Nishi
9459f93c97 Merge "Move the MIME type icon detection into the platform." into nyc-mr1-dev 2016-07-06 19:54:27 +00:00
Daniel Nishi
c29d2b0492 Move the MIME type icon detection into the platform.
This allows the MIME type icons to be used in other system apps.
In this instance, the StorageManager app needs to show file icons
for a given file. By moving the icon mapping into a static library,
we can avoid duplicating the mapping and resources.

Bug: 29826961
Change-Id: Ic2dc7970cc5a5ca430e33425eb9f1ecbd733fe9a
2016-07-06 10:57:06 -07:00
Robin Lee
bae6d820d2 Update isValidLockdownProfile to block PPTP
Since this isn't supported and it will take a framework update to make
it work.

Bug: 28807474
Change-Id: I12371134a1c51a53af26fe8c4db1f04b0f687abe
2016-07-06 09:41:05 +00:00
Annie Chin
ecb9f3e9b8 Add callbacks to VoiceInteractionManagerService
Bug: 29582254

Change-Id: I548d01bd1c7e261b2d2e0afd606d964e5553124e
2016-07-01 13:00:09 -07:00
Yohei Yukawa
f3806f57a5 Automatically grant URI permission as needed.
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.  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.

If we do not do this and there is an application that forgot to call
that method then there is no way for IME developers to prevent
permission denial from happening in the application except for relaxing
the default permission of the ContentProvider just because of such an
application.

Although application developers are still expected to explicitly call
InputContentInfo#{request,release}Permission(), forgetting to call
InputContentInfo#requestPermission() does not hurt the user anymore.

With this CL, calling InputContentInfo#requestPermission() after calling
InputContentInfo#releasePermission() is also allowed.

Bug: 29892936
Change-Id: Id955435dd2e72549ee7134f46b3c6951581694ad
2016-06-30 16:27:46 -07: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 c4b8f36de5523366e354fc01b6cba81ad72f6423.

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
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
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 80bf1f8a3c6a656a687bb6169a93325cccbb0d06)
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
      25e0813e6eb6315b1016db805fa9b791b4ae5cc2

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 ad48dc18a55313095b7a777bef6d66faa40ef7dd. 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
      152944f4909c47917473293b258d266435c6ab35
 [2]: Ica1ba3154795c1bf44e140dfe639b299f83cd8af
      adebb52588b098a1af678d4e33a234ef1ce783b2

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 e977b0ae59bbd7af0ccdf56db6aa0a53c5e6414d 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