Commit Graph

13190 Commits

Author SHA1 Message Date
Bernardo Rufino
2de79fb6fd Merge "Wire user info and use user context for text toasts" into rvc-dev 2020-04-06 21:59:20 +00:00
Bernardo Rufino
78f5d83ac8 Wire user info and use user context for text toasts
Text toasts don't currently support multi-user. This CL prepares toasts
for multi-user by wiring the user information from who requested the
toast (in the form of uid) to ToastUI, where text toasts are actually
rendered.

We go only as far as obtaining a new user-specific context for that user
and using that to construct the view. Actual support will come in future
CLs.

Bug: 151414297
Test: atest android.widget.cts29.ToastTest android.widget.cts.ToastTest
      ToastWindowTest ToastUITest NotificationManagerServiceTest
      LegacyToastTest
Change-Id: I8c92453c6a2b73c31f9a41ca9ff463d194d4f44f
2020-04-06 20:20:09 +01:00
Susi Kharraz-Post
8bd0f532a3 Fix NPE for Open With ChooserActivity Logging Bug
Target is not populated for "Open With" processed by ChooserActivity.
Adding a null catch in the logger to return default intent.

Bug: 153335691
Test: manual testing and running ChooserActivityTests
Change-Id: Ib7477a9030d0244d33d74690c6aab8b03b88e1e3
2020-04-06 15:07:23 -04:00
TreeHugger Robot
04e287816f Merge "Limit stage install to system and whitelisted packges only (1/2)" into rvc-dev 2020-04-06 14:16:25 +00:00
Tony Huang
a171ec4203 Merge "Fix split divider janky" into rvc-dev 2020-04-06 07:24:15 +00:00
Jerry Chang
792c79623d Limit stage install to system and whitelisted packges only (1/2)
Bug: 148664742
Test: atest FrameworksServicesTests:SystemConfigTest SysConfigTest#testStageWhitelist
Change-Id: I5d7617a014869167151f9f486dc0e89f5957390a
2020-04-06 11:05:53 +08:00
TreeHugger Robot
59a65bdc0f Merge "Revert "Fix DecorView error about non-visual context"" into rvc-dev 2020-04-03 19:53:56 +00:00
TreeHugger Robot
85ac2217f8 Merge "[wm]: Support free snap mode" into rvc-dev 2020-04-03 18:07:05 +00:00
Vadim Tryshev
5420fffe19 Revert "Fix DecorView error about non-visual context"
This reverts commit 828c498904.

Reason for revert: b/152806048
Bug: 152806048

Change-Id: I0ba53944a7fddf42cccf79c6495945c8afa3ab31
2020-04-03 18:06:05 +00:00
Selim Cinek
17c3f421d4 Merge "Fixed that the importance ring might show inside of groups" into rvc-dev 2020-04-03 17:48:05 +00:00
Song Hu
66726b1e19 Merge "Enable Sharesheet direct share target append prototype for droidfood." into rvc-dev 2020-04-03 14:56:58 +00:00
Susi Kharraz-Post
dde9c3afc8 Add sharesheet statsd logging
Add a Logger for sharesheet and add calls into ChooserActivity.java

Bug: 147508495
Test: manual testing and added unit tests into ChooserActivityTests.
Change-Id: I0024b5020f47475a28c4745af4d8ef268e5f85be
2020-04-03 11:07:19 +00:00
Song Hu
2eb5dbb378 Enable Sharesheet direct share target append prototype for droidfood.
Bug: 151112858
Test: manually tested both prod flow and prototype flow on phones.
Change-Id: I459e73e1a15c00f51dca929d4d0bf0adb74fbaeb
2020-04-02 20:22:23 -07:00
Selim Cinek
853a84b5e5 Fixed that the importance ring might show inside of groups
Fixes: 153106733
Test: add group, change priority to important, observe no ring inside of group
Change-Id: I4f30ac6b1e8877eb459e26335696b9aa11c3613e
2020-04-02 15:38:07 -07:00
Yohei Yukawa
f87f750888 Let blocked InputConnection APIs fail upon IInputMethod.unbindInput()
This is a follow up CL to our previous CL [1], which implemented
fail-fast mode for blocking InputConnection APIs based on
IInputMethod.unbindInput() async signal from IMMS to IMS.

