Commit Graph

103559 Commits

Author SHA1 Message Date
TreeHugger Robot
2a7091d896 Merge "Fine tune performance for notifyContentCapture()" into rvc-dev 2020-04-10 04:42:58 +00:00
Winson Chung
cb437ade00 Merge changes I7d2ca2a2,I9f1fc593 into rvc-dev
* changes:
  Fix a couple issues with previous CL (keeping tasks hidden)
  Keep task hidden until task appeared
2020-04-10 03:03:21 +00:00
TreeHugger Robot
c0404ff5e5 Merge "Pass inline suggestions renderer info Bundle to Frameworks and IME" into rvc-dev 2020-04-10 02:19:23 +00:00
Winson Chung
1b5d055f2e Keep task hidden until task appeared
- If the task is previously not visible or has no visible children at
  the point when we start controlling it in the task org, hide the task
  until we send taskAppeared to ensure that the task org can reparent
  and show it otherwise we could see a flash of the task.

  This happens mainly from two cases:
  - when starting a new task with a given win mode, we show it and wait
    for first draw before notifying the task org
  - when transitioning into pip from swipe up, the activity is hidden
    and when it requests to enter pip is made visible again

  Since we are hiding the task w/ the pending transaction, we also need
  to defer all task org callbacks until that's applied to ensure proper
  lifecycle of the calls.
- Also skip app transitions for task org tasks for now

This reverts commit d2fb07e4f6.

Bug: 152809695
Bug: 152134460
Test: Open a bubble, ensure that we don't see the task in fullscreen
      first.  Enter pip, ensure that we don't see flash of the task
      before SysUI can fade it in.
Test: atest PipAnimationControllerTest
Test: atest TaskOrganizerTests
Test: atest SplitScreenTests
Change-Id: I9f1fc5931df1d69a7086c02b633347162cda94bf
2020-04-09 15:55:03 -07:00
Sergey Volnov
51ecd453b3 Merge "Fix Content Capture Data Share" into rvc-dev 2020-04-09 22:35:08 +00:00
Adam He
89afcd6f5d Pass inline suggestions renderer info Bundle to Frameworks and IME
Bug: 146454892
Test: manual verification
Change-Id: I5db6c3795a4a295486e497f2d27eaa561e1a3887
2020-04-09 13:30:33 -07:00
Rob Carr
0a57530be1 Merge "ViewRootImpl: Pass buffer to finishDrawing when requested" into rvc-dev 2020-04-09 20:26:43 +00:00
Sergey Volnov
6c74f7cc9a Fix Content Capture Data Share
Fixing a typo in the previous commit: s/remove/put/

Bug: 153013604
Test: ran CTS tests on sdk_gphone_x86
Change-Id: Iabe8ce51f38ac921aa5cc0e78b559e4a512b9273
2020-04-09 21:23:03 +01:00
Hui Yu
d0139b01dd Merge "Document process capability in AppOps.md." into rvc-dev 2020-04-09 19:42:09 +00:00
Fabian Kozynski
a35a860c36 Merge "Added Settings intents" into rvc-dev 2020-04-09 17:58:44 +00:00
Selim Cinek
279238f3c2 Merge changes I7dc8f5fd,Ia5262ca7 into rvc-dev
* changes:
  Fixed the transformation of min priority notifications
  Always use the largeIcon as avatar replacement
2020-04-09 17:55:27 +00:00
Pavel Grafov
c4adf5e87b Merge "Copy the remaining policies on migration." into rvc-dev 2020-04-09 17:30:36 +00:00
Nikita Ioffe
e9ed63aa92 Merge "Introduce static @hide PowerManager.isRebootingUserspaceSupportedImpl()" into rvc-dev 2020-04-09 16:39:54 +00:00
TreeHugger Robot
9f990dedb3 Merge "Add an API to set layer trace flags" into rvc-dev 2020-04-09 16:26:21 +00:00
Yuncheol Heo
8ecd6a377b Merge "Move multi window mode to the caller." into rvc-dev 2020-04-09 16:06:01 +00:00
Pavel Grafov
57c69d1e30 Copy the remaining policies on migration.
* accountTypesWithManagementDisabled
* disableScreenCapture

