Commit Graph

66469 Commits

Author SHA1 Message Date
Jeff Sharkey
9727f22fc0 Merge "Introduce RecoverableSecurityException." 2017-01-24 03:19:18 +00:00
Jason Parks
7a190b08fe Merge "Allow the profile owner to enforce auto time." 2017-01-24 02:46:29 +00:00
Chris Tate
0d4d74d619 Merge "Document dependency between Intent symbols and dumpstate" 2017-01-24 02:17:15 +00:00
TreeHugger Robot
8af7d0e850 Merge "Expose colorimetry capabilities on Display" 2017-01-24 02:15:58 +00:00
Christopher Tate
bdc394118c Document dependency between Intent symbols and dumpstate
Bug 34594835

Test: N/A
Change-Id: I4494c224bc6341c7a41b79361ba599befc408341
2017-01-23 18:15:27 -08:00
TreeHugger Robot
5c5e0ac419 Merge "Eliminating sections." 2017-01-24 01:41:57 +00:00
TreeHugger Robot
24454ca4b8 Merge "Add an 'am crash' shell command" 2017-01-24 01:25:12 +00:00
Romain Guy
6d228c2589 Expose colorimetry capabilities on Display
Test: CtsDisplayTestCases
Bug: 32984164
Change-Id: I11e6a85a27959c578eeac276ac0e2c8ab8db70bf
2017-01-23 17:17:32 -08:00
Jeff Sharkey
56f0368fb7 Introduce RecoverableSecurityException.
This takes advantage of the recently added behavior that offers to
send Parcelable exception types across Binder calls.

Certain SecurityException can be resolved if we involve the end user,
such as when a password has expired, or a user challenge is required
to proceed.  This new subclass of SecurityException provides
user-visible messaging and convenience methods for quickly rendering
that messaging as a notification or dialog.

Test: builds, boots, throws, shows as notification and dialog
Bug: 33749182
Change-Id: Iba66c7466b8fabca9e3f83c60db5a4ab849a256f
2017-01-23 17:23:17 -07:00
Dmitri Plotnikov
d11b9e77e4 Merge "Adding TvExtender channel override" 2017-01-24 00:07:42 +00:00
Dianne Hackborn
5f1a2a34d9 Merge "Optimize bg check flow." 2017-01-24 00:05:38 +00:00
Jason Parks
841cb0a37f Allow the profile owner to enforce auto time.
Test: runtest -c com.android.server.devicepolicy.DevicePolicyManagerTest frameworks-services

Change-Id: I1cb04cce5d232fba668535dd391459a050d62dd7
2017-01-23 17:32:53 -06:00
Adrian Roos
5304e89dfd Merge "KeyguardManager: Fix user resolution of isDeviceSecure/Locked" 2017-01-23 22:21:07 +00:00
Dianne Hackborn
c3af19a87d Optimize bg check flow.
No longer need to look up the application info, target SDK is
explicitly passed in to the check.  For the external method, we
change this to just checked to see if background is completely
disabled, which doesn't need a target SDK check (and is the only
thing any of the current clients care about).

Now allow SystemUI to put targets of notification pending intents
on the temporary whitelist when they fire, so developers can avoid
dealing with background restrictions in this case (if the user
interacts with their notification, they will temporarily be
considered in the foreground).

Remove any thoughts of enforing restrictions on registerReceiver(),
so we don't need to deal with target SDK versions there (which can't
be done all that efficiently).

Also bring back the old "allow starts coming from foreground apps"
only for the MODE_IGNORE app op, since it should provide some
better compatibility.

Test: ran them.

Change-Id: Id4ea7f992d12ce4bd8e54f1dbaeb4a460a3dee59
2017-01-23 14:18:33 -08:00
Richard Coles
2536cc6872 Merge "Expose isMultiProcessEnabled via WebViewDelegate." 2017-01-23 21:23:45 +00:00
Soonil Nagarkar
086ab84878 Merge "Add background location throttling to LocationManagerService" 2017-01-23 20:42:49 +00:00
Adrian Roos
0b1853f997 KeyguardManager: Fix user resolution of isDeviceSecure/Locked
Fixes isDeviceSecure and isDeviceLocked APIs to use
the user id of the app that executes the code rather
than that of any incoming binder call.

Change-Id: Ib7772b60c35a3ebf96830f9b013c539021e1f063
Fixes: 34592592
Test: manual
2017-01-23 12:40:30 -08:00
TreeHugger Robot
1f42d9a6ec Merge "Fix recent checkPermission() bug." 2017-01-23 20:27:32 +00:00
TreeHugger Robot
eeb4e1d219 Merge "Change WebView fallback mechanism to consider all users' package states." 2017-01-23 20:20:15 +00:00
Christopher Tate
8aa8fe1289 Add an 'am crash' shell command
Induce a normal VM crash via adb, because it's quite different from the
effects of 'am kill'.

Test: induced crashes via adb shell using both pid & pkg

