Commit Graph

13226 Commits

Author SHA1 Message Date
Richard Gaywood
9efa35f8cb Add aggregation method to dumputils
Will be used for aggregating process states together for stats tracking
and output.

Change-Id: I5833a53f2e5e788d0475e10129658d12d9cf2b88
Bug: 148542701
Merged-In: I5833a53f2e5e788d0475e10129658d12d9cf2b88
Test: build, flash, unit tests (newly added code is not invoked yet)
(cherry picked from commit b832e98879)
2020-04-16 06:18:04 +00:00
Rhed Jao
8fcba0353e Fixes long press the a11y shortcut no response
An a11y service targeting sdk version > Q and requesting a11y button
should be turned on by the Settings when it's assigned to the a11y
shortcut by the user. An a11y button callback is sent to the a11y
service when the user long press the a11y shortcut.

This issue happened when an disabled a11y service is assigned to the
a11y shortcut, and upgraded to the target sdk version > Q. Framework
fails to send the callback and no response when user long press the
shortcut.

Turns on the a11y service and show up a toast to fix this issue.

Bug: 153517972
Test: atest AccessibilityShortcutControllerTest
Change-Id: Ie4fc9bbeaf08ba674cfe6382eab214b2a15c004c
2020-04-16 12:14:23 +08:00
TreeHugger Robot
10e9c219a1 Merge "Enable System User Home for CSI" into rvc-dev 2020-04-15 00:47:44 +00:00
TreeHugger Robot
42987638f5 Merge "Increase collapsed height for resolver list with default and tabs" into rvc-dev 2020-04-14 18:30:29 +00:00
Garfield Tan
4456f7d2d6 Merge "Enable compositor shadow for freeform windows." into rvc-dev 2020-04-14 17:03:59 +00:00
arangelov
bf80675a0f Increase collapsed height for resolver list with default and tabs
Fixes: 153510337
Test: manual
Change-Id: Icaf291764f7549ae245b63f706e4c33061bb6c8d
2020-04-14 17:02:36 +01:00
TreeHugger Robot
1f6f9a6c75 Merge "Start sharesheet in the same profile instead of switching to other profile." into rvc-dev 2020-04-14 13:15:56 +00:00
Julia Reynolds
c026d54cd7 Merge changes from topic "bubble_settings_wooo" into rvc-dev
* changes:
  Changes to enable bubble settings CTS
  Notification Bubble Button
  Make bubble settings a pref with an int rather than a bool
2020-04-14 11:22:14 +00:00
Susi Kharraz-Post
1faa960005 Merge "Rename sharesheet started atom proto fields." into rvc-dev 2020-04-14 10:49:57 +00:00
Peter_Liang
8b7c9dada1 Migrate AccessibilityButtonChooserActivity into dialog folder and renaming.
1. Migrate and renaming file, functions.
2. Revise java doc and annotations.

Bug: 151294664
Bug: 147655054
Test: manual test
Change-Id: Ie791bce32b21495f9c2bf499feb8f6601c941f1d
2020-04-14 03:24:59 +00:00
Garfield Tan
7e1cb5c6b6 Enable compositor shadow for freeform windows.
It was disabled because root task didn't have bounds for freeform
windows, but now it does so let's enable it.

Bug: 149585281
Test: Smoke tests on crosshatch with freeform developer option on.
Change-Id: Ie8a40ad20c028919c8959a1df291dee408b49c39
2020-04-13 14:11:36 -07:00
Susi Kharraz-Post
3ddadd8f3c Rename sharesheet started atom proto fields.
When copying over the fields into Google3 the linter failed on two field
names that are camel case rather than snake case. Changing here so the
two match. In addition, one of the enum fields didn't have a default
value.

Bug: 147508495
Test: compiles + ChooserActivityTest runs
Change-Id: Iacec9654350763e691a4a10087f693839fd5ea83
2020-04-13 10:05:29 -04:00
PETER LIANG
83c4af69d0 Merge "Renaming for accessibility fragment type and functions." into rvc-dev 2020-04-13 12:23:43 +00:00
Peter_Liang
293e32bb90 Renaming for accessibility fragment type and functions.
1. Update fragment type name to latest.
2. Revise the corresponding functions name.

