Commit Graph

116862 Commits

Author SHA1 Message Date
TreeHugger Robot
6bf25fdfc4 Merge "Handle NPE in LocalImageResolver to avoid crashing systemui" into rvc-qpr-dev 2020-08-24 03:07:11 +00:00
Kevin Hufnagle
8293d8aba7 docs: Fix note about new intent action changes coming with Android 11. am: e69b8a9006 am: 53f6fe0a82
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12418304

Change-Id: I74bc5add5347f1f77d77c54c1c1c7cbf4d85243c
2020-08-21 21:04:04 +00:00
Kevin Hufnagle
53f6fe0a82 docs: Fix note about new intent action changes coming with Android 11. am: e69b8a9006
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12418304

Change-Id: I90566db73bb86ec900ae8246dd8f504ad3adb104
2020-08-21 20:48:04 +00:00
Ahan Wu
1a1c93f964 Handle NPE in LocalImageResolver to avoid crashing systemui
ContentResolver#openInputStream may return null, and may lead to
systemui keeps crashing, handle null to avoid this case.

Bug: 163412636
Test: manually
Change-Id: Ie149b75d4445b37afac82c8351a32cb17442936d
2020-08-21 14:18:08 +08:00
Kevin Hufnagle
e69b8a9006 docs: Fix note about new intent action changes coming with Android 11.
Bug: 155091482
Change-Id: I3dfeb333cbe95880142ed97d0d50fd9f85c52f50
Test: Documentation changes - no test necessary
2020-08-20 18:48:17 +00:00
Philip P. Moltmann
732608a6be Add app-ops for camera/mic use during phone call
Test: Started a phone call, verified app-op was active
Bug: 162547999
Change-Id: I93bf59d24e3cfbeaede442571f09ba97f0990c75
2020-08-19 20:17:29 -07:00
Kweku Adams
1706f9c22f Merge "Allow package verifier to hide specific fgs notifications." into rvc-qpr-dev 2020-08-19 17:14:33 +00:00
Tiger Huang
444e8dc6ce Refine system bar position restoring
The previous logic restores the system bar as long as its insets source
is visible. There can be a timing issue that if the user swipes to show
transient bars while an immersive app just becomes the control target
but the hide-bar info haven't sent to WM yet, WM will re-show the bar
incorrectly.

This CL uses the requested visibility and the behavior to decide if we
should restore the postion and the visibility.

This CL also refines and caches the arguments of showTransient. In this
way, we don't have to create the array every time while invoking that
method.

Fix: 161247175
Test: atest InsetsPolicyTest
Merged-In: Idef314dfe6625399b88b3dacb4c74c7071453497
Change-Id: Idef314dfe6625399b88b3dacb4c74c7071453497
(cherry picked from commit 533682ebb3)
2020-08-19 16:13:25 +00:00
Tiger Huang
23c75281ef Update requested state after applying pending frames
When there is an insets animation, we will stop updating insets source
frames until the animation is done. The previous logic didn't update the
frames within the requested state while the animation is done. And the
frames was relied by InsetsPolicy while playing transient bar animation.
If the frames don't match the display, the insets would be wrong, and
the animation wouldn't be played correctly.

Fix: 161134197
Test: atest InsetsControllerTest
Merged-In: Id8f3c1956fbfe3ad16f167ff76297dde6c634e81
Change-Id: Id8f3c1956fbfe3ad16f167ff76297dde6c634e81
2020-08-19 20:42:39 +08:00
Tiger Huang
1adfc8b85c Merge "Refine system bar position restoring" into rvc-qpr-dev 2020-08-19 11:57:15 +00:00
Tiger Huang
f8175d1a5b Dispatch insets to client if mState is changed
Previous logic in onStateChanged notifies insetsChanged based on the
change of mLastDispatchedState, which can make us dispatch redundant
insets changes to the app.

