Commit Graph

104194 Commits

Author SHA1 Message Date
Heemin Seog
d79e4f49d2 Add climate bar insets
This can be used to support a 3rd kind of system bar to inset the
applicaiton space.

Bug: 152763889
Test: manual
Change-Id: I3ba75886e94a9fe80a0d1a920749d152dda64031
2020-05-26 14:26:25 -07: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
Anton Hansson
78b956deb1 Merge "Remove nullablility annotations from module-lib" into rvc-dev 2020-05-25 12:09:26 +00:00
TreeHugger Robot
c34c144c6b Merge "Remove feature flag, unused lib and test cases" into rvc-dev 2020-05-25 09:07:24 +00:00
Sunny Shao
ffc352b9f9 Remove feature flag, unused lib and test cases
Fixes: 155949554
Test: make RunSettingsLibRoboTests -j56
Change-Id: I54a31aed503f7f058887720ab4fe01ca2f39ff93
2020-05-25 13:38:54 +08: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
Adam Bookatz
535e4abdd2 Merge "UserRestriction doc fix: primary -> admin" into rvc-dev 2020-05-21 22:44:53 +00:00
Eugene Susla
3f24b9cf64 Merge "Correct javadoc for an auto-revoke API" into rvc-dev 2020-05-21 21:07:30 +00:00
TreeHugger Robot
2f988b5a82 Merge "Don't truncate an app's own label when forcing safe label." into rvc-dev 2020-05-21 19:06:51 +00:00
Julia Reynolds
28c3a34faa Merge "Update conversation labels" into rvc-dev 2020-05-21 18:53:24 +00:00
Eugene Susla
44753b4c8f Correct javadoc for an auto-revoke API
Test: presubmit
Bug: 153607914
Change-Id: Ie271ecfbb3e9356080c28103df658b411ebd61ec
2020-05-21 11:03:37 -07:00
TreeHugger Robot
5d6cf38cd1 Merge "Prevent DPCs from requesting INTERACT_ACROSS_PROFILES" into rvc-dev 2020-05-21 16:25:25 +00:00
TreeHugger Robot
4586885a63 Merge "Camera: Query default display size from display manager" into rvc-dev 2020-05-21 16:12:40 +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
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
Hongwei Wang
047a550900 Merge "Ignores entering PiP animation on seamless rotation" into rvc-dev 2020-05-21 03:12:56 +00:00
Hongwei Wang
f4e4bab403 Ignores entering PiP animation on seamless rotation
- Added onFixedRotationStarted/onFixedRotationFinished callback in
  DisplayWindowListener
- onFixedRotationStarted shall be called before onTaskAppeared for PiP
- When onTaskAppeared is received in PipTaskOrganizer, we defer the
  entering PiP transition if fixed rotation is ongoing
- When onFixedRotationFinished is received in PipTaskOrganizer and the
  entering PiP transition is deferred, schedule an immediate
  transition to PiP to make sure all the expected callbacks from
  PipTaskOrganizer are still being sent

Video: http://go/recall/-/aaaaaabFQoRHlzixHdtY/bb8HjJvMZKtpN8YTPKZXmj
Bug: 153861223
Test: manually enter PiP from Play Movies / YT fullscreen
Test: atest ActivityRecordTests \
            RecentsAnimationControllerTest \
            ActivityTaskManagerServiceTests \
            PinnedStackTests
Change-Id: I0dea905d610e2387af56b611be5f93518cc9a153
2020-05-20 17:34:17 -07:00
Emilian Peev
46e7450670 Camera: Query default display size from display manager
The current Android API will trigger strict mode
violations in case a context not bound to any
particular display tries to connect to the window
manager service.
To avoid such violations query the default display size
directly from the display manager.

Bug: 157167435
Test: Camera CTS
Change-Id: Icad19ec0227b4945da9e6fcacaec916c5799877f
2020-05-20 17:18:02 -07:00
TreeHugger Robot
d220792d6b Merge "camera2: Add some more docs to getConcurrentCameraIds" into rvc-dev 2020-05-21 00:15:00 +00:00
TreeHugger Robot
5c77ec2e12 Merge "Maintain compatibility by deleting target directory before renaming into it." into rvc-dev 2020-05-20 23:20:42 +00:00
TreeHugger Robot
beac47b12e Merge "Properly keep compatibility with openRead() during a write." into rvc-dev 2020-05-20 22:46:01 +00:00
Jayant Chowdhary
9c8fe18534 camera2: Add some more docs to getConcurrentCameraIds
- specifying the order of camera open and session configuration.
- explaining the use of CONTROL_ZOOM_RATIO with concurrent operation of cameras.

