Commit Graph

16545 Commits

Author SHA1 Message Date
TreeHugger Robot
89f022ac99 Merge "Add multi-user jank monitoring" into sc-v2-dev 2021-09-29 22:31:47 +00:00
Lucas Dupin
71d3f5bb9e Add multi-user jank monitoring
Created CUJ for monitoring jank when switching users, including guest
users, but excluding the "Add User" user journey.

Bug: 200160966
Test: switch users manually, look at logs
Test: atest KeyguardUpdateMonitorTest
Test: atest UserSwitcherControllerTest
Change-Id: I5570133a1f96a58d39a8f053f9f480cdaada8df1
2021-09-29 10:26:26 -07:00
TreeHugger Robot
7f541b72f7 Merge "Zero out WiFi duration and power if ControllerActivityCounter is null" into sc-qpr1-dev am: c410f29893
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15934611

Change-Id: I94e7ba1c4e69ed2140ca49f4542c08e0bbd72573
2021-09-29 00:43:17 +00:00
Dmitri Plotnikov
fb10be47c9 Zero out WiFi duration and power if ControllerActivityCounter is null
Bug: 200346841
Test: atest FrameworksCoreTests:WifiPowerCalculatorTest
Change-Id: I087e3b60c277c1d1a63b6c06e60ffcbe95224668
(cherry picked from commit 199f93ac3b)
2021-09-28 17:20:34 +00:00
lpeter
918ea9940f [NGA v2] Reliable Visible Activity Lookup
To enable more voice-oriented in-app user journeys, Google Assistant
needs to access more information regarding the visible activities
via the Voice Interaction Session. Thus, we provide the APIs to receive
the changed visible activities in Voice Interaction Session.

Bug: 178244510
Test: atest CtsVoiceInteractionTestCases
Test: atest CtsVoiceInteractionTestCases --instant
Change-Id: I019d09fee8105ae1eadbc76803f46fd8b1948f6b
2021-09-28 17:06:49 +08:00
Varun Shah
991929b9fb Merge "Dismiss the suspend dialog if conditions have been modified." into sc-qpr1-dev am: 912d89451a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15853562

Change-Id: Id9539465fac375a4c2953aff19d6b3e5a880375a
2021-09-27 16:10:57 +00:00
TreeHugger Robot
a401999f85 Merge "Check custom component names before aggregating BatteryUsageStats snapshots" into sc-qpr1-dev am: 0ef5152b17
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15872124

Change-Id: I453c8cda7d7d6ab29facc35acd1d6ab84f6ee5fa
2021-09-25 02:17:20 +00:00
Dmitri Plotnikov
5375fe32cb Drop per-app measured energy when an OTA changes the set of energy components am: 50348e3120
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15857253

Change-Id: Ib7813a74c1c4c12d1827d8a07f6caaa8dd4de65b
2021-09-25 02:11:05 +00:00
Varun Shah
912d89451a Merge "Dismiss the suspend dialog if conditions have been modified." into sc-qpr1-dev 2021-09-24 17:54:45 +00:00
Dmitri Plotnikov
0c561475c3 Check custom component names before aggregating BatteryUsageStats snapshots
If the lists of custom power components do not match, a crash will occur.
Instead of causing a crash, simply skip incompatible snapshots.

Bug: 196040329
Bug: 200511361
Test: atest FrameworksCoreTests:com.android.internal.os.BatteryUsageStatsProviderTest

Change-Id: I87ba605371a5f3119dcff33f6109e94ee46ab57d
(cherry picked from commit a1ea9ecd56)
2021-09-20 18:35:09 +00:00
Dmitri Plotnikov
50348e3120 Drop per-app measured energy when an OTA changes the set of energy components
Bug: 200123115
Test: atest BatteryStatsTests
Change-Id: I750a5c9fa3faa9757625b2d2494df1484b68016d
(cherry picked from commit 9cb960304e)
2021-09-17 23:10:56 +00:00
Varun Shah
777d87f91b Dismiss the suspend dialog if conditions have been modified.
Whenever suspension conditions change, if there is a user-visible
suspension-related dialog, dismiss it to ensure the user is never
looking at stale information.

Bug: 169137795
Test: atest SuspendPackagesBroadcastTest#sendPackagesSuspendModifiedForUser
Test: manual (steps below)
-enable EBS, tap on suspended app to see dialog
-enable Focus mode, ensure dialog is dismissed
-tap on suspended app again to see relevent dialog,
 disable Focus mode, ensure dialog is dismissed
-tap on suspended app again to see relevant dialog,
 disable EBS, ensure dialog is dismissed correctly