Change-Id: I79654afa7c4a70364cfd7d3af3e80a7b0e59b882
2017-01-23 20:18:45 +00:00
TreeHugger Robot
4a65687b85 Merge "Expose fonts.xml via public API with a service" 2017-01-23 19:57:23 +00:00
TreeHugger Robot
953038d1ce Merge changes from topic 'anb'
* changes:
  Adding HardwareBuffer, a Java wrapper around AHardwareBuffer.
  AHardwareBuffer implementation.
2017-01-23 19:29:05 +00:00
Jeff Schumacher
b16bddca89 Merge "Opened some App Links APIs to @SystemApi" 2017-01-23 18:50:16 +00:00
Jeff Sharkey
d69b083bc3 Fix recent checkPermission() bug.
It should be checking if the UID argument passed in has the requested
permission; not the calling UID.

Test: builds, boots
Bug: 34528367
Change-Id: Ie1828f571d9f143ce9f5bdca2eedcf2fa6ccfd79
2017-01-23 11:37:27 -07:00
TreeHugger Robot
ec30d6e12f Merge "add a signaled reader to the eventlog" 2017-01-23 18:18:30 +00:00
Charles He
34f04ffa0b Merge "DPM: Notify DO/PO of security updates." 2017-01-23 17:11:53 +00:00
Chris Wren
d09bf8271e add a signaled reader to the eventlog
Test: manual using a logspammer app
Change-Id: I89e3dda82d4d1d3fc6d343b634642687e550f70a
2017-01-23 11:40:52 -05:00
Toby Sargeant
773deddaf5 Merge "WebView: Add the definition of the renderer importance API." 2017-01-23 16:21:18 +00:00
Torne (Richard Coles)
b26428b3c2 Expose isMultiProcessEnabled via WebViewDelegate.
Allow the WebView implementation to call isMultiProcessEnabled via the
delegate, so that it doesn't have to fetch and interpret the value of
the system setting itself.

Bug: 21643067
Test: manual (requires modifications to chromium to call)
Change-Id: I1ef2b7ea0054c606965040e02034c938d5e6464c
2017-01-23 15:09:55 +00:00
Clara Bayarri
04d72abde1 Expose fonts.xml via public API with a service
This change creates a new FontManagerService, in charge of providing
font management data. It exposes a public API to retrieve the
information in fonts.xml without accessing it directly. To do this,
it also refactors FontListParser's internal classes into a new public
FontConfig class holding all the font data.

getSystemFonts() returns all the available information in fonts.xml
as well as file descriptors for all the fonts. This allows us to
share the memory consumed by these files between all clients.

Bug: 34190490
Test: See attached CTS change in topic
Change-Id: I0e922f8bcc9a197a1988d04071eb485328d66fb7
2017-01-23 15:02:23 +00:00
TreeHugger Robot
83d577581b Merge "Expose Resources.getFont" 2017-01-23 13:31:33 +00:00
Andrei Stingaceanu
2317b64f02 Merge "AutoSize TextView (part 7) - APIs for configuring auto-size" 2017-01-23 11:21:57 +00:00
Clara Bayarri
18e9f9f377 Expose Resources.getFont
Based on the work already done in aapt2, load a Font from a
resource id.

Test: WIP
Change-Id: Idc06bfbfd16452a328bfcc6ea9dcfb723b633f0c
2017-01-23 11:18:09 +00:00
Charles He
dea0c3b654 DPM: Notify DO/PO of security updates.
We add a variant of notifyPendingSystemUpdate method which takes an
additional isSecurityPatch boolean flag. This information, if available,
will be persisted and available to device and profile owners when they
call getPendingSystemUpdate method.

Test: gts-tradefed run gts -m GtsGmscoreHostTestCases -t com.google.android.gts.devicepolicy.DeviceOwnerTest#testPendingSystemUpdate
Test: gts-tradefed run gts -m GtsGmscoreHostTestCases -t com.google.android.gts.devicepolicy.ManagedProfileTest#testPendingSystemUpdate
Bug: 33102479
Bug: 30961046
Change-Id: If3f1b765bb18a359836ac43ac9a0a9f29e9f8428
2017-01-23 09:38:49 +00:00
Gustav Sennton
364e160290 Change WebView fallback mechanism to consider all users' package states.
MultiProcess WebView will use a Service to start a separate process (the
renderer process). This Service can only be started if the WebView
package is enabled for the current user. To ensure that the current
WebView package is usable by all users on a single device we now only
use a WebView package as WebView implementation if that package is
enabled and installed for all user on the device. This also means that
the WebView-fallback mechanism will trigger when disabling the primary
WebView package for any user (not just the system user).

Also add multi-user unit tests to cover this new change.

Bug: 32894152
Test: run unit tests in WebViewUpdateServiceTest
Test: ensure the standalone WebView package becomes enabled (for all
device users) when disabling Chrome for a secondary user.
Test: load WebView (both using Monochrome, and using the standalone
WebView).

Change-Id: Iad3fc48aa50273062c2f29ae48a343c2dea38116
2017-01-23 09:30:11 +00:00
Daichi Hirono
baa0116854 Remove StorageManager#mountAppFuse hidden API.
The API should be replaced with StorageManager#openProxyFileDescriptor.