Bug: 147655054
Test: manual test
Change-Id: I731246beda9159ac7672ac20f4d7ba0e4f8a3684
2020-04-13 18:02:38 +08:00
Yurii Zubrytskyi
da208016d6 [incfs] Make native library extraction async
IncrementalService can create the library files beforehand, but
delay filling in their data. As it takes quite a while in
general (over a second in cases when the phone is busy), it's
better to run the unzipping and filling in a separate thread
and only make sure it finishes before the whole installation
process is complete.
This speeds up the megacity.apk installation by ~250-300ms,
1000-1100ms -> 750-800ms

Bug: 153513507
Test: adb install megacity.apk

Change-Id: Ia44f7e45b9e0abaebdfb6fe5352f9dcf29ab4ece
2020-04-10 12:30:49 -07:00
TreeHugger Robot
85b561c3c2 Merge "Exposed PooledLambdaImpl.getFriendlyName() as FunctionalUtils.getLambdaName()" into rvc-dev 2020-04-09 23:22:25 +00:00
Mady Mellor
9adfe6a20c Notification Bubble Button
Button is visible on expanded notifications that are in the
conversation section.

Always visible if the notification has metadata & the user
hasn't turned off bubbles for the device.

Button is added to end of the template actions, making it
visible if there were no other actions.

Tapping it to make a button will change the app settings
to "selected" and enable bubbles for that channel, if the
bubble wasn't allowed otherwise.

Tapping it to stop the bubble will disallow that channel
from bubbling.

Test: manual:
- check bubble button on notif with long action text
- check button is hidden when inline reply is focused
- check no bubble button on non-conversation notifs
- check create bubble from HUN
- check create bubble from expanded notif
- check that dismissing a bubble updates state of the button
- check that getting new notif after dismissing bubble
  updates state of the button

Bug: 138116133
Change-Id: Ic12204bd191530e94ea0400e16a9315a0d149252
2020-04-09 14:49:36 -07:00
arangelov
c758139095 Start sharesheet in the same profile instead of switching to other profile.
Instead of starting the sharesheet in the other profile when
choosing the "Switch to work"/"Switch to personal" button,
we now start the sharesheet in the same profile with the other tab
selected.

For example, we're in the personal profile and share something
via an app that uses its own sharing logic. That shows the
"Switch to work" button and when we press it, we now start
the sharesheet in the personal profile with the work tab selected.

The reason for this is to avoid user confusion when they go back
to the personal tab and it shows an empty state screen due to
lack of cross-profile intents.

Fixes: 152866292
Test: manual
Test: atest ChooserActivityTest
Test: atest ResolverActivityTest
Test: atest IntentForwarderActivityTest#launchInSameProfile_chooserIntent
Change-Id: Ic117c9c51c663b6574e7692022bac82f7c899ec2
2020-04-09 15:46:33 +01:00
Adrian Roos
3d670ae046 Merge "Insets: Fix DecorView consuming of insets" into rvc-dev 2020-04-09 08:17:01 +00:00
Adrian Roos
d686b084ec Insets: Fix DecorView consuming of insets
Previously, disabling the consuming logic was
done based on whether we target R.

But this:
- didn't work for Q apps that already use the new API
- causes a bit of unnecessary behavior churn
- requires special-casing the IME

Instead, we look at whether the app has requested to
handle insets with the R setDecorFitsSystemWindows API.

Fixes: 152384150
Test: atest DecorInsetSdk29Tests DecorInsetTests
Change-Id: I754851d0c11dccd21c2fa011cfdc3f0d7396cf60
2020-04-08 19:25:45 +02: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
TreeHugger Robot
6acebc809a Merge "Don't ask libc for PT feature w/o kernel support." into rvc-dev 2020-04-08 14:15:23 +00:00
Isaac Chen
fd2f5f66f9 Enable System User Home for CSI
Core system image (CSI) doesn't have Launcher or Settings so no home
activity, but still needs to boot properly. This change enables the
fallback home activity, SystemUserHome, in the framework for CSI.

Bug: 149307007
Bug: 149780604
Test: $ lunch csi_arm64-userdebug; m
      # flash the system.img built to crosshatch
      $ atest DeviceHealthTests
