Commit Graph

115152 Commits

Author SHA1 Message Date
arangelov
aa307e28ca Don't show layout with default if in tabbed view
Fixes: 155890640
Fixes: 150939321
Test: atest ChooserActivityTest
Test: atest ResolverActivityTest
Test: manually verified default layout is not shown

Change-Id: I11c543331b44039a7a2ae85a1b2a67b8525739a4
2020-05-07 16:16:45 +01:00
Matt Pietal
2f16758a0a Merge "Sharesheet/Resolver a11y adjustments" into rvc-dev 2020-05-07 11:38:59 +00:00
Jorim Jaggi
b3c02592e1 Merge "Cancel existing animations when detaching View" into rvc-dev 2020-05-07 11:36:11 +00:00
Antoan Angelov
afbd12c4ed Merge "Fix sharesheet scroll jankiness." into rvc-dev 2020-05-07 10:56:05 +00:00
Feng Cao
254545cae5 Merge "Support re-attaching the inline suggestion view to window" into rvc-dev 2020-05-07 05:23:15 +00:00
Philip P. Moltmann
f7d1f1a40c Merge "Forward dumps from PermissionControllerManager to permissionmgr" into rvc-dev 2020-05-07 05:07:27 +00:00
Riddle Hsu
b76f9472df Merge "Do not stop dream service if dream activity is relaunching" into rvc-dev 2020-05-07 04:51:38 +00:00
Feng Cao
b46851c964 Support re-attaching the inline suggestion view to window
* Before this change, when the inline suggestion view is detached from
  the IME window (e.g. due to layout change), the remote view content
  will not show again even after the view is reattached to the window
  on the IME side. This patch fixes it by requesting the remote view
  owner (the ext services) for a new SurfacePackage when the view is
  re-attached to the window (see javadoc of SurfaceControlViewHost for
  why this works).
* This patch also fixes the issue where the SurfaceControlViewHost was
  never released in the ext services. This is done by notifying the
  ext services (through system server) when the view is detached from
  the IME window, and then the system server will release the
  SurfaceControlViewHost if after N(=500) ms the view is not re-attached
  to a window.
* After the SurfaceControlViewHost is released, if the view is
  re-attached to the window later, a new SurfaceControlViewHost will be
  created to back the same InlineContentView.
* The current code structure also lays a foundation for a subsequent
  change to allow reusing the same remote view for inline suggestions
  during filtering.

Test: atest CtsAutofillServiceTestCases (sanity test)

Bug: 153615023
Bug: 154683107

Change-Id: Idc587e1e82a96b792c351796464821b7aad7cd89
2020-05-06 19:30:39 -07:00
Kevin Chyn
73407d6559 Merge "Revert "Check Read permissions when getDocumentMetadata"" into pi-dev am: 3d599fd941 am: c1f5869518 am: 38691f7626
Change-Id: I2179cb6e443d25c859ab6c433b11aec63153f256
2020-05-07 01:28:25 +00:00
Kevin Chyn
38691f7626 Merge "Revert "Check Read permissions when getDocumentMetadata"" into pi-dev am: 3d599fd941 am: c1f5869518
Change-Id: I1ea9173d607acdcbd03de42aa793b018c23828e3
2020-05-07 01:15:56 +00:00
Kevin Chyn
c1f5869518 Merge "Revert "Check Read permissions when getDocumentMetadata"" into pi-dev am: 3d599fd941
Change-Id: I18eb6c4cd9c42f3cc1d1051b47aafeeffb6b0c16
2020-05-07 01:02:48 +00:00
Kevin Chyn
f21b907b1b Revert "Check Read permissions when getDocumentMetadata"
This reverts commit c94646177c.

Reason for revert: 155930637

