Commit Graph

26244 Commits

Author SHA1 Message Date
Adam Bookatz
b9be8d8277 Merge "UserTypeFactory configurable setMaxAllowed" 2022-11-14 19:21:18 +00:00
Riddle Hsu
81d66e9d77 Merge "Move fully drawn metric log out of wm lock" 2022-11-14 16:22:01 +00:00
Cosmin Băieș
fc03fbd025 Merge changes from topic "revert-20437706-revert-20313761-IME tracking - hide-HZXGDCCPOZ-XOCVITMXNR"
* changes:
  Revert^2 "Input latency & reliability tracking - hide flow"
  Revert^2 "Input latency & reliability tracking"
2022-11-14 14:36:36 +00:00
Martynas Petuška
88275cca27 Merge "wipeData/wipeDevice API!" 2022-11-14 11:20:07 +00:00
Jigar Thakkar
f38f9e6271 Merge "Add new UserProperty to enable cross profile contact access" 2022-11-14 10:59:37 +00:00
Iris Yang
ff0748833b Merge "Show a warning toast when PiP is blocked in the streamed display" 2022-11-14 09:09:16 +00:00
Iavor-Valentin Iftime
c9275cea51 Merge "Check for FG mic capability for OP_RECEIVE_EXPLICIT_USER_INTERACTION_AUDIO" 2022-11-14 08:23:09 +00:00
Riddle Hsu
8820f0cff5 Move fully drawn metric log out of wm lock
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
2022-11-14 15:44:50 +08:00
TreeHugger Robot
fe90cf17fd Merge "Tweaks to reduce flakiness of job related test" 2022-11-14 02:19:02 +00:00
Yuncheol Heo
0c6df6e492 Merge "Revert "Start on cover display if folded"" into tm-qpr-dev am: 3fa8a61e5e am: f371c654bd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20447994

Change-Id: Ia6ca8a17175285b09bda1c9f00d3f8c9fbea1636
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-12 18:37:32 +00:00
Yuncheol Heo
f371c654bd Merge "Revert "Start on cover display if folded"" into tm-qpr-dev am: 3fa8a61e5e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20447994

Change-Id: I712827c88577af47f636dd98b316e13ec1f532b8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-12 18:04:38 +00:00
Yuncheol Heo
3fa8a61e5e Merge "Revert "Start on cover display if folded"" into tm-qpr-dev 2022-11-12 17:22:23 +00:00
Tiger Huang
d548304ed6 Merge "Refine the naming about compatible scale" 2022-11-12 15:05:39 +00:00
Martynas Petuška
faab3ea858 wipeData/wipeDevice API!
Bug: 242193913
Test: Trigger wipeData via TestDPC

Change-Id: I1f03fe90b960e8a464aee0041d2514894cdb8495
2022-11-12 11:24:09 +00:00
Kweku Adams
b1f303c7a9 Merge "Actually persist network byte values." 2022-11-12 03:01:20 +00:00
Matt Buckley
b091fb85de Merge "Add support for ADPF HintSession sendHint to JNI" 2022-11-11 17:54:42 +00:00
Kweku Adams
4b138af66a Actually persist network byte values.
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
2022-11-11 17:13:30 +00:00
Jigar Thakkar
5ab5bb8a5e Add new UserProperty to enable cross profile contact access
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
2022-11-11 11:50:54 +00:00
Cosmin Băieș
44ff0dd9eb Revert^2 "Input latency & reliability tracking - hide flow"
d638a60aae

Test: atest CtsSystemApiSignatureTestCases:android.signature.cts.api.system.SignatureTest#testRuntimeCompatibilityWithCurrentApi
Change-Id: I1ee7224b40fa3f4b744311eb4145fa13a87d835a
2022-11-11 12:22:55 +01:00
Tiger
bcbd60c45c Refine the naming about compatible scale
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
2022-11-11 11:19:06 +00:00
Marcell Kovacs
d113168197 Revert "Start on cover display if folded"
This reverts commit fbdde76342.

Reason for revert: b/258704479

Change-Id: I8f40d5bb8885f1abf06e67f65bfcec3cdfc03d24
2022-11-11 02:20:32 +00:00
Kweku Adams
68c7fbf8fa Merge "Add logic to persist jobs in separate files." 2022-11-10 19:03:15 +00:00
Felipe Leme
857e47c8a9 Merge "UserVisibilityMediator refactoring, step 1." 2022-11-10 18:34:16 +00:00
TreeHugger Robot
4be7fe434d Merge "Fix rounded corners cropping for letterbox" 2022-11-10 18:24:23 +00:00
Kriti Dang
1d414a4f5f Revert "DO NOT MERGE: Revert "Removing the initialising the mode with system pref mode."" am: 2a4e18f705
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20139183

Change-Id: Iabc079c9bed5c2c9d7d2e0cb905603e0cc54e2e5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-10 17:41:08 +00:00
Felipe Leme
53ee75642f Merge "Moved user visibility callback to its own listener." 2022-11-10 17:32:05 +00:00
Kriti Dang
b1f110a768 Merge "Revert "DO NOT MERGE: Revert "Removing the initialising the mode with system pref mode.""" into tm-qpr-dev 2022-11-10 17:14:55 +00:00
Cosmin Băieș
1619482379 Revert^2 "Input latency & reliability tracking"
1f4fd2d21e

