Commit Graph

84531 Commits

Author SHA1 Message Date
Chiachang Wang
f397b39442 Merge "Update description based on API feedback" 2019-03-06 00:49:20 +00:00
Treehugger Robot
0b3fe647ef Merge "Fix that the update to v1 signed version fails if apk verity is enabled" 2019-03-05 21:33:25 +00:00
Treehugger Robot
fd46a0aaeb Merge "add missing annotation for CarrierIdentifier" 2019-03-05 19:07:19 +00:00
Nicolas Geoffray
ca1c6419c3 Merge "Remove calls to VMRuntime methods that are no-ops." 2019-03-05 15:37:27 +00:00
Nicolas Geoffray
51297d72e6 Remove calls to VMRuntime methods that are no-ops.
Test: m

(Cherry-picked from: 5735cc7a11)
Change-Id: If2e6afe21f6efcb141f3a4428ff9154b68f08a1d
Merged-In: Ibe849f56f5fe8af1415dc6c85b484d0edca518ec
2019-03-05 14:12:19 +00:00
Chiachang Wang
4349dc08c9 Update description based on API feedback
Bug: 126883311
Test: Build pass
      atest NetworkStackTests
Change-Id: If3d21829bbe98d125215abe96247ca7d5a66d1f3
2019-03-05 20:31:57 +08:00
Jordan Liu
56bd70db86 Merge "Add NonNull and Nullable annotations" 2019-03-04 20:18:50 +00:00
Amit Mahajan
36791ef41e Merge "Adding new APN type for Mission Critical Services." 2019-03-04 18:23:30 +00:00
Treehugger Robot
70c0efdd86 Merge "Add @Nullable to new method" 2019-03-04 11:43:48 +00:00
Treehugger Robot
7c447498c3 Merge "LocalLog: add overloaded dump and reverseDump methods." 2019-03-04 01:46:23 +00:00
chen xu
bc8411cf3a add missing annotation for CarrierIdentifier
Bug: 126702740
Test: Build
Change-Id: I4e1be23ed2d9f016c9c2b71812bbeba24fd090f0
2019-03-03 15:15:30 -08:00
Treehugger Robot
a3f1b3f15d Merge "Fixed all APIs not meeting API review requirement" 2019-03-03 04:27:32 +00:00
Treehugger Robot
63f516d1ee Merge "getConnectionOwnerUid: Clarify documentation" 2019-03-02 03:42:22 +00:00
Treehugger Robot
1957b624ab Merge "Add @NonNull and @Nullable annotations to VpnService#Builder." 2019-03-02 03:41:57 +00:00
Treehugger Robot
4daca39083 Merge "Fix Automated API Review: InetAddresses" 2019-03-02 03:05:18 +00:00
Amit Mahajan
fd3ee5783e Adding new APN type for Mission Critical Services.
Test: build
Bug: 124447962
Change-Id: I9f608badd363703394432640dc892a4465660b6d
2019-03-01 16:52:17 -08:00
Jack Yu
8eb6ca8354 Fixed all APIs not meeting API review requirement
To address the API review feedback provided by
the API council.

Bug: 126702995
Bug: 126701710
Bug: 126702357
Bug: 126701113
Bug: 126701239
Bug: 126700713
Bug: 126700064
Test: Manual
Change-Id: I4b902c1fc2c09133022b05dacdda8964436205d2
2019-03-01 14:37:47 -08:00
Varun Anand
6e81d01e91 Add @NonNull and @Nullable annotations to VpnService#Builder.
Bug: 126699070
Test: n/a
Change-Id: Ief0066636ca6ae4fefbdf70b8dfdfacf2a44e0e6
2019-03-01 11:06:47 -08:00
Treehugger Robot
9886350a69 Merge "Add euicc privileged actions and extras." 2019-03-01 17:39:49 +00:00
Dongwon Kang
948d11ffa6 Merge "Make Uri.toSafeString() also handle 'rtsp'" 2019-03-01 17:09:29 +00:00
Adam Vartanian
882eb1867c Add @Nullable to new method
Add @Nullable to a newly-added method, as requested by API council.

Bug: 126698875
Test: make
Change-Id: I2e72ea457b5adaceea70d9908bb8e2cac2e0d963
2019-03-01 15:07:06 +00:00
Paul Duffin
fe38d35ba7 Fix Automated API Review: InetAddresses
Add @NonNull annotations as required by the automated review.