Change-Id: Id452d316d1c1721fce715474df009ebe0fb719e8
2020-05-07 00:39:46 +00:00
Philip P. Moltmann
5ab27fca5c Forward dumps from PermissionControllerManager to permissionmgr
Test: adb shell dumpsys permissionmgr
Bug: 155680199
Change-Id: Iab5da24277eb6333ef047ab84dfcb65b7c4c2ff2
2020-05-06 17:24:40 -07:00
Diksha Gohlyan
3bea45c642 Merge "Check Read permissions when getDocumentMetadata" into pi-dev am: 4371baafc1 am: ada451e47c
Change-Id: Id40f7456923144e3496df2028c771325ad1f480e
2020-05-06 23:16:07 +00:00
Diksha Gohlyan
ada451e47c Merge "Check Read permissions when getDocumentMetadata" into pi-dev am: 4371baafc1
Change-Id: Ib242d6ed7ff376a71f85a03aa06f2c0453638310
2020-05-06 23:05:34 +00:00
Ben Lin
c43997ba15 Merge "Enforce max size for resizing operations." into rvc-dev 2020-05-06 21:17:02 +00:00
Taran Singh
e974c347fd Merge "Revert "Keeps the served view of the window when focus to the ne..."" into rvc-dev 2020-05-06 21:06:34 +00:00
Taran Singh
0dbd6c4bd6 Revert "Keeps the served view of the window when focus to the ne..."
Revert "Refine FocusHandlingTest"

Revert submission 11182377-fix_b_152373385

Reason for revert: Fix b/155781821
Reverted Changes:
If20cdb43e:Keeps the served view of the window when focus to ...
I50402165b:Refine FocusHandlingTest
Bug: 152373385
Bug: 155781821

Change-Id: I44469caf5a5ceaf247c4e6b0694da9da1f3c0eb1
2020-05-06 20:37:09 +00:00
Galia Peycheva
1255a2d20b Merge "Override DreamActivity enter and exit animations" into rvc-dev 2020-05-06 20:30:21 +00:00
Matt Pietal
877b5ec262 Sharesheet/Resolver a11y adjustments
1. Announce app name with direct share targets
2. Don't speak 'heading' in direct share rows
3. Don't close resolver/sharesheet when swiping left
4. Talkback will announce # of rows and columns for sharesheet

Fixes: 141908464
Fixes: 155153657
Fixes: 151897812
Fixes: 149437892
Fixes: 80319063
Test: talkback
Change-Id: I16586208407ba56814d3cf69648e660bded72ccf
2020-05-06 15:27:54 -04:00
Song Hu
f52438f9a2 Merge "Send onCreatePredictionSession, sortAppTargets, requestPredictionUpdate immediately instead of sending them to main thread Looper queue of ChooserActivity." into rvc-dev 2020-05-06 19:03:46 +00:00
Jorim Jaggi
31e5254daf Cancel existing animations when detaching View
Test: WindowInsetsAnimationSynchronicityTests#testShowAndHide_renderSynchronouslyBetweenImeWindowAndAppContent * 100 times
Fixes: 155602643
Change-Id: I6f736357f5a67c01a29b2c531026a3a76c321003
2020-05-06 20:36:08 +02:00
Song Hu
d52863d12b Send onCreatePredictionSession, sortAppTargets, requestPredictionUpdate
immediately instead of sending them to main thread Looper queue of
ChooserActivity.

These methods are relatively latency-sensitive. When main thread Looper queue has many backlogs, it takes long time
to dispatch requests.

Bug: 155551642
Test: atest CtsSharesheetTestCases:android.sharesheet.cts.CtsSharesheetDeviceTest
Test: manually test on the device
Change-Id: I7d00e49c6a30fec478e620bc98180d379f801fc8
2020-05-06 10:17:29 -07:00
Hui Yu
a6099ac785 Merge "Revert "Add isUidActiveOrForeground() for camera/audio to use."" into rvc-dev 2020-05-06 16:59:34 +00:00
Marco Ballesio
ce9b47859d Merge changes from topic "developer option for app freezer" into rvc-dev
* changes:
  Resources and strings for freezer settings
  Settings option to enable/disable the app freezer
  ActivityManager API to check availability of app freezer
2020-05-06 16:35:44 +00:00
arangelov
706316db0f Fix sharesheet scroll jankiness.
This CL makes the following changes:
1. Cache the itemViewType in the ViewHolder, so that we don't
have to call it again from onBindViewHolder
2. Cache the result of shouldDisplayLandscape to reduce the
number of IPC calls while scrolling the list, as this is called
indirectly by the ChooserGridAdapter's getRowCount and
getItemCount. It calls Activity#isInMultiWindowMode which makes
an IPC call to the ActivityTaskManager.
3. Cache the work profile user handle to reduce the number of
IPC calls while scrolling the list, as this is called
indirectly by ChooserGridAdapter's getRowCount and getItemCount.

