1b2f37401818b04cf4908d5aa9017eab44fe5662 |
|
28-Mar-2018 |
Rubin Xu <rubinxu@google.com> |
Tweak SystemUpdatePolicy APIs * Introduce a FreezePeriod class that represents a single freeze period and is defined by two MonthDay instances. * Add ERROR_UNKNOWN to ValidationFailedException * Make SystemUpdatePolicy final * Document SystemUpdatePolicy.InstallationOption and add IntDef to getType() Test: runtest frameworks-services -c com.android.server.devicepolicy.SystemUpdatePolicyTest Test: cts-tradefed run cts-dev -m CtsDevicePolicyManagerTestCases -t com.android.cts.devicepolicy.DeviceOwnerTest#testSystemUpdatePolicy Test: gts-tradefed run gts-dev --module GtsGmscoreHostTestCases --test com.google.android.gts.devicepolicy.DeviceOwnerTest#testSystemUpdatePolicy Bug: 74976911 Change-Id: I85cf636c3a98c97bd03b7b296c3130028051a791
/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/SystemUpdatePolicyTest.java
|
404efc93ae2caeafe613e1127f64ff393433f06a |
|
07-Mar-2018 |
Rubin Xu <rubinxu@google.com> |
Calculate timestamp using local time zone in system update unit tests Replace hardcoded timestamp for test dates with values calculated from local time zone, because the SystemUpdatePolicy API assumes dates and timestamps are in local time zone. Also tweak test dates to avoid daylight saving time boundaries. Bug: 74335646 Test: runtest frameworks-services -c com.android.server.devicepolicy.SystemUpdatePolicyTest Change-Id: I532cd485a8ddd8b2a652fa90dee0deb932954662
/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/SystemUpdatePolicyTest.java
|
658d7bbf1d5bedd435d8a90f7b9d841dc7cc513e |
|
07-Feb-2018 |
Rubin Xu <rubinxu@google.com> |
Add System API for system update clients Introduces the concept of installation option and new system API for system update clients to convert a complex SystemUpdatePolicy into a simple action and an effective time, under any given time. This should abstract away the current complexity in SystemUpdatePolicy and all system update clients only need to query the current installation option and act on it, without the need to understand or implement other logic related to the policy. Test: gts-tradefed run gts-dev --module GtsGmscoreHostTestCases --test com.google.android.gts.devicepolicy.DeviceOwnerTest#testSystemUpdatePolicy --ignore-business-logic-failure Test: runtest frameworks-services -c com.android.server.devicepolicy.SystemUpdatePolicyTest Bug: 72939648 Bug: 64813061 Change-Id: I92537c7b99103a807d8adcbe2dc01b42a9740068
/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/SystemUpdatePolicyTest.java
|
29b9a7d1f4168d888ee2f4a0ff3882523f655e6b |
|
11-Jan-2018 |
Rubin Xu <rubinxu@google.com> |
Add freeze period support in SystemUpdatePolicy Freeze period is defined as a pair of calendar dates (recurring annually) during which the system should block any incoming system updates, including security patches. They are set on top of existing system udpate policy types (automatic, windowed, postpone) such that outside the freeze periods existing policy semantics will still apply. They are created to allow admin to keep their device fleet from any destabilizing changes during critical period of the year, for example during Christmas sales period. Device Owner can set several freeze periods, although to prevent the device from not receiving OTAs indefinitely, each single freeze period is restricted to be at most 90 days, and adjacent freeze periods need to be at least 60 days apart. To properly enforce these restrictions, any freeze periods the device previously experienced is tracked by DevicePolicyManager and are validated against any new policy. This is to deal with corner cases such as the admin repeatedly set a short but overlapping freeze period on a rolling basis, hence bypassing the 90-day freeze period restriction. Test: runtest -c com.android.server.devicepolicy.SystemUpdatePolicyTest frameworks-services Bug: 64813061 Change-Id: I2864192797dc194edd9c183b881da6cfe3fdba5e
/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/SystemUpdatePolicyTest.java
|