Bug: 126702338
Test: make checkbuild
Change-Id: I9057f06de8d7ea846af00d5cefa744d4206b4b63
2019-03-01 14:06:18 +00:00
Patrick Huang
3b3a74436c Add euicc privileged actions and extras.
Bug: 122769846
Test: Test on phone
Change-Id: Ifcf6575c3c65cb38e8787e32bc04b0e4532f7170
Merged-In: Ifcf6575c3c65cb38e8787e32bc04b0e4532f7170
2019-02-28 19:51:10 -08:00
Varun Anand
93dfa10da4 Merge "Remove ConnectivityManager and its usages from NetworkStatsService." 2019-03-01 03:06:06 +00:00
eunyoung.moon
9c0038ebd3 Make Uri.toSafeString() also handle 'rtsp'
Bug: 123669012
Test: atest CtsNetTestCases:android.net.cts.UriTest
Change-Id: I082bdbd55589f6b99a8cf5fc68c897477f2fa792
Signed-off-by: Eunyoung Moon <eunyoung.moon@lge.com>
2019-02-28 16:53:40 -08:00
Varun Anand
d33cbc6f5f Remove ConnectivityManager and its usages from NetworkStatsService.
NSS needed it for getting VpnInfo[], NetworkState[] and
activeLinkProperties which it used to query via ConnectivityManager.

For VpnInfo[], this was racy as NSS may ignore intermediate changes to a
VPN's underlying networks. See http://b/123961098 for more context.

It may also lead to deadlocks b/w ConnectivityService and
NetworkStatsService. See http://b/126245192 for more info.

This change will ensure that NSS is never contending on any of
ConnectivityService locks.

Bug: 123961098
Bug: 126245192
Bug: 120145746
Test: atest FrameworksNetTests
Change-Id: Id1da446b54d95ee68ed14079107b1a10318bcf8b
Merged-In: I57e117bb4e9efe491b19d6b5a479f2d58d1c58e6
2019-03-01 00:10:52 +00:00
Jordan Liu
260189ceab Add NonNull and Nullable annotations
Fixes: 126700810
Fixes: 126699781
Fixes: 126701115
Fixes: 126701034
Fixes: 126702858
Test: No behavior change
Change-Id: Ia590d660fbf5ed261ca2c44eed390397fe1ffba2
2019-02-28 13:48:02 -08:00
David Brazdil
96dd06a151 Merge "Move ApplicationInfo to params in AppComponentFactory" 2019-02-28 17:14:25 +00:00
Treehugger Robot
5eae14aa54 Merge "Fix broken javadoc links" 2019-02-28 13:34:52 +00:00
David Brazdil
c5a0a075a7 Move ApplicationInfo to params in AppComponentFactory
Tweak AppComponentFactory.instantiateClassLoader() API to accept
ApplicationInfo as an argument instead of an independent getter.

Bug: 124800390
Bug: 111342996
Test: atest CtsClassLoaderFactoryPathClassLoaderTestCases
Test: atest CtsClassLoaderFactoryInMemoryDexClassLoaderTestCases
Merged-In: I4a4d5af842446a5060083c88a0ac5bec014c0c55
Change-Id: I4a4d5af842446a5060083c88a0ac5bec014c0c55
(cherry picked from commit 33bd343596)
2019-02-28 11:19:20 +00:00
Jeff Vander Stoep
b58d3fea26 getConnectionOwnerUid: Clarify documentation
Test: build
Bug: 117573763
Change-Id: Ia899a541987b9c72a83287ed69fc47ab4d38f680
2019-02-27 13:37:37 -08:00
Chiachang Wang
90882258ed Fix broken javadoc links
Bug: 123683994
Test: Verify with javadoc
Change-Id: I4b1b936e3cf86104ace5fcb6829778710801f2d5
2019-02-27 17:18:40 +08:00
Treehugger Robot
1b9adbfdd1 Merge "Use public APIs instead of Conscrypt ones" 2019-02-27 09:01:03 +00:00
Irina Dumitrescu
5155a2d7e4 Add @NonNull annotation to set proxy on VPN parameter.
Test: manual
Bug: 124883120
Change-Id: Ifb4bd98a69a006220b1a824033395fc6f12ea6ce
2019-02-27 01:06:00 +00:00
Adam Vartanian
19254043ae Use public APIs instead of Conscrypt ones
Use the equivalent public APIs on SSLContext instead of reaching into
OpenSSLContextImpl, except for the one place where a
Conscrypt-specific API is needed.

