Commit Graph

13452 Commits

Author SHA1 Message Date
Nikita Dubrovsky
832edc3cc9 Add unified API for inserting rich content (e.g. pasting an image)
The new callback provides a single API that apps can implement to
support the different ways in which rich content may be inserted.

The API is added to TextView and unifies the following code paths:
* paste from the clipboard (TextView.paste)
* content insertion from the IME (InputConnection.commitContent)
* drag and drop (Editor.onDrop)
* autofill (TextView.autofill)

Corresponding API in support lib: aosp/1200800

Bug: 152068298
Test: Manual and unit tests
  atest FrameworksCoreTests:TextViewRichContentReceiverTest
  atest FrameworksCoreTests:AutofillValueTest
  atest FrameworksCoreTests:TextViewActivityTest
Change-Id: I6e03a398ccb6fa5526d0a282fc114f4e80285099
2020-03-31 15:15:36 -07:00
Antoan Angelov
7daf1bb4f6 Merge "Show empty state screens in order of priority." into rvc-dev am: 9238e32a16 am: 571c0e4ea3 am: f6be54216a am: 399abda1fd
Change-Id: Ie7a6a1552fa729977fe06be9679dc6dee8468b25
2020-03-31 05:50:02 +00:00
TreeHugger Robot
ec1c0d4a21 Merge "Fix flickers when changing control" into rvc-dev am: c322ed2173 am: 162040e358 am: b88c500fea am: 3cb2ddd649 am: 2e5799ae71
Change-Id: I19e3ca9cb45d5e9e058b318fc891d5a5c06859e7
2020-03-30 23:44:23 +00:00
TreeHugger Robot
770f2b18e5 Merge "Include word "fatal" in zygote death message" 2020-03-30 22:11:52 +00:00
Alex Spradlin
10700dceea Merge "Fix DecorView error about non-visual context" into rvc-dev
Automerger is stuck on this

Change-Id: Ia4cdfbb83787521e8eb32993dc6dd2cb2dbde96b
2020-03-30 20:57:09 +00:00
Antoan Angelov
f6be54216a Merge "Show empty state screens in order of priority." into rvc-dev am: 9238e32a16 am: 571c0e4ea3
Change-Id: Ia7f2f0f9f56392dace7e0b12e4bc2c9891e258a6
2020-03-30 20:05:03 +00:00
TreeHugger Robot
444f200f86 Merge "Fix flickers when changing control" into rvc-dev am: c322ed2173 am: 162040e358
Change-Id: Id54a95cfda897b0c88c02959ada4997ec4b69308
2020-03-30 18:58:25 +00:00
TreeHugger Robot
546feccda1 Merge "Fix DecorView error about non-visual context" into rvc-dev am: 8927986f3b am: 64b0a51b1b
Change-Id: I60cf98662d85f780d01ee0f02b1587193bff2752
2020-03-30 18:51:42 +00:00
TreeHugger Robot
2e5799ae71 Merge "Fix flickers when changing control" into rvc-dev am: c322ed2173 am: 162040e358 am: b88c500fea am: 3cb2ddd649
Change-Id: I5a7d6e658add347463be56e4022d31ccc1e30a04
2020-03-30 18:14:52 +00:00
TreeHugger Robot
d08a399a81 Merge "Fix DecorView error about non-visual context" into rvc-dev am: 8927986f3b am: 64b0a51b1b am: 776ff41d18 am: aaec840228
Change-Id: I7a3e288a6634da4d26120edcbbb0024bd1cf5146
2020-03-30 18:12:32 +00:00
arangelov
27608554dc Show empty state screens in order of priority.
To improve the user experience, this CL changes the order
in which the empty state screens are shown:
1. (highest priority) cross-profile disabled by policy
2. no apps available
3. (least priority) work is off

The intention is to prevent the user from having to turn
the work profile on if there will not be any apps resolved
anyway.

Fixes: 150936283
Test: atest ResolverActivityTest
Test: atest ChooserActivityTest
Test: manually tested each possible combination of edge cases
(work profile off, no apps found, cross-profile intents disabled)

