Commit Graph

18528 Commits

Author SHA1 Message Date
TreeHugger Robot
f22b790260 Merge "Restrict some OpEntry#* methods for apps targeting R." 2020-05-28 09:47:27 +00:00
TreeHugger Robot
a00402bb70 Merge "Remove InstantAppResolverTests for migration to CTS" into rvc-dev am: f37b09335f am: 38a9ac0ff4 am: 538f254eec am: a9196432f5
Change-Id: Ifd8ca2bb20d50a7011d03bf876c00775a00f8cf7
2020-05-28 01:29:26 +00:00
TreeHugger Robot
a9196432f5 Merge "Remove InstantAppResolverTests for migration to CTS" into rvc-dev am: f37b09335f am: 38a9ac0ff4 am: 538f254eec
Change-Id: I3b694a86cb51bb019993de0ac3710a3a0322928e
2020-05-28 01:10:06 +00:00
TreeHugger Robot
f37b09335f Merge "Remove InstantAppResolverTests for migration to CTS" into rvc-dev 2020-05-28 00:23:16 +00:00
Julia Reynolds
b39d72b8a6 Merge "Clarify conversation policy" into rvc-dev am: 1e8ce29af7 am: 8dc7491d51 am: 1075523e84 am: 1c6b59868a
Change-Id: I23a846a71354c9c6eb26234ac6206820294590e2
2020-05-27 21:38:47 +00:00
Julia Reynolds
1c6b59868a Merge "Clarify conversation policy" into rvc-dev am: 1e8ce29af7 am: 8dc7491d51 am: 1075523e84
Change-Id: Id090a288435134f7fe8ab50ed58ee2b0d44419ed
2020-05-27 21:18:41 +00:00
Julia Reynolds
1e8ce29af7 Merge "Clarify conversation policy" into rvc-dev 2020-05-27 20:43:59 +00:00
Collin Fijalkovich
fd92d2fac3 Merge "Add performance counters to cacheinfo dumps." into rvc-dev am: 4edffac782 am: 23e5f201c8 am: 959b44ba0b am: cf0702af73
Change-Id: I8459abf3d6f654023d4cce5b881b382893c7302f
2020-05-27 19:11:20 +00:00
Collin Fijalkovich
cf0702af73 Merge "Add performance counters to cacheinfo dumps." into rvc-dev am: 4edffac782 am: 23e5f201c8 am: 959b44ba0b
Change-Id: Ie19567b510ec47ecc4fdec0ec4412beadbbc2502
2020-05-27 18:49:25 +00:00
Collin Fijalkovich
4edffac782 Merge "Add performance counters to cacheinfo dumps." into rvc-dev 2020-05-27 18:24:04 +00:00
Julia Reynolds
2fcfe23f79 Clarify conversation policy
Test: make
Fixes: 157482114
Change-Id: Icb6993a4c2c651465cadfa31c1d1915b7352994c
2020-05-27 12:47:10 -04:00
Louis Chang
f3639b8692 Merge "Do not always report configuration change to activity" into rvc-dev am: e500c6773b am: b29e0c2dc7 am: 731bdebe1c am: 84fd155147
Change-Id: I3170b111104ad5afeb868371bc390799d2bf185a
2020-05-27 05:13:43 +00:00
Louis Chang
84fd155147 Merge "Do not always report configuration change to activity" into rvc-dev am: e500c6773b am: b29e0c2dc7 am: 731bdebe1c
Change-Id: Ib1789b838fa2e36a638a82e297d839a156d1e7d3
2020-05-27 04:49:41 +00:00
Louis Chang
e500c6773b Merge "Do not always report configuration change to activity" into rvc-dev 2020-05-27 04:17:14 +00:00
Collin Fijalkovich
88aa314afa Add performance counters to cacheinfo dumps.
Tracks the number of hits, misses, refreshes, and invalidations on a
per-cache basis, and makes that information available through dumpsys
cacheinfo.

Bug: 157175501
Test: adb shell dumpsys cacheinfo
Change-Id: Icabdd82acda2edc54d787d0a2d15a33ba18fd668
2020-05-26 18:47:42 -07:00
Artur Satayev
ec8727b453 Restrict some OpEntry#* methods for apps targeting R.
Partial revert of Ie4a2cb155c40d46c52d44e0f53c05d52a8a9b523.

