The method getPackageOptimizationInfo will access IO which
may spend 3~10+ms, so post the log action to the logger thread
to avoid blocking other important UI operations.
ActivityRecord#reportFullyDrawnLocked is removed because fully
drawn won't be accepted if the window is not drawn, so the
invocation reportActivityLaunched in it is a dead code.
Currently reportActivityLaunched will be called from
ActivityRecord#onWindowsDrawn.
Bug: 236677935
Test: atest ActivityMetricsLaunchObserverTests
Change-Id: Ic64b9722de4edb0a41cc7370ed0ed2f7019bbdec
These numbers are useful in adjusting JS policy, so we should persist
them so we can use them after the device reboots.
Bug: 258701271
Test: atest FrameworksServicesTests:JobStoreTest
Change-Id: Iee8fb699ea5b4c01446ce8fd8f806203effbe4ce
Adding a user property to dictate the behaviour to redirect
the contact calls to the parent user profile, thereby using
the parent's contacts database to serve its calls
Bug: 253004929
Test: atest UserManagerServiceUserPropertiesTest
Change-Id: Ifc81c067893aceab3afd8bf20fb7d931e3a529f9
There can be 2 reasons that we need to apply compatible scale to a
window:
1. The app doesn't support large screen. We would layout the window as
if it is on a small display. And then we need to scale its window up
to match the display.
2. We put a running app into a container that the size doesn't fit. We
need to down-scale the app so that it can fit the container.
The scaling of case 2 is also known as size-compat-scale which is fully
controlled at the server side. The client shouldn't know about it. And
this CL refines the naming.
Fix: 258393096
Bug: 254187021
Test: presubmit
Change-Id: Ifbd2ca725bed231d9e6dd8190df3dc773d4402b7
Make it possible to persist jobs in a separate file for each calling
UID. This makes it easier to persist changes to jobs of individual apps
instead of having to write the entire set of jobs every time something
changes.
Read times decrease by 2-5% when there are many jobs for each app but
increase by 33-35% when there are only a few jobs per app.
Write times increase by 5% (for many jobs) to 64% (for few jobs) for a
full write but decrease by 1% (for few jobs) to 38% (for many jobs) when
there are partial writes.
JobScheduler is read-once, write-many system, and apart from migration
from between monolithic and split file architectures, should mostly be
in the partial write scenario.
The code is disabled for now and will be turned on separately.
Performance Test Results:
(With monolithic file):
com.android.frameworks.perftests.job.JobStorePerfTests#testPersistedJobReading_fewJobs_badRTC
testPersistedJobReading_fewJobs_badRTC_mean (ns): 4632075
testPersistedJobReading_fewJobs_badRTC_median (ns): 4568177
com.android.frameworks.perftests.job.JobStorePerfTests#testPersistedJobWriting_manyJobs
testPersistedJobWriting_manyJobs_mean (ns): 38133928
testPersistedJobWriting_manyJobs_median (ns): 37794691
com.android.frameworks.perftests.job.JobStorePerfTests#testPersistedJobReading_manyJobs_goodRTC
testPersistedJobReading_manyJobs_goodRTC_mean (ns): 46015412
testPersistedJobReading_manyJobs_goodRTC_median (ns): 45553494
com.android.frameworks.perftests.job.JobStorePerfTests#testPersistedJobWriting_fewJobs
testPersistedJobWriting_fewJobs_mean (ns): 4903462
testPersistedJobWriting_fewJobs_median (ns): 4914740
com.android.frameworks.perftests.job.JobStorePerfTests#testPersistedJobReading_fewJobs_goodRTC
testPersistedJobReading_fewJobs_goodRTC_mean (ns): 4432127
testPersistedJobReading_fewJobs_goodRTC_median (ns): 4395469
com.android.frameworks.perftests.job.JobStorePerfTests#testPersistedJobWriting_delta_manyJobs
testPersistedJobWriting_delta_manyJobs_mean (ns): 42629601
testPersistedJobWriting_delta_manyJobs_median (ns): 42282061
com.android.frameworks.perftests.job.JobStorePerfTests#testPersistedJobWriting_delta_fewJobs
testPersistedJobWriting_delta_fewJobs_mean (ns): 5070691
testPersistedJobWriting_delta_fewJobs_median (ns): 4914688
com.android.frameworks.perftests.job.JobStorePerfTests#testPersistedJobReading_manyJobs_badRTC
testPersistedJobReading_manyJobs_badRTC_mean (ns): 45184576
testPersistedJobReading_manyJobs_badRTC_median (ns): 44922660
(With split files):
com.android.frameworks.perftests.job.JobStorePerfTests#testPersistedJobReading_fewJobs_badRTC
testPersistedJobReading_fewJobs_badRTC_mean (ns): 6350549
testPersistedJobReading_fewJobs_badRTC_median (ns): 6232605
com.android.frameworks.perftests.job.JobStorePerfTests#testPersistedJobWriting_manyJobs
testPersistedJobWriting_manyJobs_mean (ns): 39963524
testPersistedJobWriting_manyJobs_median (ns): 39628389
com.android.frameworks.perftests.job.JobStorePerfTests#testPersistedJobReading_manyJobs_goodRTC
testPersistedJobReading_manyJobs_goodRTC_mean (ns): 43956702
testPersistedJobReading_manyJobs_goodRTC_median (ns): 43569874
com.android.frameworks.perftests.job.JobStorePerfTests#testPersistedJobWriting_fewJobs
testPersistedJobWriting_fewJobs_mean (ns): 8250152
testPersistedJobWriting_fewJobs_median (ns): 8090939
com.android.frameworks.perftests.job.JobStorePerfTests#testPersistedJobReading_fewJobs_goodRTC
testPersistedJobReading_fewJobs_goodRTC_mean (ns): 6006753
testPersistedJobReading_fewJobs_goodRTC_median (ns): 5869193
com.android.frameworks.perftests.job.JobStorePerfTests#testPersistedJobWriting_delta_manyJobs
testPersistedJobWriting_delta_manyJobs_mean (ns): 26459508
testPersistedJobWriting_delta_manyJobs_median (ns): 26147607
com.android.frameworks.perftests.job.JobStorePerfTests#testPersistedJobWriting_delta_fewJobs
testPersistedJobWriting_delta_fewJobs_mean (ns): 4958038
testPersistedJobWriting_delta_fewJobs_median (ns): 4881588
com.android.frameworks.perftests.job.JobStorePerfTests#testPersistedJobReading_manyJobs_badRTC
testPersistedJobReading_manyJobs_badRTC_mean (ns): 44476839
testPersistedJobReading_manyJobs_badRTC_median (ns): 43993285
Bug: 255352252
Test: atest JobSchedulerPerfTests:JobStorePerfTests
Test: atest FrameworksServicesTests:JobStoreTest
Change-Id: Ib7bfa2c974f7663dea79d707c9e1b2bd53ef89b3
The installation of sdk extension version that does not exist should
fail. Since extension 5 exist now, the test started failing.
This CL changes the non-existent extension version to a higher value to
ensure it does not exist, to ensure installation failure in the test.
Bug: 257466496
Test: atest FrameworksServicesTests:com.android.server.pm.parsing.PackageParserLegacyCoreTest#testUsesSdk
Change-Id: I5fb3ceed2b6db3dd5a5154df941918b97cb52204
The initial version of UserVisibilityMediator was relying on
UserManagerService to get the state of the current users (full and
profiles), which caused a cyclic dependency between these 2 objects.
This CL breaks that dependency by replicating such state into
UserVisibilityMediator (and adding methods to start / stop users).
There's still room for improvement (just look at the TODOs :-), but
they'll be handled on future CLs, so this one minimizes the changes
(both in the main code and unit tests).
Test: atest FrameworksMockingServicesTests:com.android.server.pm.UserManagerServiceTest UserVisibilityMediatorMUMDTest UserVisibilityMediatorSUSDTest UserControllerTest
Test: atest CtsMultiUserTestCases:android.multiuser.cts.MultipleUsersOnMultipleDisplaysTest
Test: adb shell dumpsys user --visibility-mediator
Bug: 244644281
Change-Id: I8daa751dbc6fd4c38edd21ab9ef7b7c7ad13c8ff
Increasing timeout for waiting for the test app to report job start /
stop events and elevating broadcast priority to foreground.
Test: atest FrameworksServicesTests:BackgroundRestrictionsTest
Bug: 254836785
Change-Id: I49cd4d259a361c8b059b521adf2746fc656dbf7a
This is a part of restructuring the way display service
updates the power state of the system. All the proximity related logic
has been abstracted out to a new class. As an attempt to keep this
simple and contained, no new logic has been added.
Bug: 241308364
Test: atest com.android.server.display
Change-Id: I45bb8cff3f6da805a816a9c3eef7428e7f7fbf7d
* Add sendHint API to HintManagerService and PerformanceHintManager
* Plumb relevant calls through the existing implementation
* Extend existing tests to cover new API calls
* Update the relevant build files to use power API v4
Bug: b/243973548
Test: atest PerformanceHintNativeTestCases
Test: atest FrameworksCoreTests:android.os.PerformanceHintManagerTest
Test: atest HintManagerServiceTest
Change-Id: Ice7ed8f32e877bd845afad77fcc6ae16f1a1b78c
Test: atest FingerprintAuthenticationClienTest
Test: Verified fingerprint hal is now sent cancellation signal.
Fixes: 258101086
Change-Id: I4b2f5ea1f7fe94b62071fb51b53224b1ca5756d0
Merged-In: I4b2f5ea1f7fe94b62071fb51b53224b1ca5756d0