Change-Id: I096456e9cd7449836b373ff392f2e9df58b3e661
2022-11-10 17:53:07 +01:00
Kweku Adams
d20d4fa0c3 Add logic to persist jobs in separate files.
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
2022-11-10 16:37:55 +00:00
Pascal Mütschard
581fdec050 Merge changes from topic "revert-20313761-IME tracking - hide-HZXGDCCPOZ"
* changes:
  Revert "Input latency & reliability tracking"
  Revert "Input latency & reliability tracking - hide flow"
2022-11-10 13:22:35 +00:00
Pascal Mütschard
1f4fd2d21e Revert "Input latency & reliability tracking"
Revert submission 20313761-IME tracking - hide

Bug: b/258637227
Reason for revert: Breaks CtsSystemApiSignatureTestCases android.signature.cts.api.system.SignatureTest#testRuntimeCompatibilityWithCurrentApi
Reverted Changes:
Icf9ab3fc0:Input latency & reliability tracking - hide flow
I1096564d5:Input latency & reliability tracking - hide flow
I14e009250:Input latency & reliability tracking - hide flow
Ic32e36b2d:Input latency & reliability tracking
I56f96dc6b:Input latency & reliability tracking
I73dec2e9e:Input latency & reliability tracking

Change-Id: Ia376a1624fb6abf937eb2a335aa75cb3ca9831d8
2022-11-10 13:11:27 +00:00
Pascal Mütschard
d638a60aae Revert "Input latency & reliability tracking - hide flow"
Revert submission 20313761-IME tracking - hide

Bug: b/258637227
Reason for revert: Breaks CtsSystemApiSignatureTestCases android.signature.cts.api.system.SignatureTest#testRuntimeCompatibilityWithCurrentApi
Reverted Changes:
Icf9ab3fc0:Input latency & reliability tracking - hide flow
I1096564d5:Input latency & reliability tracking - hide flow
I14e009250:Input latency & reliability tracking - hide flow
Ic32e36b2d:Input latency & reliability tracking
I56f96dc6b:Input latency & reliability tracking
I73dec2e9e:Input latency & reliability tracking

Change-Id: I0d0ce41e3a4f0d19ff482c2f5ab4884b5f758134
2022-11-10 13:11:27 +00:00
Gurpreet Singh
4da4060a36 Merge "Fix testUsesSdk test to use higher extension version." 2022-11-10 12:56:31 +00:00
Gurpreet Singh
4dd1cbed4b Fix testUsesSdk test to use higher extension version.
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
2022-11-10 12:52:17 +00:00
Cosmin Băieș
36d3884041 Merge changes from topics "IME tracking - hide", "IME tracking"
* changes:
  Input latency & reliability tracking - hide flow
  Input latency & reliability tracking
2022-11-10 10:19:00 +00:00
Felipe Leme
a2c65f11be UserVisibilityMediator refactoring, step 1.
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
2022-11-09 11:07:20 -08:00
Joshua Mccloskey
2a0e839955 Merge "Cancel side auth on power press" into tm-qpr-dev am: 28b3fee28a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20414320

Change-Id: I8ca6cb172b9b296908478c72f7d4af92a8631bb3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-09 18:20:15 +00:00
Joshua Mccloskey
28b3fee28a Merge "Cancel side auth on power press" into tm-qpr-dev 2022-11-09 18:10:23 +00:00
Suprabh Shukla
0752a9c1a3 Tweaks to reduce flakiness of job related test
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
2022-11-09 09:51:19 -08:00
Piotr Wilczyński
59373e4958 Merge "Start on cover display if folded" into tm-qpr-dev am: 1ca2f8ec7d am: b05da12b20
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19536894

Change-Id: I735f8828eb3eabddf4badd0913d34d94d8d7fc37
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-09 16:40:57 +00:00
Piotr Wilczyński
b05da12b20 Merge "Start on cover display if folded" into tm-qpr-dev am: 1ca2f8ec7d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19536894

Change-Id: I395635c84fdcb5fcffcc673858e8bcac9cd97fce
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-09 16:08:17 +00:00
Piotr Wilczyński
1ca2f8ec7d Merge "Start on cover display if folded" into tm-qpr-dev 2022-11-09 15:33:35 +00:00
Ankita Vyas
3d1d415843 Merge "Add new UserProperty InheritDevicePolicy" 2022-11-09 11:17:52 +00:00
Ming-Shin Lu
991dd46e48 Merge "Freezing IME insets when screen turned-off" 2022-11-09 10:24:28 +00:00
Jackal Guo
54917317f1 Merge "Enforce the calling identity" 2022-11-09 05:56:18 +00:00
Rupesh Bansal
c9aa96111f Introducing DisplayPowerProximityStateController
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
2022-11-09 03:58:27 +00:00
Joshua Mccloskey
a3608b5624 Merge "Cancel side auth on power press" 2022-11-09 03:34:47 +00:00
Matt Buckley
354cc0a140 Add support for ADPF HintSession sendHint to JNI
* 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
2022-11-09 01:49:41 +00:00
Achim Thesmann
cc5a41a7ee Merge "Refactor tests." 2022-11-09 00:45:22 +00:00
Joshua McCloskey
7a40885b22 Cancel side auth on power press
Test: atest FingerprintAuthenticationClienTest
Test: Verified fingerprint hal is now sent cancellation signal.
Fixes: 258101086

Change-Id: I4b2f5ea1f7fe94b62071fb51b53224b1ca5756d0
Merged-In: I4b2f5ea1f7fe94b62071fb51b53224b1ca5756d0
2022-11-08 21:22:30 +00:00