Bug: 156307884,156254238
Test: m
Change-Id: I6fd0d4a010987170c2da258d331ac3143686ffe7
2020-05-26 16:09:25 +01:00
Neil Fuller
29867f046d Merge "Be more defensive around invalid tzids" am: f60c302dad am: 96c57398b4
Change-Id: If8695ee257155eaedc901aa797f1939eab0c721e
2020-05-26 10:54:50 +00:00
Neil Fuller
96c57398b4 Merge "Be more defensive around invalid tzids" am: f60c302dad
Change-Id: I08e1daaf9dd0a26017b18c984eb6d4093c46ed46
2020-05-26 10:36:28 +00:00
Neil Fuller
f60c302dad Merge "Be more defensive around invalid tzids" 2020-05-26 10:20:09 +00:00
Neil Fuller
26fe60a188 Be more defensive around invalid tzids
Add checks during boot in case the persist.sys.timezone property is set
to a bad ID.

This can happen in the rare case of a mainline rollback: i.e. if a device has
been set to a new ID and then the update is rolled back. Using GMT as a
fallback probably works without this change (it does in java.util.TimeZone),
but relies on all code, including native code that uses
persist.sys.timezone directly, knowing to interpret a bad ID as "GMT".
This commit makes that choice more explicit and defensive.

This change also removes the possibility of IOException, which is never
thrown, from some ZoneInfoDb methods.

Bug: 155738410
Test: boot with a valid id, verify persist.sys.timezone is unchanged
Test: boot with an invalid id set,  verify persist.sys.timezone is "GMT"
Merged-In: I6dc0f4f81848efbbaec6a11a62014471a0ef01fd
Change-Id: I6dc0f4f81848efbbaec6a11a62014471a0ef01fd
Exempt-From-Owner-Approval: Approved / landed internally
2020-05-26 10:19:53 +00:00
Stanislav Zholnin
9e3a623fac resolve merge conflicts of 25a656d916 to master
Change-Id: Ie6353043b4abcaccea368a0ee961f65f12ec397c
2020-05-25 20:46:02 +00:00
Stanislav Zholnin
e4f7ef8190 Merge "Remove UidAtomTests from presubmit due to failures." into rvc-dev am: c1846a1a65 am: 5a3280af45
Change-Id: I49aa667a556ea110ccda7a662fe5a7f401d9a964
2020-05-25 20:11:29 +00:00
Stanislav Zholnin
dc84372155 Merge "Remove UidAtomTests from presubmit due to failures." into rvc-dev am: c1846a1a65
Change-Id: Ic55f54c525d0aa21ed01ac9ea3fe9776ea47c663
2020-05-25 19:51:02 +00:00
Stanislav Zholnin
86b0b984cf Remove UidAtomTests from presubmit due to failures.
Test: manual

Bug: 155714228
Change-Id: I661c6503c387a00803bb949e3e8ca431045dd266
2020-05-25 19:01:34 +00:00
Stanislav Zholnin
b6804a1dbc resolve merge conflicts of 4603f2ac78 to master
Change-Id: I215aa52b3f5d1762742e65426e08b3bb71464397
2020-05-25 00:56:38 +00:00
easoncylee
a8714179a7 Fix mis-configuration of TEST_MAPPING file. am: 3e213cffec am: 77911d258b
Change-Id: Iebaef4b1c76b3ebe2eecf715a37c0354031c9a86
2020-05-24 23:55:38 +00:00
easoncylee
6043c366b5 Fix mis-configuration of TEST_MAPPING file. am: 3e213cffec
Change-Id: I59f141c2b95e29a69a4b0f19436349340e8417b2
2020-05-24 23:35:01 +00:00
easoncylee
3e213cffec Fix mis-configuration of TEST_MAPPING file.
UidAtomTests:testAppOps is a test class and test method of
CtsStatsdHostTestCases. To run this in Test Mapping, it should
specify CtsStatsdHostTestCases. as the name in TEST_MAPPING file,
and android.cts.statsd.atom.UidAtomTests as the options.

