Commit Graph

13254 Commits

Author SHA1 Message Date
Mark Renouf
03f9a814a5 Merge "Scroll Capture Framework" into rvc-dev 2020-04-20 19:20:13 +00:00
TreeHugger Robot
1161f28ddb Merge "Use startActivityAsCaller instead of startActivity." into rvc-dev 2020-04-20 17:36:59 +00:00
TreeHugger Robot
6699c412bb Merge "Fix comparison of UserHandle objects" into rvc-dev 2020-04-20 16:41:37 +00:00
arangelov
e7b713474b Use startActivityAsCaller instead of startActivity.
Also make canForward return null for ACTION_CHOOSER.

Fixes: 154225763
Test: manual
Test: atest IntentForwarderActivityTest
Change-Id: If035607a751af857a39f42e45633a35b44e3e83e
2020-04-20 17:04:07 +01:00
arangelov
47906054fc Fix comparison of UserHandle objects
Fixes: 154442613
Test: none
Change-Id: If650e9d6a0034ef4d428852cb08fa456e1f4a247
2020-04-20 16:14:26 +01:00
Mark Renouf
a927929d99 Scroll Capture Framework
This is an implementation of long screenshots supporting
interactive, incremental capture of scrolling content using
a cooperative API between the app process and the system.

Design goals:

 - Provide for tile based incremental screenshots of scrolling content
 - Support existing apps without developer action
 - Provide support for non View-based Apps & UI toolkits

Bug: 148131831
Test: atest \
      FrameworksCoreTests:android.view.ScrollCaptureClientTest \
      FrameworksCoreTests:android.view.ScrollCaptureTargetResolverTest \
      FrameworksCoreTests:com.android.internal.view.ViewGroupScrollCaptureTest \
      FrameworksCoreTests:android.view.ScrollViewCaptureHelperTest \
      WmTests:com.android.server.wm.DisplayContentTest

Merged-In: I6c66a623faba274c35b8fa857d3a72030a763aea
Change-Id: I6c66a623faba274c35b8fa857d3a72030a763aea
2020-04-20 15:07:59 +00:00
Jing Ji
35c6b8f0ab Merge "Set a default wtf handler for system_server at initialization" into rvc-dev 2020-04-20 05:57:25 +00:00
Song Hu
ab1145d2f1 Merge "Fix sharesheet prototype to support CtsSharesheetDeviceTest" into rvc-dev 2020-04-18 16:44:32 +00:00
Hui Yu
4db77a9749 Merge "Move noteAppWidgetTapped call into AppWidgetHostView." into rvc-dev 2020-04-18 04:03:52 +00:00
Jing Ji
6674e0d654 Set a default wtf handler for system_server at initialization
In case the ActivityManagerService hasn't started yet.

Bug: 153704326
Bug: 153598920
Test: Manual - induce wtf logs in early-booted services
Change-Id: I2b444cf70d9126963084ab15f9cd17fe5b464529
2020-04-17 12:48:08 -07:00
Song Hu
36ba1b1037 Fix sharesheet prototype to support CtsSharesheetDeviceTest
Bug: 153904514
Test: atest CtsSharesheetTestCases:android.sharesheet.cts.CtsSharesheetDeviceTest

Change-Id: I8cff9855586070589401f5f8248556d01814d324
2020-04-17 11:17:40 -07:00
TreeHugger Robot
4ae2732361 Merge "Reset placeholder count when rebuilding resolver list." into rvc-dev 2020-04-17 12:39:49 +00:00
PETER LIANG
7682deac2d Merge changes from topic "redesign shortcut chooser" into rvc-dev
* changes:
  Redesign for AccessibilityShortcutChooserActivity (3/n).
  Redesign for AccessibilityShortcutChooserActivity (2/n).
  Redesign for AccessibilityShortcutChooserActivity (1/n).
2020-04-17 12:19:58 +00:00
Peter_Liang
fbd4bf7b34 Redesign for AccessibilityShortcutChooserActivity (3/n).
1. Migrate the functions related to permision dialog into AccessibilityTargetHelper file.
2. Remove redundant codes.

Bug: 147655054
Test: manual test
Change-Id: Ie052bd7c4159552a78193464602e3d1d9471554b
2020-04-17 15:34:32 +08:00
Peter_Liang
7d9af05e13 Redesign for AccessibilityShortcutChooserActivity (2/n).
Refactor and replace it with new components and functions.

Bug: 147655054
Test: manual test
Change-Id: I12ef647ef0524d2d2cada63c46341c0fddb828da
2020-04-17 15:34:30 +08:00
Peter_Liang
fbad548bf0 Redesign for AccessibilityShortcutChooserActivity (1/n).
Analyzes the common attributes and functions in AccessibilityShortcutChooserActivity in advance and separate them into respective new component target related to Accessibility service, Accessibility activity or white listing feature.