Change-Id: Ic86c90bdda93cf731df2133890081b5583ef35e1
2020-03-30 17:00:09 +00:00
TreeHugger Robot
c322ed2173 Merge "Fix flickers when changing control" into rvc-dev 2020-03-30 11:45:54 +00:00
TreeHugger Robot
8927986f3b Merge "Fix DecorView error about non-visual context" into rvc-dev 2020-03-30 07:20:00 +00:00
Charles Chen
828c498904 Fix DecorView error about non-visual context
This error showed because DecorContext uses application context
to get WindowManager. This CL changes to use context to do so.
Also rename fields in DecorContext because we actually can pass any
context in "activityContext."
Note that most cases of misuse WindowManager is covered by [1].
We can guarantee that WindowManager can be obtained by mContext.

[1]:I52aa0c4a02b7da018aa10f1473e1616564296e41

Bug: 150632074
Test: manual - enable strict mode and check the error log not shown.
Test: atest DecorContextTest
Change-Id: I558a2819e5928a802b897a130cfc3262115b9935
2020-03-30 11:24:48 +08:00
Ram Muthiah
5408417d65 Merge "Revert "Do not mount whitelisted package in storage data and obb dirs"" into rvc-dev am: 40383b0f2b am: ee7f81aca9 am: 870cac3e11 am: 13da09c37f
Change-Id: I013f0da33cd8e806876253d46d80c97cbec220ba
2020-03-28 03:37:16 +00:00
Ram Muthiah
ee7f81aca9 Merge "Revert "Do not mount whitelisted package in storage data and obb dirs"" into rvc-dev am: 40383b0f2b
Change-Id: I32cc4880b7017114f9207e73e2c6087679efe637
2020-03-28 02:58:05 +00:00
Ram Muthiah
40383b0f2b Merge "Revert "Do not mount whitelisted package in storage data and obb dirs"" into rvc-dev 2020-03-28 02:47:38 +00:00
Ram Muthiah
7929c5dced Revert "Do not mount whitelisted package in storage data and obb dirs"
This reverts commit 2cd955e79d.

Reason for revert: Bisect indicates this change causes b/152550025

Bug: 152550025
Bug: 151218156
Change-Id: I350bfc44d2137416bd23591fffbe4284e1462a91
2020-03-28 02:39:58 +00:00
Jorim Jaggi
49b9f6c67c Fix flickers when changing control
- Do not reset system bar visibility when changing control target
- Do not apply hide transaction when gaining control, because that
may result in a single-frame flicker because it will conflict with
the animation
- Check requestedVisible instead of InsetsState.isVisible in
DecorView to avoid drawing the bar backgrounds transiently
- Abort transient mode when focused win changes.