Bug: 151891611

Test: make doc-comment-check-docs

Change-Id: I3ee3f114f7295570aa6af5dbe35bb32db555811b
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
2020-05-20 15:43:47 -07:00
Hai Zhang
5177cfa1bd Don't truncate an app's own label when forcing safe label.
Fixes: 152973001
Test: manually confirm default apps title isn't truncated in RU.
Change-Id: Ic54ea66fa4b9117d633b58838465adfb9d2ae7fa
2020-05-20 14:51:00 -07:00
Hai Zhang
30afab690e Properly keep compatibility with openRead() during a write.
Bug: 157092639
Test: atest AppIdleHistoryTests#testFilesCreation
Change-Id: I7d6808139aa41b25715293207b8ad42f9f42ef65
2020-05-20 14:15:12 -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
Hai Zhang
cf2ee87fd4 Maintain compatibility by deleting target directory before renaming into it.
The target shouldn't be a directory, but if it is, it would be
deleted (as long as it's empty). This became some kind of API and we
need to remain compatible with it.

Bug: 151959443
Test: Reboot and ensure ShortcutService can persist its state
Change-Id: I11a80cd4252128b025912b7aab86b113935e549a
Merged-In: I11a80cd4252128b025912b7aab86b113935e549a
2020-05-20 12:08:41 -07:00
TreeHugger Robot
5a1dc47c34 Merge "Reconfigure Scoped Storage experiment: force ScSt on list of apps" into rvc-dev 2020-05-20 16:14:27 +00:00
Tiger Huang
090ee6ff39 Merge "Dispatch the requested visibility if the client has the control" into rvc-dev 2020-05-20 14:36:30 +00:00
Anton Hansson
206be52a78 Remove nullablility annotations from module-lib
They were added to workaround the problem of package-private versions
being added to the stubs, which prevented use of the annotations from
mainline modules.

Having them in the API leads to a different problem -- this version of
the nullability annotations have SOURCE retention. However in the stubs
build we want to have CLASS retention, so that kotlin can make use of
their presence.

This is arguably a much cleaner fix, since having a source-retention
annotation doesn't really make much sense.

Bug: 157010342
Test: m
Change-Id: Id78f00da5b6af2930224a82faa24cb8235362521
Merged-In: Id78f00da5b6af2930224a82faa24cb8235362521
2020-05-20 12:55:22 +01: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
shafik
3acc77cc7b Reconfigure Scoped Storage experiment: force ScSt on list of apps
Add a DeviceConfig feature that denotes a list of apps we want to force
into scoped storage. This would allow us to test these apps behaviours
under scoped storage at scale.

Also add the feature to StorageManagerService#dump.

Test: manual:
$ adb shell device_config put storage_native_boot forced_scoped_storage_whitelist <pkg>
$ adb reboot
$ adb shell dumpsys appops --package <pkg> # observe LEGACY_STORAGE
mode=ignored
Test: adb shell dumpsys mount
Bug: 151735608

Change-Id: I6a43e987ebf8d14fb64103a74bafde28f5863ae2
2020-05-20 12:37:24 +01:00
TreeHugger Robot
c74a76863b Merge "Don't delete the new file in openRead()." into rvc-dev 2020-05-20 07:39:29 +00:00
TreeHugger Robot
a0b41154fe Merge "webkit: Update documentation for onJsConfirm, onJsPrompt callbacks" into rvc-dev 2020-05-20 05:44:33 +00:00
Hai Zhang
25adf3c471 Don't delete the new file in openRead().
Although it may seems a left-over from a previous interrupted write,
actually there are callers who call startWrite(), openRead() and then
finishWrite(), and this was okay in the previous implementation, so we
have to keep supporting it.

The new file is virtually ignored in the new implementation, and we
have no good way to know if it's actually a left-over or one that's
being written, so simply leaving it there is also okay.

Fixes: 157092639
Test: atest AppIdleHistoryTests#testFilesCreation
Change-Id: I4dc7fde99d2b8e04356f082a6e6ad61c2835022e
2020-05-19 20:35:51 -07:00
Julian Odell
4946555a8e Merge "Flush buffered data when session connects. Typically this data would have been flushed at the end of the first draw and there would otherwise be an extended delay before the data would be sent to the service." into rvc-dev 2020-05-19 22:22:30 +00:00
Changwan Ryu
dd4f03d419 webkit: Update documentation for onJsConfirm, onJsPrompt callbacks
Fix documentation to clearly indicate that the default behavior is to
show WebView's own default dialog, and also describing clearly default
dialog behavior and how to customize it.

Note that onJsBeforeUnload is not updated at the moment as I could not
find a way to reproduce it.

Bug: 154014645
Test: m -j offline-sdk-docs seems not broken

Change-Id: I5ee09ea35340eb8d17353eda1786dcebcff4a29e
2020-05-19 14:30:44 -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
Julian Odell
ef928f8a11 Flush buffered data when session connects.
Typically this data would have been flushed at the end of the
   first draw and there would otherwise be an extended delay
   before the data would be sent to the service.

Test: make -j
Test: Manually start WhatsApp - check for lost events
Test: atest CtsContentCaptureServiceTestCases

Bug: 154777879
Change-Id: Ia0a97e24ffcc1c189d5d0cd6b8888678fa48968e
2020-05-19 12:30:57 -07:00
TreeHugger Robot
db48450e84 Merge "Fix parsing sCachedPackageReadCount" into rvc-dev 2020-05-19 18:57:33 +00:00
TreeHugger Robot
f6f2273cb0 Merge "Carry over bugfixes from MediaProvider." into rvc-dev 2020-05-19 17:22:25 +00:00
TreeHugger Robot
470910085b Merge "fix RuntimeException when inflating default layout for AdapterView-based widgets" into rvc-dev 2020-05-19 17:13:04 +00:00
Winson
46220780ba Fix parsing sCachedPackageReadCount
This was moved to PackageCacher, but the old and unused counter
was not removed.

Bug: 154310064

Test: manual device reboots and logs cached count >0

Change-Id: I32fdb4b8fccd281fe61c64f231cb0ba154934679
2020-05-19 09:37:36 -07:00
Jeff Sharkey
0fd3e39760 Carry over bugfixes from MediaProvider.
A few months ago MediaProvider forked SQLiteQueryBuilder and we
fixed bugs in how the new insert(), update(), and delete() methods
were executed, but those fixes never made their way back upstream.

This CL is a clean cherry-pick of existing logic.

Bug: 155149941
Test: atest android.database.sqlite.cts.SQLiteQueryBuilderTest
Change-Id: I00d2ee88539b12d27a2ed99fff0546d1e3543b0e
2020-05-19 09:37:13 -06:00
Tiger Huang
2ab590a4b8 Dispatch the requested visibility if the client has the control
Otherwise, we would think its visibility needs to be cleared.

This CL:
- reverts parts of eb5a5920b7,
- prevents sending redundant MSG_DISPATCH_SYSTEM_UI_VISIBILITY, and
- cancels clearing visibility if a new reversed visibility is set.

Fix: 156994866
Test: atest --iterations 100 LayoutTests#testAddingImmersiveWindow
      atest WindowInsetsControllerTests InsetsAnimationControlImplTest
Change-Id: I8b8b7541523c0a94daf336f3be415aa5fa3f33da
2020-05-19 22:07:04 +08:00
TreeHugger Robot
0d23267a9c Merge "Change AtomicFile to use rename-into-place." into rvc-dev 2020-05-19 06:52:52 +00:00
TreeHugger Robot
58657c7c10 Merge "Report resizeTask failure as boolean result" into rvc-dev 2020-05-19 01:39:54 +00:00
Hai Zhang
b1a7706716 Change AtomicFile to use rename-into-place.
The previous implementation of backing up beforehand doesn't handle
the case where the file is created for the first time, and might leave
a corrupted file in case of failure.

This new implementation creates a new file for writing data into, and
renames it into the place of the original file after writing
finished.

Fixes: 151959443
Test: atest android.util.AtomicFileTest
Change-Id: I5c4c438526a2aecdd2af18f71e16b41a05817c61
Merged-In: I5c4c438526a2aecdd2af18f71e16b41a05817c61
2020-05-19 00:27:32 +00:00
Pinyao Ting
5cb48cbc0d fix RuntimeException when inflating default layout for AdapterView-based widgets
Bug: 151901506
Test: manual
Change-Id: I71068b7d13783f658c02cc76ec50f40319e68160
2020-05-18 17:06:56 -07:00
Patrick Baumann
ce6252e5a4 Merge "Doc update re use of MATCH_UNINSTALLED flag" into rvc-dev 2020-05-18 21:31:02 +00:00