Commit Graph

66429 Commits

Author SHA1 Message Date
Andrei Stingaceanu
2317b64f02 Merge "AutoSize TextView (part 7) - APIs for configuring auto-size" 2017-01-23 11:21:57 +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
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
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
Jesse Hall
3bb7e5c909 resolve merge conflicts of 5fa7fb1d9f to master
Test: make
Change-Id: I7f119535a120303796fcd08f0274269f7d0dbaba
2017-01-20 17:04:48 -08:00
TreeHugger Robot
4cbec883f1 Merge "Set permissions for launching on private displays" 2017-01-21 00:59:20 +00:00
Jeff Sharkey
fe6f85cac9 Introduce RescueParty.
When a device gets stuck in a crash loop, it's pretty much unusable
and impossible for users to recover from.

To help rescue devices from this state, this change introduces a new
feature that watches for runtime restart loops and persistent app
crash loops, and escalates through a series of increasingly
aggressive rescue operations.  Currently these rescue levels walk
through clearing any experiments in SettingsProvider before finally
rebooting and prompting the user to wipe data.

Crash loops are detected based on a number of events in a specific
window of time.  App stats can be stored in memory, but boot stats
need to be stored in system properties to be more robust.

Start up RecoveryService much earlier during the boot so we can
reboot into recovery when needed.

Add properties tha push system_server or SystemUI into a crash loops
for testing purposes.

Test: builds, boots, forced crashing walks through modes
Bug: 24872457, 30951331
Change-Id: I6cdd37682973fe18de0f08521e88f70ee7d7728b
2017-01-20 17:36:38 -07:00
TreeHugger Robot
961405613c Merge "Updating picture-in-picture API." 2017-01-21 00:29:23 +00:00
David Ouyang
618fb8b194 Merge "Promote DevicePolicyManager.packageHasActiveAdmins for Play Store" 2017-01-21 00:28:17 +00:00
Zachary Iqbal
327323d2b3 Added an onDeviceUnlockLockout callback to TrustAgentService.
Test: Manually tested onDeviceUnlockLockout being called with an actual
TestAgentService implementation.

Notes:
- Active Trust Agents are no longer killed/unbinded from when a temporary
  device lockout occurs. Instead, the onDeviceUnlockLockout callback of
  the agent is called.

Change-Id: Ifa0984d1d7e5153568334d736e9ebd5a00ef1297
Bug: 34198873
2017-01-20 15:55:07 -08:00
Vladislav Kaznacheev
8e7b940f8d Add ClipData.addItem(Item, ContentResolver)
Unlike the existing addItem(Item), this method updates
the MIME type list in the ClipDescription.

Bug: 28750744
Test: cts-tradefed ... -m CtsContentTestCases
  --test android.content.cts.ClipboardManagerTest
Change-Id: Ida0477267d1319a31a738dfd704c0af71928dd2f
2017-01-20 15:39:12 -08:00
Makoto Onuki
75ca7b8edd Merge "Do not allow work profile apps to access main profile app." 2017-01-20 23:35:53 +00:00
Andrii Kulian
fb1bf69d5d Set permissions for launching on private displays
- System UIDs must be allowed to launch anything and everywhere.
- Display owner must be allowed to launch activities on it.
- Apps that are already on target display must be allowed to launch
  there.
- All other apps mustn't be allowed to launch on private displays.

Bug: 34230873
Test: android.server.cts.ActivityManagerDisplayTests
Test: #testPermissionLaunchFromSystem
Test: #testPermissionLaunchFromAppOnSecondary
Test: #testPermissionLaunchFromOwner
Test: #testPermissionLaunchFromDifferentApp
Change-Id: Ic98005649a6368370c512e822cba4e9decc18ae9
2017-01-20 15:15:59 -08:00
Jeff Sharkey
f5d2c7278e Merge "Add Binder support for Parcelable exceptions." am: a2ef6b5741 am: c3fbf32011 am: 4a0a4664b9
am: 7bb9ccc1e5