What was not implemented in the previous CL was a mechanism to
immediately unblock a sync InputConnection API call that is already
requested to the IME client process and waiting for its response.

With this CL, any blocking InputConnection API fails immediately when
IInputMethod#onUnbindInput() is delivered to the IME process, without
waiting for the full time-out period (MAX_WAIT_TIME_MILLIS == 2 sec)
to pass.

Implementation Note:

The key idea is to use CountDownLatch to compose multiple wait
conditions.composed wait condition. The CountDownLatch is initialized
with 1 then will be decremented when:

 A. received a result from the IME client
 B. received IInputMethod.unbindInput()

Hence InputConnectionWrapper can simply wait for the CountDownLatch to
become 0 with an existing timeout (MAX_WAIT_TIME_MILLIS) then returns
failure unless the CountDownLatch became 0 because of A.

 [1]: I0f816c6ca4c5c0664962432b913f074605fedd27
      1d113d041f

Fix: 36897707
Test: atest InputConnectionBlockingMethodTest
Test: InputConnectionBlockingMethodTest#*FailFastAfterUnbindInput()
      take shorter time to complete.
Test: Monitor logcat with `adb logcat -s InputConnectionWrapper:*`
      while running `atest InputConnectionBlockingMethodTest`
Change-Id: Ic65a95eb5d0fd56f505a02fd9083bcf6694b6734
2020-04-02 12:54:55 -07:00
Daegyun Shin
8a9cb1d383 [wm]: Support free snap mode
In aosp, split divider can be snapped to the specific targets
(first, middle, or last)

new concept is freely snapping between non-dismiss targets.

Test: manual test
1. change config_dockedStackDividerFreeSnapMode true in config.xml
2. build
3. make split state
4. drag divider any position

Bug: 123693029
Change-Id: I9fc42fb698659608de6509acc9ad44874e793fd5
2020-04-02 09:00:16 -07:00
Feng Cao
257aa916ac Merge "Define custom equals method for bundles in the inline APIs" into rvc-dev 2020-04-02 02:47:01 +00:00
Feng Cao
59b682f5cd Define custom equals method for bundles in the inline APIs
Test: atest android.view.inputmethod.cts
Bug: 152811052

Change-Id: I15051493bb37f05b579b16d6e7fee36b05ab10cc
2020-04-01 12:46:15 -07:00
Selim Cinek
4237e8277a Reintroduced app ops for conversation notifications
Previously app ops weren't showing in conversation notifications
Also made sure that they show in case the app name is long.
Additionally this fixes the coloring of the sender name.

Fixes: 150905003
Test: atest SystemUITests
Change-Id: Iae8026e7efdec8c207d1984dac4ee089abe116b9
2020-04-01 11:40:54 -07:00
Steve Elliott
4605ca9daa Merge changes Ie5bfc2f6,I38e7dc8c,I9308a15a into rvc-dev
* changes:
  Reinflate notif when [un]marked as conversation
  Update conversation UI when importance changed
  Add unread count badge to conversation layout
2020-04-01 17:34:36 +00:00
Tony Huang
89d580c056 Fix split divider janky
The janky caused by SurfaceFlingerVsyncChoreographer does not work
reliably. Sometimes it didn't update but sometimes update twice per
frame so cause janky.

Fix this by removed using SurfaceFlingerVsyncChoreographer and use
real surface flinger sync signal to update screen.

Bug: 150874701
Test: enter split mode and drag divider to observer janky
Change-Id: I5a8bce36738a97b0ddaf4c4e77949eb5295b4894
2020-04-01 19:07:49 +08:00
TreeHugger Robot
cbd80ea094 Merge "Send more IME events to autofill manager service." into rvc-dev 2020-03-31 20:22:28 +00:00
Steve Elliott
239e6cb1df Add unread count badge to conversation layout
Fixes: 152303800
Test: manual, visual
Change-Id: I9308a15ab223086398ba073b08d60cb7c50d8c30
2020-03-31 16:20:39 -04:00
Selim Cinek
9bad85af2b Merge changes I0d79642d,If8756ac8,I29e73897,Ia8c5121a,I533b8f06 into rvc-dev
* changes:
  Indented the conversation action list
  Fixed some issues where conversation badges would not be visible
  Improved the animations of the conversation badges
  Important conversations now also transform into the shelf
  Adapted Shelf algorithm to also use conversation icons
