Commit Graph

15466 Commits

Author SHA1 Message Date
Mark Renouf
d84643adcc Avoid detecting WebView as TYPE_RECYCLING
Currently ScrollCaptureIntrnal only checks for >1 child views
but not >0 child views. Because of this, WebView is considered
a RecyclerView, but this will not work without any Views to
track.

This change classifies these as "OPAQUE" so they can be handled
specially. Until support for these is implemented they will be
skipped as targets.

Bug: 179253269
Test: Open Chrome to a scrollable page, take screenshot
Change-Id: I0b00598031879d2fa7c1295440b3de1e0e453031
2021-02-03 20:00:56 +00:00
Dmitri Plotnikov
df5ebd7eab Merge "Calculate total power for a BatteryConsumer by adding up PowerComponents" into sc-dev 2021-02-03 19:06:15 +00:00
Marcin Oczeretko
81ed6656ba Merge "Use PerfettoTrigger to trigger traces from LatencyTracker" into sc-dev 2021-02-03 18:07:04 +00:00
TreeHugger Robot
8dcab0dee6 Merge "Do not propogate test api access flags to Zygote." into sc-dev 2021-02-03 18:01:30 +00:00
Jeff Sharkey
eb4fdbc3b7 Merge "Add core notifications team as owners of internal notification widgets." am: 752040bead am: 6b3ed78bf6 am: b7cd95098f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1571164

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0c79eefd95bb24714c79145fdc907cbd6f4672e8
2021-02-03 16:33:36 +00:00
Jeff Sharkey
b7cd95098f Merge "Add core notifications team as owners of internal notification widgets." am: 752040bead am: 6b3ed78bf6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1571164

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7133f6b8f758f6a37973691aea5e1ea2386a848b
2021-02-03 15:54:28 +00:00
Jeff Sharkey
6b3ed78bf6 Merge "Add core notifications team as owners of internal notification widgets." am: 752040bead
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1571164

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4ced104b3622d406e0eefe64aa311ab5970ccc02
2021-02-03 15:30:13 +00:00
Matt Pietal
0448729358 Merge "Lock Pattern View - Visual update" into sc-dev 2021-02-03 13:08:12 +00:00
Artur Satayev
eb05e6c8fa Do not propogate test api access flags to Zygote.
The flow has been replaced by @ChangeId ALLOW_TEST_API_ACCESS, making
old approach obsolete.

Bug: 147113465
Test: atest CameraEvictionTest#testBasicCamera2ActivityEviction
Merged-In: I0bf109fa78212d6d71ba85d25f80e27e8e7cd900
(cherry picked from commit a27cd30535)
Change-Id: I0e58b6924744590afaadec6a6230aa9d552b2f6f
Exempt-From-Owner-Approval: cp
2021-02-03 12:29:45 +00:00
Galia Peycheva
e6ae6e325a Merge changes from topic "revert-13350963-blur_system_api-AFRJFBKNBA-sc-dev" into sc-dev
* changes:
  Revert "Add permission for blur SystemApi"
  Revert "Make window background blurs SystemApi"
  Revert "Make BackgroundBlurDrawable a SystemApi"
2021-02-03 05:49:41 +00:00
Ahaan Ugale
b7fd9a7814 Merge "VIMS: Clarify NonNullability of PackageMonitor#onPackageModified." into sc-dev 2021-02-03 02:57:18 +00:00
Jeff DeCew
c879d183a8 Add core notifications team as owners of internal notification widgets.
Change-Id: Ie1a8e61f8c250340083940af866552e0d15851dd
2021-02-03 01:07:21 +00:00
Galia Peycheva
3804d61f2a Revert "Make window background blurs SystemApi"
Revert "Add permission check for blurs in SurfaceFlinger"

Revert "Remove public usages of FLAG_BLUR_BEHIND"

Revert "Add pid and uid to SF::setClientStateLocked"

Revert "Add USE_BACKGROUND_BLUR to cts expected permissions"

Revert submission 13350963-blur_system_api