Bug: 155714228
Test: presubmit test.
Change-Id: I7df08ae811425020ebbeae6a8e9f1317065c00c9
2020-05-24 21:32:51 +00:00
Julia Reynolds
6304878212 Merge "Update conversation labels" into rvc-dev am: 28c3a34faa am: c9bf62b6fe am: c31eb3260f am: 8f0cbb4498
Change-Id: I4dfacbc5543b0cf096a49eee7f8a1c069ec4daf3
2020-05-21 20:11:16 +00:00
Julia Reynolds
c31eb3260f Merge "Update conversation labels" into rvc-dev am: 28c3a34faa am: c9bf62b6fe
Change-Id: I00b7afe871c74441cc823f4d2d7654fbc949dbb0
2020-05-21 19:34:33 +00:00
Julia Reynolds
a4eebac4e4 Merge "Update conversation labels" into rvc-dev am: 28c3a34faa
Change-Id: I9b1715deb958d5bf72ee173e46575f4a2788af1a
2020-05-21 19:17:25 +00:00
Julia Reynolds
28c3a34faa Merge "Update conversation labels" into rvc-dev 2020-05-21 18:53:24 +00:00
Winson
badad7b62f Remove InstantAppResolverTests for migration to CTS
See change I79b7c42e8a495c0f4ba4cd42a076ac3b43ee2919

Bug: 155114274
Bug: 155115137
Bug: 155115845
Bug: 155116506
Bug: 155116748
Bug: 155117421

Test: atest CtsInstantAppTests

Change-Id: I09023d098c93758c049169a909c27c230bb3dd9b
2020-05-21 11:50:43 -07:00
TreeHugger Robot
19e54012a0 Merge "Prevent DPCs from requesting INTERACT_ACROSS_PROFILES" into rvc-dev am: 5d6cf38cd1 am: 3fb3ffeda8 am: 39bca2cdec am: 286ad43c7c
Change-Id: If314fd205ac3676a0b1270136ffa82c693bd3b0d
2020-05-21 17:12:24 +00:00
Hui Yu
00b64d7a71 Merge "Check PendingStartActivityUids list before updateOomAdj is done." into rvc-dev am: 600ce540ca am: 20710498ee am: 5b95c916c5 am: 62f3401654
Change-Id: I2c44a1ed2cb23a104985c535a8bbc29eee56fb24
2020-05-21 16:55:06 +00:00
Hui Yu
62f3401654 Merge "Check PendingStartActivityUids list before updateOomAdj is done." into rvc-dev am: 600ce540ca am: 20710498ee am: 5b95c916c5
Change-Id: Ibc31718f6e0626b6190560cd25f529c512c71339
2020-05-21 16:39:47 +00:00
TreeHugger Robot
3fb3ffeda8 Merge "Prevent DPCs from requesting INTERACT_ACROSS_PROFILES" into rvc-dev am: 5d6cf38cd1
Change-Id: I6120224f6026d605121e00e38b18fe5fcd769d99
2020-05-21 16:27:31 +00:00
TreeHugger Robot
5d6cf38cd1 Merge "Prevent DPCs from requesting INTERACT_ACROSS_PROFILES" into rvc-dev 2020-05-21 16:25:25 +00:00
Hui Yu
0c107e3d09 Merge "Check PendingStartActivityUids list before updateOomAdj is done." into rvc-dev am: 600ce540ca
Change-Id: Ic0af8fa5f1e9bcaa9b7eeb2aba990524024f013e
2020-05-21 16:04:04 +00:00
Hui Yu
600ce540ca Merge "Check PendingStartActivityUids list before updateOomAdj is done." into rvc-dev 2020-05-21 16:00:43 +00:00
Alex Johnston
dd19dc740b Merge "setAutoTimeRequired disabled on managed profile" into rvc-dev am: fa6cf17648 am: 0fc71e147b am: 620ae475a0 am: 284299915a
Change-Id: Icf42011d6260ce3c4d5afc45748a4ef679f86206
2020-05-21 11:15:15 +00:00
Alex Johnston
620ae475a0 Merge "setAutoTimeRequired disabled on managed profile" into rvc-dev am: fa6cf17648 am: 0fc71e147b
Change-Id: I5ea7463fbe6fec3144cb8aaf5f393c8646aed637
2020-05-21 10:39:29 +00:00
Alex Johnston
28ccaf1dfd Merge "setAutoTimeRequired disabled on managed profile" into rvc-dev am: fa6cf17648
Change-Id: Ifebf6a1e9320028b3a3ab1604a876621d35aee93
2020-05-21 10:26:57 +00:00
Alex Johnston
fa6cf17648 Merge "setAutoTimeRequired disabled on managed profile" into rvc-dev 2020-05-21 10:08:51 +00:00
Hui Yu
3f5b1521f0 Check PendingStartActivityUids list before updateOomAdj is done.
While starting activity, WindowManager posts a runnable to DisplayThread to updateOomAdj.
The latency of the thread switch could cause client app failure when the app is checking
ActivityManagerService.isUidActive() before updateOomAdj is done.

