1. Add globalBatterySaverEnabled in PowerSaveState, which stores
the real battery saver mode, not the one for specific service.
2. Add "mRestrictBackgroundChangedInBsm" and
"mRestrictBackgroundBeforeBsm" to restore the mRestrictBackground
if necessary.
3. If user toggles the data saver when battery saver is on, don't
restore the data saver when battery saver is off.
Bug: 34693888
Test: FrameworksServicesTests
Change-Id: Ic50c1cae3fb110a228e59e5d1fd04c164e4b7274
When all AppWindowTokens belonging to a Task are closing, it should
not be considered for orientation. Likewise, if a task is moving to
the bottom, it should also not be considered.
Change-Id: Ie387457c413d5360afbb0ac8edb112f81feab81b
Fixes: 35699615
Test: bit FrameworksServicesTests:com.android.server.wm.TaskStackTests#testClosingAppDifferentStackOrientation
Test: bit FrameworksServicesTests:com.android.server.wm.TaskStackTests#testMoveTaskToBackDifferentStackOrientation
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test CtsServicesHostTestCases android.server.cts.ActivityManagerAppConfigurationTests#testTaskCloseRestoreOrientation
Test: cts/hostsidetests/services/activityandwindowmanager/util/run-test CtsServicesHostTestCases android.server.cts.ActivityManagerAppConfigurationTests#testTaskMoveToBackOrientation
Test: Launch DisableScreenshotsActivity, go to recents, make sure
content is blue. Reopen activity from home, make sure starting
window is blue.
Bug: 31339431
Change-Id: I29689774c3cdcb784d8f5bfa4f947a6f35b91e01
Test: runtest frameworks-services -c
com.android.server.wm.TaskSnapshotControllerTest
Test: Launch DisableScreenshotsActivity, go to recents, make sure
content is white.
Bug: 31339431
Change-Id: I329925d2fca389e561da3389a67fe888b5bb1033
Test: Turn off work, lock and unlock device with PIN/password/pattern,
turn on work and now you get a screen lock prompt.
Test: runtest frameworks-services -c com.android.server.LockSettingsServiceTests
Change-Id: I0c6946af4ffb1546ffbd4d80c11fa4b8ab5555bc
When device is provisioned, we delete all files from /data/preloads
except file_cache. We should do best effort to keep file_cache during
the first config_keepPreloadsMinDays. After that,
persist.sys.preloads.file_cache_expired is set to 1, which indicates
that cache can be deleted when additional storage space is requested.
Bug: 34690396
Test: Manual + RetailDemoModeServiceTest
Change-Id: Ie584a9dd6689bcc5e6b3cb448e95dfe5f73d2eeb
A few methods were incorrectly ORing instead of ANDing the frontline
security check. Fixed and added tests.
Test: runtest frameworks-services -c com.android.server.NetworkScoreServiceTest
Change-Id: I20531ad5a8df6fe9b9e2225198be25a2a070b603
- Uid, not user id
- unspecified importance really does mean 'don't override'
Change-Id: Ia60aade179f70cd5d5278eed41c707b9ab6590e0
Fixes: 36007628
Fixes: 36355913
Test: manual, runtest systemui-notification
In order to speed up loading time when scrolling through it
in recents. They will be used in recents in the next CL. Also, we
use JPG instead as loading JPG is much faster than PNG.
Test: TaskSnapshotPersisterLoaderTest
Test: TaskSnapshotCacheTest
Bug: 34829962
Change-Id: I4c74b26969ae459bd3b1a42707011a49f425abd9
TouchLatency is needed by test TouchLatencyJankTestWear
UiBench is needed by test UiBenchJankTests
Details about test configs changes are tracked in doc
https://docs.google.com/document/d/1EWUjJ7fjy8ge_Nk0YQbFdRp8DSHo3z6GU0R8jLgrAcw/edit#
Bug: 35882476
Test: local test
make -j32 TouchLatency TouchLatencyJankTestWear && \
tradefed.sh run template/local --template:map test=TouchLatencyJankTestWear \
--test-tag testname --log-level-display VERBOSE
make -j32 UiBenchJankTests UiBench && \
tradefed.sh run template/local --template:map test=UiBenchJankTests \
--test-tag testname --log-level-display VERBOSE
Change-Id: I63f23e3a21ad1343607953958fb7bb0a5fb8c343
This will help in identifying the last procStateSeq for which AMS
notified NPMS about the process state change.
Bug: 27803922
Test: runtest -c com.android.server.am.ActivityManagerServiceTest frameworks-services
Change-Id: I741a8ffe31de92070f3ebbc9c4f95fc1c0a340cd
The default display is used by some tests that exercise features only
functional only on the default display (like policy rotation). This CL
makes this display not get removed with the created test displays and
ensures no collision in id space from a previous test run (done in the
test setup).
Change-Id: Ia14b9c023c779d263283fe8c7b512dca17ff312f
Fix: 36385757
Test: bit FrameworksServicesTests:com.android.server.wm.StackWindowControllerTests#testRemoveContainer_deferRemoval
New apps should create their own channels.
Not using channels will silently fail.
STOPSHIPS:
Throw to provide better feedback for developers.
Delete the default channel for all apps that target O.
Test: runtest systemui-notification
Change-Id: Ic93f103efe397f563eaaf1c2e7d8bf9093b2b2e1
Replace the existing Vibrator APIs with a new class to encapsulate the
haptic effect information, and add the ability to control the vibration
strength.
Test: cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.cts.VibratorTest
cts-tradefed run commandAndExit cts-dev -m CtsOsTestCases -t android.os.cts.VibrationEffectTest
runtest systemui-notification
Manual testing with $T/google_experimental/users/michaelwr/Vibrator
Bug: 30961353
Change-Id: Idbb9864a7b084c85e7b7de3257a0e6b40d9d91d6
The intent is for this not to cause any behaviour changes, just to
make it easier to see what is going on with the code.
Permissions are checked in DevicePolicyManagerService. All calls to
CertificateMonitor are privileged.
Test: runtest -x frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java
Test: cts-tradefed run cts-dev --module CtsDevicePolicyManagerTestCases
Change-Id: I98224087315a62234732f08b53fe91884be86386
Let's have several separate contexts instead of doing strange things
with package names in one monolithic context representing every single
user on the device at once, sometimes multiple times in the same call.
Syntax looks like:
runAsCaller(callerContext, dpms, (dpm) -> {
assertSomething(dpm.doSomething(caller, param));
});
When a caller calls into DevicePolicyManager here's what happens:
PRE
- a new DevicePolicyManager is created with the caller context
- service context callingIdentity is saved
- the callingUid, callingPid, and callingPermissions are added to the service context
TEST
- client-side test code interacts with DevicePolicyManager using the caller context
- server-side coder under test runs as DevicePolicyManagerService using the service context
POST
- service context callingIdentity is restored to what it was before the test.
This should be easier to reason about.
Test: runtest -x frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/DevicePolicyManagerTest.java
Test: cts-tradefed run cts-dev --module CtsDevicePolicyManagerTestCases
Change-Id: I148e3f298b0a958639ce261e9cf91f6eb49fae4d
There is some flakiness in View#onConfigurationChanged callback -
if ViewRootImpl receives config update earlier than ActivityThread,
it may not detect the configuration change and skip inner updates.
Also now ViewRootImpl assumes that it receives the global config as
a param, but instead it gets merged config from WM. This means that
ViewRootImpl#sConfigCallbacks was sending incorrect values to the
recipients.
This CL switches to sending global and override configuration to the
client separately. Also in case if there is a corresponding activity,
it first updates it and waits for update callback to ViewRootImpl.
This way global config and override config for activity will always
be set first and resources will be updated before inner state of
ViewRootImpl is updated.
Bug: 35870157
Bug: 34164473
Test: android.server.cts.ActivityManagerDisplayTests
Test: testOnMovedToDisplayCallback
Change-Id: Ic9e7541cf25ecfac6ec90e48f7efb0ece91f657e
- Allow apps to delete notification groups (which cascade to delete all
channels therein)
- Allow apps to get their groups, so they know what they might want to
delete
- Don't throw if someone tries to delete something that already doesn't
exist.
Change-Id: I5f6e25497c5da1e57b52737586e86097332f88f9
Fixes: 36245468
Fixes: 36127382
Test: runtest systemui-notification, cts