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
* 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
Prevent crash if the database cannot be opened.
Guard not thread safe SQLiteStatement.
Test: atest com.android.server.accounts
Change-Id: Idab30703facacb469a568361998c59c039d3dd2a
Merged-In: I2af9074e50bddc5a1d18ea781cc6f56934f21302
If included in framework.jar, the interfaces conflict with any app that
needs to depend on them, including the NetworkStack.
Bug: 124033493
Test: atest FrameworksNetTests NetworkStackTests
Change-Id: I2db9f87b7154130726d4700b241d55b041635d98
Merged-In: I0ecae20d514bf888f3a80331f19369ceb1c52aa3
Remove the stubbed TimeZoneDetectorService. Priorities
dictated that it not be worked on so it has never been
used.
This reverts commit 7fb88c3928.
Bug: 112827764
Bug: 78217059
Test: build / boot
Change-Id: I39ed2fc7f8de8d4b2c0d883cd264cc126579af27
Merged-In: I39ed2fc7f8de8d4b2c0d883cd264cc126579af27
(cherry picked from commit f4894d391b)
Define the DynamicAndroid with AIDL.
Add a java implementation.
Start a service instance in the system server.
Add a permission test.
Bug: 122015653
Test: Build & Test on a pixel phone with following command \
./frameworks/base/services/tests/runtests.py -e class com.android.server.DynamicAndroidTest
Merged-In: I2e54b6b71fac4a4c5a9c9c25ce6bdac74cddcfb7
Change-Id: I2e54b6b71fac4a4c5a9c9c25ce6bdac74cddcfb7
Currently, if AppStandbyController is enabled after some listeners have
already registered, the listeners will be told that the system is in a
state of parole even though AppStandbyController thinks it's not in
parole. This change informs AppIdleStateChangeListeners when
AppStandbyController's enabled state changes as well so that they can be
in the correct state.
I also removed the call to setAppIdleEnabled() in onBootPhase() since
updateSettings() is called right afterwards and that also calls
setAppIdleEnabled().
Bug: 112329453
Test: atest AppStandbyControllerTests
also check logs to confirm that NetworkPolicyManagerService and
JobSchedulerService's listeners switch from ON to OFF when the system is
ready.
Change-Id: I88bc293c70b459f54f75f92126ad306d6ab8d9b7
Merged-In: I88bc293c70b459f54f75f92126ad306d6ab8d9b7
The JUnit filter com.android.test.filters.SelectTest is a generic test
filter that can supersede |-e package| and |-e class| options of
AndroidJUnitRunner.
The com.android.server.wm.test.filters.CoreTestsFilter extends SelectTest
filter to filter out Window Manager Service releated tests in
FrameworksCoreTests.
Bug: 122451194
Test: Can select some tests from WmTests.
$ adb shell am instrument -w \
-e filter com.android.test.filters.SelectTest \
-e selectTest com.android.test.filters.,com.android.server.wm.DummyTests \
com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner
Test: CoreTestsFilter works for FrameworksCoreTests.
$ adb shell am instrument -w \
-e filter com.android.server.wm.test.filters.CoreTestsFilter \
-e selectTest_verbose true \
com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Change-Id: Ic72637997bf17debef914e2596049f6cf3e753de
Merged-In: Ic72637997bf17debef914e2596049f6cf3e753de
This test is ~10% flaky everywhere but git_master. Marking as flaky on aosp-master, git_pi-dev-plus-aosp, and git_stage-aosp-master. I will roll back this change on git_master after it merges there.
Bug: b/114098433
Change-Id: I4d8365de4a4e2112848c9721836ca2289f7e2804
Test: Build and run StatusBarTest/_NotifyBuilder
Test: Set notification sound and vibration
Test: Make notification with + button, and cancel it with - button quickly
TEst: Check notification not vibrating
Change-Id: Ia21f45c165f863ed4143da3707b492c89e58387c
Merged-In: Ia21f45c165f863ed4143da3707b492c89e58387c
Signed-off-by: Seungho Lee <shiny.lee@samsung.com>
When setting a password from DPM.resetPassword(), the actual quality of the
password was not passed to LockSettingsService (instead, the minimum required
quality was passed which is often UNSPECIFIED). As a result, during FRP we
would see inconsistent state and skip it.
Bug: 110172241
Test: Set credential via DPM.resetPassword(), factory reset device to trigger FRP, verify FRP shows.
Change-Id: I54376f60ac53451ace22965d331b47cd8c2e614e
Change 1/2. Change 2/2 will setup the class loader namespace for
shared libraries.
This change sets up shared libraries class loaders for applications
and for dexopt.
bug: 111174995
Test: DexoptUtilsTest, device boots
Exempt-From-Owner-Approval: PS1 was approved by owner, PS2 is a build fix.
(cherry picked from commit 8d144eb8bd)
Merged-In: Ie9a2b4eaa85cda59951703433f7a2d03bc12095d
Change-Id: I76383308418485ad6739f8a404d02c2771e4afe4
The version information about time zone formats is moving
to a new libcore class TzDataSetVersion.
Bug: 119026403
Test: build
Change-Id: I6f80f16f9cd7e37fc04d75c89483497f4f00a6a5
Also made sure we can handle null classpaths.
Test: atest -p services/core/java/com/android/server/pm/dex
Bug: 111336847
Change-Id: Idabf3fb9a09a0764e805679ac29cd8455e8dc267
According to the mockito FAQ use of thenReturn(mock(...)) is
forbidden. This fixes that pattern in the setup for
ZenModeFilteringTest.
https://github.com/mockito/mockito/wiki/FAQ#can-i-thenreturn-an-inlined-mock-
Test: runtest systemui-notification
Bug: 119063276
Change-Id: Ic62b18063e5837240255e1dd0f5e0feb450f22cb
This attribute will stabilize ScreenDecorWindowTests since this test
needs activity is shown even on locked device.
Fixes: 119041502
Bug: 119037340
Test: On sleeping DUT.
atest FrameworksServicesTests:com.android.server.wm.ScreenDecorWindowTests
Change-Id: I98ef00ba32c792c396f3abba447dd20628902492
Merged-In: I8fc2683ad65e627c4e002b767fd23a4dd9f16223
Don't record anything if any of the classloaders in the chain are
unsupported. (This is slightly unsubtle, but matchs the existing
behavior - see below.) We can't correctly DexOpt secondary dex files
in this case anyway.
Also discard any existing records of unsupported classloaders on read.
Currently this is almost a no-op: BaseDexClassLoader doesn't notify if
there are any unknown class loaders, since
5ac512c07cfa80160e240c359349c1390a20a981, so the new check is
reachable only if there's some sort of mismatch. But I'm going to
change that soon.
Tightened up visibility a bit too.
Bug: 111336847
Test: atest --test-mapping services/core/java/com/android/server/pm/dex
Change-Id: I6af5620a73be7b6440cbafdf6a5c1da1082cbdd4
When native layer reports onDnsEvent, netId, eventType and
returnCode are available only in NetdEventListenerService, but
not for the clients who register event on it.
Thus, extend the callback to give clients more detail on the
network the look up was performed on and the result of the
lookup.
Bug: 113916551
Test: 1. runtest frameworks-net
2. runtest frameworks-services -c com.android.server. \
net.watchlist.NetworkWatchlistServiceTests
Change-Id: If7beecea50e1baf18cb5c6775ad3ecb1a60b312a
Until b/113616538 is fixed, a test class without FlakyTest, can be included in
a presubmit test mapping suite unexpectedly. Mark these 3 classes as FlakyTest
for now:
ActivityManagerServiceTest
AssistDataRequesterTest
AppErrorDialogTest
This test becomes unstable and still needs to be fixed before it can run in
presubmit:
TaskPositioningControllerTests
Bug: 117880789
Test: none
Change-Id: I3ed29bcbd30e34d6fd97169ac2913fbf312d4f70
onBlockedStatusChanged is intruduced for network blocked status.
The changes in this patch are:
- Test onBlockedStatusChanged which tells apps whether the
network is blocked.
- Fixed the tests which is affected by the order changed in
onAvailable.
Test: as follows
- runtest frameworks-net
- runtest -x NetworkPolicyManagerServiceTest.java
Bug: 74575553
Change-Id: I383c037ed895ef69c478dc3cff69fb1e27c42845