Commit Graph

13201 Commits

Author SHA1 Message Date
Feng Cao
deec8f0175 Sends click and long click events from the inline suggestion to host app
Test: manual, atest InlineSuggestionTest
Bug: 151185482

Change-Id: Iafeb4584feca8a1cb1374f81105fa22136eba183
2020-03-12 15:51:22 -07:00
Andrei-Valentin Onea
e57cfbae26 Merge "Add option to toggle all changes" into rvc-dev 2020-03-11 17:15:34 +00:00
Antoan Angelov
5527ace031 Merge "Call setAdapter from handleLayoutChange for the other profile" into rvc-dev 2020-03-11 15:36:09 +00:00
Jeff Sharkey
a7a96ad6f8 Merge "Give hidden API behavior to legacy apps." into rvc-dev 2020-03-10 23:03:41 +00:00
Jeff Sharkey
8b0cff7108 Give hidden API behavior to legacy apps.
Starting in R, there is a new public API overload that delivers a
flags argument.  Some apps may be relying on a previous hidden API
that delivered a userId argument, and this change is used to control
delivery of the new flags argument in its place.

There are dozens of these hidden API users are in the system UID,
either in the system process or the Settings app, so we hard-code
giving them the legacy behavior, since refactoring would be messy
between internal and AOSP branches.

Also adjust incoming and outgoing method signatures to use slightly
more flexible Collection<Uri>, which has handy methods like
contains() and isEmpty().

Bug: 150939131
Test: atest --test-mapping packages/providers/MediaProvider
Test: atest FrameworksServicesTests:com.android.server.devicepolicy.DevicePolicyManagerTest
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: If6a77449e19215cf1c60d4217e62fc04b0959bfc
2020-03-10 16:36:21 -06:00
TreeHugger Robot
98f21c2474 Merge "Revert "Revert "Notification statsd logs: Notification panel.""" into rvc-dev 2020-03-10 20:09:43 +00:00
arangelov
19e1fea590 Call setAdapter from handleLayoutChange for the other profile
Fixes: 150936654
Test: manual
Change-Id: Ida516b215ca4e42cbf89d82c115ce8f369829e3a
2020-03-10 18:09:39 +00:00
Steven Moreland
02e00a379b Merge "SystemConfig: Allow runtime differentiation of vendor configurations" into rvc-dev 2020-03-10 16:18:57 +00:00
Andrei Onea
5b1e2eb495 Add option to toggle all changes
This change adds the ability of enabling and disabling all allowed
changes for a given package and target sdk through adb.

Bug: 149980515
Test: adb shell am enable-all 28 foo.bar && \
	adb shell dumpsys platform_compat
Test: adb shell am disable-all 28 foo.bar && \
	adb shell dumpsys platform_compat
Test: atest CompatConfigTest
Merged-In: Ia84d8e1162ea0b3f4c6afe87e63db56256236940
Change-Id: I4696e13882b1b2c930731e6e7787924e20da1a46
2020-03-10 13:27:14 +00:00
Roopesh Nataraja
50c61752a8 SystemConfig: Allow runtime differentiation of vendor configurations
Single vendor can support multiple sku's with different capabilities.
Add support to load capability xml's from below vendor locations.