Bug: 32891253
Test: build
Change-Id: Ibbf8b64f3a39900a1f05a52132aa931491d6fd48
2017-01-23 09:36:59 +09:00
TreeHugger Robot
e2a31c0226 Merge "Platform support for static shared libraries" 2017-01-22 23:45:12 +00:00
Svet Ganov
6788212d17 Platform support for static shared libraries
This change adds support for static shared libraries that
emulate static linking allowing apps that statically link
against the same library version to share a common
implementation. A library is hosed by a package in a standard
APK.

Static shared libraries have a name and a version declared
by a dedicated manifest tag. A client uses also a new tag
to refer to the static library it uses by specifying the
lib name, version, and the hash of the signing certificate.
This allows two apps to rely on two different library versions
and prevents impersonation of the shared library by a side-loaded
app with the same package name.

Internally apps providing static libs use synthetic package
name generated from the manifest package name and the library
version. This allows having different "versions" of the same
package installed at the same time.

An application cannot be installed if a static shared lib it
depends on is missing. A used shared library cannot be uninstalled.
Shared libraries can rotate certificates like normal apps. The
versions of these libs should be ordered similarly to the version
codes of the hosting package. Such libs cannot use shared user
id, cannot be ephemeral, cannot declare other libraries, cannot
rename their package, cannot declare child-packages. They must
target O SDK. Also they cannot be suspended or hidden or their
uninstall blocked. Generally, speaking policy regarding code in
static shared libs should be applied to the packages using the
library as it could have just statically linked the code.

We now have APIs to query information about the shared libraries
on the device in general. To clients static shared libraries are
presented as multiple versions of the same package which is how
they are declared and published. Therefore, one can have two
versions of the same package which means we need way to query
for and uninstall a specific version of a package. Also static
shared libs can depend on other static shared libs which are
versioned packages. To ease representation we add the concept
of a versioned package which should be used in the case of
static shared libs.

A client can see only the static shared libs it depends on and
more specifically only the versions it depends would be retrieved
by using the standard package manager APIs. There is a new
dedicated API to get info about all shared libraries which
would provide data about all static shared lib versions. Also
these libraries must use v2 signing scheme.

Test: CTS tests pass

bug:30974070

Change-Id: I4f3d537ee7a81f880950377b996e1d9d4813da5c
2017-01-22 14:05:15 -08:00
Tobias Sargeant
d10e4af098 WebView: Add the definition of the renderer importance API.
The renderer importance API is used to specify how important
out-of-process WebView renderer services are for the purposes of OOM
killing and scheduling with respect to the binding application.

This allows an application to - for example - specify that renderers can
be killed while the application is not in the foreground, thus cleaning
up additional resources.

Bug: 30824898
Test: Tests await Chromium change.
Change-Id: I6dca3d427d6cdb5cb7e0be6f7fb8ece64bd24af9
2017-01-22 18:59:12 +00:00
TreeHugger Robot
39e25af396 Merge "Use infinities for one-sided ranges for a11y." 2017-01-22 00:06:55 +00:00
TreeHugger Robot
9a33bda070 Merge "Add @TestApi PopupMenu.getMenuListView" 2017-01-21 07:10:05 +00:00
Phil Weaver
79e441929c Use infinities for one-sided ranges for a11y.
This was a request from Chrome to be able to specify
one-sided ranges. Rather than add new behavior, I'm just
documenting what seems to me a reasonable convention.

Bug: 30025621
Test: No tests as this just adds comments.
Change-Id: I1467f57729eed08a981c3e6d50951e78c3564a50
2017-01-21 06:06:54 +00:00
Chad Brubaker
9d8e0fc679 Merge "Rename visibleToEphemeral to visibleToInstantApps" 2017-01-21 04:38:55 +00:00
Sanket Agarwal
705eedcb01 Merge "Change HFP Client API to support multi device" 2017-01-21 03:21:58 +00:00
Craig Donner
1a4d07d919 Adding HardwareBuffer, a Java wrapper around AHardwareBuffer.
Bug: 34050596
Test: new CTS test added in other topic CL; tested with cts-tradefed on Pixel XL
Change-Id: I177107757f917fcab5bc1f1dcdbb5b81a605f777
2017-01-20 18:52:01 -08:00
TreeHugger Robot
af6668bc9d Merge "resolve merge conflicts of 5fa7fb1d9f to master" 2017-01-21 02:41:19 +00:00
TreeHugger Robot
885019151d Merge "Add Setting for curating saved open networks." 2017-01-21 02:27:30 +00:00
TreeHugger Robot
5feefa54c4 Merge "Introduce RescueParty." 2017-01-21 02:22:43 +00:00
Zac Iqbal
655f908aa6 Merge "Added an onDeviceUnlockLockout callback to TrustAgentService." 2017-01-21 01:35:43 +00:00
TreeHugger Robot
c49f2e5d88 Merge "Add ClipData.addItem(Item, ContentResolver)" 2017-01-21 01:09:28 +00:00