Test: atest ChooserActivityTest
Test: atest ResolverActivityTest
Test: manually verify there is no jankiness when scrolling
Test: manually change orientation between portrait and
landscape to make sure screen orientation cache gets invalidated
Test: launched share sheet in multi-window mode and then removed
one window - sharesheet properly updated its views
Fixes: 151117747
Fixes: 154766645

Change-Id: Ib8e329b534f3de1d4906f6a07908cc7879dcaa47
2020-05-06 16:35:16 +01:00
Antoan Angelov
950aca5795 Merge "Use intent resolver strings for sharesheet when picking intent" into rvc-dev 2020-05-06 14:23:13 +00:00
Riddle Hsu
d948f743c2 Do not stop dream service if dream activity is relaunching
Currently DreamActivity doesn't handle any configuration changes,
and does not set fixed orientation. So the decor view will be
detached if the activity is relaunching for configuration changes.

Though it also works by making DreamActivity support handling the
changes, all implementations of DreamService may need to add the
corresponding handling. So this fix only keeps the service alive
for compatibility.

Fixes: 154474768
Test: atest DreamManagerServiceTests#testDreamNotFinishAfterRotation
Test: Enter Settings > Display > Screen saver, press "Start now".
      The dream service should not be stopped after device rotated.
Change-Id: I454f75d06c4539258eeafd8794a3cb03e0276163
2020-05-06 12:26:13 +00:00
Galia Peycheva
3cf3520d3f Override DreamActivity enter and exit animations
Fix: 153151516

Test: atest DreamManagerServiceTests
Change-Id: I4ba741512edea23e0209b176a34478045931c891
2020-05-06 10:30:27 +02:00
Galia Peycheva
95f8aba25e Merge "Add isDreaming method to DreamManager" into rvc-dev 2020-05-06 08:18:19 +00:00
Tony Huang
e13e2229ce Merge "Aviod divider surface memory allocated after boot" into rvc-dev 2020-05-06 04:39:14 +00:00
TreeHugger Robot
a83fad74b4 Merge "Migrate remaining parsePackage V1 to V2" into rvc-dev 2020-05-06 03:57:38 +00:00
Song Hu
efa0eab058 Merge "Enable ChooserTarget ranking of the same app." into rvc-dev 2020-05-06 00:02:06 +00:00
Yuncheol Heo
73cc6b8f47 Merge "Migrate Tap exclusion logic to TaskEmbedder." into rvc-dev 2020-05-06 00:00:53 +00:00
Winson
3cb5610a99 Migrate remaining parsePackage V1 to V2
Uses ParsingPackageImpl to generate the PackageInfo for
PackageManager's getPackageArchiveInfo API.

This keeps the migration to v2 hidden and thus the API can
be shipped for this release and then deprecated entirely
if necessary.

Exempt-From-Owner-Approval: Has approval on previous patchsets,
    will need non-logic updates to resolve merge conflict and CP
    into rvc-dev properly

Bug: 135203078
Bug: 146575910
Bug: 153880854

Test: atest com.android.server.pm.parsing
Test: atest android.content.pm.PackageManagerTests

Merged-In: Ib21dbbdc556502144df8e3d7a26b7a9d33885cd9
Change-Id: Ib21dbbdc556502144df8e3d7a26b7a9d33885cd9
2020-05-05 16:35:34 -07:00
Varun Shah
2806da306b Merge "Update some ContentResolver docs." into rvc-dev 2020-05-05 23:18:55 +00:00
Yuncheol Heo
d1cfb337cf Merge "Revert "Notify the visibility change to update color views without control."" into rvc-dev 2020-05-05 22:56:42 +00:00
Yuncheol Heo
11df7e13a8 Revert "Notify the visibility change to update color views without control."
This reverts commit 02d3a8ad07.

Reason for revert: the original change caused the infinite message loop.
Bug: 155794233

Change-Id: I3d72541cd51cd8b16ce4f44124d486b4615b09da
2020-05-05 22:56:27 +00:00
Marco Ballesio
74f0159425 Settings option to enable/disable the app freezer
The new setting option allows for a local configuration to override the
Device Config flag. Device Config and experiments will be honored by
default.

