Commit Graph

103967 Commits

Author SHA1 Message Date
TreeHugger Robot
8011ca6185 Merge "Enable the settings_controller_loading_enhancement" into rvc-dev 2020-05-05 09:23:12 +00:00
Adam Bookatz
316bc6ff66 Merge "Listener to watch op starts" into rvc-dev 2020-05-05 00:52:12 +00:00
Yuncheol Heo
8f4363a226 Merge changes from topic "immersive" into rvc-dev
* changes:
  Add test api getStatus/NavigationBarBackgroundView.
  Notify the visibility change to update color views without control.
2020-05-05 00:14:09 +00:00
Adam Bookatz
182862e595 Listener to watch op starts
Currently, there is
onOpNoted - tells listeners that noteOp has occurred
onOpActiveChanged - tells listeners that an op's 'active' state has
changed, i.e. that a successfull startOp or stopOp has happened

There was, however, no way of telling a listener that a startOp has
happened (regardless of whether it was successful). This cl introduces
it, via a OnOpStartedListener.

This is required by the ForegroundServiceAppOpSessionEnded atom,
which counts the number of accepted vs. rejected attempts, and
therefore also needs to know when a rejected start happened.

This cl also contains some cosmetic moving of code so that
startOperation() and noteOperationImpl() are almost
exactly parallel.

* Also *
This cl fixes a bug I discovered in stopWatchingNoted, in which
the callback wasn't fully removed. Consequently, if a callback
was unregistered and then re-registered, the re-registration would
mistakingly be ignored (in direct contradiction to the javadoc).

Test: atest UidAtomTests#testForegroundServiceAccessAppOp
Test: atest AppOpsStartedWatcherTest AppOpsActiveWatcherTest AppOpsNotedWatcherTest
Test: manually monitor: adb shell cmd stats print-logs && adb logcat -v uid -s statsd | grep "statsd  : {" | egrep '\(256\)'
Bug: 152800926
Change-Id: Icdb9edf6b2b7c5807b339c1aabb32e882190b071
2020-05-04 21:59:29 +00:00
Yuncheol Heo
70c4bb9007 Add test api getStatus/NavigationBarBackgroundView.
Introduces new test api to access the background view of status bar and
navigation bar.

Bug: 154720832
Test: atest WindowInsetsPolicyTest

Change-Id: If38d3f57edfbb2631d4c1e47ed5347a332edacfb
2020-05-04 14:36:43 -07:00
Yuncheol Heo
02d3a8ad07 Notify the visibility change to update color views without control.
Previously, we've notified it only when we have the control.
But to update color views, we should notify it even when we have no control.

Bug: 154720832
Test: atest WindowInsetsPolicyTest
Test: make sure no regression on b/150195782, b/151425506
Change-Id: I44b88ddc206f36d8ef11dae9c1477739a185ff21
2020-05-04 14:36:28 -07:00
Jorim Jaggi
98f012c304 Merge "Restore force relayout logic for apps targeting < R" into rvc-dev 2020-05-04 20:44:08 +00:00
Feng Cao
98367aef11 Merge "Make autofill requested by augmented autofill service non-manual" into rvc-dev 2020-05-04 20:30:01 +00:00
TreeHugger Robot
1e15db9ce4 Merge "SurfaceControlViewHost: Let ViewRoot release control." into rvc-dev 2020-05-04 20:19:04 +00:00
TreeHugger Robot
fcaa5a8667 Merge "Fix IME visibility after lock screen" into rvc-dev 2020-05-04 20:00:53 +00:00
Feng Cao
08abd46f61 Make autofill requested by augmented autofill service non-manual
* The use case of this API was for augmented autofill service to send
  updated suggestions
* Before this change, the dynamic autofill request by the augmented
  autofill service only triggers a manual request, but this has caused
  some regular autofill providers to always some suggestion due to
  their special handling for the manual request. Thus the augmented
  autofill service will not receive the request.
* With this cahnge, the request cancels the previous session to start a
  new session, and also it triggers a regular request (non-manual) so
  the autofill provider will not special handle the request.

Test: atest CtsAutoFillServiceTestCases
Bug: 154543563

Change-Id: I233125a6070394a102ad40b9a50b98a43d952b9f
2020-05-04 11:36:21 -07:00
Robert Carr
8644050a99 SurfaceControlViewHost: Let ViewRoot release control.
In SurfaceControlViewHost#release we currently immediately
release mSurfaceControl and then call ViewRootImpl#doDie.
However doDie executes on a handler so the ViewRootImpl may try
and use the SurfaceControl between posting and executing
the message. Actually this release is totally erroneous,
mSurfaceControl is the same object used by the ViewRootImpl
and the ViewRootImpl will release it when processing
doDie().