2020-03-31 20:02:01 +00:00
Feng Cao
97ec1c4dcc Send more IME events to autofill manager service.
* In IME side, wait for the input start before calling back to Autofill,
  rather than returning inline unsupported immediately.
* Also adds an InlineSuggestionManager to simplify code in the
  InputMethodService

Test: atest CtsAutoFillServiceTestCases
Test: atest CtsInputMethodTestCases
Bug: 151123764

Change-Id: I199925d77aa508f259e98a8929120aeb96015b57
2020-03-31 18:11:24 +00:00
Selim Cinek
e027da23c0 Indented the conversation action list
Previously the actions weren't aligned with the conversation content
start.

Bug: 150905003
Test: add conversations, observe normal layout
Change-Id: I0d79642db736c66419ae3e4a6982ebd17abf09e2
2020-03-31 10:42:34 -07:00
Benedict Wong
7df7129b40 Merge changes I97ba5903,Icd80b368 into rvc-dev
* changes:
  Make VpnProfile.maxMtu default value match Ikev2VpnProfile
  Add negotiated DNS servers to VPN config
2020-03-31 16:52:04 +00:00
Benedict Wong
399c1365c2 Make VpnProfile.maxMtu default value match Ikev2VpnProfile
This change corrects the VpnProfile's maxMtu defaults to match that of
the Ikev2VpnProfile. 1400 is too high as a default, and Settings will
run into an issue here quite often.

Bug: 152573931
Test: FrameworksNetTests passing
Change-Id: I97ba5903b3cc1ed6a21c706ed3d78bd8ecbeee0c
Merged-In: I97ba5903b3cc1ed6a21c706ed3d78bd8ecbeee0c
(cherry picked from commit d0a44f49df)
2020-03-30 22:59:17 -07:00
Selim Cinek
9f2d21f3cc Improved the animations of the conversation badges
Previously the badges would just immediately disappear
without an animation. They are now animated when the
icon has finished animating.

Bug: 150905003
Test: add conversations, observe animations
Change-Id: I29e7389732bd5c22953dd7753d0feaae00297db0
2020-03-30 16:18:10 -07:00
Selim Cinek
9ed6e0452c Important conversations now also transform into the shelf
Instead of always using the small icon, important conversations
now transform from the conversationIcon

Bug: 150905003
Test: add a few notification, observe nice transitions
Change-Id: Ia8c5121a6bd415ccca9d959d291665b8ac43b000
2020-03-30 16:18:10 -07:00
Selim Cinek
79d9863ebc Adapted Shelf algorithm to also use conversation icons
Previously the algorithm would only work with a header
and the icon wouldn't transform into the shelf.
This is now fixed.

Bug: 150905003
Test: add conversation notification, observe normal transition
Change-Id: I533b8f06bee29ee93888d748808b4313fef338e8
2020-03-30 16:18:09 -07: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
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
ac30aafd29 Merge "Make caption a insets source" into rvc-dev 2020-03-27 17:27:01 +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
363edf449a Merge "Report bounds instead of size in WindowMetrics" into rvc-dev 2020-03-27 01:08:37 +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
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
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
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
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
5cb264d9df Merge "Fix calculation of the collapsible height" into rvc-dev 2020-03-25 13:25:56 +00:00
menghanli
390f8f9be9 Accessibility Service & Shortcut Redesign - Remove “volume key shortcut” setting (5/n)
- Target to fix migration issue to support a user revoked the accessibility shortcut before upgrading to R, but wants to to apply new hardware shortcut design in R.
- The switchbar of accessibility_shortcut_enabled was removed in (1/n), so we should also remove related checker in controller.

Bug: 142529032
Test: atest AccessibilityShortcutControllerTest
Change-Id: I48f8d88c4192e894b9e210221e5dc7e701344623
2020-03-25 07:46:41 +08:00