1385 Commits

Author SHA1 Message Date
Jeff Schumacher
b16bddca89 Merge "Opened some App Links APIs to @SystemApi" 2017-01-23 18:50:16 +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
Jeff Schumacher
6fd90ed961 Opened some App Links APIs to @SystemApi
This change promotes some of the APIs that Settings uses for the
"Open by default" screen from @hide to @SystemApi.

GTS tests are added in ag/1811536.

This change also changes the protection level for
Manifest.permission.SET_PREFERRED_APPLICATIONS to allow package verifiers
(e.g. the Play Store) to be granted it. This permission is used in the
PM.updateIntentVerificationStatusAsUser() and
PM.setDefaultBrowserPackageNameAsUser() APIs.

Bug:31008483
Test: Patch in ag/1811536 and follow the test instructions there.
Change-Id: I18b069de11eaa8fe97c151fb3cfb63854f1fd056
2017-01-20 14:51:47 -08:00
Sundeep Ghuman
d9ade64f8c Merge "Allow REQUEST_NETWORK_SCORES to be used by SetupWizard." 2017-01-20 19:42:04 +00:00
Sundeep Ghuman
3d12a05f52 Allow REQUEST_NETWORK_SCORES to be used by SetupWizard.
Bug:34479801
Test: Built system and setup wizard and tested.
Change-Id: I4fcc3d1f56f78cfb0deaf13d0eccae97dac4ffa2
2017-01-20 10:32:18 -08:00
Suprabh Shukla
2f34b1a678 Adding app op and intent action for external sources
Added an app op to control which package and uid can install apps on the
device and an intent action to launch the settings fragment.

Test: Will include in follow up CL, tracked in b/33792674

Bug: 31002700
Change-Id: Ic073495759d9867f8001a6c712e402398c53dfc9
2017-01-20 02:39:08 -08:00
Tyler Gunn
15470f9bfc Merge "Adding self-managed connection service APIs." am: 3a7253a09d am: 2155be0218 am: d70e5d9317
am: 61650097ed

Change-Id: Icfeff293b66b1bb062095a857c8a22ac0dcbdd63
2017-01-19 18:44:10 +00:00
Tyler Gunn
61650097ed Merge "Adding self-managed connection service APIs." am: 3a7253a09d am: 2155be0218
am: d70e5d9317

Change-Id: I20ba841ceefb5905bf81262d6c42ea4b252ba3d4
2017-01-19 18:39:50 +00:00
Tyler Gunn
d70e5d9317 Merge "Adding self-managed connection service APIs." am: 3a7253a09d
am: 2155be0218

Change-Id: I75319e09f352905ffa45194086b11711f9070c70
2017-01-19 18:34:53 +00:00
Treehugger Robot
3a7253a09d Merge "Adding self-managed connection service APIs." 2017-01-19 18:23:34 +00:00
Tyler Gunn
f50354363c Adding self-managed connection service APIs.
1. Adding new APIs for self-managed connection services.
2. Adding Telecom package-level documentation.

Test: Manual (unit, cts pending; this is just scaffolding for now)
Bug: 34159263
Change-Id: Ic226ec8bfcb2fbcc02fe802b47499e47aab17d0a
2017-01-18 14:44:43 -08:00
Julia Reynolds
7967230de2 Send Snooze callback for Assistant
On selection of a snooze context SnoozeCriterion.

Test: runtest systemui-notification & make cts-verifier
Change-Id: Iaca567100c29295fbbf1d327195a114106909652
2017-01-12 10:40:11 -05:00
Jeremy Joslin
005224f27d Merge "Make REQUEST_NETWORK_SCORES signature only." am: 1f89f3d1da am: 99b73c61f2
am: 542f906448

Change-Id: I55dc42d95816e0edd2c570fe96dc724c180a3cd1
2017-01-09 21:18:26 +00:00
Jeremy Joslin
542f906448 Merge "Make REQUEST_NETWORK_SCORES signature only." am: 1f89f3d1da
am: 99b73c61f2