Bug: 150195782
Bug: 152014877
Change-Id: I8bc9cdc89ce7364984ade8146e12a706ad5e8edb
2020-03-27 20:11:31 +01:00
Jorim Jaggi
2556c5f041 Merge "Make caption a insets source" into rvc-dev am: ac30aafd29
Change-Id: I5c486a30fe0828cfef21e2804a6dd9e3c4415d85
2020-03-27 17:42:41 +00:00
Jorim Jaggi
ac30aafd29 Merge "Make caption a insets source" into rvc-dev 2020-03-27 17:27:01 +00:00
TreeHugger Robot
6551128716 Merge "Make caption a insets source" 2020-03-27 07:39:45 +00:00
TreeHugger Robot
7c829731a4 Merge "Fix the duplicate components in edit shortcut menu list." into rvc-dev am: 22a0b13e5d am: 084b7b3acb am: 80f4dbf683 am: a2fa8b9872
Change-Id: I52eaa272055779c2aed0880efdc144b0a7a9247a
2020-03-27 02:08:26 +00:00
Andrii Kulian
6a62eaac3f Merge "Report bounds instead of size in WindowMetrics" into rvc-dev am: 363edf449a am: f8bb4fef74 am: 7e9a4c2f34 am: f68ab26611
Change-Id: I37268426928fa1da47ddb3ba68f080e1824dfedd
2020-03-27 01:46:40 +00:00
TreeHugger Robot
80f4dbf683 Merge "Fix the duplicate components in edit shortcut menu list." into rvc-dev am: 22a0b13e5d am: 084b7b3acb
Change-Id: I5b43e814887828fe3a50cbaa750bb3a555ca1c4e
2020-03-27 01:44:32 +00:00
TreeHugger Robot
f47351d42d Merge "Fix the duplicate components in edit shortcut menu list." into rvc-dev am: 22a0b13e5d
Change-Id: I69e00001eb1e3fbe7ce416eb01a83dc0a2503fb7
2020-03-27 01:34:06 +00:00
TreeHugger Robot
22a0b13e5d Merge "Fix the duplicate components in edit shortcut menu list." into rvc-dev 2020-03-27 01:33:38 +00:00
Andrii Kulian
5c13904c68 Merge "Report bounds instead of size in WindowMetrics" into rvc-dev am: 363edf449a
Change-Id: I80833bd0256a350662a90c2c4f73b9d1fee9273e
2020-03-27 01:16:24 +00:00
Andrii Kulian
7e9a4c2f34 Merge "Report bounds instead of size in WindowMetrics" into rvc-dev am: 363edf449a am: f8bb4fef74
Change-Id: I03b8e519c34c4c9318239540a20d6923672b2272
2020-03-27 01:15:53 +00:00
Andrii Kulian
363edf449a Merge "Report bounds instead of size in WindowMetrics" into rvc-dev 2020-03-27 01:08:37 +00:00
Automerger Merge Worker
ba50e8e635 Merge "Merge "Hide empty state icon and button in landscape mode." into rvc-dev am: 5e8e9e5f1a am: 27fcb96242" into rvc-d1-dev-plus-aosp am: 5612bb2979 am: f5dbcd5479
Change-Id: I58c060c4bc4baa82a069ac40fefd0b59131577a4
2020-03-26 13:03:39 +00:00
TreeHugger Robot
27fcb96242 Merge "Hide empty state icon and button in landscape mode." into rvc-dev am: 5e8e9e5f1a
Change-Id: I8e58e9cc4af96deebe46f01881362c3cc6ea92c0
2020-03-26 12:21:16 +00:00
TreeHugger Robot
5e8e9e5f1a Merge "Hide empty state icon and button in landscape mode." into rvc-dev 2020-03-26 12:19:56 +00:00
TreeHugger Robot
52fd7e1cf6 Merge "Do not mount whitelisted package in storage data and obb dirs" into rvc-dev am: e5d60ed552 am: 11dfc1132e am: 4528003b22 am: 196f780902
Change-Id: I9cd526f03e6a930082743e0c4e754dd69d91ed02
2020-03-26 12:07:17 +00:00
TreeHugger Robot
4528003b22 Merge "Do not mount whitelisted package in storage data and obb dirs" into rvc-dev am: e5d60ed552 am: 11dfc1132e
Change-Id: Ia3ac8b0475d904937d55d48bf664eeaefcc20287
2020-03-26 11:37:38 +00:00
TreeHugger Robot
bdc1efb903 Merge "Do not mount whitelisted package in storage data and obb dirs" into rvc-dev am: e5d60ed552
Change-Id: I0cddbfd4a280ed2cfd8d13ea62c1c24ae6e2f2ad
2020-03-26 11:13:55 +00:00
TreeHugger Robot
e5d60ed552 Merge "Do not mount whitelisted package in storage data and obb dirs" into rvc-dev 2020-03-26 11:01:12 +00:00
Yunfan Chen
fae0aeabe0 Make caption a insets source
This patch introduced setCaptionInsets, and set the Insets in
ViewRootImpl when dispatch the insets if there's a caption.

Modification is made in Window and DecorCaptionView to make caption
overlay with the app content, and pass the value to ViewRootImpl to
apply when dispatch. It is necessary to trigger a dispatch when caption
enabled status chanaged, otherwise sometimes it will not be updated.
Because caption is now updated locally on the client side.

Some old logic to deal with the overlay caption without insets are
removed, including the touch event dispatch override, the color
override.

Bug: 134531136
Test: go/wm-smoke
Test: Manually change the value in dispatchApplyInsets, can observe a
      blank content area when there's a caption bar.
Test: atest InsetsStateTest
Test: atest InsetsControllerTest
Change-Id: I356344a13c8569512d8f51f7ea19a5603f778252
2020-03-26 06:58:07 +00:00
Yunfan Chen
4f7ebe3bce Make caption a insets source
This patch introduced setCaptionInsets, and set the Insets in
ViewRootImpl when dispatch the insets if there's a caption.

Modification is made in Window and DecorCaptionView to make caption
overlay with the app content, and pass the value to ViewRootImpl to
apply when dispatch. It is necessary to trigger a dispatch when caption
enabled status chanaged, otherwise sometimes it will not be updated.
Because caption is now updated locally on the client side.

Some old logic to deal with the overlay caption without insets are
removed, including the touch event dispatch override, the color
override.

