313202 Commits

Author SHA1 Message Date
Jeff Davidson
35cda39422 Squashed merge of master-sim into master.
Includes the following commits:

==

New system feature: eUICC.

Presence of this feature implies that eUICC-related APIs are expected
to function as long as an eUICC is present in the device. Note that an
eUICC may be embedded in the device but may also be removable.

==

Add empty EuiccManager API and plumbing.

==

Add stub EuiccService.

EuiccService is the class that the LPA app must implement; for now,
just define the action and priority so that the implementation can be
found. Actual methods will come later.

Also declare two relevant permissions: BIND_EUICC_SERVICE, which the
implementation must require (so that nobody else can bind to the
service directly), and WRITE_EMBEDDED_SUBSCRIPTIONS, which permits
signature|privileged apps and CTS (via development) to access
EuiccManager APIs.

==

Add UiccAccessRule based off UiccCarrierPrivilegeRules#AccessRule.

This class can be used to transfer access rules between an
EuiccService implementation and the platform.

We also add a simple encoding/decoding of a list of rules so that they
may be stored in the subscription info table.

==

Add getEid() to EuiccManager/EuiccService.

getEid() fetches the EID. It requires either a privileged permission
(READ_PRIVILEGED_PHONE_STATE) or carrier privileges on the
currently-active profile. Until there is a use case that requires
opening this up to apps with only READ_PHONE_STATE, we shouldn't do
so.

To avoid churn in the future, the API signatures for EuiccService
include a slot ID to identify which SIM slot is being used. However,
this parameter is currently not populated correctly (nor is it usable,
as no Telephony APIs accept a slot ID to address commands). There is
no need to expose it yet in the EuiccManager APIs as we expect to
follow the TelephonyManager pattern of allowing per-slot instances of
EuiccManager in the future while keeping other method signatures the
same.

==

Define Euicc UI actions in EuiccManager/EuiccService.

The EuiccManager actions are to be implemented by the platform (and
only the platform), which forwards the actions to the active
implementation.

Also, remove our explicit priority meta-data tag as we can just rely
on android:priority in the corresponding intent-filter.

==

APIs for downloading embedded subscriptions.

Includes:

-getDownloadableSubscriptionMetadata, used by the platform and LUI to
fetch metadata about a downloadable subscription. The platform will
use this to perform the necessary permission checks (only allowing
otherwise-unprivileged apps to download profiles that are permitted
per the subscription metadata), and the LUI can use this to present
the name of the profile.

-downloadSubscription, to actually perform a profile download.

The stub for startResolutionActivity is included but not implemented;
resolution activities will be handled in a follow-up change.

==

Test: TreeHugger
Change-Id: I47b1da5a69f0736012cb137e02cd6c4e07fdaace
2017-04-03 11:17:53 -07:00
TreeHugger Robot
2a071d69b4 Merge "Launch Intents from QS security footer as current user" 2017-04-03 15:10:36 +00:00
Bartosz Fabianowski
e46e2b944a Launch Intents from QS security footer as current user
Intents triggered from QS should be resolved as the current user,
not as the user that QS is running as (which will always be user 0).
ActivityStarter knows how to do this and can handle this for us
automatically.

Bug: 36118203
Test: Manual

Change-Id: I48d880f0a17d7a9f218ab07ef807ad49ebeda624
2017-04-03 13:29:15 +02:00
Lorenzo Colitti
1f4c17a807 Merge "Add test coverage for NetworkSpecifiers." am: 9a029b5262 am: 0e068f6360 am: 8ee38521bc
am: 391c97d506

Change-Id: Ia71b72cc10dba6bac7c8fbe1ab3c5f40bc5506ff
2017-04-03 11:06:24 +00:00
Lorenzo Colitti
391c97d506 Merge "Add test coverage for NetworkSpecifiers." am: 9a029b5262 am: 0e068f6360
am: 8ee38521bc

Change-Id: Ia7d36096f0e3f0b203d1d838043c03fcd1cea829
2017-04-03 10:59:17 +00:00
Lorenzo Colitti
8ee38521bc Merge "Add test coverage for NetworkSpecifiers." am: 9a029b5262
am: 0e068f6360

Change-Id: I376b9011aaae7f0b8a2899a942d1a43e26605101
2017-04-03 10:52:20 +00:00
Lorenzo Colitti
0e068f6360 Merge "Add test coverage for NetworkSpecifiers."
am: 9a029b5262