Change-Id: I5959ba9a45dd3c895421b131fd34db6b37c6e405
2017-01-09 21:09:09 +00:00
TreeHugger Robot
93b785a90f Merge "Revert "Implement Account Discovery API."" 2017-01-09 20:04:52 +00:00
Jeremy Joslin
85fcf96e99 Make REQUEST_NETWORK_SCORES signature only.
There are no use cases where it's needed by a privileged app today.

Test: Built and ran
BUG: 33752149
Change-Id: Ia63a86eca1f60644d25f037d395a08c541a06a08
Merged-In: Iae689e878fdb60b506536c918079a4fcff527a71
2017-01-09 11:31:21 -08:00
Dmitry Dementyev
2e22cfbefb Revert "Implement Account Discovery API."
This reverts commit 58fa836210a2872e58e8890456c2cd14a4b0fd3d.

Change-Id: Iffc9c5eb63db382b720b45ff5e8f1948db908a03
2017-01-09 18:42:14 +00:00
TreeHugger Robot
44a64f0a8c Merge "Make REQUEST_NETWORK_SCORES signature only." 2017-01-07 02:49:11 +00:00
Dmitry Dementyev
ed92d5b55b Merge "Implement Account Discovery API." 2017-01-07 02:41:44 +00:00
Dmitry Dementyev
58fa836210 Implement Account Discovery API.
Bug: https://b.corp.google.com/issues/33046496
Test: cts tests, manual tests.

Change-Id: I03d1ae5dfa1577f191817aa7d508f6b4d0e625ed
2017-01-06 16:44:27 -08:00
Jeremy Joslin
302d02b95b Make REQUEST_NETWORK_SCORES signature only.
There are no use cases where it's needed by a privileged app today.

Test: Built and ran
BUG: 33752149
Change-Id: Iae689e878fdb60b506536c918079a4fcff527a71
2017-01-06 14:38:57 -08:00
Jeremy Joslin
afc31dfe0f Merge "Defining a new REQUEST_NETWORK_SCORES permission." am: a54d76a81f am: 84fd1e1120
am: 195ac87578

Change-Id: I1f6de46c521a232c1a218e3e6b50883ea6e150b0
2017-01-04 23:20:17 +00:00
Jeremy Joslin
195ac87578 Merge "Defining a new REQUEST_NETWORK_SCORES permission." am: a54d76a81f
am: 84fd1e1120

Change-Id: I85279a0185d9191bf81e1088d68f86827fe2d103
2017-01-04 23:16:38 +00:00
Treehugger Robot
a54d76a81f Merge "Defining a new REQUEST_NETWORK_SCORES permission." 2017-01-04 23:04:47 +00:00
Jeremy Joslin
6a848fdf09 Merge "Use the new BIND_NETWORK_RECOMMENDATION_SERVICE." am: 34d46ca94c am: acbf592683
am: cb3f75cca7

Change-Id: I0da58029bb854a7df7bc286a0bd6a22c61d5daee
2017-01-04 21:52:11 +00:00
Jeremy Joslin
cb3f75cca7 Merge "Use the new BIND_NETWORK_RECOMMENDATION_SERVICE." am: 34d46ca94c
am: acbf592683

Change-Id: Ic488962a47eecea4c2ed522596549ef088bfbfc3
2017-01-04 21:47:42 +00:00
Jeremy Joslin
97e711139d Defining a new REQUEST_NETWORK_SCORES permission.
This is intended to be a drop-in replacement for the existing
BROADCAST_NETWORK_PRIVILEGED with a more appropriate name.

Test: Built, ran.
BUG: 33752149
Change-Id: Iebe9d1c12f159bd91953ef094d9866eba9ff925a
Merged-In: I12bdba9694fdf2a2e39990736265919edafd865e
2017-01-04 13:30:07 -08:00
TreeHugger Robot
64593c6993 Merge "Defining a new REQUEST_NETWORK_SCORES permission." 2017-01-04 19:51:50 +00:00
Jeremy Joslin
c02fd4ea78 Use the new BIND_NETWORK_RECOMMENDATION_SERVICE.
Declare that the system uses the new
BIND_NETWORK_RECOMMENDATION_SERVICE permission.