In this CL, we only notifies insetsChanged if mState is really changed
in onStateChanged -- we use the final mState (after updateState and
applyLocalVisibilityOverride) to compare with the one before changing.

Fix: 161924448
Test: atest InsetsControllerTest WindowInsetsControllerTests
Test: Swipe up to home while IME open and see if there is any jank
Merged-In: Ia536cdf76805caa56ca1b6eaf2b3db83b6ecd94e
Change-Id: Ia536cdf76805caa56ca1b6eaf2b3db83b6ecd94e
2020-08-19 15:32:53 +08:00
Tiger Huang
943589cf45 Merge "Update requested state after applying pending frames" into rvc-qpr-dev 2020-08-19 00:25:22 +00:00
Kweku Adams
e49aa726f0 Allow package verifier to hide specific fgs notifications.
The package verifier performs some system critical work that the user
doesn't need to be explicitly aware of. This adds a mechanism for the
verifier to indicate which foreground service notifications should be
hidden, if possible.

Bug: 164440539
Test: use test app to confirm requested fgs notifications are hidden
Change-Id: Ib3eb0b71cc676c145557ade9def98a363e5abebb
2020-08-18 10:32:58 -07:00
Beth Thibodeau
3743d5526a Merge "Allow user to block individual apps from resuming" into rvc-qpr-dev 2020-08-18 14:29:56 +00:00
Tiger Huang
533682ebb3 Refine system bar position restoring
The previous logic restores the system bar as long as its insets source
is visible. There can be a timing issue that if the user swipes to show
transient bars while an immersive app just becomes the control target
but the hide-bar info haven't sent to WM yet, WM will re-show the bar
incorrectly.

This CL uses the requested visibility and the behavior to decide if we
should restore the postion and the visibility.

This CL also refines and caches the arguments of showTransient. In this
way, we don't have to create the array every time while invoking that
method.

Fix: 161247175
Test: atest InsetsPolicyTest
Merged-In: Idef314dfe6625399b88b3dacb4c74c7071453497
Change-Id: Idef314dfe6625399b88b3dacb4c74c7071453497
2020-08-18 20:53:41 +08:00
TreeHugger Robot
01d9441cec Merge "Update docs to clarify how providers can create style bundles and Slices for inline suggestions." into rvc-dev am: 18cff6082d am: 6128b1ba0f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12265211

Change-Id: I83317ac5a0f2d33ff2403a0b3777f06a15fc347b
2020-08-18 00:35:23 +00:00
TreeHugger Robot
6128b1ba0f Merge "Update docs to clarify how providers can create style bundles and Slices for inline suggestions." into rvc-dev am: 18cff6082d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12265211

Change-Id: Ib0e9657c1d796cfcf9f5aa89709b9ad357d81f23
2020-08-18 00:24:55 +00:00
TreeHugger Robot
18cff6082d Merge "Update docs to clarify how providers can create style bundles and Slices for inline suggestions." into rvc-dev 2020-08-18 00:14:21 +00:00
Beth Thibodeau
70b5235a9d Allow user to block individual apps from resuming
This adds a setting which stores a list of packages that will be
prevented from persisting in QS as resumable media controls, even when
resumption is enabled. If the user adds a new package to this list when
it already has a resume control, that control will be removed.

Bug: 161813143
Test: manual, atest
Change-Id: I8c85bc937aeaf366954f2669eba8f6954640fe4c
Merged-In: I8c85bc937aeaf366954f2669eba8f6954640fe4c
2020-08-17 15:45:47 +00:00
Julia Reynolds
2778b62f1d Remove app ops indicators from notifications
Test: atest
Bug: 163076432
Change-Id: I5b7514f765811ffd3b0aca63d0108591755974ab
Merged-In: I5b7514f765811ffd3b0aca63d0108591755974ab
2020-08-14 15:02:02 +00:00
Tiger Huang
1a53789bc8 Update requested state after applying pending frames
When there is an insets animation, we will stop updating insets source
frames until the animation is done. The previous logic didn't update the
frames within the requested state while the animation is done. And the
frames was relied by InsetsPolicy while playing transient bar animation.
If the frames don't match the display, the insets would be wrong, and
the animation wouldn't be played correctly.