Change-Id: Ia328b945af4c4f55ef560b33b00fa861b8f81b0d
2017-04-03 10:45:22 +00:00
Treehugger Robot
9a029b5262 Merge "Add test coverage for NetworkSpecifiers." 2017-04-03 10:37:01 +00:00
Hugo Benichi
3d8cf2254e Merge "ConnectivityService: simplify WakeLock management" am: c98db5caa2 am: 6db00a22b0 am: 56ca1705d6
am: e92a4ba79b

Change-Id: Id8ae92f0eec4284ff5ba59a4a8c2227e9a77765a
2017-04-03 09:24:14 +00:00
Hugo Benichi
e92a4ba79b Merge "ConnectivityService: simplify WakeLock management" am: c98db5caa2 am: 6db00a22b0
am: 56ca1705d6

Change-Id: Iacc2e977c1eec2ebc9deb9395e1f77a62b57f070
2017-04-03 09:17:18 +00:00
Hugo Benichi
56ca1705d6 Merge "ConnectivityService: simplify WakeLock management" am: c98db5caa2
am: 6db00a22b0

Change-Id: I468e31800d5cfe1dd385d773fcc393b615cfa343
2017-04-03 09:10:44 +00:00
Hugo Benichi
6db00a22b0 Merge "ConnectivityService: simplify WakeLock management"
am: c98db5caa2

Change-Id: I1e0ae930cd7a329febf21ff3fc83ad2d0a3be69b
2017-04-03 09:03:13 +00:00
Hugo Benichi
c98db5caa2 Merge "ConnectivityService: simplify WakeLock management" 2017-04-03 08:56:24 +00:00
Lorenzo Colitti
6556a220d7 Add test coverage for NetworkSpecifiers.
Tests various combinations of empty / non-empty NetworkSpecifiers
and changing specifiers on the fly.

Test: ConnectivityServiceTest passes
Bug: 27533960
Change-Id: Ibd6b4efc861dc51689e46f3882ba859223411bf0
2017-04-03 17:46:35 +09:00
Daichi Hirono
c971eb5168 Merge "Process FuseAppLoop messages in Handler.Callback" into oc-dev am: cb9ceb3fd4
am: fd88a3aba7

Change-Id: I14919d6eef09fc3b4fc0f94faae2b6c8c1222abc
2017-04-03 07:07:03 +00:00
Daichi Hirono
fd88a3aba7 Merge "Process FuseAppLoop messages in Handler.Callback" into oc-dev
am: cb9ceb3fd4

Change-Id: I8708c1e60300c5384071106d9b3f75a534d1fbf6
2017-04-03 07:00:35 +00:00
TreeHugger Robot
cb9ceb3fd4 Merge "Process FuseAppLoop messages in Handler.Callback" into oc-dev 2017-04-03 06:55:04 +00:00
TreeHugger Robot
a06240021a Merge "Process FuseAppLoop messages in Handler.Callback" 2017-04-03 06:49:05 +00:00
Jeff Sharkey
60bca4e4bf Enforce PACKAGE_USAGE_STATS for usage data. am: 6df866a851
am: 979f227fb9

Change-Id: Ia3aaf773b4defb4b1399544ff7475cd4142f16aa
2017-04-03 06:27:05 +00:00
Jeff Sharkey
558b0dd418 Consistent dump() permission checking. am: fe9a53bc45
am: 020de02854

Change-Id: Iffbf78a7b48cea41ed4b0763f2452738e084225c
2017-04-03 06:26:04 +00:00
Jeff Sharkey
979f227fb9 Enforce PACKAGE_USAGE_STATS for usage data.
am: 6df866a851

Change-Id: I52d982ee864903ca93e889aa03f6315438dc6c4b
2017-04-03 06:19:57 +00:00
Jeff Sharkey
020de02854 Consistent dump() permission checking.
am: fe9a53bc45

Change-Id: I300f8bc07e1266b9e78f56d085cd458862176a85
2017-04-03 06:19:02 +00:00
TreeHugger Robot
5b01105ca3 Merge "Expose ConfigUpdater Intents in SystemApi" 2017-04-03 06:05:18 +00:00
Daichi Hirono
ea6e6e17a0 Process FuseAppLoop messages in Handler.Callback
Previously FuseAppLoop instantiates Runnable for each command, which
causes lots of instantiation and GC.