Bug: 155575445
Test: Existing tests pass
Change-Id: I6a4bf41ba38636ff884aa73d2653b1bab6958b00
2020-05-04 11:23:29 -07:00
Kevin Hufnagle
a18b3ea71b Merge "docs: Clarify class definition of Settings.Secure" into rvc-dev 2020-05-04 17:03:25 +00:00
Sally Yuen
a2172bb23d Merge "Add triggering the accessibility shortcut as a system action" into rvc-dev 2020-05-04 16:07:34 +00:00
Jorim Jaggi
653828d09e Restore force relayout logic for apps targeting < R
Test: Open IME in Telegram
Fixes: 153832271
Change-Id: I0c26bbaeb22b06718054fccdec0b550129ccecf8
2020-05-04 17:01:09 +02:00
Hungyen Weng
1c85c4501b Merge "Revert "BluetoothProfileConnecter now calls the ServiceListener'..."" into rvc-dev 2020-05-04 06:51:08 +00:00
Hungyen Weng
ba5692ea72 Revert "BluetoothProfileConnecter now calls the ServiceListener'..."
Revert submission 11348591-btmap-close-gts

Reason for revert: Droidcop reverted the change due to test failure, Test failed. https://android-build.googleplex.com/builds/tests/view?invocationId=I05500004181087103&testResultId=TR42507671126333727

Reverted Changes:
I324b4ea66:BluetoothProfileConnecter now calls the ServiceLis...
I1427f1a86:Add GTS test for BluetoothMap#close

Bug: 155587865

Change-Id: I9a2645c7bbaec9fdf0c6f5972b08ba70cfe78741
2020-05-04 04:53:46 +00:00
Lucas Dupin
2d8266cdc4 Merge "Move media setting to a constant, disabling it" into rvc-dev 2020-05-04 03:59:28 +00:00
Sunny Shao
8bdf700088 Enable the settings_controller_loading_enhancement
- Enable some settings pages to use paralleled loading approach.

Bug: 137558156
Test: compilation
Change-Id: I7302de2413c14a7573adf2f9949ac28866557e2f
2020-05-04 08:44:15 +08:00
Svet Ganov
38cd221d81 Updating platform SDK version for R
* Finalize resources
  * Update appt/aapt2 constants
  * Update R and SDK constants
  * Fix a crashloop bug

Test: build + boot

bug:150281259

Change-Id: Ie56e12336cd1fcf347ac7164f6988b0c2da77c7d
Merged-In: Ie56e12336cd1fcf347ac7164f6988b0c2da77c7d
2020-05-03 09:58:54 -07:00
Rahul Sabnis
248896bf98 Merge "BluetoothProfileConnecter now calls the ServiceListener's onServiceDisconnected method after unbinding the service" into rvc-dev 2020-05-03 05:20:48 +00:00
Steven Thomas
5724666853 Merge "Split refresh rate range into two ranges" into rvc-dev 2020-05-02 02:12:39 +00:00
Andrew Sapperstein
975ca816ec Merge changes from topic "cherrypick-ctor-refs-03y8i58ine" into rvc-dev
* changes:
  Update inner class constructor refs to use proper syntax.
  Fix broken @see tags in public documentation.
2020-05-02 00:21:33 +00:00
Garfield Tan
abe5a4f3f5 Merge changes I702d89c9,Id7bfc3e6 into rvc-dev
* changes:
  Remove TaskRecordFactory.
  Notify when task changes requested orientation.
2020-05-02 00:10:29 +00:00
Darryl Johnson
ceb2befc1b Merge "Don't override activity display adjustments with app config" into rvc-dev 2020-05-01 23:05:10 +00:00
Rahul Sabnis
ee31c78cb8 BluetoothProfileConnecter now calls the ServiceListener's
onServiceDisconnected method after unbinding the service

Bug: 155120232
Test: atest BluetoothHostTest#testMapClose
Change-Id: I324b4ea6654261eb67d5ec184f6b3456ba3d1aa4
2020-05-01 15:39:47 -07:00
Feng Cao
4e20f2b97c Merge "Support receiving touch event in the inline suggestion view" into rvc-dev 2020-05-01 22:07:39 +00:00
sallyyuen
40dd559f9e Add triggering the accessibility shortcut as a system action
Holding down the volume keys triggers the shortcut, making it a
system-level action.