Fix: 161134197
Test: atest InsetsControllerTest
Change-Id: Id8f3c1956fbfe3ad16f167ff76297dde6c634e81
2020-08-13 14:58:06 +00:00
TreeHugger Robot
ca28a90bec Merge "Add changeId to gate R-QPR tests behind" into rvc-qpr-dev 2020-08-12 17:41:39 +00:00
Bradley Allen
803254aaeb Merge "docs: Removed Q preview language and added a link to the Android 10 page on developer.android.com." into rvc-dev am: 6dfedd05a7 am: d015d7299a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12347462

Change-Id: I8d8d9595a7992196255d09aecac3ace195e15374
2020-08-12 16:57:03 +00:00
Bradley Allen
d015d7299a Merge "docs: Removed Q preview language and added a link to the Android 10 page on developer.android.com." into rvc-dev am: 6dfedd05a7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12347462

Change-Id: I7bd9a90e3b66e4a842bdcaa33f62328fd9928af7
2020-08-12 16:46:29 +00:00
junyulai
d56bfed60c Add 5G NSA to collapsed RAT types list am: d75a22bc20
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12355984

Change-Id: I4cead400825ea55098bc15f6ebceb333bfc1afc9
2020-08-12 08:57:52 +00:00
junyulai
d75a22bc20 Add 5G NSA to collapsed RAT types list
Currently, getAllCollapsedRatTypes is used to retrieve
all RAT types which will be recorded into NetworkStatsService.
However, there is a missing part that 5G NSA virtual RAT type
is not added into this list. This makes callers such as statsd
do not aware of 5G NSA RAT type and missed to collect data
usage of it.

Test: atest NetworkStatsSubscriptionsMonitorTest#test5g
Test: adb shell cmd stats pull-source 10082
Test: ./out/host/linux-x86/bin/statsd_testdrive 10082
Test: atest UidAtomTests#testMobileBytesTransfer \
      UidAtomTests#testMobileBytesTransferByFgBg \
      UidAtomTests#testDataUsageBytesTransfer
Bug: 163021464
Change-Id: I0faeda20f0506a48ac1131b234c5fc40d95dfbe0
Merged-In: I0faeda20f0506a48ac1131b234c5fc40d95dfbe0
2020-08-12 05:21:23 +00:00
Nate Myren
070b491882 Add changeId to gate R-QPR tests behind
Bug: 162551686
Test: none
Change-Id: I6df669785db4d4684b8207fa7234d4793d652cb3
2020-08-12 00:21:40 +00:00
Bradley Allen
462481663c docs: Removed Q preview language and added a link to the Android 10 page on developer.android.com.
Test: http://go/forrest-run/L62500000661914456
Bug: 149267624
Change-Id: I73b92cf0af8f78117448db9a89d7685f45bc512d
2020-08-11 18:56:15 +00:00
TreeHugger Robot
178e18a7fc Merge "Migrate PiP logs to UiEvent" into rvc-qpr-dev 2020-08-11 18:49:47 +00:00
Miranda Kephart
8a912c716b Merge "Make screenshot process unbind correctly" into rvc-qpr-dev 2020-08-11 18:00:13 +00:00
Miranda Kephart
6bb575bab1 Make screenshot process unbind correctly
There's a bug in ScreenshotHelper that causes the process not to
unbind properly. Now that the screenshot connection is kept track
of by the class, we don't need to compare its value at the
beginning and end of the started service before closing the
connection.

This also fixes an issue where screenshots didn't work right,
immediately after switching users (since the process is now
closed correctly, a new one can begin for the secondary user).