Bug: 134531136
Test: go/wm-smoke
Test: Manually change the value in dispatchApplyInsets, can observe a
      blank content area when there's a caption bar.
Test: atest InsetsStateTest
Test: atest InsetsControllerTest
Change-Id: I356344a13c8569512d8f51f7ea19a5603f778252
2020-03-26 15:56:25 +09:00
Peter_Liang
ee74b0ea90 Fix the duplicate components in edit shortcut menu list.
Root cause: After android R, will have new feature about AccessibilityShortcutInfo let developers to apply that in their service. But if the service have the both features that AccessibilityServiceInfo and AccessibilityShortcutInfo, the framework will make AccessibilityShortcutInfo priority higher than AccessibilityServiceInfo.

Goal: Filter tagert list in advance.

Bug: 152464317
Test: manual test
Change-Id: I93d2886ee686c939b8b6c4cf67b045392e9d9b51
2020-03-26 12:27:21 +08:00
Menghan Li
ec65a6a138 Merge "Accessibility Service & Shortcut Redesign - Remove “volume key shortcut” setting (5/n)" into rvc-dev am: fea8d184c2 am: 5664cb5315 am: 21f36c7bfb am: b10fbb7a4e
Change-Id: I995d4e7e20d12235d6fd57c8e8d437c8cb727fb6
2020-03-26 01:27:47 +00:00
Menghan Li
21f36c7bfb Merge "Accessibility Service & Shortcut Redesign - Remove “volume key shortcut” setting (5/n)" into rvc-dev am: fea8d184c2 am: 5664cb5315
Change-Id: Ibb1c94b1c8fc5df59caba66d2a16215800297a00
2020-03-26 00:54:21 +00:00
Menghan Li
835bda5744 Merge "Accessibility Service & Shortcut Redesign - Remove “volume key shortcut” setting (5/n)" into rvc-dev am: fea8d184c2
Change-Id: I276c3ab248480a37ae4905fc364a3e8325be0d7e
2020-03-26 00:38:20 +00:00
Menghan Li
fea8d184c2 Merge "Accessibility Service & Shortcut Redesign - Remove “volume key shortcut” setting (5/n)" into rvc-dev 2020-03-26 00:21:50 +00:00
Ricky Wai
2cd955e79d Do not mount whitelisted package in storage data and obb dirs
We now pass 2 booleans from AM to zygote about:
- If CE and DE data dirs need to be mounted
- If storage data and obb dirs need to be mounted

And also, separate whitelisted package from same uid packages, as same
uid packages do not need to be mounted in storage data and obb dir case,
it's needed to be mounted for CE and DE data dirs only. Otherwise
whtelisted packages will also be mounted in storage data and obb dirs,
which apps should not have access to it.

Bug: 151218156
Test: atest AdoptableHostTest
Change-Id: If7c20a7ed3b845d8657c937469161cb7ed3da07f
2020-03-25 16:40:46 +00:00
Automerger Merge Worker
e7c7b5257e Merge "Merge "Fix calculation of the collapsible height" into rvc-dev am: 5cb264d9df am: 0d9c6a8fce" into rvc-d1-dev-plus-aosp am: a68d2cfc67 am: 3c6bcfc2ab
Change-Id: I01e2350b376632b8d57b73882f250a7cd11d4f6d
2020-03-25 16:32:06 +00:00
arangelov
c5fb839d31 Hide empty state icon and button in landscape mode.
This is to accommodate for the case when the user
has max font size and max display size. The rest of
the empty state screen won't fit unless we hide the
icon and "Turn on work" button.

Test: manual
Fixes: 149817494
Fixes: 152274446
Change-Id: I95b90461ac36b4bbf6b0e4c4dd223e941d8c75cb
2020-03-25 13:48:10 +00:00
TreeHugger Robot
91253a6acb Merge "Fix calculation of the collapsible height" into rvc-dev am: 5cb264d9df am: 0d9c6a8fce
Change-Id: I6194ce3affb91934bb63bb7aee10fe67274f76dc
2020-03-25 13:32:36 +00:00
TreeHugger Robot
af4ed634cf Merge "Fix calculation of the collapsible height" into rvc-dev am: 5cb264d9df
Change-Id: I5759366868bdd770959f20ac0c6cf04031f8b11f
2020-03-25 13:32:05 +00:00
TreeHugger Robot
5cb264d9df Merge "Fix calculation of the collapsible height" into rvc-dev 2020-03-25 13:25:56 +00:00