Change-Id: I9346a576d57c9f7093b875c4a43134f2ef095018
2017-01-20 23:12:19 +00:00
Sunny Goyal
907b467e91 Merge "Fixing dimensions for AppWidgetProviderInfo not getting updated properly for PinItemRequest" 2017-01-20 23:07:22 +00:00
Dianne Hackborn
9544fe6039 Merge "Improve behavior of bg check." 2017-01-20 23:05:41 +00:00
Dianne Hackborn
85e35643ba Improve behavior of bg check.
There is a new APP_START_MODE_DELAYED_RIGID which means that
things discovering something is not allowed to start should
report a clear error back to the caller.  This is how apps
that opt in to bg check should behave, and will now
be used if the app op mode is set to ERRORED.

This (for now?) removes the code that allows services to
be started if the request is coming from a foreground process.
That behavior isn't in the current bg check spec, and
probably not what we want as the standard platform model (since
it makes knowing when a service can start even harder to
determine).  It was originally done for the experimental
bg check work in N to see how much we could avoid
breaking existing apps, so not relevant when apps need to
explicitly opt in.

Also report temporary whitelist changes to activity manager for
it to lift background restrictions temporarily for apps.  Being
on the whitelist is now part of UidRecord, preventing a uid from
going idle.

Test: Initial CTS test added.

Change-Id: I36fd906fa69de8b7ff360605ae17c088f182e172
2017-01-20 15:03:41 -08:00
Jeff Sharkey
7bb9ccc1e5 Merge "Add Binder support for Parcelable exceptions." am: a2ef6b5741 am: c3fbf32011
am: 4a0a4664b9

Change-Id: I9b5667ca6e5497a4eedaaf88979a1a3d0e22c174
2017-01-20 23:03:40 +00:00
Jiuyu Sun
417d30d88b Merge "Change the default behavior when MCC/MNC changes." 2017-01-20 22:58:25 +00:00
Jeff Sharkey
4a0a4664b9 Merge "Add Binder support for Parcelable exceptions." am: a2ef6b5741
am: c3fbf32011

Change-Id: Ibd977a017ce48f0791520af3500969aec0c132e5
2017-01-20 22:56:45 +00:00
Chad Brubaker
699c771024 Rename visibleToEphemeral to visibleToInstantApps
Test: builds
Test: cts-tradefed run commandAndExit cts-dev -m
CtsAppSecurityHostTestCases -t android.appsecurity.cts.EphemeralTest
Change-Id: Ia173af181ec6206dfa8d1956eb2c4894c43c059e
2017-01-20 14:56:03 -08:00
Sanket Agarwal
039eeb81b5 Change HFP Client API to support multi device
- Adds BluetoothDevice as a parameter where required
- Gets rid of device management APIs that can be done via
  BluetoothProfiles instead

Test: Manual sanity tests
Bug: b/33554547
Bug: b/30984220
Change-Id: I3485ac5bfe1fcb29c774ad040fdd608e1cacb8df
2017-01-20 14:55:15 -08:00
Jeff Sharkey
c3fbf32011 Merge "Add Binder support for Parcelable exceptions."
am: a2ef6b5741

Change-Id: Ide766c0220e86b7661af83551354b3a498297ed8
2017-01-20 22:50:49 +00:00
Jeff Sharkey
a2ef6b5741 Merge "Add Binder support for Parcelable exceptions." 2017-01-20 22:45:04 +00:00
Chad Brubaker
6ba5dccd50 Merge "Add ephemeral whitelist for SettingsProvider" 2017-01-20 22:06:58 +00:00
Holly Jiuyu Sun
b6d7695cf2 Change the default behavior when MCC/MNC changes.
By default, we don't restart the activity when MCC/MNC changes
even when they are not set in configChanges. If they want to
restart, set mcc or mnc in the new attribute restartOnConfigChanges.

Bug: 34258948
Test: Test in unit test(testGetActivityConfigChanges() in
      PackageParserTest.java) and on real device with
      changing the SIM card.

Change-Id: Icd6899597c9b8f2e5706e74373a0280d19150092
2017-01-20 13:50:51 -08:00
Jesse Hall
5fa7fb1d9f Load EGL early in Activity launch, instead of in Zygote
Preloading EGL in Zygote was originally a memory footprint
optimization, but it turns out to be an important app startup time
optimization as well. Preloading EGL in Zygote is incompatible with
updatable graphics drivers, but we don't want to do it on-demand as
part of drawing the first frame either, since that increases
first-frame latency unacceptably.

This change removes Zygote preload, and instead loads EGL on a
low-priority background thread immediately after choosing which
graphics driver to use. This means it is usually done well before
drawing the first frame, without significantly disrupting other
activity launch work.