-can permute enable/disable steps to further verify

Change-Id: Ib1650f910f7441498424ab4bc92185ce432ac405
(cherry picked from commit 25e73a8b9e)
2021-09-17 22:35:26 +00:00
Bernardo Rufino
00d9e5301e Merge "Remove sendCloseSystemDialogs() from PhoneFallbackEventHandler" into sc-qpr1-dev am: d9ba2df119
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15836011

Change-Id: I92fe8e94c677f79951994d03c6cae6071f31592c
2021-09-17 15:29:36 +00:00
Bernardo Rufino
d9ba2df119 Merge "Remove sendCloseSystemDialogs() from PhoneFallbackEventHandler" into sc-qpr1-dev 2021-09-17 15:15:48 +00:00
Miranda Kephart
082e54a5ba Merge "Fix direct share badges when sharing on work/personal profiles" into sc-qpr1-dev am: b51d58e6fd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15839049

Change-Id: I1ac8b7840f29eaa7353b4c744452d428271d6e12
2021-09-16 14:03:53 +00:00
Miranda Kephart
63fe7d7343 Fix direct share badges when sharing on work/personal profiles
Use the passed-in user instead of the current user to determine
whether or not to add the work profile badge to direct share
target app icons, so that personal share targets do not have the
badge (even when sharing something from the work profile) and
work/managed share targets do have it (even when sharing something
from the personal profile).

Test: manual; tested appearance sharing from personal->work and
from work->personal
Bug: 197388251
Fix: 197388251

Change-Id: Ieee50d46e8058a92efa5be8aae9859447531c270
2021-09-15 15:20:14 -04:00
Bernardo Rufino
1538b7fda7 Remove sendCloseSystemDialogs() from PhoneFallbackEventHandler
Today's flow of events is like this: key goes to focused app
(ViewRootImpl::processKeyEvent), the view hierarchy does not handle the
event, so ViewRootImpl uses FallbackEventHandler to invoke the fallback
action for this key.

The problem is that for many keys the app itself is closing system
dialogs before taking the appropriate action (often launching an
activity, eg. dialer for KEYCODE_CALL), but this is now prohibited in S
due to abuse of said action.

The long-term plan is to return to InputDispatcher the fact that the key
wasn't handled by the app and have ID call out to the policy, which will
launch the appropriate action and adjust the UI as it sees fit (close
system dialogs).

However, we need to prevent apps from crashing because of this, hence
this change for S still. The unfortunate effect is that system dialogs
won't be hidden in these cases, but this livable with until we properly
implement the infrastructure.

Bug: 199173862
Test: Simulate code-paths with affected keys and make sure apps don't
      crash:
      1. adb shell input keyevent --longpress KEYCODE_CALL
      2. adb shell input keyevent --longpress KEYCODE_CAMERA
Change-Id: I44ad41ac1eac9acc8320298ceb4c1b21bde8af5d
2021-09-15 15:25:47 +01:00
Wu Ahan
d0b1d557e9 Merge "Add latency instrument point for ACTION_TURN_ON_SCREEN" into sc-v2-dev 2021-09-15 02:33:51 +00:00
Gaurav Bhola
9260cf2831 Merge "Move the NotificationAccessConfirmationActivity component name to resource config so that it can be overlayed." into sc-v2-dev 2021-09-14 19:25:04 +00:00
PETER LIANG
d596ae37f4 Merge "Fix the title of the HW "Edit shortcuts" menu is truncated when the device is folded." into sc-v2-dev 2021-09-14 03:58:38 +00:00
Ahan Wu
767bae370b Add latency instrument point for ACTION_TURN_ON_SCREEN
We missed LatencyTracker.ACTION_TURN_ON_SCREEN, add proper instrument
point.

Bug: 188626939
Test: atest
Change-Id: If366a8bcbda41087dd1255110f4f60a8970cca15
2021-09-13 11:57:46 -08:00
Pavel Grafov
d730a09568 Merge "Respect PASSWORD_QUALITY_MANAGED for biometrics" into sc-qpr1-dev am: a238881ee0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15778512

Change-Id: I44b1e9fa8d418ef84c1ab324306a00e47e5b4e9a
2021-09-13 14:08:56 +00:00
Pavel Grafov
a238881ee0 Merge "Respect PASSWORD_QUALITY_MANAGED for biometrics" into sc-qpr1-dev 2021-09-13 13:52:26 +00:00
Michael Wachenschwanz
04dcc9e512 Merge "Ref count isolated uid usage in BatteryStats" into sc-qpr1-dev am: b85b750561
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15756344