For security logging nothing has to be done since the state is
stored in a system property, just changed it so that the logging
will be started after the migration and only events for the
right user are logged.

Also removed the todo about hardening for power cut case, the
risk of additional complexity sees to outweight the benefit.

Bug: 149075700
Test: atest DevicePolicyManagerServiceMigrationTest
Change-Id: I3a58325f2d6f415e51998c5096c5fc123d26602d
2020-04-09 15:47:18 +01:00
Nikita Ioffe
57300d9057 Introduce static @hide PowerManager.isRebootingUserspaceSupportedImpl()
This method consolidates logic of testing whenever rebooting userspace
is supported in a place that can be used both from
PowerMager.isRebootingUserspaceSupported() API and from
PowerManagerService.reboot() implementation.

Consequently, this makes `adb shell svc power reboot userspace` also
benefit from that check, and fail userspace reboot on devices that don't
support it.

Also tweaked logic of ignoring RemoteException to take into account
userspace reboot.

Test: adb root
Test: adb shell setprop init.userspace_reboot.is_supported 0
Test: adb shell svc power reboot userspace & verified error message
Test: adb shell setprop init.userspace_reboot.is_supported 1
Test: adb shell svc power reboot userspace & verified no error message
Test: atest PowerManagerTest
Test: atest CtsUserspaceRebootHostSideTestCases
Bug: 152803929
Change-Id: I2d3a8e0ae1320c408a838c5c5fdf4cd977b167b3
2020-04-09 14:07:22 +01:00
TreeHugger Robot
bc98d3edb0 Merge "Enhance exception message on SQLiteCantOpenDatabaseException" into rvc-dev 2020-04-09 12:54:52 +00:00
Andrei-Valentin Onea
1775d16adb Merge "Add method to greylist" into rvc-dev 2020-04-09 11:17:11 +00:00
Charles Chen
5c082c998f Merge "Fix WindowContext leak" into rvc-dev 2020-04-09 07:39:29 +00:00
Yvonne Jiang
eb31eb5bae Merge "Fix secondary lock screen implementation such that DevicePolicyKeyguardService calls are made on the main (UI) thread." into rvc-dev 2020-04-09 07:26:48 +00:00
Vishnu Nair
9eb672e5a9 Add an API to set layer trace flags
This will be used by FlickerTests to capture composition state
in SurfaceFlinger trace.

Test: atest FlickerLibTest:LayersTraceMonitorTest
Fixes: 153563549

Change-Id: I3d09196ced43a1b0bac811e8f458c28be4e44992
2020-04-09 04:04:46 +00:00
Jeff Sharkey
de7f060772 Merge "Offer a NOTIFY_NO_DELAY flag for notifications." into rvc-dev 2020-04-09 03:14:42 +00:00
TreeHugger Robot
0fcab06f80 Merge "Fix an issue that setMaxSuggestions(-1) throws unexpectedly" into rvc-dev 2020-04-09 02:23:23 +00:00
Steven Thomas
288c434f34 Merge "Add acquireFrameRateFlexibilityToken permission comment" into rvc-dev 2020-04-09 01:08:40 +00:00
TreeHugger Robot
58de85c41e Merge "Revert "Fix exception handling in getState() binder cache"" into rvc-dev 2020-04-08 23:58:45 +00:00
Yuncheol Heo
5d62e75560 Move multi window mode to the caller.
Bug: 153576019
Test: Checks if Maps will move into the ActivityView when Home is pressed (in AAOS)
Change-Id: I040bf008a2f41130d6f118f359c9cefffb5acfc4
2020-04-08 16:43:52 -07:00
TreeHugger Robot
ffce5f2b7c Merge "Make OPSTR_MANAGE_EXTERNAL_STORAGE test API" into rvc-dev 2020-04-08 23:21:23 +00:00
Makoto Onuki
a868d701d7 Enhance exception message on SQLiteCantOpenDatabaseException
Bug: 150248286
Test: atest CtsDatabaseTestCases
Change-Id: I39f7a3516dfbe0198b1ef5f68af1265df98c5a0a
2020-04-08 16:19:42 -07:00
Hui Yu
3b1110b170 Document process capability in AppOps.md.
Bug: 153581565
Test: NA
Change-Id: I3c42cf5022c0e7e5b008570fdc656260bb13475f
2020-04-08 16:12:21 -07:00
Jeff Sharkey
9d475e958d Offer a NOTIFY_NO_DELAY flag for notifications.
We've heard reports that some ContentProviders are sensitive to their
notifications being delayed, so this change adds a NOTIFY_NO_DELAY
flag that they can use to bypass any background delays.