Test: observe systrace of Calculator launch on bullhead
Bug: 34404021
Change-Id: I887aa09bd35b088b16f53a89838a0c7c98f15761
2017-01-20 13:50:41 -08:00
TreeHugger Robot
22e1cbad24 Merge "Make TelephonyManager#get/setAllowedCarriers system api" 2017-01-20 21:18:31 +00:00
TreeHugger Robot
52461d46a4 Merge "Destroy DisplayLists on time" 2017-01-20 19:45:35 +00:00
Chad Brubaker
97bccee6d6 Add ephemeral whitelist for SettingsProvider
Currently the list is small, only whats required to launch a basic
ephemeral app. It will expand in followup CLs.

Note that the goal of this is not to completely shut down all ways that
an ephemeral app could learn the value (or part of) of a setting not in
the set. The goal is to limit the raw access to settings to a small set that
includes settings that ephemeral apps should have access to directly
System APIs that are exposed to ephemeral apps may allow for
ephemeral apps to learn the value of settings not in the directly
exposed set and that is OK and _not_ a security issue.

This contains a hack to support code in system system server that in
the process of a binder transaction reads a setting using a
ContentReceiver with a system package name. This was previously not an
issue but causes an exception to be thrown from getCallingPackage which
reading a setting now calls.

Bug: 33349998
Test: Boots, functions as normal for regular apps.
Test: cts-tradefed run cts -m CtsProviderTestCases -t
android.provider.cts.SettingsTest

Change-Id: Icc839b0d98c725d23cdd395e8cb76a7b293f8767
2017-01-20 11:03:53 -08:00
Ta-wei Yen
2d7a496e0a Add voicemail backup/restore columns am: f48d5ce630
am: 1f296f7793

Change-Id: I38e6e33438500a0815bb1b87dc21617213f42637
2017-01-20 18:44:39 +00:00
Makoto Onuki
aecbd03751 Do not allow work profile apps to access main profile app.
Bug: 34340531

Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest1 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest2 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest3 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest4 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest5 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest6 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest7 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest8 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest9 -w com.android.frameworks.servicestests
Test: adb shell am instrument -e class com.android.server.pm.ShortcutManagerTest10 -w com.android.frameworks.servicestests

Test: cts-tradefed run cts --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -m CtsShortcutHostTestCases -t 'android.content.pm.cts.shortcuthost.ShortcutManagerMultiuserTest#testManagedUser'
Test: cts-tradefed run cts --skip-device-info --skip-preconditions --skip-system-status-check com.android.compatibility.common.tradefed.targetprep.NetworkConnectivityChecker -a armeabi-v7a -m CtsDevicePolicyManagerTestCases -t 'com.android.cts.devicepolicy.LauncherAppsProfileTest'

Change-Id: I34e9f351d2a8addf65a5a928c3dd4363f08611dc
2017-01-20 18:41:44 +00:00
Ta-wei Yen
1f296f7793 Add voicemail backup/restore columns
am: f48d5ce630

Change-Id: I2dd76b4107b9e7c75595fa3c49dcda74cebd2a09
2017-01-20 18:38:23 +00:00
Bartosz Fabianowski
aaad776c2c Merge "Allow system to retrieve persistent preferred activities" 2017-01-20 18:16:00 +00:00
Crystal Qin
586c400bfc Merge "Add new key purpose Wrap Key to KeyProperties.java and KeymasterDefs.java." 2017-01-20 18:13:47 +00:00
John Reck
2874daa4d3 Destroy DisplayLists on time
Change-Id: I32a97d1234545075e9423c352c772e09ca954741
Fixes: 34072929
Test: Manual, see b/34072929#comment36
2017-01-20 09:56:38 -08:00
Jeff Sharkey
8e8269fc11 Merge "StrictMode to detect untagged network traffic." 2017-01-20 17:31:59 +00:00
TreeHugger Robot
459692adad Merge "Add additional fields to RecommendationRequest." 2017-01-20 17:30:02 +00:00
Michal Karpinski
61238c2d13 Merge "Unhide enabling backup service in DO APIs" 2017-01-20 17:12:21 +00:00
Makoto Onuki
444d64749d Merge "requestPinShortcut for pinned shortcut still notifies launcher" 2017-01-20 16:49:16 +00:00