Test: CTS
Bug: 35229514
Change-Id: Ifea098e5ade044b1a954c0b714c5b3270a95cd1a
2017-04-03 05:03:03 +00:00
Jeff Sharkey
6df866a851 Enforce PACKAGE_USAGE_STATS for usage data.
Some system services are offering package usage data through both
public/system APIs and through dump() calls.  In principle, usage
data hould always be protected with PACKAGE_USAGE_STATS, so start
enforcing that.  (Otherwise if a user blocked PACKAGE_USAGE_STATS
access to an app, that app could still obtain the data via dump()
if they held the DUMP permission.)

Bottom line, let's respect the user's wishes.

Protecting the entire output like this is pretty blunt, but future
CLs can add more nuance to the output if desired.

Test: cts-tradefed run commandAndExit cts-dev -m CtsSecurityTestCases -t android.security.cts.ServicePermissionsTest
Bug: 32806790
Change-Id: I46173562713bea7d89e12a4313c78eb52ea8d77d
2017-04-02 22:29:07 -06:00
Jeff Sharkey
fe9a53bc45 Consistent dump() permission checking.
This change introduces new methods on DumpUtils that can check if the
caller has DUMP and/or PACKAGE_USAGE_STATS access.  It then moves all
existing dump() methods to use these checks so that we emit
consistent error messages.

Test: cts-tradefed run commandAndExit cts-dev -m CtsSecurityTestCases -t android.security.cts.ServicePermissionsTest
Bug: 32806790
Change-Id: Iaff6b9506818ee082b1e169c89ebe1001b3bfeca
2017-04-02 22:29:07 -06:00
Daichi Hirono
5c2688a861 Process FuseAppLoop messages in Handler.Callback
Previously FuseAppLoop instantiates Runnable for each command, which
causes lots of instantiation and GC.

Test: CTS
Bug: 35229514
Change-Id: Ifea098e5ade044b1a954c0b714c5b3270a95cd1a
2017-04-03 13:18:40 +09:00
Bill Yi
413476a2d4 Merge "Import translations. DO NOT MERGE" into stage-aosp-master am: 8f59f867f9 -s ours am: 14f8818989 -s ours
am: 5220e58299  -s ours

Change-Id: I5c32430cc7341934e7874d1b4715895b336846fb
2017-04-03 02:32:18 +00:00
Bill Yi
5220e58299 Merge "Import translations. DO NOT MERGE" into stage-aosp-master am: 8f59f867f9 -s ours
am: 14f8818989  -s ours

Change-Id: I6e42ae3f5cf5a704b1f3c350af378bd178ac6714
2017-04-03 02:25:51 +00:00
Bill Yi
14f8818989 Merge "Import translations. DO NOT MERGE" into stage-aosp-master
am: 8f59f867f9  -s ours

Change-Id: Ief3fa9c34e3a1959e193d35cea0b0ace7168411e
2017-04-03 02:18:48 +00:00
TreeHugger Robot
8f59f867f9 Merge "Import translations. DO NOT MERGE" into stage-aosp-master 2017-04-03 02:11:44 +00:00
Pankaj Kanwar
1ce83f009e Merge "Address API concerns for isConcurrentVoiceAndDataAllowed and OnReceiveUssdResponseCallback." 2017-04-03 01:31:40 +00:00
Roozbeh Pournader
4580130b09 Merge "Override bidi property of new emojis" into oc-dev am: 21a5edcc24
am: 09aef96840

Change-Id: I70a00e1bf2e3ffd2787796c7b1e473f12968dd6e
2017-04-03 00:33:40 +00:00
Roozbeh Pournader
09aef96840 Merge "Override bidi property of new emojis" into oc-dev
am: 21a5edcc24

Change-Id: Ie37451b8234f1e5c06bb20f1c26e8f832006f3e3
2017-04-03 00:27:42 +00:00
TreeHugger Robot
21a5edcc24 Merge "Override bidi property of new emojis" into oc-dev 2017-04-03 00:21:55 +00:00
Hugo Benichi
be5f0f197a Merge "ConnectivityService: log wakelock activity in dumps" am: db104b2367 am: 146914c0d5 am: bf1b181c63
am: 7346613f27

Change-Id: Id95860ab5d874f24f9fa510a44038ce05bed12f0
2017-04-03 00:07:16 +00:00
Hugo Benichi
7346613f27 Merge "ConnectivityService: log wakelock activity in dumps" am: db104b2367 am: 146914c0d5
am: bf1b181c63

Change-Id: Id4c980a2a1ef7f51b6a06c7c8636160437e99b84
2017-04-03 00:00:19 +00:00
Hugo Benichi
4c31b34d16 ConnectivityService: simplify WakeLock management
This patch simplifies wakelock management by acknowledging that only one
acquisition at most is in flight at any time. This allows to remove the
serial number associated with wakelock acquisition and to avoid double
release when regaining a default network.