Bug: 149370968
Test: none
Change-Id: I0465c8dee92cd5708c04035bc0396ce2d1083f67
2020-04-08 16:32:41 -06:00
Lee Shombert
2a8802d2ca Revert "Fix exception handling in getState() binder cache"
This reverts commit 81a3e1c578.

Bug: b/153505953

Change-Id: I58c46e534ccadf332d10fff8f99c85ad24340c27
2020-04-08 21:12:52 +00:00
Makoto Onuki
52c24bdedf Merge "Context.getSystemService() shouldn't return null..." into rvc-dev 2020-04-08 19:33:30 +00:00
Andrei Onea
a8766420c6 Add method to greylist
Add Landroid/hardware/camera2/CameraMetadata;->getNativeMetadataPtr()J
to greylist so that
CameraManagerTest#testCameraCharacteristicsNdkFromSdk no longer needs
to forego hidden api checks.

Bug: 149594233
Test: atest CameraManagerTest#testCameraCharacteristicsNdkFromSdk
Test: adb install -r -g CtsCameraTestCases.apk && \
      adb  shell am instrument -e class \
	'android.hardware.camera2.cts.CameraManagerTest#testCameraCharacteristicsNdkFromSdk' \
	-w 'android.camera.cts/androidx.test.runner.AndroidJUnitRunner'
Change-Id: Ibd53dd198efc5722e20f153ef5cc9433e5b7539d
2020-04-08 19:56:52 +01:00
Robert Carr
6cc720b70a ViewRootImpl: Pass buffer to finishDrawing when requested
As the final enabler for the BLASTSyncEngine, we add a new relayout
result BLAST_SYNC. If the WindowState is participating in a BLAST sync
during relayout we return it to the client. If we return it to the
client the client will direct it's next draw in to a BLAST transaction
and report that transaction via finishDrawing. You can now observe
the BLASTSyncEngine working end to end in TaskOrganizerMultiWindowTests.
We do a few small clean-ups in TaskOrganizerMultiWindowTest while we
are there.

Bug: 153561718
Test: TaskOrganizerMultiWindowTests
Change-Id: I719b731350b942aafa444a33972aaef8973422ea
2020-04-08 11:18:09 -07:00
Andrii Kulian
ac4b972e7a Merge "6/n Manage multiple task display area in the policy" into rvc-dev 2020-04-08 17:35:42 +00:00
shafik
2a20790621 Make OPSTR_MANAGE_EXTERNAL_STORAGE test API
We need that to enable CTS for Environment#isExternalStorageManager API

Test: build
Bug: 152478019
Change-Id: I8c24c08991558629c83a25b4bed89c817723d732
2020-04-08 17:49:47 +01:00
TreeHugger Robot
afef06a0f6 Merge "Revert "Revert "Do not mount whitelisted package in storage data and obb dirs""" into rvc-dev 2020-04-08 14:48:39 +00:00
Charles Chen
4bff5be1a9 Fix WindowContext leak
The root causes of this issue are:
  1. WindowTokenClient#attachContext makes WindowTokenClient has strong
     reference to WindowContext, which leads to WindowContext cannot be
     GC'd.
  2. WMS#removeWindowToken needs MANAGE_APP_TOKEN permission which
     normal apps don't hold.

This CL does following things:
  1. Use weak reference instead on WindowTokenClient#mContext.
  2. Relax WMS#removeWindowToken to check callingUid if
     MANAGE_WINDOW_TOKEN permission is not held
  3. Deliver config changes to the client side in
     WMS#addWindowTokenWithOption
  4. Some minor fixes