Reason for revert: This topic made blurs a system api. API council voted against that and we will instead aim to make it public for S. None of these changes are relevant in that case.

Reverted Changes:
I3683db296:Remove public usages of FLAG_BLUR_BEHIND
I23b21b603:Add USE_BACKGROUND_BLUR to cts expected permission...
Id21f03793:Add pid and uid to SF::setClientStateLocked
If5d8344a5:Add permission for blur SystemApi
I70d1e1715:Add permission check for blurs in SurfaceFlinger
Icf98c3607:Make window background blurs SystemApi
I0b881ec6e:Make BackgroundBlurDrawable a SystemApi

Bug: 177523043
Test: m
Change-Id: I0f7bcf34db2986d8d5e08b115a611e8e07db5917
Merged-In: I0f7bcf34db2986d8d5e08b115a611e8e07db5917
2021-02-02 23:08:29 +01:00
Galia Peycheva
f83b52cc13 Revert "Make BackgroundBlurDrawable a SystemApi"
Revert "Add permission check for blurs in SurfaceFlinger"

Revert "Remove public usages of FLAG_BLUR_BEHIND"

Revert "Add pid and uid to SF::setClientStateLocked"

Revert "Add USE_BACKGROUND_BLUR to cts expected permissions"

Revert submission 13350963-blur_system_api

Reason for revert: This topic made blurs a system api. API council voted against that and we will instead aim to make it public for S. None of these changes are relevant in that case.

Reverted Changes:
I3683db296:Remove public usages of FLAG_BLUR_BEHIND
I23b21b603:Add USE_BACKGROUND_BLUR to cts expected permission...
Id21f03793:Add pid and uid to SF::setClientStateLocked
If5d8344a5:Add permission for blur SystemApi
I70d1e1715:Add permission check for blurs in SurfaceFlinger
Icf98c3607:Make window background blurs SystemApi
I0b881ec6e:Make BackgroundBlurDrawable a SystemApi

Bug: 177523043
Test: m
Change-Id: Iee4b89b06508c7dc3b7266452bb0b987f8670fac
Merged-In: Iee4b89b06508c7dc3b7266452bb0b987f8670fac
2021-02-02 23:02:05 +01:00
Ben Lin
6292565f13 Merge changes If42d4470,Ia0b701b7 into sc-dev
* changes:
  PiP: Add tap-to-unstash function.
  PiP: Allow stashing via dropping on the edge.
2021-02-02 19:27:55 +00:00
Bill Yi
e02a98aab6 Merge RQ1A.210205.004 to stage-aosp-master - DO NOT MERGE
Merged-In: Ie9567c088e4fff075cce5b6f44bd73199377c91b
Change-Id: I3a2480f2cb8331a70141dad9af61ac3fd7f39991
2021-02-02 09:54:38 -08:00
Matt Pietal
6a40f0c588 Lock Pattern View - Visual update
1. Create a wider path
2. Allow dots to be a different color
3. Draw dots over the path instead of below

Bug: 170729566
Test: manual, visual refresh only
Change-Id: I5c191893132eba89d6e55047d7500efa4aa95a29
2021-02-02 10:57:42 -05:00
Marcin Oczeretko
8d09ec3712 Use PerfettoTrigger to trigger traces from LatencyTracker
Also adds IntDef Action annotation to clarify which methods expect the
ACTION_* arguments.