Change-Id: I6998822dfe23a513d5c52a0c931bb906eb6d59b2
2021-09-09 23:54:51 +00:00
Michael Wachenschwanz
b85b750561 Merge "Ref count isolated uid usage in BatteryStats" into sc-qpr1-dev 2021-09-09 23:35:40 +00:00
Wu Ahan
7afe2f3723 Merge "Make sure the removeObservers be called correctly" into sc-dev am: 766eff7df1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15747424

Change-Id: Ia24326d6b43ca86e46511ebdaaee9718af701e98
2021-09-09 16:04:08 +00:00
TreeHugger Robot
9bcef36827 Merge "Enables scroll capture for WebView" into sc-v2-dev 2021-09-09 04:22:09 +00:00
Mark Renouf
d1b525354f Enables scroll capture for WebView
Bug: 190731582
Test: manual, long screenshot Gmail message
Change-Id: I16cd568ab155d308e444c448cc77e538c6415061
2021-09-08 22:08:13 -04:00
Michael Wachenschwanz
b028aa01c6 Ref count isolated uid usage in BatteryStats
Wakelock tracking in BatteryStats relies on the the isolated uid map
when tracking wakelocks from isolated uids. The map needs to keep the
isolated uid while it still has a  wakelock.

Bug: 194414351
Test: atest BatteryStatsNoteTest
Change-Id: I5e51f5f90191829d12fb080169520d9827b9906c
(cherry picked from commit 83c0928c34)
Merged-In: I5e51f5f90191829d12fb080169520d9827b9906c
2021-09-07 22:47:21 +00:00
Ahan Wu
6f787a7588 Shorten the timeout of finish call to 10 seconds
We have a minute timeout of finish call, it's a long duration,
shorten it to 10 seconds.

Bug: 196171638
Test: Manually
Change-Id: I4ff726bbac13fd90e7578074b5f11170816be7b1
2021-09-07 09:18:48 -08:00
Pavel Grafov
6553b4b249 Respect PASSWORD_QUALITY_MANAGED for biometrics
Bug: 195488124
Test: manual with a modified TestDPC
Change-Id: I3e5d0f6911e1fd785ac249b0dfeb2c7e4cca69df
2021-09-07 18:09:46 +01:00
Ahan Wu
59e29276f9 Make sure the removeObservers be called correctly
Handle the surface destroyed case and add a timeout for finish call.

Bug: 196171638
Bug: 197555842
Test: adb shell dumpsys SurfaceFlinger
Test: check the offscreen layers
Test: see 198714745#comment6
Change-Id: Ic6d2521d788c50e10b81b556849194a97f240376
Merged-In: Iec1eb82d1a4756a7b85c8fbdd05f4132a74c613c
2021-09-07 08:44:16 -08:00
Naomi Musgrave
052c311bb2 Merge "[MediaProjection] Do not start layer mirroring without a surface" into sc-v2-dev 2021-09-06 09:57:30 +00:00
Wu Ahan
506fa0bebd Merge "Make sure the removeObservers be called correctly" into sc-v2-dev 2021-09-06 03:18:43 +00:00
TreeHugger Robot
6bd19fab1c Merge "[DO NOT MERGE] Sync flicker from master to sc-v2" into sc-v2-dev 2021-09-04 00:15:31 +00:00
Gaurav Bhola
19c0a2c91a Move the NotificationAccessConfirmationActivity component name to resource config so that it can be overlayed.
- It will be overlayed by car_product.

Test: atest CompanionDeviceManagerTest
Bug: 191699828
Change-Id: I0f7d19d9a5e43d68affed8293745789d9b1b0adc
2021-09-03 18:04:49 +00:00
Ahan Wu
f0fda0d220 Make sure the removeObservers be called correctly
Handle the surface destroyed case and add a timeout for finish call.

Bug: 196171638
Test: adb shell dumpsys SurfaceFlinger
Test: check the offscreen layers
Change-Id: Id1c0e3a0aea1e27a5581a9c7bdcbe6562f8e2ab6
2021-09-03 06:05:43 -08:00
Naomi Musgrave
fcef782559 [MediaProjection] Do not start layer mirroring without a surface
An app may pass a null surface to MediaProjection#createVirtualDisplay,
and later set the surface on the VirtualDisplay. The display's state
will change from off to on when the surface is set.

When determining if layer mirroring should be started/updated in
DisplayContent, take the presence of the surface/display state
into account, to prevent the app from crashing.

Bug: 197863746
Test: atest WmTests:DisplayContentTests
Change-Id: I01af07fff681aab6fc8235c861375eb79118cbfe
2021-09-03 14:42:52 +01:00
Peter_Liang
a71cd04883 Fix the title of the HW "Edit shortcuts" menu is truncated when the device is folded.
Solution:
Remove the attribute configchanges and store the situation to let the dialog automatically be created again when layout changes.

