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
Add @NonNull annotations as required by the automated review.
Bug: 126702338
Test: make checkbuild
Change-Id: I9057f06de8d7ea846af00d5cefa744d4206b4b63
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
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)
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
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
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
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
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
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
* changes:
Fix merge problems with cherry-picking "Add notification settings to backup&restore" change into pi-dev
DO NOT MERGE - Merge PPRL.190205.001 into master
The hidden api logger interface also receives the actual sampled value.
This is an intermediate step before a new logging method is added.
Test: m
Bug: 119217680
(cherry picked from commit 31bde16393)
Change-Id: I3345bdcdf57e1f60970c85572e503d7b33af7148
Merged-In: I707a2624a254a80391cdae277dd59daa503d055f
When recycling SomeArgs in pool, some fields are not set to null.
Which result potential memory leak as SomeArgs in pool still holds
the reference object.
To fix this issue, clear all args when recycling.
Change-Id: Ie730c3889da948c60ef746ddbe2e926d94ad7e06
Signed-off-by: Bin Chen <bin0515@gmail.com>
Signed-off-by: Wei Huang <hwbest.v@gmail.com>
On 9/28 CL https://googleplex-android-review.git.corp.google.com/5116913 was checked into pi-dev. Merge was bad(couple of lines were lost during merge).
https://b.corp.google.com/issues/35655737#comment34
Adding LOCK_SCREEN_ALLOW_PRIVATE_NOTIFICATIONS and LOCK_SCREEN_SHOW_NOTIFICATIONS to SETTINGS_TO_BACKUP array. This fixes apct/framework/presubmit test failure.
Bug: 35655737
Bug: 118674794
Test: presubmit unit tests
Change-Id: I2e9cc95e8827e72ef3c09910d4d3e089bde375e5
Merged-In: I421c7487955ee339f88e3957c973375d0f87e2ff
(cherry picked from commit 33a11bd0e3)
When touchpad capture is enabled, events still are received via
onGenericMotionEvent. As pointer capture sends events via
onCapturedPointerEvent, this patch changes the callback used by
captured touchpads to also be onCapturedPointerEvent.
Make events from a captured touchpad cause the device to leave touch
mode. Captured mice cause the device to exit touch mode through
the virtual dpad which is mapped to it due to being
derived from SOURCE_CLASS_TRACKBALL.
Test: Write an app that starts pointer capture on a device with a
touchpad. Events from touchpad should be received via
onCapturedPointerEvent.
Test: Using the captured touchpad in the first test should cause the
view to be focusable even when not in touch mode.
Change-Id: If6fa94c66f1d9395a13fd5f31f642567256dd818