Test: manual - configure threshold through adb and trigger a trace
Bug: 161781469
Change-Id: I7497901138f71049362927c0491d1ab208df3db3
2021-02-02 15:51:08 +00:00
Wilson Wu
d8343be5ac Merge "Make IInputMethodManager to oneway (11/N)" into sc-dev 2021-02-02 07:35:56 +00:00
Dmitri Plotnikov
afe6fe643d Calculate total power for a BatteryConsumer by adding up PowerComponents
Bug: 158137862
Test: atest BatteryUsageStatsTest
Change-Id: I785799efcc895494be6e338475c6b4f276bdf9d5
2021-02-01 17:44:36 -08:00
Jeff Sharkey
38835a6212 Merge "Add BATTERY_STATS_OWNERS for IBatteryStats.aidl" am: 0db5d441ad am: f486d1dc63 am: db00fbb7b3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1568920

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I799ab3aaaac352805ad2c8dccc3e1f155484494c
2021-02-02 01:28:57 +00:00
Remi NGUYEN VAN
9d060c9e6e Merge "Use consistent Wifi-only checking" into sc-dev 2021-02-02 01:26:16 +00:00
Jeff Sharkey
db00fbb7b3 Merge "Add BATTERY_STATS_OWNERS for IBatteryStats.aidl" am: 0db5d441ad am: f486d1dc63
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1568920

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie4e04f57ef860e64e5b3af541067c5d163abc7f1
2021-02-02 00:44:46 +00:00
Dmitri Plotnikov
1ef5d3f87e Add BATTERY_STATS_OWNERS for IBatteryStats.aidl
Change-Id: Iffb8ded9ff5edc899ab38c74ffe3ad98793ca67c
2021-02-01 23:42:59 +00:00
Chloris Kuo
b3a5d74f93 Merge "Conversation Blocklist" into sc-dev 2021-02-01 22:32:32 +00:00
Ben Lin
6930fd5cbc PiP: Allow stashing via dropping on the edge.
Changes so that:
1) PiP now can be stashed when the user releases/let go of input when
PiP is currently floating on top of the left/right edge of the device.
Currently, 1/3 of the PiP needs to be off-screen in order for stash to
happen.
2) Stashing is now allowed from one edge to the other (e.g. user flings
from left to right, right to left), with VERY high velocity (>=
18000.f).

Bug: 178752503
Test: Let go of PiP when off screen, stashes
Test: fling from left to right with extremely high velocity, stashes
Change-Id: Ia0b701b75f598965d79b07b10f09118f80562f09
2021-02-01 12:41:14 -08:00
Tony Huang
d346ee5315 Merge "Make AppTransition animations sharable (1/n)" into sc-dev 2021-02-01 10:16:33 +00:00
Seigo Nonaka
ff85b932d7 Add FontManager#updateFont API
Bug: 173619554
Test: atest FontManagerTest
Change-Id: I261e55783978d9840b06c586389e2126bc6eb2ca
2021-01-29 14:28:46 -08:00
Chloris Kuo
73bcb5b51f Conversation Blocklist
Add KEY_NOT_CONVERSATION into default allowed adjustments list and add
DeviceConfig to enable it

Bug: 173106605, 178151392
Test: tested on device
Change-Id: I9a34fc3aadadde785bfce2bdf2ff35b0cc0b0ec6
(cherry picked from commit 6fe1741d37)
2021-01-29 17:52:38 +00:00
Ahaan Ugale
8b3b3b9403 VIMS: Clarify NonNullability of PackageMonitor#onPackageModified.
Bug: 178410946
Test: builds
Change-Id: I767e0f7f4ed1ae8c7f0a74afb5114a85a679d86a
2021-01-29 08:41:46 +00:00
TreeHugger Robot
8f15e41d76 Merge "ScreenPowerCalculator is responsible for smearing" into sc-dev 2021-01-28 20:39:30 +00:00
TreeHugger Robot
8f046c76d7 Merge "Revert "Revert "Use eBPF-based time-in-state monitoring for groups of threads""" into sc-dev 2021-01-28 18:20:14 +00:00
TreeHugger Robot
67c5128909 Merge "Correct trace name of LatencyTracker" into sc-dev 2021-01-28 13:24:30 +00:00
Wilson Wu
f226a79fee Make IInputMethodManager to oneway (11/N)
Comply following methods to IVoidResultCallback to emulate
current behavior and apply them to one-way.

-. startProtoDump
-. startImeTrace
-. stopImeTrace

Bug: 163453493
Test: atest CtsInputMethodTestCases
Test: 1) Enable the Winscope Trace tile
      2) Do some actions like open keyboard
      3) Disable the Winscope Trace tile
      4) Grad a bugreport and verify trace on go/Winscope
