Commit Graph

13276 Commits

Author SHA1 Message Date
TreeHugger Robot
8a5bba3e6a Merge "Check whether should auto launch after showing empty state screen" into rvc-dev 2020-04-24 17:44:37 +00:00
arangelov
4d3be0bf0b Check whether should auto launch after showing empty state screen
Fixes: 154812743
Test: manual
Test: atest ChooserActivityTest
Test: atest ResolverActivityTest
Change-Id: I9f861bb6f7e4b7ff087aa74c554cc4e52f8ce614
2020-04-24 17:17:25 +01:00
TYM Tsai
4ddfdaf641 Merge "Filter the content of the Bundles used as extras and styling APIs" into rvc-dev 2020-04-24 08:42:56 +00:00
Jason Hsu
ea2d4bf1fd Merge changes from topic "rhedjao_a11y_button_rollback" into rvc-dev
* changes:
  Rollback chooser menu to version Q behavior for accessibility button (2/n).
  Rollback chooser menu to version Q behavior for accessibility button (1/n).
2020-04-24 03:07:39 +00:00
Peter_Liang
0589ab0ae3 Rollback chooser menu to version Q behavior for accessibility button (2/n).
Allow separate Activities to handle the multiple-target case for the hardware and software shortcuts. Migrate from an extra to an explicit class so the Intent dispatch will launch the correct Activity for the particular shortcut.

Bug: 151294664
Test: manual test
Change-Id: I54bb1d3ab91e2757c465e8763786d0234f6d4ea8
2020-04-23 16:25:17 +00:00
Peter_Liang
b8bf55c8c0 Rollback chooser menu to version Q behavior for accessibility button (1/n).
1. Replace ACCESSIBILITY_BUTTON_TARGET_COMPONENT key with
ACCESSIBILITY_BUTTON_TARGETS key.
2. Rollback to version Q widgets.

Bug: 151294664
Test: manual test
Change-Id: Ibaa3b058418476e58291bfb95a1935dbf5c70e25
2020-04-23 18:44:37 +08:00
TreeHugger Robot
7ae10c0737 Merge "Add shadow under tabs when user has scrolled up in sharesheet" into rvc-dev 2020-04-22 19:52:49 +00:00
arangelov
de5ebdcacb Add shadow under tabs when user has scrolled up in sharesheet
Fixes: 154522493
Test: manual
Change-Id: I4353dea41982e7497c341c19e7b177bf176b30af
2020-04-22 18:41:03 +00:00
arangelov
2b15d71b58 Synchronize direct share expansion between work and personal tabs
For example, if share sheet is fully expanded in personal profile,
when we go to the work tab, the direct share targets should
also be expanded there.

Fixes: 154523836
Test: manual
Test: atest ChooserActivityTest
Change-Id: I9346d7485f7498fc038c86bf5f8550c8ea6d0b48
2020-04-22 18:09:00 +00:00
Antoan Angelov
3a507cbf8c Merge "Hide "Always" and "Just once" buttons for empty state screens" into rvc-dev 2020-04-22 13:10:20 +00:00
Antoan Angelov
2f5e2df152 Merge "Restore share sheet height when toggling dark mode" into rvc-dev 2020-04-22 13:08:13 +00:00
arangelov
9d8941457d Restore share sheet height when toggling dark mode
This CL does the following changes:
- Save and restore the resolver drawer layout height.
This is necessary because when we toggle darkmode,
we don't go through handleLayoutChange, thus we don't
recalculate the height the standard way.
- Disables saving state for the viewpager.
This is necessary, because the content is
incorrectly restored afterwards. It's better to
reload it instead.
- Saves and restores the last selected tab. This is
necessary because with the viewpager state saving
disabled, it defaults to the first tab.

I considered updating the configChanges attribute in
the manifest to include dark mode toggling, but it
gave unsatisfactory result - the share sheet only
partially became dark.

Test: manual
Test: atest ChooserActivityTest
Test: atest ResolverActivityTest
Fixes: 154526324
Change-Id: I99e159ea7ca413f8acbc0429a43ce5aba32a1b28
2020-04-22 13:47:00 +01:00
TYM Tsai
850c8129e6 Filter the content of the Bundles used as extras and styling APIs
Adds filter to prevent passing binder objects in the extras and styling
APIs for inline suggestions. Avoids these to be used to send over remote
objects for Autofill provider and IME to communicate through private APIs
bypassing the OS.

Bug: 152316540
Test: atest CtsAutoFillServiceTestCases
Test: atest InlineSuggestionsRequestTest
Change-Id: I00940a845ed0e2546cbe09fa36e2439869c2f783
2020-04-22 14:41:07 +08:00
Dmitri Plotnikov
afe0f89d59 Merge "Removing BatteryStatsImpl lock that causes a deadlock" into rvc-dev 2020-04-21 23:36:39 +00:00
Dmitri Plotnikov
55edd0c81c Removing BatteryStatsImpl lock that causes a deadlock
Please see the original change I0d6b4a7b12b234939cb6eb3a32658b28f61dff4f,
where the additional locks were first introduced, but the original lock
was not consistently removed.

Bug: 153826721
Bug: 153813215
Test: Disable and reenable WiFi.

Change-Id: I0e68889e9dfe22495d64b16a495a83434b816304
2020-04-21 14:08:17 -07:00
TreeHugger Robot
f9a02be500 Merge "Fix crash in IntentForwarderActivity" into rvc-dev 2020-04-21 18:52:54 +00:00
TreeHugger Robot
9bc5f9efc2 Merge "Keeing the device in gesture nav while user setup is pending" into rvc-dev 2020-04-21 18:25:41 +00:00
kholoud mohamed
149e0fe89e Fix crash in IntentForwarderActivity
The crash was caused by trying to resolve an instant
app which is not allowed on the main thread, fixed it by
resolving on a background thread.

Fixes: 146141583
Test: atest IntentForwarderActivityTest
Test: atest ResolverActivityTest
Test: atest ChooserActivityTest
Change-Id: I250d682cf90870c7360eb66529be8c91fac266b1
2020-04-21 18:06:03 +01:00
Miranda Kephart
44cc1e274b Merge "Add screenshots logging" into rvc-dev 2020-04-21 16:58:54 +00:00
arangelov
5ecac7a945 Hide "Always" and "Just once" buttons for empty state screens
This change does the following things:
- Groups the button bar and divider in a view with the system
background, so that when they get invisible, the background is not
transparent
- Sets the invisibility of the button bar and divider to invisible
so that the height of the intent resolver is preserved
- Removes the bottom padding for the empty state screen for
the intent resolver to reduce the blank space under it caused
by the now blank button bar

Fixes: 154326163
Test: manual
Change-Id: Iaea4da3f2250f51f9d1d627c1965f42014914084
2020-04-20 21:25:30 +01:00
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
Sunny Goyal
38412951a9 Keeing the device in gesture nav while user setup is pending
> Sending different insets to the app during user setup
> Keeping the back butotn visible and not handling edge swipe
> Fixing bug where EdgeBackGestureHandler is not updated with correct
  edge scale when user switches

Bug: 150004073
Bug: 148492421
Test: Manual
Change-Id: I112465a634de2c85d613c071b66f8c099c2c78e3
2020-04-17 11:35:41 -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
Miranda Kephart
7b2c313da7 Add screenshots logging
Bug: 150710005
Test: manual
Change-Id: I54a37eb0a62234c6c53fc0f3c80e18e9ee269f12
2020-04-17 13:28:23 -04: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