Bug: 123738844
Bug: 119752589
Test: cts -m CtsLibcoreTestCases
Test: atest android.net.SSLCertificateSocketFactoryTest
Change-Id: I61aebac4ad713b8ce53a47e72def0c537b4ab1c9
2019-02-26 09:28:35 +00:00
Treehugger Robot
a0e4349794 Merge "Add more test case and some clean up" 2019-02-26 06:20:24 +00:00
Chiachang Wang
95489ca49e Add more test case and some clean up
Bug: 120452078
Test: atest NetworkStackTests
Change-Id: Ifb981ccdaa7818bf2bebec98e91979007222910b
2019-02-26 11:32:18 +08:00
Treehugger Robot
c5ea003bbb Merge "Fixes for touchpad capture" 2019-02-23 01:27:07 +00:00
Tyler Gunn
016982ae2f Merge "Change data types on CallIdentification API." 2019-02-22 21:13:28 +00:00
Tyler Gunn
b3bdb7c36c Change data types on CallIdentification API.
Per API council feedback update the call identification name, details,
description and app name to use CharSequence.

Test: Update apis, run tests.
Bug: 123241094
Merged-In: I42df17506535c1dd598ffd61a44cb0d0440b8159
Change-Id: I42df17506535c1dd598ffd61a44cb0d0440b8159
2019-02-22 11:18:05 -08:00
Neil Fuller
ee15067180 Merge "Update RulesManagerService after APEX files" 2019-02-22 18:32:13 +00:00
Neil Fuller
a1ae02519d Update RulesManagerService after APEX files
Context
=======

The "time zone updates via APK" feature was implemented in O-MR1 to enable
devices to take time zone updates via an APK update and without needing
an OTA. RulesManagerService is an important part of the time zone updates via
APK feature. When RulesManagerService was implemented things were simple; there
was a copy of time zone data in /system. A new (optional) copy was introduced
in /data that could be managed / updated by the RulesManagerService.
Since there were only two copies the /system copy was referred to as the
"system" data.

With the introduction of the runtime APEX and time zone data APEX things
have become more complicated. Android devices can have time zone data in
several places:

1 The copy in /system/usr/share/zoneinfo/ is partially complete and remains
  for legacy usecases, e.g. binaries that "know" about the /system path and
  cannot be updated, or binaries which run before /apex paths are mounted.

2 The copy in /apex/com.android.runtime/ is a complete set of time zone
  data that can be used by libraries on the device.

3 The copy in /apex/com.android.tzdata/ is the "overlay" copy for use when
  the time zone data APEX can be updated. For devices that can take APEX
  updates it will be present and is expected to start with the same version as
  present in /apex/com.android.runtime. Note: Nothing in the code *requires*
  this copy to be present but it is expected to be present in most cases.

RulesManagerService is being kept around for devices that may not have the
capability of updating their APEX files but which still want to update time
zone data without taking an OTA. It is assumed that RulesManagerService will
*only* be turned on in these situations and *not* when the time zone
data in /apex/com.android.tzdata/ might actually be updated independently of
the copy in /apex/com.android.runtime/.

The RulesManagerService therefore adds the fourth copy of the data that *could*
be present:

4 The copy /data/misc/zoneinfo/ managed by RulesManagerService.

Important libraries / binaries on device know about all 4 copies and
prioritize them in order 4, 3, 2, 1. i.e. the libraries will use the
first copy of data found in that order.

In scenarios where RulesManagerService is disabled, 4 will not be present
and therefore 3 will be used (or 2 if 3 is also not present).

In scenarios where RulesManagersService is enabled, 4 is present iff an
APK update has been received. It is assumed that *if* /apex/com.android.tzdata/
is present, it contains the same version of tz data as in
/apex/com.android.runtime/, will never be updated, and can therefore
be ignored by RulesManagerService.

The changes
===========

This commit and others in the same topic do the following:

1) Change RulesManagerService references to "system" data to "base" data in a
   valiant attempt to limit confusion until it can be removed.