Test: Built & ran
BUG: 33897544
Change-Id: I43424642a631f58da3a065f8221e351180f4f221
Merged-In: I41c7550adf0d1f81ed9a12068ba569e6a57f3b42
2017-01-04 11:46:06 -08:00
Jeremy Joslin
a1a9676317 Merge "New permission - BIND_NETWORK_RECOMMENDATION_SERVICE." am: 871beedc6d am: a169fc3494
am: 8be80273b8

Change-Id: I4930b2d6145e5d7f4e08d267629f40517cbeae34
2017-01-04 15:38:43 +00:00
Jeremy Joslin
8be80273b8 Merge "New permission - BIND_NETWORK_RECOMMENDATION_SERVICE." am: 871beedc6d
am: a169fc3494

Change-Id: I25f816c0ee3df784a02be58a042c505f2c839394
2017-01-04 15:34:16 +00:00
Treehugger Robot
871beedc6d Merge "New permission - BIND_NETWORK_RECOMMENDATION_SERVICE." 2017-01-04 15:24:30 +00:00
Pavlin Radoslavov
858ab99071 Merge "Add a mechanism for configuring the A2DP Source codecs" am: 63270f2b96 am: 8b46f87e7e am: da3de76bdb
am: 62c5226e9c

Change-Id: I14d4cc2dc91cb1ab431eda32d5066ac8f471c3a6
2017-01-04 03:54:18 +00:00
Pavlin Radoslavov
62c5226e9c Merge "Add a mechanism for configuring the A2DP Source codecs" am: 63270f2b96 am: 8b46f87e7e
am: da3de76bdb

Change-Id: If62a29812dad856d262c38804f3d88a5406ef79e
2017-01-04 03:49:09 +00:00
Pavlin Radoslavov
da3de76bdb Merge "Add a mechanism for configuring the A2DP Source codecs" am: 63270f2b96
am: 8b46f87e7e

Change-Id: I39e4b90491f646887200649954b652d9f5439925
2017-01-04 03:44:40 +00:00
Pavlin Radoslavov
44a4ef0aa9 Add a mechanism for configuring the A2DP Source codecs
* Added a new class BluetoothCodecConfig that contains codec-related
  configuration or capabilities: codec type, priority, sample rate,
  bits per sample, channel mode, and codec specific fields.

* Extended the Bluetooth A2DP AIDL interface to get/set the current
  codec configuration

* Added new call handleBluetoothA2dpDeviceConfigChange() to the Media
  Framework that is called when there are changes in the
  Bluetooth A2DP device configuration - e.g., the A2DP codec is changed.

Test: A2DP streaming to headsets, TestPlans/71390
Bug: 30958229
Change-Id: I9a82716cbc2a5efbe77352a031ac80c88f6a2459
2017-01-03 17:52:52 -08:00
Jeremy Joslin
b9a61979cc New permission - BIND_NETWORK_RECOMMENDATION_SERVICE.
Used to protect exported network recommendation services.

Test: Built & ran
BUG:33897544
Change-Id: Icfc566275a8d832449f6358e576784199ab0f7b2
Merged-In: I4f163fb965be6a25201bc3ba5e0032e7652c8f20
2017-01-03 14:19:51 -08:00
TreeHugger Robot
3c9ce1cd17 Merge "Use the new BIND_NETWORK_RECOMMENDATION_SERVICE." 2017-01-03 22:08:55 +00:00
Ivan Podogov
48e6745a08 Rename the Bluetooth profile classes for HID Device role. am: 0afe190af5 am: 94e3d3f499 am: 91ab2e2f98
am: 48738f5ad0