Bug: 158303623
Bug: 160355802
Fix: 158303623
Fix: 160355802
Test: manual; tested single screenshots and multiple in succession;
made sure that after switching users screenshots could be taken
immediately.

Change-Id: Idf25c6a60bdde8ab970c4af68884de798159ef3f
2020-08-11 09:32:29 -04:00
Nikita Dubrovsky
7094198a26 Merge "Add DeviceConfig flag for drag direction angle threshold for cursor drag" into rvc-qpr-dev 2020-08-11 01:53:10 +00:00
Susi Kharraz-Post
ce030f1d75 Fix argument order in Sharesheet Started logging
Argument order for westworld logging number of direct and app targets
provided by the app got turned around in the function call. Fixing the
order by moving the lines

Bug: 162982477
Test: manual
Change-Id: I23d0d2861c169b8e6eb26ce3040913db42f3e01f
(cherry picked from commit 6eb59aa87e)
2020-08-07 16:20:42 +00:00
Fabian Kozynski
515db30387 Merge "Separate mic + camera from location" into rvc-qpr-dev 2020-08-07 13:22:04 +00:00
Santos Cordon
91cef65eaa Merge "Allow Power-button to temporarily ignore proximity sensor." into rvc-d1-dev am: fdc35a2491
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12282513

Change-Id: I0ba859b9fdebae7dae046516886eb5594ff779cc
2020-08-07 09:46:30 +00:00
Santos Cordon
fdc35a2491 Merge "Allow Power-button to temporarily ignore proximity sensor." into rvc-d1-dev 2020-08-07 09:33:05 +00:00
Tiger Huang
046b604fd4 Merge "Dispatch insets to client if mState is changed" into rvc-qpr-dev 2020-08-06 20:58:40 +00:00
Tiger Huang
b6478edb09 Dispatch insets to client if mState is changed
Previous logic in onStateChanged notifies insetsChanged based on the
change of mLastDispatchedState, which can make us dispatch redundant
insets changes to the app.

In this CL, we only notifies insetsChanged if mState is really changed
in onStateChanged -- we use the final mState (after updateState and
applyLocalVisibilityOverride) to compare with the one before changing.

Fix: 161924448
Test: atest InsetsControllerTest WindowInsetsControllerTests
Test: Swipe up to home while IME open and see if there is any jank
Change-Id: Ia536cdf76805caa56ca1b6eaf2b3db83b6ecd94e
2020-08-06 17:26:57 +08:00
Chavi Weingarten
464e51527f Merge "Revert "Reparent bounds layer if surface was replaced."" into rvc-d1-dev am: 15e6f37a16
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12308823

Change-Id: Iad5abb3a1498bbc45359a6e454aa446a0fc983d4
2020-08-06 01:41:08 +00:00
Hongwei Wang
01b7a61338 Migrate PiP logs to UiEvent
Per go/uievent, migrated PiP logs to UiEvent and also in this change
- Deprecates counterpart proto definitions in metrics_constants
- Record PiP logs from SysUI only, deprecates what's used to be in WM

Changes to the actual logging
- No longer logs the actual aspect ratio
- Disables logging the change of aspect ratio since there are flood of
  events can trigger this
- Splits menu visibility log to SHOW_MENU and HIDE_MENU
- Splits removal of PiP to TAP_TO_REMOVE and DRAG_TO_REMOVE
- No longer logs supportsEnterPipOnTaskSwitch
- Adds new RESIZE logging

Bug: 147508020
Test: $ANDROID_HOST_OUT/bin/statsd_testdrive -terse 90
Merged-In: I805d16ae6f30c07270b743f7ae1e66cbbd121131
Change-Id: I805d16ae6f30c07270b743f7ae1e66cbbd121131
2020-08-05 13:42:16 -07:00
Nikita Dubrovsky
81fa5e436a Add DeviceConfig flag for drag direction angle threshold for cursor drag
Bug: 160786691
Test: Manual and unit tests
  atest FrameworksCoreTests:EditorTouchStateTest
  atest FrameworksCoreTests:EditorCursorDragTest