Change-Id: I3eafbc28ed3acf3ba859885bf201cb06b3149b94
2021-01-28 17:09:39 +08:00
Treehugger Robot
8172883202 Merge "Note network interfaces based on transport" am: 8334a265ad am: cd65235a77
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1562876

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I444343c7230c0f947a666334fb895736fa4bc153
2021-01-28 09:02:21 +00:00
Adam Bookatz
2ad7cd4169 ScreenPowerCalculator is responsible for smearing
The estimated energy used by the screen is
smeared over all apps based on their foreground time.
This calculation is performed by BatteryStatsHelper after
most of its other processing.
In this cl, we move that logic to the ScreenPowerCalculator,
which is actually responsible for calculating the total and
app screen energy blaming. This also allows other power calculators
for screen usage (such as actual screen energy measurements) to
be hooked up in the future, without BSH worrying about whether to
smear.

Note: Smeared energy is not included in the app's total energy usage
until the very end; prior to that, it is recorded in a special field
BatterySipper.screenPowerMah. This is NOT changed in this cl.

NOTE: The actual smearing algorithm is NOT altered in this cl.

Test: atest BatteryStatsHelperTest
Bug: 174818228
Bug: 162379528
Change-Id: I30b436b736e96071a1e4167d37512d250119665c
Merged-In: I30b436b736e96071a1e4167d37512d250119665c
(cherry picked from commit 3754504f4b)
2021-01-28 08:31:13 +00:00
Tony Huang
5fcda4f860 Make AppTransition animations sharable (1/n)
Move some animation functions in AppTransition to new
TransitionAnimation class for wm-shell using.

Bug: 175053726
Test: build
Change-Id: I7eef67359fd4532f7e4d97c787d5288362a32f13
2021-01-28 16:03:56 +08:00
Treehugger Robot
8334a265ad Merge "Note network interfaces based on transport" 2021-01-28 07:45:20 +00:00
Dmitri Plotnikov
8d247edc93 Revert "Revert "Use eBPF-based time-in-state monitoring for groups of threads""
This reverts commit c9e9058347.

This is the original CL, unchanged. The test that was the reason for
the rollback now passes, see http://go/forrest-run/L29200000799760670

The reason for the test failure was that Cuttlefish does not
define any CPU frequencies, which caused https://android.googlesource.com/platform/frameworks/native/+/refs/changes/65/1558465/2/libs/cputimeinstate/cputimeinstate.cpp#578
to fall into a near-infinite loop, thus locking up BatteryStats.

The no-frequencies issue was addressed in https://r.android.com/1558465.

Reason for revert: rolling forward since the test failure has been addressed

Bug: 169279846
Change-Id: I537561b4c86ef2aaf236b1807b844855fef38f8b
(cherry picked from commit 4a7792b30c)
Merged-In: I537561b4c86ef2aaf236b1807b844855fef38f8b
2021-01-28 07:16:16 +00:00
Remi NGUYEN VAN
8ec5d32772 Use consistent Wifi-only checking
Use the same checkWifiOnly method in BatteryUsageStatsProvider and other
battery stats logic.

Bug: 174436414
Test: atest
Change-Id: I6ae21c579a063c3dd65726620b7a6c9e9f09a957
2021-01-28 15:43:34 +09:00
Remi NGUYEN VAN
2c9ed7f32d Note network interfaces based on transport
Instead of classifying interfaces by network type in BatteryStats,
classify them based on the transports array provided by the
NetworkAgent.

Network types are deprecated and transports should be used instead. This
change allows BatteryStats to stop depending on unstable APIs such as
isNetworkTypeMobile.

This change also updates nullability annotations in ConnectivityService
and NetworkAgentInfo to show that the NetworkCapabilities are non-null
(as provided by the network agent) when calling
noteNetworkInterfaceTransports.

Bug: 174436414
Test: atest
  atest ConnectivityServiceTest#testBatteryStatsNetworkType \
      --rerun-until-failure 40

