Add a mechanism for suggesting the "manual" time zone setting to the
TimeZoneDetectorStrategy, e.g. for the settings app to use. This
involves various changes / renames to TimeZoneDetectorStrategy to
introduce a distinction between 3 things:
1) General detection code, applicable for anything that changes device
time zone.
2) Phone detection code, applicable for setting the device time zone
from phone signals.
3) Automatic detection code, applicable for setting the device time zone
automatically (of which telephony signals is currently the only example,
but could be joined by new things in future).
Adds tests for the new ManualTimeZoneSuggestion and makes improvements
to the existing tests for PhoneTimeZoneSuggestionTest.
Test: atest android.app.timezonedetector
Test: atest com.android.server.timezonedetector
Bug: 140712361
Change-Id: I9c3a18e47b157cccabda74855e5c91b45fa93b92
* changes:
DO NOT MERGE: Fixes NPE when preparing app data during init
Support privileged apps installed in APEX.
Support non-privileged APKs in APEX.
Refactors initial directory scan to be dryer
Add a new time zone detection service. Much of the code is from
frameworks/opt/telephony with some changes for naming, threading and
to modify the interaction with the "Callback" class.
Overall goal:
Implementing the service in the system server means it will be easier to
add new time zone detection logic unrelated to telephony in future.
Bug: 140712361
Test: atest com.android.server.timezonedetector
Test: atest android.app.timezonedetector
Change-Id: I89505fc4fecbd3667b60f8e1479b8f177eaa60ae
Merged-In: I89505fc4fecbd3667b60f8e1479b8f177eaa60ae
(cherry picked from commit 3e3b5405b6c5e77a640ad9450eb1cac5b7c80ff1)
Make TimeDetectorService / Strategy consistent with time zone detection
code, improve logging and generally tidy up.
1) Turn off debug logging / shorten log tags.
2) Add LocalLog for recording time changes.
3) Move to using FgThread for calls that can be done async / change
synchronization model (responsibility moves from service to strategy).
4) Move responisibility for determining current auto-time state to the
strategy.
5) Rename the strategy test to be correct(!)
Bug: 140712361
Test: atest services/tests/servicestests/src/com/android/server/timedetector/TimeDetectorServiceTest.java
Test: atest services/tests/servicestests/src/com/android/server/timedetector/SimpleTimeDetectorStrategyTest.java
Change-Id: I4902f6b360c168ec16a1595359153488a310a91a
This change collapses a bunch of manual calls to scanDir with a map and
a loop. This makes things a little more readable and easier to update
going forward.
Bug: NA
Test: boots without issue.
Merged-In: I81fb7a9474894d0bceecb6b0ef7a64d047a40c14
Change-Id: I81fb7a9474894d0bceecb6b0ef7a64d047a40c14
Symptom:
If a snoozed notification is cancelled and new notification that has
same key is registered, the system continue to snooze the
notification. But the notification won't be notified when the snoozing
period expires.
Root cause:
SnoozeHelper doesn't update NotificationRecord if the existing record
has already been cancelled. SnoozeHelper continue to use existing
cancelled record. So SnoozeHelper doesn't repost notification when the
snoozing period expires.
Solution:
SnoozeHelper updates NotificationRecord even if the existing record
has been cancelled.
Fixes: 140462813
Change-Id: I4b58aed20eec08819e36dac9dda250ac046205b8
Before this change there are a various components that set the system
clock by directly calling AlarmManager.setTime(). This change exposes a
new method on TimeDetector to use when setting the device time manually
(e.g. via settings) and modifies some callers to use it.
The intent is to later restrict the number of distinct processes that
can manipulate the device system clock directly so that all time changes
go through the time detector service, which can enforce policy, log
the reasons for changes, and so on.
Bug: 140712361
Test: atest com.android.server.timedetector
Change-Id: I9300dba868ed61249d0848b0dd4b953996161bda
Merged-In: I9300dba868ed61249d0848b0dd4b953996161bda
(cherry picked from commit e376756b0c0e3164300c3fd624f9221181e82553)
In preparation for adding more tests to LockSettingsService, convert the
existing JUnit3 tests to JUnit4 like the tests in the
recoverablekeystore subdirectory.
(cherry-picked from commit e7178a2358a457922ecb35c5f418903a3de363ab)
Test: atest FrameworksServicesTests:CachedSyntheticPasswordTests \
FrameworksServicesTests:LockSettingsServiceTests \
FrameworksServicesTests:LockSettingsShellCommandTest \
FrameworksServicesTests:LockSettingsStorageTests \
FrameworksServicesTests:LockscreenFrpTest \
FrameworksServicesTests:PasswordSlotManagerTests \
FrameworksServicesTests:SP800DeriveTests
Test: atest FrameworksServicesTests:SyntheticPasswordTests \
FrameworksServicesTests:WeaverBasedSyntheticPasswordTests
Bug: 145144304
Merged-In: Iaf280718d4c28966b60c76dda90a4674a24f26c6
Change-Id: Iaf280718d4c28966b60c76dda90a4674a24f26c6
This allows doing more work except killing the app upon change override.
Up to one listener per change id is allowed. Currently intended for
SeLinux usecase only (for data relabeling, see http://ag/9635653).
Test: atest FrameworksServicesTests
Bug: 143539591
Change-Id: Ib2110a31d4f521fc8054620a9edf902fa5bba501
* changes:
Add multi-user test for the general non-staged case
Increase timeout in testNativeWatchdogTriggersRollback
Fix flaky testEnableRollbackTimeoutFailsRollback test
Wait for available rollbacks in RollbackTest.
Include NewRollbacks in result of getAvailableRollbacks.
Rename RollbackData to Rollback.
Remove INSTALLED_USERS extra from ACTION_PACKAGE_ENABLE_ROLLBACK.
Update to new RollbackUtils.sendCrashBroadcast API.
Extend ROLLBACK_COMMITTED broadcast for the multi-user case
Fix NullPointerException.
Cleanup some obsolete TODOs and unused code.
Test Native Watchdog triggers RollbackManager rollback
Uninstall testapps before running SecondaryUserRollbackTest
delete ENABLING rollback if we can't get session info for it.
Add test for rollback of userdata with multiple rollbacks
Load rollback data in RollbackManagerServiceImpl constructor.
Use "commit" for rollbacks instead of "execute".
Add TestApi to block the RollbackManagerHandlerThread.
Use Slog in RollbackManager, not Log
Make setRequestDowngrade @TestApi
Migrate RollbackTest and StagedRollbackTest to cts utils
Add .apex suffix to apex files during validation
Add host side test for secondary user rollback
Reduce ENABLE_ROLLBACK timeout to 0 for timeout test.
This allows the RecoverySystemService to be instantiated outside of its
lifecycle events and mocked connections to be injected during the tests.
Test: atest FrameworksServicesTests:RecoverySystemServiceTest
Merged-In: If75632b8dc16c916f3fa90853d6c1863b75d2c64
Change-Id: If75632b8dc16c916f3fa90853d6c1863b75d2c64
Because "Data" doesn't add anything useful to the name.
Also prefer the variable name "rollback" over "data" and "rd" for
instances of Rollback.
Test: builds.
Change-Id: Ibaa3326660345a763c67c573368ba1da11c0a830
Merged-In: I5ae3866753d6badcdf019525b40522937568dee5
This changes RollbackManagerServiceImpl to use the list of installed users
that is passed in to snapshotAndRestoreUserData for the purpose of snapshotting.
With this change, it is no longer necessary for the list of installed users to be
added as an extra to the ENABLE_ROLLBACK intent, so that extra
(EXTRA_ENABLE_ROLLBACK_INSTALLED_USERS) is removed.
Bug: 139181444
Test: atest RollbackTest
Test: atest AppDataRollbackHelperTest
Exempt-From-Owner-Approval: Already approved in
https://googleplex-android-review.git.corp.google.com/c/platform/frameworks/base/+/9168506
Change-Id: Iff42f4e5b2d02d1124d64a5fedc659a41cddd5fc
Merged-In: Iffd63977a7498e3cba20d2039af623c921d38f57
Allow for empty time suggestions in the TimeDetectorService. The empty
suggestions are currently ignored but are likely to be used in future
time detector strategy implementations.
Bug: 140712361
Test: atest android.app.timedetector.PhoneTimeSuggestionTest
Test: atest com.android.server.timedetector
Change-Id: Ifb219702fa8bc53665a0d74752e06d851d86f8bb
This change adds much needed unit tests to the scanPackageOnlyLI method
in PackageManagerService. As part of the change, the abi-deriving /
parsing code that is heavily device state dependant has been extracted
into an interface that can be mocked.
Test: atest ScanTests
Bug: 137881067
Bug: 137961986
Exempt-From-Owner-Approval: Already approved in
https://googleplex-android-review.git.corp.google.com/c/platform/frameworks/base/+/7844466
Change-Id: If99330c63658ff21c799712f99c9bb5eba35b960
Merged-In: Ib0b17bffa02570451bd2ad6a649791832c9edd65
Naming rule for aidl module is changed to make using unstable AIDL module more explicit
So, to use unstable version AIDL module, use "-unstable" suffix version
And also, module name without any suffix means latest frozen version.
But wrt modules for C++ and NDK, module name with latest frozen version
is not available for now.
In b/139280289, more background is explained
Test: m
Bug: 139280289
Change-Id: Ib38e2cb114cc373ef50652f421ddaff9b4fbe5b9
Merged-In: Ib38e2cb114cc373ef50652f421ddaff9b4fbe5b9