Change-Id: Ib2e88fbdce4f901772d73bc7ee60483c98e02509
Merged-In: Ib2e88fbdce4f901772d73bc7ee60483c98e02509
(cherry picked from commit 8bac79d651)
2020-08-05 20:15:49 +00:00
Fabian Kozynski
e534fb7782 Separate mic + camera from location
The different states are:
- No indicators enabled. Location is displayed using
LocationControllerImpl
- Only mic + camera indicators. Location is displayed using
LocationControllerImpl
- All indicators enabled. LocationControllerImpl is ignored.

Also, hardwire OP_MONITOR_HIGH_POWER_LOCATION as user sensitive.

Fixes: 162552566
Test: atest com.android.systemui.privacy
Test: manual

Change-Id: I1e7f62d6fccb4a3bc4fdf2a47a8d5c8a4f55421d
Merged-In: I1e7f62d6fccb4a3bc4fdf2a47a8d5c8a4f55421d
2020-08-05 13:54:42 -04:00
Zhen Zhang
7a6365ae7e Fix bug: NullPointerException in ChooserActivity
Add a null check for mResolverDrawerLayout in ChooserActivity

Bug: 162900698
Test: ChooserActivityTest
Change-Id: Id2b4442a0c5f22e1ecff04a1d20b48784ecc47dd
2020-08-05 16:13:51 +00:00
Chavi Weingarten
e6c662098d Revert "Reparent bounds layer if surface was replaced."
This was intended to fix a reparent issue when preserving
surfaces before the app was closed. That is no longer happening
so this change is no longer needed.

The reason this causes the flicker is it waits to reparent until
next frame. However, the frame can be submitted before WM gets a
chance to show the new Surface since that request is sent to WM.

Therefore, the SurfaceView can end up getting reparented to the
new SurfaceControl before the new SurfaceControl is visible,
causing it to be hidden for a few frames.

This reverts commit c1dcac9568.

Reason for revert: b/162377855

Fixes: 162377855
Test: Split screen with SurfaceView doesn't flicker
Change-Id: Ic7a209b7aa66e278b99a526d8427f140b31de0f6
2020-08-04 20:36:49 +00:00
Alan Stokes
56dc3f4122 Merge "Don't include inaccessible data dirs in library paths." into rvc-qpr-dev 2020-08-04 07:56:42 +00:00
Kevin Hufnagle
e500a9f38b Merge "docs: Changes "their" to "the" in 2 places" into rvc-dev am: 24ed56bd0c am: b4937f485e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12286685

Change-Id: I034901e5722e469498fd6c871de294edbb466a6e
2020-08-03 23:02:59 +00:00
Kevin Hufnagle
b4937f485e Merge "docs: Changes "their" to "the" in 2 places" into rvc-dev am: 24ed56bd0c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12286685

Change-Id: I8d018f90219ac8461f5b15f16d35e9159278d1cf
2020-08-03 22:51:22 +00:00
Kevin Hufnagle
24ed56bd0c Merge "docs: Changes "their" to "the" in 2 places" into rvc-dev 2020-08-03 22:26:36 +00:00
Eugene Susla
08ec7a316d Fix duplicate devices when multiple mediums scanning requested am: b8b53f3b39
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12295535

Change-Id: Ib79a52ee96c9a386a5efd6446cf3594ea3d62b65
2020-08-03 21:36:41 +00:00
Adam He
5277e0781d Update docs to clarify how providers can create style bundles and Slices
for inline suggestions.

Fixes: 162437790
Test: atest android.autofillservice.cts.inline
Change-Id: If02b34ec7978897545c0b7eabfebb8db0b9417c0
2020-08-03 13:06:38 -07:00