Merged-In: I4e928fac8a57a9b1fc758a44af2a5719b8c871b8

Change-Id: I4e928fac8a57a9b1fc758a44af2a5719b8c871b8
2021-01-28 15:10:54 +09:00
TreeHugger Robot
330454222a Merge "Revert "Revert "Note network interfaces based on transport""" into sc-dev 2021-01-28 05:55:23 +00:00
Wilson Wu
299897e9ba Merge "Make IInputMethodManager to oneway (10/N)" into sc-dev 2021-01-28 01:46:32 +00:00
Jackal Guo
199d13c73d Merge "Refactor PackageParser (4/n)" into sc-dev 2021-01-28 00:19:02 +00:00
Treehugger Robot
f5c35bcfa7 Merge "[FUI03] No-op refactoring of VpnInfo" am: f9dbe61693 am: b0989fd2d2 am: 046ebf41b7
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1547637

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I05e6b14fca44919610317831c147413b0a431224
2021-01-27 14:16:00 +00:00
Treehugger Robot
046ebf41b7 Merge "[FUI03] No-op refactoring of VpnInfo" am: f9dbe61693 am: b0989fd2d2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1547637

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic947ae7aabd4e0095e94977dffb66c2f6b7b9e57
2021-01-27 13:57:34 +00:00
Wilson Wu
c4663ba6a9 Make IInputMethodManager to oneway (10/N)
1. Comply following methods to IVoidResultCallback to
emulate current behavior.

-. setAdditionalInputMethodSubtypes
-. removeImeSurface
-. removeImeSurfaceFromWindow

2. Add "oneway" to all methods which we already apply them
to result-callback model.

Bug: 163453493
Test: Manual test with keyboard
Test: atest CtsInputMethodTestCases
Test: atest DisplayImeControllerTest
Change-Id: Icb396ae5d74060af69c4ecb16723b2e37b9f2067
2021-01-27 09:12:47 +00:00
Remi NGUYEN VAN
84f8c48420 Revert "Revert "Note network interfaces based on transport""
Instead of classifying interfaces by network type in BatteryStats,
classify them based on the transports array provided by the
NetworkAgent.

Network types are deprecated and transports should be used instead. This
change allows BatteryStats to stop depending on unstable APIs such as
isNetworkTypeMobile.

This change also updates nullability annotations in ConnectivityService
and NetworkAgentInfo to show that the NetworkCapabilities are non-null
(as provided by the network agent) when calling
noteNetworkInterfaceTransports.

This is rolling forward a previously reverted change. The new change
also fixes MobileRadioPowerCalculatorTest that was broken when
submitting the previous change.

Bug: 174436414
Test: atest
      atest ConnectivityServiceTest#testBatteryStatsNetworkType \
          --rerun-until-failure 40

Merged-In: I4e928fac8a57a9b1fc758a44af2a5719b8c871b8

Change-Id: I4e928fac8a57a9b1fc758a44af2a5719b8c871b8
(cherry picked from commit 2d17d202bc)
2021-01-27 09:02:22 +00:00
Jackal Guo
f9f526f296 Refactor PackageParser (4/n)
Replace the usage of the constant and Package/ApkLite from
PackageParser by the alternative in order to move away from
PackageParser.

Bug: 174723245
Test: make
Test: atest -p core/java/android/content/pm \
        core/java/com/android/internal/content \
	services/core/java/com/android/server/pm \
	services/tests/servicestests/src/com/android/server/pm
Change-Id: I4e2a7666b2feede3994a6075edfe4d18e80433e9
(cherry picked from commit ce0715ba54)
2021-01-27 07:14:40 +00:00
junyulai
fa528b2d20 [FUI03] No-op refactoring of VpnInfo
As a preparation of exposing system API. This patch does some
harmless refactoring, which includes:
  1. Move VpnInfo to android.net
  2. Add nullability annotations
  3. Make members final

Bug: 174123988
Test: TH
Change-Id: I1530bb45d0e84c28c6deac33596bc686058afc0d
2021-01-27 15:03:06 +08:00