Bug: 154950547
Test: Tested with TalkBack
Change-Id: I2aac0162047f7900103eab472ff649d77836ca93
2020-05-01 15:01:55 -07:00
Winson Chiu
2728af853a Merge "Add skip functionality to package parsing" into rvc-dev 2020-05-01 20:20:49 +00:00
Garfield Tan
afa0de8a91 Notify when task changes requested orientation.
This allows listener know task's orientation request change before
handling display rotation through IDisplayWindowRotationController if
they can register a local TaskStackListener.

Bug: 150409355
Test: atest WmTests:TaskStackChangedListenerTest#testNotifyTaskRequestedOrientationChanged
Change-Id: Id7bfc3e63329ce26d454b7e9c143e084e04dd365
2020-05-01 12:52:46 -07:00
Feng Cao
c23bfc7819 Support receiving touch event in the inline suggestion view
* Before this change, the suggestionRoot would intercept all touch
  events so that it can optionally forward them to the IME process
  to support scrolling, no touch event will be sent to the child
  view through the regular event dispatching process.
* With this change, we move the touch event transferring (to IME)
  logic from SuggestionRoot's onTouchEvent to dispatchTouchEvent.
  Now the touch events before a scroll is detected will be sent to
  the child chip view, and only the touch events after a scroll is
  detected will be sent to the IME.
* This patch also move the OnClickListener and OnLongClickListener
  from the root view to the chip view, since the touch events now
  either goes to the chip view or to the IME process.
* Note that in order to achieve this, given that we can't change
  the API, and there is existing OnLongClickListener registered
  to the chip view, we have to add a @hide API to the View to
  get the existing OnLongClickListener and attach a new one to the
  chip view, such that we can do the additional work of sending
  the long click event to IME, when the view is long clicked.
* This patch should also fix the a11y talkback mode bug where
  double-tapping on the view doesn't autofill the value.
  Double-tap and hold also works that it triggers the attribution
  dialog.

Test: atest CtsAutoFillServiceTestCases (sanity test)
Bug: 155245913
Bug: 154149807