Example of $ adb shell dumpsys connectivity logs:
  NetTransition WakeLock activity (most recent first):
    03-31 00:15:13.816 - RELEASE (EVENT_CLEAR_NET_TRANSITION_WAKELOCK)
    03-31 00:14:59.216 - ACQUIRE for NetworkAgentInfo [WIFI () - 101]
    03-31 00:09:05.799 - RELEASE (EVENT_EXPIRE_NET_TRANSITION_WAKELOCK)
    03-31 00:08:05.738 - ACQUIRE for NetworkAgentInfo [WIFI () - 100]

Test: watched wakelock section $ adb shell dumpsys connectivity while
      turning on and off Wifi (with no other network).
Bug: 36703718
Change-Id: I899b0816c0e41b3991d9540e9b9a604914ff673a
2017-04-03 08:54:54 +09:00
Hugo Benichi
bf1b181c63 Merge "ConnectivityService: log wakelock activity in dumps" am: db104b2367
am: 146914c0d5

Change-Id: I4d0430a6a5b3a1f97cdc4cf9590e5b0a798ae04f
2017-04-02 23:53:46 +00:00
Hugo Benichi
146914c0d5 Merge "ConnectivityService: log wakelock activity in dumps"
am: db104b2367

Change-Id: If08e0088ab25f1494aaf3a339a38e7a8e343d910
2017-04-02 23:47:15 +00:00
Hugo Benichi
db104b2367 Merge "ConnectivityService: log wakelock activity in dumps" 2017-04-02 23:40:27 +00:00
Jesse Evans
de7d306df8 Merge "Adds appropriate filtering for instant apps" 2017-04-02 16:09:37 +00:00
Bill Yi
5976525c03 Merge "Import translations. DO NOT MERGE" into stage-aosp-master am: 2c697884a3 -s ours am: d6cbc60edc -s ours
am: 6003b7dff2  -s ours

Change-Id: Id1bd20968e08716f37588f7ab8e1fecce000178a
2017-04-02 09:25:47 +00:00
Bill Yi
def5132e77 Merge "Import translations. DO NOT MERGE" into stage-aosp-master am: bcd194eb04 -s ours am: 4448f63145 -s ours
am: 481fbe66fc  -s ours

Change-Id: I15a6e70791de334ca68963e1ed8cb3a55dae493d
2017-04-02 09:24:42 +00:00
Bill Yi
9395e0dfa6 Merge "Import translations. DO NOT MERGE" into stage-aosp-master am: 1058478d5b -s ours am: c29576d8ab -s ours
am: 2dcedc156a  -s ours

Change-Id: I03997e6ac545f54549412b0836a7b22dbb9bb054
2017-04-02 09:23:26 +00:00
Bill Yi
e289cca256 Merge "Import translations. DO NOT MERGE" into stage-aosp-master am: 69dd99c741 -s ours am: 932a818776 -s ours
am: 83d85047bf  -s ours

Change-Id: I6f34bb4b7cc5565c6eece31ef40008820e1ab9b6
2017-04-02 09:22:18 +00:00
Bill Yi
99c17596bf Merge "Import translations. DO NOT MERGE" into stage-aosp-master am: e1a2ddeee8 -s ours am: 11a1d54f70 -s ours
am: bf317f15e0  -s ours

Change-Id: Ie6a8a4b5255225b6df489bc481c2c9bc0c49ed7a
2017-04-02 09:21:12 +00:00
Bill Yi
6003b7dff2 Merge "Import translations. DO NOT MERGE" into stage-aosp-master am: 2c697884a3 -s ours
am: d6cbc60edc  -s ours

Change-Id: I6d4593dd6e87a4da1518ee4ef397b3872c58660e
2017-04-02 09:17:29 +00:00
Bill Yi
4ec0aeb932 Merge "Import translations. DO NOT MERGE" into stage-aosp-master am: 45d02673c5 -s ours am: 6139220455 -s ours
am: d772966366  -s ours

Change-Id: I6a6f304ff3091187baa21ee7516c89653f3deca1
2017-04-02 09:17:29 +00:00
Bill Yi
481fbe66fc Merge "Import translations. DO NOT MERGE" into stage-aosp-master am: bcd194eb04 -s ours
am: 4448f63145  -s ours

Change-Id: I44a2fcad7ce27350d110263ce2083b489bb47762
2017-04-02 09:16:19 +00:00