Bug: 194072748
Test: manual test
Change-Id: I0d70af45720d796bed1115f1835eb66fc6ccadf3
2021-09-03 16:16:36 +08:00
Shawn Lin
97b0de7326 Merge "[DO NOT MERGE]Support rounded corner for multi-display devices" into sc-v2-dev 2021-09-03 03:57:09 +00:00
Joe Bolinger
c346dab881 Merge changes from topic "more-cancel-sc-qpr1-dev" into sc-qpr1-dev am: 16a7d2e7bd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15727904

Change-Id: Id8fb1fac31177116d974bd99f1056f6565d986ea
2021-09-01 22:23:23 +00:00
Joe Bolinger
bdd477a5d1 Add requestId to authentication entry points.
The CancellationSignal passed into the authentication methods is not
associated with the request and can be used to cancel the current
operation, even if it is more recent. The new id prevents outdated
signals from being using.

Note that there are still issues with the Callbacks that are not
addressed (see bug for details).

Bug: 194405579
Bug: 189451155
Bug: 191716671
Test: atest com.android.systemui.biometrics com.android.server.biometrics

Change-Id: Id71be912cc88ae90df8087eb8f1a6fc3e110f883
2021-09-01 08:49:26 -07:00
Nataniel Borges
c8287a930f [DO NOT MERGE] Sync flicker from master to sc-v2
Flicker on master diverged form sc-v2, to make it easier to debug
flicker issues on sc-v2, push the current version of flicker into sc-v2

Test: atest FlickerTests WMShellFlickerTests
Bug: 188792659
Change-Id: I1c832bf32214b12ba4b708bccfc95cf259324844
2021-09-01 12:06:21 +00:00
Ming-Shin Lu
6902904e97 Refine WindowInsets logs
- Add WM_DEBUG_WINDOW_INSETS ProtoLogGroup to use for logging
  general Insets logs in WM core.
- Refine InsetsSourceProvider#updateVisibility proto log format
  to add insets type information.
- Add InsetsSurceControl#toString to print control target info.

Bug: 197189357
Test: adb shell wm logging enable-text WM_DEBUG_WINDOW_INSETS
Test: atest ProtoLogImplTest \
            ProtoLogViewerConfigReaderTest \
            WmTests:ProtoLogIntegrationTest \
            LogDataTypeTest \
            protologtool-tests
Change-Id: I1f01ce4d9fe5cb17f7bd60a424689260682b1dfc
2021-08-30 22:43:46 +08:00
shawnlin
6603444a76 [DO NOT MERGE]Support rounded corner for multi-display devices
- Add new array configs for every rounded corner configs.
- Update rounded corner drawable when a display changes in
  ScreenDecorations.

Bug: 131221697
Test: atest DisplayCutoutTest RoundedCornersTest LocalDisplayAdapterTest
      ScreenDecorationsTest
Change-Id: I1f32ff680609267010b05a39a5b8e84511bf1243
2021-08-25 15:58:28 +08:00
Neha Jain
fd8c882352 Merge "ims: Version support for uce feature tags" into sc-dev am: d446e80289 am: 5d29a96cab
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15515803

Change-Id: Ib937dcefc2d5e7fe44636155c2b868696cdfac6c
2021-08-24 18:33:16 +00:00
Neha Jain
5d29a96cab Merge "ims: Version support for uce feature tags" into sc-dev am: d446e80289
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15515803

Change-Id: I57427075675705a05a172e7d04dcf2eb76e4dd23
2021-08-24 18:17:25 +00:00
Pavan Kumar M
6624e2aa57 ims: Version support for uce feature tags
Add version support for uce feature tags

Bug: 175092320
Bug: 193992611
Bug: 193543670
Change-Id: I8b62b9b9d7ae271bc623764d545db1320b4dc64f
2021-08-24 01:39:55 +00:00
Jeff DeCew
262b278197 Merge changes I09b3999a,I590be0ba into sc-qpr1-dev am: 10c7e2b811
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15549414

Change-Id: I9597ee3b59967386c95bb5aa2129ed5ea7b5e58d
2021-08-16 19:38:07 +00:00
Jeff DeCew
10c7e2b811 Merge changes I09b3999a,I590be0ba into sc-qpr1-dev
* changes:
  Use tertiary accent color for expander with unread count.
  Fix ContrastColorUtil.findContrastColorAgainstDark to return the valid color
2021-08-16 19:21:18 +00:00