Bug: 147655054
Test: manual test
Change-Id: I123d30cc4d2ada97eda6010e75cfca70e9fa4503
2020-04-17 15:10:45 +08:00
TreeHugger Robot
5c9429661e Merge "Add stats puller for aggregated procstats" into rvc-dev 2020-04-16 20:07:53 +00:00
TreeHugger Robot
2dda126b01 Merge "Show other profile tab if 0 apps in current profile and >1 in the other." into rvc-dev 2020-04-16 20:03:45 +00:00
arangelov
61c7d2f4b6 Reset placeholder count when rebuilding resolver list.
Fixes: 148589435
Test: manual
Change-Id: I150ba1c14648fc5939a519b0b3583e0e12dd16f4
2020-04-16 20:15:58 +01:00
Richard Gaywood
863a72186f Add stats puller for aggregated procstats
Implement puller code in StatsPullAtomService & ProcessStats that will
output new pre-aggregated proto form of ProcStats data.

Change-Id: Id3d28b0ec135b1b25f3b70a5eb29bec67d71805d
Test: local debugging, see b/152397079
Bug: b/152397079
Bug: b/145203981
Merged-In: Id3d28b0ec135b1b25f3b70a5eb29bec67d71805d
(cherry picked from commit 3b428af57f)
2020-04-16 18:44:48 +00:00
Richard Gaywood
89e6a4a4b5 Merge "Implement procsstats data agggregation" into rvc-dev 2020-04-16 18:43:09 +00:00
arangelov
2c6115af27 Show other profile tab if 0 apps in current profile and >1 in the other.
Currently if we have 0 browser apps in work profile and >1 in personal,
and we try open a link from the  work profile, the personal profile
intent resolver is launched. We handle this gracefully by showing the
work tab and the no apps found empty state screen, instead of the
cross profile intents disabled.

Other changes in this commit:
- Handle all empty state screens from a single method
- All empty state screens are now shown from ResolveActivity#onPostListReady.
This was needed to guarantee consistency when showing the header.
- Always create the header exactly once for the lifetime of the intent
resolver/share sheet. Before it was re-created when swiping back to
the initial tab.
- Always show the header text when the tabbed view is enabled.

Fixes: 148536209
Test: manual
Test: atest ChooserActivityTest
Test: atest ResolverActivityTest

Change-Id: I737f1e8f864ae1108af7ec3ba8a1fa0f10b383b0
2020-04-16 19:07:43 +01:00
TreeHugger Robot
dbbb59a1c5 Merge "Call updateChooserCounts with the correct user id" into rvc-dev 2020-04-16 17:39:38 +00:00
arangelov
4872e68cf6 Call updateChooserCounts with the correct user id
Fixes: 154216098
Test: atest ChooserActivityTest
Test: manually share in-profile and cross-profile
Change-Id: I7a970acba6ca4ab044c2fa07cef6bfe99582bf62
2020-04-16 17:06:26 +01:00
TreeHugger Robot
5895295da0 Merge "Don't hide "Switch on work" button in landscape" into rvc-dev 2020-04-16 13:55:36 +00:00
Richard Gaywood
57dc86afc0 Implement procsstats data agggregation
Aggregation of procstats data is done to a subset of total possible
process states; this reduces total data footprint.

Change-Id: Ia1528c5ca33bafcb992e34d5fec53156d357b9e1
Test: make, flash (code not yet invoked)
Bug: 145203981
Merged-In: Ia1528c5ca33bafcb992e34d5fec53156d357b9e1
(cherry picked from commit 1651ad3c3a)
2020-04-16 12:50:26 +00:00
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
Hui Yu
4803268229 Move noteAppWidgetTapped call into AppWidgetHostView.
RemoteViews is public API used out of scope of widget. The correct place
to call noteAppWidgetTapped is in AppWidgetHostView.

Fix: 153676411
Test: manual test, tap a widget, "adb shell dumpsys usagestats | grep
USER_INTERACTION" to oberserve USER_INTERACTION event sent to UsageStas, "adb shell dumpsys appops | grep appWidgetVisible" to observer appWidgetVisible flag.

Change-Id: Ic473211b91fd952dbb81b09b1e1568d6f69a0dd8
2020-04-15 22:06:12 -07: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
arangelov
5f29e27a11 Don't hide "Switch on work" button in landscape
Hiding the button is not in line with the a11y
guidelines. Make button always show instead.

Fixes: 149817494
Test: manual
Change-Id: If2d2ef34ece72a6d397d18ff735ab2c55c8bd4a3
2020-04-15 18:48:52 +01: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