Change-Id: I15651c5a6e3baf53d915626ea6c55180fefe28b5
2016-12-29 20:08:38 +00:00
Ivan Podogov
48738f5ad0 Rename the Bluetooth profile classes for HID Device role. am: 0afe190af5 am: 94e3d3f499
am: 91ab2e2f98

Change-Id: If0e072e96491020191a7742928cc90adff151342
2016-12-29 20:00:09 +00:00
Ivan Podogov
91ab2e2f98 Rename the Bluetooth profile classes for HID Device role. am: 0afe190af5
am: 94e3d3f499

Change-Id: I97ff93fd2564bd76d90095f8086f79c6c6086aff
2016-12-29 19:46:55 +00:00
Jeremy Joslin
d687693902 Use the new BIND_NETWORK_RECOMMENDATION_SERVICE.
Declare that the system uses the new
BIND_NETWORK_RECOMMENDATION_SERVICE permission.

Test: Built & ran
BUG: 33897544
Change-Id: I41c7550adf0d1f81ed9a12068ba569e6a57f3b42
2016-12-29 10:37:57 -08:00
Ivan Podogov
0afe190af5 Rename the Bluetooth profile classes for HID Device role.
We already have BluetoothInputDevice class, so adding something
called BluetoothHidDevice seems confusing. On the other hand,
the new class is designed to connect to HID Host devices, so
naming it BluetoothInputHost makes sense and goes in line with
the existing BluetoothInputDevice.

The same goes for the new constant HID_DEVICE that is just as
confusing to have together with the INPUT_DEVICE one.

This CL also renames the "connection state changed" broadcast
(for the same reasons), declares it as an SDK constant, and also
adds some javadoc to it.

Note that BluetoothHidDeviceApp* classes remained unchanged, as
those correspond to the app that implements the Device (and
connects to the Host).

Test: make
Change-Id: I5075ca5b97db3c1dd403c2e9660eecc7380cffe2
2016-12-29 14:30:40 +00:00
TreeHugger Robot
77447de5d5 Merge "New permission - BIND_NETWORK_RECOMMENDATION_SERVICE." 2016-12-29 01:20:48 +00:00
Andrew Solovay
305040411b [DAC FIXIT]: Noted that UNINSTALL_SHORTCUT is no longer supported. am: 40ba793b33 am: 2891357f4d am: ff501e5e5f
am: 88addedb34

Change-Id: Ic38830c87084c6fc7237f290f8167324744c12d0
2016-12-28 20:44:54 +00:00
Andrew Solovay
88addedb34 [DAC FIXIT]: Noted that UNINSTALL_SHORTCUT is no longer supported. am: 40ba793b33 am: 2891357f4d
am: ff501e5e5f

Change-Id: I8e7bf9b66c92ed5db45007084075fca36ccaa0c8
2016-12-28 20:37:36 +00:00
Jeremy Joslin
72f5e08ce2 New permission - BIND_NETWORK_RECOMMENDATION_SERVICE.
Used to protect exported network recommendation services.

Test: Built & ran
BUG:33897544
Change-Id: I4f163fb965be6a25201bc3ba5e0032e7652c8f20
2016-12-28 12:31:30 -08:00
Andrew Solovay
23473e8851 [DAC FIXIT]: Noted that UNINSTALL_SHORTCUT is no longer supported. am: 40ba793b33
am: 2891357f4d

Change-Id: Id95f2f8c11a98b56f656b3688accd632fe6da43d
2016-12-28 20:31:08 +00:00
Andrew Solovay
ff501e5e5f [DAC FIXIT]: Noted that UNINSTALL_SHORTCUT is no longer supported. am: 40ba793b33
am: 2891357f4d

Change-Id: I9b15c8787d6f6aa6c2d362de46ab06a583d3283c
2016-12-28 20:31:02 +00:00
Andrew Solovay
2891357f4d [DAC FIXIT]: Noted that UNINSTALL_SHORTCUT is no longer supported.
am: 40ba793b33

Change-Id: I5d15df8192fee8362dca8dcc53d84b75af29a13f
2016-12-28 20:24:30 +00:00