Use PendingStartActivityUids to save uid after WindowManager start activity and before
updateOomAdj is done.

PendingStartActivityUids list is checked in
ActivityManagerService.isUidActive() and
AppOpsService.UidState.evalMode(). A uid in this list is treated same as
uid is active.

Bug: 157180494
Test: atest cts/tests/app/src/android/app/cts/ActivityManagerCameraLaunchTest.java
Change-Id: If0685c3c2fad01e48f3fcf2228057041f4ec9b00
2020-05-20 23:04:34 -07:00
Julia Reynolds
8d34af82ac Update conversation labels
By adding a util method that prefers longlabel and
falls back to shortlabel.

Test: atest
Bug: 157140669
Change-Id: Ib7229b75b7a8ab87274e9aab1c7816129f04e505
2020-05-20 17:03:35 -04:00
Alex Johnston
67623cf556 setAutoTimeRequired disabled on managed profile
* A security exception should be thrown when
  setAutoTimeRequired is called on a managed profile
* Update javadoc

Bug: 156620695
Test: atest com.android.server.devicepolicy.DevicePolicyManagerTest
      atest com.android.cts.devicepolicy.MixedDeviceOwnerTest#testSetAutoTimeRequired
      atest com.android.cts.devicepolicy.MixedProfileOwnerTest#testSetAutoTimeRequired
      atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testSetAutoTimeRequired
Change-Id: Ifb53c218947f62aa446aa607d3f4eee354586395
2020-05-20 12:50:04 +01:00
Louis Chang
42b72736fa Do not always report configuration change to activity
Activity that does not handle any of the configuration changes was not
relaunched when only changing its size and without cross the size
threshold, see ActivityRecord#crossesSizeThreshold(), but the
new configuration would still be scheduled to the client.

In that case, Activity#onConfigurationChanged() was called when
ActivityConfigurationChangeItem executed, because it requested to
always report to the activity. This was wrong since the activity didn't
request to handle any of the configuration changes.

On the other hand, if configuration change sent from view root came
earlier than ActivityConfigurationChangeItem, the new configuration
change did not propagate to ResourcesManager.

Allow the new configuration changes propagate to ResourcesManager
and report to activity only if the activity has been declared to handle.

Bug: 155589510
Test: atest AppConfigurationTests
Change-Id: If7dd769098a9f06efafda0250bfce71c6c96fb49
2020-05-20 16:54:04 +08:00
Suprabh Shukla
2760e5ee53 Move AlarmManager to apex
Mechanical refactoring to move all except native code to the apex
directory. Accesses across the jar boundary will be cleaned up in
follow-ups.
Also, moved alarm manager code into its own package for better
organization.

Test: Buids, boots. Existing tests:
atest FrameworksMockingServicesTests:AlarmManagerServiceTest
atest CtsAlarmManagerTestCases

Bug: 151976605
Change-Id: Ida46491c1f1dff02dce4c50d3fafd4efbf977766
2020-05-19 21:19:26 -07:00
Alex Kershaw
e6a81b38d6 Prevent DPCs from requesting INTERACT_ACROSS_PROFILES
Fixes: 156745686
Test: atest
com.android.cts.devicepolicy.CrossProfileAppsPermissionHostSideTest#testCanRequestInteractAcrossProfiles_profileOwner_returnsFalse
Test: atest services/robotests/src/com/android/server/pm/CrossProfileAppsServiceImplRoboTest.java --verbose

Change-Id: Ia72573991ecccd9a9d01285ba55059e7f9ea14b0
2020-05-19 20:34:17 +01:00