2) Switch RulesManagerService over from using the data in
   /system/usr/share/zoneinfo/ as base data to the data in
   /apex/com.android.runtime/.  As part of this change, the RulesManagerService
   can now use the tz_version file to identify the version of tzdb in "base"
   rather than reading the header of the tzdata file, so that is done
   here too.
3) Update imports neccessary to meet pre-upload check requirements.

Note: tzdatacheck, an independent binary that manages time zone data
after OTA, was updated to use /apex/com.android.runtime/ instead of
/system/usr/share/zoneinfo/ in commit c6a2737e0861472d1726ed472708d7762ab1e802.

Bug: 119293618
Bug: 113373927
Test: atest FrameworksCoreTests:android.app.timezone
Test: atest FrameworksServicesTests:com.android.server.timezone
Test: CTS: run cts-dev -m CtsLibcoreTestCases -t libcore.libcore.timezone.ZoneInfoDBTest
Test: CTS: run cts-dev -m CtsLibcoreTestCases -t libcore.libcore.icu.TimeZoneIntegrationTest
Change-Id: Idabe245c7ad337938c202b1796ce9d89ec68bbd6
2019-02-22 15:43:39 +00:00
Nandana Dutt
2badc1e434 Merge "Add a new error code for disallowing concurrent bugreports" 2019-02-22 08:43:48 +00:00
Sooraj Sasindran
9f0115bb6e Merge "Allow UiAutomation to adopt the shell permission indentity" 2019-02-22 00:41:29 +00:00
Svet Ganov
c2841ec7fe Allow UiAutomation to adopt the shell permission indentity
For testing we often need to run shell commands. This can be done
today via running a shell command from an instrumentation test
started from the shell. However, this requires adding shell commands
which are not in the API contract, involve boilerplate code, require
string parsing, etc.

This change allows an instrumentation started from the shell to
adopt the shell UID permission state. As a result one can call APIs
protected by permissions normal apps cannot get by are granted to
the shell. This enables adding dedicated test APIs protected by
signatures permissions  granted to the shell.

Test: cts-tradefed run cts-dev -m CtsUiAutomationTestCases
          -t android.app.uiautomation.cts.UiAutomationTest#testAdoptShellPermissions

bug:80415658

Merged-In: I4bfd4b475225125512abf80ea98cd8fcacb6a1be
Change-Id: I4bfd4b475225125512abf80ea98cd8fcacb6a1be
2019-02-21 19:59:14 +00:00
Treehugger Robot
c1e55147c9 Merge "Add feature flag for Dynamic Android" 2019-02-21 17:32:25 +00:00
Nandana Dutt
cfb3d4856e Add a new error code for disallowing concurrent bugreports
BUG:123571915
Test: manual
Change-Id: I8787137c3cfeb33aacfa439f6eab1a668977e572
2019-02-21 16:17:54 +00:00
Paul Duffin
5d70cdf262 Update backwards compatibility support for android.test.base
Previously, the plan was for android.test.base to be removed from the
bootclasspath in P, i.e. in the same release as org.apache.http.legacy.
Any apps that targeted < P were to have the android.test.base library
added to their app classpath in order to maintain backwards
compatibility.

Unfortunately, it was not possible to remove android.test.base from P
and instead it is being removed from Q. This update prepares for that
by updating the backwards compatibility support and its tests to add
the android.test.base library to apps that target < Q.

The affected code is only used at runtime when
REMOVE_ATB_FROM_BCP=true.

Bug: 73711752
Test: atest FrameworksCoreTests with and without REMOVE_ATB_FROM_BCP=true
Change-Id: I76b40dad14193cd174114a351b1350c18d647bed
2019-02-21 10:42:12 +00:00
Hugo Benichi
d7be4c70c3 LocalLog: add overloaded dump and reverseDump methods.
Both dump() and reverseDump() only need a single PrintWriter parameter.
This patch adds overloaded versions of these methods with that single
parameter. Callers can slowly migrate to these simpler methods over
time.

Test: Compiled.
Change-Id: I503df2af1d8115f715238f94551343fda1e951cb
2019-02-21 16:34:08 +09:00
Howard Chen
0d958bbf1d Add feature flag for Dynamic Android
Bug: 119647479
Test: flashall and check the option exists.

Merged-In: I46efd27a6880dde4bc69aa457a6f3b0fdd9ce5cd
Change-Id: I46efd27a6880dde4bc69aa457a6f3b0fdd9ce5cd
2019-02-21 15:05:20 +08:00