Change-Id: I6f7be1ea5c0955969abb4ccae0cb421423095c4d
2020-05-01 12:36:51 -07:00
Patrick Baumann
24070a6c95 Merge "Adds new activity flags to the @Flags annotation." into rvc-dev 2020-05-01 19:32:49 +00:00
Andrew Sapperstein
88d565e7e7 Update inner class constructor refs to use proper syntax.
Previously, we generally required fully qualified names for referring
to inner class constructors (like #Notification.Builder()) despite that
not being valid javadoc. Now, we properly support #Builder() syntax and
the old syntax will error.

Bug: 6963924
Test: make doc-comment-check-docs
Exempt-From-Owner-Approval: cherry-picked from master
Change-Id: Ib2e4360493275b79c72487ee1cb173bb5e0fd35f
Merged-In: Ib2e4360493275b79c72487ee1cb173bb5e0fd35f
(cherry picked from commit 4c4aa41272)
2020-05-01 18:33:15 +00:00
Andrew Sapperstein
8fe35e5f21 Fix broken @see tags in public documentation.
These were previously being suppressed by doclava but with this change,
all failures are fixed and the suppression logic has been removed.

To fix the issues, there were a few possible changes made:
- broken reference to a public API (such as incorrect parameters): fixed
- unnecessary @link inside an @see tag: fixed
- @see referring to an @hide or @SystemApi: reference removed
- broken references to inner class constructors
 - worked around by fully qualifying the constructor

Bug: 6963924
Test: make doc-comment-check-docs
Exempt-From-Owner-Approval: cherry-picked from master
Change-Id: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
Merged-In: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
(cherry picked from commit e0624c7a40)
2020-05-01 18:25:32 +00:00
Yin-Chia Yeh
ab59e9af27 Merge "Camera: add proper null check for mRemoteDevice" into rvc-dev 2020-05-01 18:05:49 +00:00
Winson
b58595b767 Add skip functionality to package parsing
There are specific cases where a package should be ignored by
whoever is parsing it, either because the device was configured to
ignore it, or the device doesn't support it.

While mostly used for testing, this adds a skip method to
ParseInput and a matching install error code to explicitly express
this case during parsing.

Bug: 155420149

Test: atest com.android.server.pm.parsing

Change-Id: I7eff53544341e21108d9d027f3afe75a1e845f40
2020-05-01 10:49:15 -07:00
Lucas Dupin
fbe9117ed9 Move media setting to a constant, disabling it
Test: manual
Test: atest SettingsBackupTest
Bug: 155315021
Change-Id: I2f96b1df5e635f3362352ef929e09d7d1ff4be66
2020-05-01 10:48:58 -07:00
Patrick Baumann
40bdf5c5e6 Adds new activity flags to the @Flags annotation.
Bug: 148452357
Change-Id: I01c1a6f5a678f92402c489679b47310f132a445c
Test: Builds
2020-05-01 17:22:30 +00:00
Dianne Hackborn
f55fbde1bd Merge "Fix #155437855: "dumpsys activity" package filtering doesn't filter everything" into rvc-dev 2020-05-01 15:49:51 +00:00
Abodunrinwa Toki
1cf3ce8fde Merge "Rewrite Icons from the TCS." into rvc-dev 2020-05-01 10:52:43 +00:00
TreeHugger Robot
75c82108f6 Merge "Add the IME insets to virtual display for bubble" into rvc-dev 2020-05-01 03:58:14 +00:00
Steven Thomas
305a57c5fc Split refresh rate range into two ranges
To prevent low-priority refresh rate considerations from overriding the
app frame rate as specified via the new setFrameRate() api, split the
display refresh rate range into "primary" and "app request" ranges. The
primary range includes the low priority considerations, while the app
request range removes two lower priority considerations.

In general, surface flinger will keep the display refresh rate within
the primary range, but layers with frame rate settings via the
setFrameRate() api may cause surface flinger to pick a refresh rate
outside the primary range. Surface flinger will never choose a refresh
rate outside the app request range specified by display manager.

Bug: 148978562

Test: - Added a new unit test to DisplayModeDirectorTest to verify that
        display manager strips lower priority considerations when
        deciding the app request range.

- Added a new unit test to RefreshRateConfigsTest to verify
  RefreshRateConfigs handles the primary vs app request range
  correctly.

- Manual test: Confirmed that with the "force 90Hz refresh rate" option
  turned on, we don't switch to 60Hz when playing a 60Hz video.

- Manual test: Confirmed that with the "force 90Hz refresh rate" option
  turned on, when an app calls setFrameRate(60), we stay at 60Hz.

- Manual test: Modified a Pixel 4 XL to prefer 60Hz in low brightness,
  entered low brightness, and confirmed we don't touch boost to 90Hz.

- Manual test: Confirmed that Maps stays at 60Hz on Pixel 4.

- Manual test: Turned on verbose logs in RefreshRateConfigs.cpp,
  confirmed they look good.

- Manual test: Inspected dumpsys output, confirmed the primary and
  app request refresh rate ranges are printed correctly.

Change-Id: I2a7f5ded0831c90b9b1ac09d941963a63b824098
2020-04-30 19:58:42 -07:00
TreeHugger Robot
d725389a55 Merge "Update the documentation for inline suggestion APIs" into rvc-dev 2020-05-01 01:42:05 +00:00
Dianne Hackborn
9106f2a73d Fix #155437855: "dumpsys activity" package filtering doesn't filter everything
Clean up various code paths to correctly use the "packageName" option to
limit its output to only information about that package.

Also do a little re-arranging of the output to cleanup a bit recent
stuff that was added, so the end of the output is still the important
high-level summary of process states.

Bug: 155437855
Test: manually inspected various "dumpsys activity" output.
Change-Id: I2ebe6f7ab3d433281993eb3959d375e2e53e0df9
2020-04-30 17:29:16 -07:00
Evan Rosky
5a61909275 Merge "Give Divider back its touch-region" into rvc-dev 2020-05-01 00:11:36 +00:00
Hongwei Wang
28c136e1cb Merge "Move PIP/MW mode callbacks to be on the client side" into rvc-dev 2020-04-30 23:38:56 +00:00
Rambo Wang
767b58716b Merge "Restrict match conditions of TelephonyNetworkSpecifier#canBeSatisfied" into rvc-dev 2020-04-30 22:23:13 +00:00
Eino-Ville Talvala
2a4de9cf21 Merge "Camera: Improve metadata access JNI performance" into rvc-dev 2020-04-30 22:19:13 +00:00
Mady Mellor
a0f44693f5 Merge "Enable flagging shortcuts to launch properly in a bubble" into rvc-dev 2020-04-30 21:52:11 +00:00
Darryl L Johnson
e810bc539e Don't override activity display adjustments with app config
When process configuration was applied on the client side it
accidentally applied an override to display adjustments in resources
for all ResourceImpl objects. This resulted in resources of
activities having incorrect display adjustments and reporting
incorrect display size.

This change fixes the issue by applying the activity's override
configuration on top of the app config before updating the
display adjustments.

Note: This is a slight revert/rework of Ib3ee007bc

Fixes: 148639826

Test: ActivityThreadTest#testHandleConfigurationChanged_DoesntOverrideActivityConfig
Change-Id: I08a5bc29443fbdefbca791240aeaff8f138b8756
2020-04-30 13:44:38 -07:00