vendor/etc/sysconf/sku_${ro.boot.product.vendor.sku}/*.xml
vendor/etc/permissions/sku_${ro.boot.product.vendor.sku}/*.xml

Bug : 148582757
Test: Copy capability xml's to above mentioned vendor locations
      during compilation and check if it gets loaded by
      SystemConfig at runtime.

Change-Id: Ic1a332d30224f6d26afdfc230ea7c1462aefa243
(cherry picked from commit 62e212521a)
Merged-In: Ic1a332d30224f6d26afdfc230ea7c1462aefa243
2020-03-09 14:33:51 -07:00
atrost
4f5949f5ba Allow overriding disabled changes in final release.
Since disabled changes are disabled by default, our policy should allow
opting in to them in the final release.
Add toString to OverrideAllowedState for easier test debugging.

Test: atest com.android.server.compat.OverrideValidatorImplTest
Bug: 144552011
Change-Id: Iff01ee44d30d3e5703a980cddaf1b38435756c3c
2020-03-09 19:47:05 +00:00
Peter_Liang
baf4f05387 Update the edit shortcut menu (4/n).
1.Popup the permission dialog to warn user when trigger service target.
2.Update strings

Bug: 148989057
Test: manual test
Change-Id: If2d72bb5a98ba5a4c284a5d9a32991ea38fbadd7
2020-03-09 13:37:48 +08:00
Peter_Liang
b6d9e4168e Update the edit shortcut menu (3/n).
1. Enable to uncheck legacy service target item in edit menu mode.
2. Add toast to warng the user when uncheck service.

Bug: 148989057
Bug: 150365947
Test: manual test
Change-Id: Ieb35d3593ed25025dbc37507d0c54e6ba266d2ed
2020-03-08 21:25:44 +08:00
Peter_Liang
1e20bc4147 Update the edit shortcut menu (2/n).
Add checkbox into list item and change the beavior.

Bug: 148989057
Test: manual test
Change-Id: I7782898582c2f9759d4ef466d2864f124d8c83be
2020-03-08 21:25:25 +08:00
TreeHugger Robot
1a023125c9 Merge "Add permissions data validation in AppOpsService" into rvc-dev 2020-03-07 00:50:14 +00:00
Will Brockman
ed05940533 Merge "Statsd log of dismiss all notifications event." into rvc-dev 2020-03-06 21:59:11 +00:00
Eugene Susla
8f562219c8 Merge "Generate @NonNull setter args and @MaySetToNull to opt out" into rvc-dev 2020-03-06 18:53:24 +00:00
Will Brockman
b65faa8e05 Statsd log of dismiss all notifications event.
Using UiEventLogger: DISMISS_ALL_NOTIFICATIONS_PANEL

Bug: 146488473
Test: atest NotificationStackScrollLayoutTest
Change-Id: Ic81190fa52e9e43498d41182b0476bb03645a52d
2020-03-06 13:51:14 -05:00
TreeHugger Robot
8f15e287e9 Merge "Autolaunch if one app in active profile and empty state in the inactive." into rvc-dev 2020-03-06 17:41:44 +00:00
TreeHugger Robot
8a34b90f7a Merge "Enable work tab in share sheet and intent resolver feature flag" into rvc-dev 2020-03-06 17:38:32 +00:00
Zhen Zhang
973ec1172b Merge "Fix Sharesheet nest scrolling issue introduced by using RecyclerView" into rvc-dev 2020-03-06 17:22:11 +00:00
arangelov
85974ed070 Enable work tab in share sheet and intent resolver feature flag
Test: rigorous testing by my team, manual QA and myself
Fixes: 150937704
Change-Id: I025e0b64c7c12ecb8eb0290d8bb8c6f3b4f41dcd
2020-03-06 16:38:52 +00:00
Will Brockman
492b381224 Revert "Revert "Notification statsd logs: Notification panel.""
This reverts commit 3cc20a4ed8, which
reverted the original change.

Reason for revert: Roll-forward with corrections and additional testing.

Test: atest NotificationLoggerTest SystemUITests
Test: statsd_testdrive 245
Test: adb shell cmd stats print-logs && adb logcat -s statsd:I | grep ' (245)'
Test: manually pull down notification shade
Bug: 146488473
Change-Id: Ifd766dddf869e1e345bf93e950ebb30b149c72c0
2020-03-06 11:38:51 -05:00
arangelov
4c0513d8c7 Prevent intent resolver from changing height when no app targets
If we select the inactive tab, and there are no resolved targets,
the intent resolver changes its height for a few frames.
This is because first we show and reload the list view as we
switch to the other, and then in onPostListReady we show the
empty state screen for no apps available. There are few frames
between these two events, when the list view has a height of 0.
That's when the ResolverViewPager recalculates its height and
thus reduces the intent resolver height. Then as the empty state
screen is shown, the proper intent resolver height is restored.
The fix is to move the showListView call to onPostListReady.

Test: manual
Fixes: 150888674
Change-Id: I685568e183bbd5708242e1228195ec6b09023272
2020-03-06 15:34:34 +00:00
arangelov
b91d08f1a8 Autolaunch if one app in active profile and empty state in the inactive.
Fixes: 150883045
Test: manual
Change-Id: I2fbc862cc73c5763de9aaff436c01de8dbc83efb
2020-03-06 15:34:21 +00:00
Anna Trostanetski
e9e7d56cd9 Merge "Add support for LoggingOnly changes" into rvc-dev 2020-03-06 14:38:28 +00:00
TreeHugger Robot
ac8a5397bc Merge "Update strings related to intent resolver and share sheet." into rvc-dev 2020-03-06 13:48:02 +00:00
Hugo Benichi
4cf6815168 Merge "vpn: Fix NPE in VpnConfig#toString when no ProxyInfo is set" into rvc-dev 2020-03-06 12:30:17 +00:00
arangelov
78fd360cf6 Update strings related to intent resolver and share sheet.
Test: manual
Fixes: 149749960
Fixes: 149897521
Change-Id: I8a8273bec0e85bc9d21e863ded943e9e28e4dbd4
2020-03-06 11:58:37 +00:00
Hugo Benichi
c8922177c8 vpn: Fix NPE in VpnConfig#toString when no ProxyInfo is set
Bug: 150910582
Test: Compiled bertha_x86_64-userdebug (Chrome OS ARCVM image) for
rvc-dev, flashed eve-arcvm (Pixelbook), connected TouchVpn App, observed
that ARC's VpnTracker does not crash the system server when printing
VpnConfig objects with no ProxyInfo.

Change-Id: I3f8dd1d232e2b18dae9e99eb05c92a797a2358b9
2020-03-06 14:20:23 +09:00
Eugene Susla
47ca5d035e Generate @NonNull setter args and @MaySetToNull to opt out
Bug: 143653080
Test: source /usr/local/google/home/eugenesusla/android2/master/frameworks/base/tests/Codegen/runTest.sh
Change-Id: Iba8da34c91fd09e266429ab131add1d53449506b
(cherry picked from commit ab14c55c1f)
2020-03-05 23:54:43 +00:00
David Cheung
2ead966e7b Add permissions data validation in AppOpsService
Added functionality to collect noteOp noteProxyOp startOp operations for permissions data validation, this functionality is for
developers and can be enabled by modifying the flag. This data will be utilized to ensure permissions are
requested only when necessary.

Bug: 150890258

Test: Manually tested on crosshatch to ensure files are
written/formatted properly with the necessary data and does not
interfere with normal behavior

Design Document: https://docs.google.com/document/d/1RRs3cPgCzF5S1TkTD11MBKJedUp2DAUEGtCQXtrk0XQ/edit?usp=sharing

Change-Id: Ia7fba6ec5e47b7ddd13ca964ae5f6c1afa1cc186
2020-03-05 23:04:05 +00:00
arangelov
349af6a99d Make "Always" and "Just once" buttons work properly in tabbed view
Fixes: 149821678
Test: manual

Change-Id: Ib0398d1a967d2b406894d499ccfc38da215ce230
2020-03-05 20:11:03 +00:00
TreeHugger Robot
88a6bcaec8 Merge "Only add vertical resolver_list padding if showing tabs." into rvc-dev 2020-03-05 17:36:08 +00:00
arangelov
2a4d0b1925 Only add vertical resolver_list padding if showing tabs.
Otherwise we show an unnecessary extra padding in single-user mode.

Test: manual
Fixes: 150780076
Change-Id: Ibf5997fd9a13335dc0d7765a68375541235e9570
2020-03-05 15:40:46 +00:00
PETER LIANG
9eefc0aca4 Merge "Update the edit shortcut menu (1/n)." into rvc-dev 2020-03-05 12:30:42 +00:00
Peter_Liang
dfe6f92343 Update the edit shortcut menu (1/n).
1. Add the dialog title
2. Change font family and size for label
3. Move functions into the corresponding files

Bug: 148825350
Test: manual test
Change-Id: Id8858122714cc0b063a7562c5a99218efb1766f7
2020-03-05 12:19:12 +00:00
Lee Chou
6f0c1bc10e Merge "Revert "Revert "Remove exception from OverlayConfig zygote method""" into rvc-dev 2020-03-05 10:35:05 +00:00
Lee Chou
15db04ec6c Revert "Revert "Remove exception from OverlayConfig zygote method""
This reverts commit 920105c38b.

Reason for revert: The real reason for the robolectric freeze has been found

Bug: 150011638#comment55
Bug: 150763929
Change-Id: Ib59acf362e87fa907902e19bac6e3b16cafa77d4
2020-03-05 09:42:49 +00:00
Zhen Zhang
dc9047c513 Fix Sharesheet nest scrolling issue introduced by using RecyclerView
ResolverDrawerLayout did not recognize RecyclerView as a nested
scrollable child. This is causing scrolling on areas other than
RecyclerView in Sharesheet won't trigger scrolling of RecyclerView.
Modified ResolverDrawerLayout to recognize RecyclerView and trigger
scrolling back if RecyclerView has been scrolled.

Bug: 150772409
Test: Built and flashed to crosshatch, dragging the header will first
scroll sharesheet to the top.

Change-Id: I4a0fee09d02ed2193155c4cbb18550df9071cd2e
2020-03-05 01:17:13 +00:00
Antoan Angelov
9c3ed4de9f Merge "Fix sharesheet height expansion." into rvc-dev 2020-03-04 13:49:47 +00:00
Yogisha Dixit
1399825fe7 Merge "Store ambient display suppression state in memory." into rvc-dev 2020-03-04 12:56:20 +00:00
Antoan Angelov
f6b536594b Merge "Show a spinner when waiting for the work profile to turn on." into rvc-dev 2020-03-03 21:34:02 +00:00
Feng Cao
c9611acb62 Merge "Notify autofill with the IME start/finish input view events" into rvc-dev 2020-03-03 18:36:11 +00:00
arangelov
2dd9f7b64d Show a spinner when waiting for the work profile to turn on.
This covers the usecase when we show the share sheet or
intent resolver on a device with a work profile, and
the work profile is turned off. In that case, when
sharing from the personal profile, we show an empty
state screen with the option to turn on the work profile.
When we tap that button, we now show a spinner, as there
is a delay until the profile is actually enabled.

Fixes: 149821684
Test: manual

Change-Id: Id90b21a61b10ecce8172bddc42fdeec5fb61c5fe
2020-03-03 18:29:33 +00:00
Winson Chiu
f5f588e032 Merge changes I815bb92e,I1777f84c into rvc-dev
* changes:
  Adjust AndroidPackage String interning
  Add package parsing v1 vs v2 benchmark
2020-03-03 18:06:37 +00:00
arangelov
c4dbdbd2e6 Fix sharesheet height expansion.
This CL does the following things:
- Add an isIntentResolver check for cases when we want
logic to only apply to ResolverActivity, but not
ChooserActivity.
- Gracefully handle the sticky content preview loading.
Preload it if it will ever be shown, in order to avoid
sudden changes in the share sheet height.
- Don't recalculate the share sheet height when changing
tabs.
- Recalculate the share sheet height if the number
of recycler view children has changed in the cases
when we last calculated it when it wasn't populated yet

Test: manual
Bug: 149817068
Bug: 148156663
Bug: 149823253
Bug: 149732754

Change-Id: If74fc36bd3b8bfa5aa1d91c042fa99e4d19899c9
2020-03-03 17:37:50 +00:00
atrost
fd87a60be8 Add support for LoggingOnly changes
Throw an exception if someone tries to add an
override for a logging only change. Incorporate the restriction in the
OverrideValidator.

Test: change one change to be logging only, flash device, adb shell
dumpsys platform_compat
Test: atest com.android.server.compat.CompatConfigTest
Test: atest com.android.server.compat.OverrideValidatorImplTest
Bug: 148009004

Change-Id: I379c63f8b5c54500d9066be9363a186efd55d200
2020-03-03 15:20:06 +00:00
Jorim Jaggi
57157ac5d8 Fix WindowInsetsController lifecycle
Provide a recording insets controller before the window gets
created, and replay the commands once a view gets attached. This
allows the client to use the controller in Activity.onCreate.

Test: WindowInsetsControllerTests
Bug: 118118435
Change-Id: I1a825ecc4367c02b27f2d08cd5442325315d4f89
2020-03-03 15:12:15 +01:00
Lee Chou
920105c38b Revert "Remove exception from OverlayConfig zygote method"
Commit ag/9740370 caused problem with robotests b/149806146
The fix ag/10373855 froze targets like run_host_tests
This revert will unfreeze run_host_tests but robotests will break

Bug: 150011638
Test: m RunSettingsRoboTests0
Change-Id: Ibe954e9d0dc1542477ba7156da5799479631cfb0
2020-03-03 17:11:49 +08:00