Bug: 155465196
Change-Id: I978a7b6bd75d9daab3fafed58b7f3c6417e0adab
Test: the option is correctly read and written by the companion CLs
2020-05-05 15:22:56 -07:00
Marco Ballesio
240bea3f47 ActivityManager API to check availability of app freezer
A method to verify the availability of the app freezer is required for
configuration code running in places like the Settings app

Bug: 155465196
Change-Id: I5779d263536091689a099eec0815f207dfbbf6ad
Test: verified its workings through the developer options CL
2020-05-05 15:22:43 -07:00
Yuncheol Heo
8f5f53ca0f Migrate Tap exclusion logic to TaskEmbedder.
We want to pass the touches on ActivityView to the Activity inside ActivityView, not to be consumed by Activity hosting ActivityView.
To do that, we need to set a tap exclude region, so touches can go through.

Bug: 155424730
Test: Make sure the Activity inside ActivityView gets touch.
Change-Id: Ia9b2c7eba0c48512a633c798b1012e5fbec8422f
2020-05-05 14:41:43 -07:00
Andrew Solovay
9e2fa5042b Merge "docs: Fixing broken Javadoc comments" into rvc-dev 2020-05-05 20:55:50 +00:00
Diksha Gohlyan
c94646177c Check Read permissions when getDocumentMetadata
Test: manually tested
Bug: 151095863

Change-Id: I4f04f08f76d039196c2c67bac80d4a46ebec87f2
(cherry picked from commit 0e75809955)
2020-05-05 20:00:05 +00:00
Galia Peycheva
e1903416bb Add isDreaming method to DreamManager
This CL adds isDreaming to DreamMaanger and changes the way it starts a
dream to use IDreamManager.dream()

DreamManager is only used for testing. So far it has been using the
DreamManagerInternal.testDream() API to start the dream. This restricts
the amount of verification that can be done in the dream tests because
it doesn't put the device in a dreaming state -
IDreamManager.isDreaming() is always false.
IDreamManager.dream() puts the device in a dreaming state and enables
better testing.

Bug: 152994058

Test: atest DreamManagerServiceTests
Change-Id: Id4d947e83eabcafa9724764b8d063357c5f2cb49
2020-05-05 21:59:24 +02:00
Varun Shah
5de2589627 Update some ContentResolver docs.
Clarify when some of the ContentResolver APIs could return null.

Bug: 112833761
Test: builds (documentation update)
Change-Id: I3af1a23bc484d05b167a86bbff0c93ff1bd364e7
2020-05-05 12:25:30 -07:00
Song Hu
60c131e869 Enable ChooserTarget ranking of the same app.
Bug: 151112858
Test: atest CtsSharesheetTestCases:android.sharesheet.cts.CtsSharesheetDeviceTest
Change-Id: If5a4edfec7116cd54ed0ae6543cab0beb011f987
2020-05-05 10:27:52 -07:00
Collin Fijalkovich
a131a0c64f Merge changes from topic "rvc-telephony-caching" into rvc-dev
* changes:
  Cache getPhoneId and getSlotIndex binder calls.
  Refactor SubscriptionManager caching code
  Cache getDefaultSmsSubscriptionId Binder calls
  Cache getActiveDataSubscriptionId Binder calls
2020-05-05 16:30:39 +00:00
Kholoud Mohamed
d4d2427c01 Merge "Fix bug in IntentForwarderActivity" into rvc-dev 2020-05-05 13:37:54 +00:00
Tony Huang
0f8981d9b1 Aviod divider surface memory allocated after boot
The divider surface buffer will be allocated even if the user does
not enter split mode. Avoid it by only copy surface when it show and
release it when it hidden.

Bug: 150190730
Test: reboot and check adb shell dumpsys SurfaceFlinger
Change-Id: Id70a2626b2a921cff6243d992c6b053e329ef92b
2020-05-05 18:52:14 +08:00
kholoud mohamed
06335279aa Fix bug in IntentForwarderActivity
Bug: 155096621
Test: atest com.android.cts.devicepolicy.ManagedProfileCrossProfileTest#testCrossProfileIntentFilters
Test: atest IntentForwarderActivityTest
Test: atest ResolverActivityTest
Test: atest ChooserActivityTest
Change-Id: Ieb99f566fa9cfc14254fecfa5897d421fd39482f
2020-05-05 09:56:07 +00:00