Change-Id: I0f999f76e23c6316f6d5d0741a1116028e34a0ab
2020-04-08 12:31:26 +08:00
TreeHugger Robot
f9557e4400 Merge "Fixed an issue where the unread count would disappear too fast" into rvc-dev 2020-04-07 18:42:06 +00:00
Selim Cinek
3c2a6a281e Merge "Fixed the appearance of image messages that are out of view" into rvc-dev 2020-04-07 17:58:04 +00:00
TreeHugger Robot
0ed25f0cd2 Merge "Show sharesheet with 1 personal app and >0 work apps with WP off" into rvc-dev 2020-04-07 16:06:30 +00:00
Mitch Phillips
4d4347c257 Don't ask libc for PT feature w/o kernel support.
Check that the kernel supports the Tagged Pointers feature before asking
libc to disable/enable pointer tagging.

Bug: 153114333
Test: Build coral, note no messages from SetHeapTaggingLevel.
Test: atest CtsTaggingHostTestCases

Change-Id: Id5fbd731aa70f7b0a75525387479f6123628a012
Merged-In: Id5fbd731aa70f7b0a75525387479f6123628a012
2020-04-07 15:44:00 +00:00
felipeal
97a1e153ff Exposed PooledLambdaImpl.getFriendlyName() as FunctionalUtils.getLambdaName()
Test: manual verification
Bug: 145689885

Change-Id: I0889df1f5e509bd6184e3e08122469d38c1138ed
2020-04-07 15:30:28 +00:00
Selim Cinek
94d0be89f0 Fixed an issue where the unread count would disappear too fast
Especially with images this was leading to really bad transitions
since the image would pop over immediately.
We now update the counter once the expansion has finished

Fixes: 153392205
Test: add conversations with messages with unread count and image, click on it.
Change-Id: I2ad2ec6a989a21154e3edbf09aabc6d17ea75bd7
2020-04-06 20:16:27 -07:00
Selim Cinek
35910cacaa Merge changes I76df6529,I99594ae9 into rvc-dev
* changes:
  Fixed the heads up layout of conversations
  Fixed an issue where the conversation title was showing doubled
2020-04-07 01:22:04 +00:00
Selim Cinek
a959fe44a0 Fixed the appearance of image messages that are out of view
Previously we were showing image messages of all senders instead
of just the last one.
This is now fixed.

Fixes: 153388613
Change-Id: I4e9c563c28291de25bf3dbd0ad72940ab59cad6f
2020-04-06 18:16:40 -07:00
Sally Yuen
de172d5438 Merge "Set the window title in AlertDialog's AlertController" into rvc-dev 2020-04-06 23:54:23 +00:00
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
arangelov
ce7d4a623c Show sharesheet with 1 personal app and >0 work apps with WP off
Previously we would autolaunch in this case, as
getResolversForIntentAsUserInternal didn't return any apps for
the work profile when it's off. This change adds the
MATCH_DIRECT_BOOT_AWARE and MATCH_DIRECT_BOOT_UNAWARE
flags to the PackageManager#queryIntentActivitiesAsUser call.

Test: manual
Test: atest ResolverActivityTest
Test: atest ChooserActivityTest
Fixes: 153338971

Change-Id: Iedf10d54953b94393c78d6357ce7e5216f3ba261
2020-04-06 18:22:33 +01: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
Selim Cinek
28db07e902 Fixed the heads up layout of conversations
Previously the expand button layout was always at 80dp which
made the collapsed size increase. we now measure it at
match_parent instead and just internally use another layout
to position it properly.

Fixes: 153204251
Test: add heads up notification, observe normal padding
Change-Id: I76df6529c1a24808bce54ed0d04230cddf7a0c8c
2020-04-03 17:52:15 -07: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
sallyyuen
83ba7aab9a Set the window title in AlertDialog's AlertController
AlertDialog.Builder's setTitle() does not set the title of its
window, which TalkBack uses for announcements.

Make the behavior consistent between the AlertDialog.Builder's
setTitle and AlertDialog's setTitle, which does change the window
title.

Bug: 149755168
Test: Menu titles appear in the node tree debug info and are announced.
by TalkBack. App version info in Settings is announced.

Change-Id: I49deb98ad294538864e413c6c486b4148e06a2b6
2020-04-03 09:06:11 -07: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