fixes: 150812449
Bug: 150715095
Test: atest WindowContextTest
Test: atest WindowManagerServiceTests
Test: atest WindowTokenTests
Test: atest WindowManagerPermissionTests#testMANAGE_APP_TOKENS
Test: atest
WindowManagerPermissionTests#testADD_WINDOW_TOKEN_WITH_OPTIONS

Change-Id: I9f1d73af2abb78fc9844e6d9eb25e9f0293514e7
2020-04-08 21:30:24 +08:00
Tony Mak
976cd96983 Fix an issue that setMaxSuggestions(-1) throws unexpectedly
As per the javadoc, -1 is a valid input.

BUG: 153529167

Test: ag/10976796
Change-Id: I4cf172fbd36b893428be1bb87a9ccb0b7c5c3c6a
2020-04-08 14:16:11 +01:00
Yvonne Jiang
6d34642533 Fix secondary lock screen implementation such that DevicePolicyKeyguardService calls are made on the main (UI) thread.
For implementations of DevicePolicyKeyguardService to provide a SurfacePackage via SurfaceControlViewHost, they must be running on the UI thread.
Additionally, fix dismissal logic to bypass re-checking the secondary lockscreen, and add defensive null checks.

Bug: 136085151
Bug: 151365616
Test: atest AdminSecondaryLockScreenControllerTest
Test: atest KeyguardUpdateMonitorTest
Change-Id: Ibcd7090f50831cddbf952914adf020015750afd8
2020-04-08 05:31:20 -07:00
Jorim Jaggi
9c50a64e91 Merge "Re-apply local client state when leash changes" into rvc-dev 2020-04-08 11:05:50 +00:00
Steven Thomas
6faeaa2a9b Add acquireFrameRateFlexibilityToken permission comment
Add a comment explaining the permissions necessary for a successful call
to acquireFrameRateFlexibilityToken(). This is feedback from a
previously submitted CL.

Change-Id: Id316e6943153c20a06d90af844605851591e225c
Bug: 148033900
Test: n/a
2020-04-07 21:31:59 -07:00
Andrii Kulian
44b3c569f4 6/n Manage multiple task display area in the policy
Delegate task display area creation and container management to the
display area policy implementation. This should allow creating and
handling device-specific task display area arrangements.

Bug: 152116619
Test: WM CTS and unit tests
Change-Id: Ic1182d064e7d8387f701f04fb267e2bb6d4da0c5
2020-04-07 21:30:26 -07:00
TreeHugger Robot
9f16f2665a Merge "Change the way how we call setStorageParams." into rvc-dev 2020-04-08 00:48:58 +00:00
Jorim Jaggi
ee54070608 Re-apply local client state when leash changes
When leash changes, we need to re-apply our local state, to ensure
new leash has same state as before and new leash is visible on
screen.

Test: Switch IME while open
Test: SurfaceControlTest
Fixes: 152876819
Change-Id: Ieae1aecdc3ddc427ccb89c4aa7ef7ae9283f39eb
2020-04-07 23:04:44 +00:00
Evan Rosky
e68c8ac02b Merge "Remove some more dead-code from old split impl" into rvc-dev 2020-04-07 21:47:44 +00:00
Alex Buynytskyy
f415679228 Change the way how we call setStorageParams.
Now it's unified with callback FS connector - we are passing the
callback pointer directly to dataloader. This restricts access only
to methods we want and only by someone we want.

Bug: b/153468113
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest
Change-Id: Ib557ebbe7c6c5ce92140eb20534a3626b3ac96d3
2020-04-07 14:42:50 -07:00
Makoto Onuki
a49b1e6260 Context.getSystemService() shouldn't return null...
Even when interrupted.

Fix: 153005526
Test: Manual code inspection...
Change-Id: I6747c6b5fb4956b95b43d6fcd3fd636853339b8a
2020-04-07 14:01:30 -07:00
Santiago Seifert
995870accd Merge "Rephrase NonNull javadoc to make it more generic" into rvc-dev 2020-04-07 19:32:21 +00:00