Commit Graph

18511 Commits

Author SHA1 Message Date
TreeHugger Robot
1781b4c620 Merge "Send SDK sandbox UID instead of app UID in battery stats push metrics" into tm-dev am: 34fba3edc7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17244143

Change-Id: I6d152984de09c76639aa9620ecdb7249eb19f8a8
2022-03-18 17:12:18 +00:00
TreeHugger Robot
34fba3edc7 Merge "Send SDK sandbox UID instead of app UID in battery stats push metrics" into tm-dev 2022-03-18 17:04:25 +00:00
Corina Grigoras
2907ec82ab Merge "Move UiEventLogger interface to modules-utils." into tm-dev 2022-03-18 14:19:43 +00:00
Marco Gontijo
b4355a326f Send SDK sandbox UID instead of app UID in battery stats push metrics
Bug: 225204467
Test: atest FrameworksCoreTests:BatteryStatsTests
Change-Id: I68825c156d67c535978922015f62f2add2ec634d
2022-03-17 22:14:18 +00:00
Richard Gaywood
4305679aad Merge "Implement puller for new SurfaceFlinger dmabuf stats." into tm-dev am: 3e41c83514
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17157091

Change-Id: I84fb71bc6fd5e76b3713b6586891d6d776f2d651
2022-03-17 18:22:14 +00:00
Richard Gaywood
3be5773ec9 Implement puller for new SurfaceFlinger dmabuf stats.
Involves pushing most of the logic down out of StatsPullAtomService
and into KernelAllocationStats.cpp, as well as changing some method
signatures along the way.

At the end of this work, two new fields in atoms.proto will be
populated; these will allow us to tell how much of SurfaceFlinger's
dmabuf memory usage is due to buffers shared with other processes
and how much is due to private internal buffers.

Test: statsd_testdrive 10105
Test: adb shell dmabuf_dump
Bug: 220084049
Change-Id: Ia41cfd693d3db2bd06083801075cae290f67221f
2022-03-17 12:07:09 +00:00
Andrei-Valentin Onea
f3c87b7dfc Merge "Treat allowlists differently for flattened apex" into tm-dev am: c568c0d78e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17220110

Change-Id: I2f07cf1b303df82286f5e4df573e9a406777d4c3
2022-03-17 09:57:49 +00:00
Andrei-Valentin Onea
c568c0d78e Merge "Treat allowlists differently for flattened apex" into tm-dev 2022-03-17 09:34:59 +00:00
Wu Ahan
8200cd3776 Merge "Mark instrument events of FrameTracker in the trace" into tm-dev am: 332cf2b6d4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17077331

Change-Id: I7e4c1d0b0091309420db5c4ca0ffcf1b0af704a1
2022-03-17 02:20:21 +00:00
Wu Ahan
332cf2b6d4 Merge "Mark instrument events of FrameTracker in the trace" into tm-dev 2022-03-17 02:00:24 +00:00
Andrei Onea
fd1c87c0a6 Treat allowlists differently for flattened apex
On devices which use flattened APEX, treat the allowlists as part of the
system image.

Test: m # lunch wembley_2GB-userdebug
Bug: 221862988
Change-Id: I1971a686aa111b396f9e694a74be70d758078423
2022-03-16 18:54:42 +00:00
Corina
cbc4d681e7 Move UiEventLogger interface to modules-utils.
This is so the soures can be accessed both fom framework and modules.
The implementation needs the local StatsLog, so cannot be reused.

Test: m
Test: atest SystemUITests
Test: make statsd_testdrive $ANDROID_HOST_OUT/bin/statsd_testdrive 90
Bug: 218862369
Change-Id: I27ebffa6817575f1377beb80f4092287d9b12c49
Merged-In: I27ebffa6817575f1377beb80f4092287d9b12c49
2022-03-16 18:41:11 +00:00
Corina Grigoras
adf8b23505 Merge "Move UiEventLogger interface to modules-utils." 2022-03-16 18:38:11 +00:00
Corina
6116503243 Move UiEventLogger interface to modules-utils.
This is so the soures can be accessed both fom framework and modules.
The implementation needs the local StatsLog, so cannot be reused.

Test: m
Test: atest SystemUITests
Test: make statsd_testdrive $ANDROID_HOST_OUT/bin/statsd_testdrive 90
Bug: 218862369
Change-Id: I27ebffa6817575f1377beb80f4092287d9b12c49
2022-03-16 18:32:49 +00:00
Michael Wachenschwanz
eb7d253a63 Merge "Fix mobile radio battery consumption double counting" 2022-03-16 17:07:02 +00:00
Wu Ahan
7f57784720 Mark instrument events of FrameTracker in the trace
Mark deferMonitoring/begin/end/cancel/abandon events of FrameTracker.

Bug: 220281996
Test: See trace
Change-Id: I3d3eace0048c523c94311432cb96db8301015c0c
2022-03-16 19:44:02 +08:00
David Anderson
ad1f1db512 Merge "Add PackageManager feature strings for EROFS." 2022-03-16 05:02:57 +00:00
Jared Duke
059b53948f Merge changes from topic "revert-17083643-large-icons-tm-XHQQYXZDHH" into tm-dev am: 7bc013b627
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17199637

Change-Id: I763d2206b91481feb82a5f7fd0872fdaf0f77565
2022-03-16 00:23:49 +00:00
Michael Wachenschwanz
acb52c2fcb Fix mobile radio battery consumption double counting
On ODPM enabled devices, the total mobile radio power consumption was
being used when reporting the idle/suspended power. This means app
mobile radio power consumption was effectively being double counted.

Bug: 209525694
Test: atest MobileRadioPowerCalculatorTest
Change-Id: Ibc1a504014ac10c285b71273ba50493ba237f6a9
2022-03-15 16:22:56 -07:00
Jared Duke
b68458f6cc Revert "Support downscaling of Drawable icons in LocalImageResolver"
Revert submission 17083643-large-icons-tm

Reason for revert: Speculative revert for android.app.cts.NotificationManagerTest breakage.
Reverted Changes:
Ib66933a8f:Size restrict right notification icon size
If3d871e78:Downscale large bitmaps in CachingIconView
I504694cb2:Support downscaling of Drawable icons in LocalImag...

Bug: 224768026
Change-Id: Icae8dfdfb89544f76a43a141b5f93271a03db360
2022-03-15 22:21:10 +00:00
Jared Duke
71cf617ef3 Revert "Downscale large bitmaps in CachingIconView"
Revert submission 17083643-large-icons-tm

Reason for revert: Speculative revert for android.app.cts.NotificationManagerTest breakage.
Reverted Changes:
Ib66933a8f:Size restrict right notification icon size
If3d871e78:Downscale large bitmaps in CachingIconView
I504694cb2:Support downscaling of Drawable icons in LocalImag...

Bug: 224768026
Change-Id: Iabb2d26899979aff25afa095baacd6bae12f6fde
2022-03-15 22:20:51 +00:00
Ahaan Ugale
a727775d80 Merge "Fix ServiceConnector failing unbind if not connected." into tm-dev am: 0ede4b88ff
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17193618

Change-Id: I219c33cd9a0c01a28c814ae82081287438c9df6b
2022-03-15 20:52:56 +00:00
Ahaan Ugale
52e0dafcb3 Fix ServiceConnector failing unbind if not connected.
ServiceConnector does not call unbindService when requested to unbind if
the service isn't currently connected. This causes issues like leaving
zombie Trusted Hotword processes bound forever if the process is stopped
('restarted') immediately after being created (say if audio server
crashes twice in quick succession).

Fix: 223845998
Test: manual - locally comment out code that immediately connects the
 service, then `for i in {1..10}; do adb shell cmd voiceinteraction\
 restart-detection; done` - without fix results in an extra process
Change-Id: I6a8c01390130bcec9aff1460004343ca2b207031
2022-03-15 08:20:58 +00:00
Jernej Virag
a027bec760 Merge changes from topic "large-icons-tm" into tm-dev am: c515a0aed9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17104643

Change-Id: I0bf98385f90d557d4c5752d5f368cf19a6c84658
2022-03-15 07:52:55 +00:00
Jernej Virag
c515a0aed9 Merge changes from topic "large-icons-tm" into tm-dev
* changes:
  Size restrict right notification icon size
  Downscale large bitmaps in CachingIconView
  Support downscaling of Drawable icons in LocalImageResolver
2022-03-15 07:36:11 +00:00
Michael Wachenschwanz
3f53035561 Merge "Smear ModemActivityInfo across multiple stats" into tm-dev 2022-03-15 01:26:33 +00:00
Eric Biggers
e945bd62d6 Merge changes from topic "remove-fde" into tm-dev
* changes:
  Remove unused FDE methods from StorageManager
  Stop checking FDE password cache
  Remove checks for FDE in 'adb backup'
2022-03-14 23:03:22 +00:00
Rob Carr
9f33e09f0a Merge "WMS/ViewRoot: Prepare for Async BLAST Sync [1/N]" into tm-dev am: 6caacdcf72
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17100717

Change-Id: Ib978f36892c86f7a5544aefd39a61654fc0ebfd5
2022-03-14 23:03:08 +00:00
Rob Carr
6caacdcf72 Merge "WMS/ViewRoot: Prepare for Async BLAST Sync [1/N]" into tm-dev 2022-03-14 22:48:21 +00:00
Michael Wachenschwanz
be79640cb0 Smear ModemActivityInfo across multiple stats
If ModemActivityInfo is available on a device, smear the provided
transmit and received times across RadioAccessTechnology and frequency
(for NR RAT).

Bug: 207697945
Test: atest BatteryStatsNoteTest
Change-Id: Ifb4e30dc3fa5ac5dd4824a87a7a86c4a0d14d019
(cherry picked from commit e85ac3239e)
2022-03-14 15:16:15 -07:00
Jernej Virag
104e6492b2 Downscale large bitmaps in CachingIconView
CachingIconView is used to displayed (smallish) icons in Notifications. Those can accidentally be made very large if big resources are used.
This makes CachingIconView use LocalImageResolver to load those images with limited size. This fixes large memory use of notification header icons.

Bug: 210690571
Bug: 218845090

Test: Manually on small and large Pixel device with Notification tester APK
      Added Unit Tests to cover this case.
Change-Id: If3d871e788608c1702461d563673560fa18fc53f
2022-03-14 21:51:15 +00:00
Jernej Virag
f450d3c054 Support downscaling of Drawable icons in LocalImageResolver
LocalImageResolver only enforced downscaling for Uri-based Icons at this point. This still allowed app developers to provide large bitmaps as a resource or as a bitmap payload itself. This change also verifies these new types of bitmaps.
Also adds an external size parameter to image resolver so different widgets can use it - right now the upper limit was hardcoded in pixels.

Bug:218845090
Bug:210690571

Test: Manually on device - tested on Raven and new Pixel with multiple
                       notification sizes via notification test apk.
      Unit tests
Change-Id: I504694cb27953bc7950669b1b48f90d2e9c6a68d
2022-03-14 21:51:14 +00:00
Dmitri Plotnikov
e703085f29 Merge "Track CACHED procstate in BatteryStats" into tm-dev am: b79d6441df
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17162687

Change-Id: I4152bee2564a95d25910eaabfaa73ac3f550554a
2022-03-14 20:16:23 +00:00
Dmitri Plotnikov
b79d6441df Merge "Track CACHED procstate in BatteryStats" into tm-dev 2022-03-14 19:42:07 +00:00
TreeHugger Robot
0f837c966b Merge "Defer MessagingMessage#recycle until bind ends" into tm-dev am: ec74b17af9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17160577

Change-Id: I6f9c504aa36aa9a99ec6c1fcd657118f659b3c88
2022-03-14 15:35:43 +00:00
TreeHugger Robot
ec74b17af9 Merge "Defer MessagingMessage#recycle until bind ends" into tm-dev 2022-03-14 15:25:15 +00:00
Andrei-Valentin Onea
f0b2f49a87 Merge "Use apex name when querying privapp allowlists" into tm-dev am: ba30e36310
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17155047

Change-Id: I4e645d59a122a26dae577e9b31de2f9283589fa1
2022-03-14 15:15:29 +00:00
Andrei-Valentin Onea
ba30e36310 Merge "Use apex name when querying privapp allowlists" into tm-dev 2022-03-14 15:11:28 +00:00
Robert Carr
027b59d90a WMS/ViewRoot: Prepare for Async BLAST Sync [1/N]
We would like to make relayoutWindow a non-blocking call,
and of course why not, who likes blocking. However it functions
as a critical path of BLASTSync. To understand why examine the
Guarantee described in BLASTSync.md.

In order to implement this guarantee we need to know
“Which frame has the client finished drawing” when it calls
finishDrawing. The current answer to this question is
“The frame reflecting the state observed in the last call
to relayoutWindow”. The comments on mPending and mCurrentDrawHandlers
also have a lot more context on how this works currently. Since
relayoutWindow has a critical section, it also ensures that changes
to syncable state and preparation of sync will be observed atomically
(since they are both observed over relayoutWindow, which is always
called before any frame drawing updated syncable state).

We design a new protocol described in BLASTSync.md, which uses a seqId
to track which call to finishDrawing reflects which syncable state.
We implement this seqId based system. Unfortunately the WindowManager
doesn’t quite conform to the requirements specified by the protocol,
and a follow up CL ensures that syncable state changes will
always be sent with the seqId.

This CL simply adds the protocol specification and makes some required
interface changes. It can be seen to be a no-op.

Bug: 161810301
Bug: 175861051
Bug: 175861127
Bug: 200285149
Change-Id: If2dea07121fe7de5d2524c5b63678dddf955d4b7
2022-03-14 08:08:40 -07:00
Dmitri Plotnikov
c311349874 Track CACHED procstate in BatteryStats
Bug: 216361629
Test: atest FrameworksCoreTests:BatteryStatsTests

Change-Id: If3ada99a009d09db07f38be1ffb62e86c637e1a3
2022-03-10 17:26:11 -08:00
Rambo Wang
58e76a792e Merge "Introduce CarrierPrivilegesCallback to replace CarrierPrivilegesListener" into tm-dev am: 01da996576
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17124493

Change-Id: I2e81cfbbac53828b9cef15399cc318a9817bfee0
2022-03-10 23:54:12 +00:00
Dmitri Plotnikov
886e2fe0f5 Merge "Exclude SDK Sandbox virtual UID from BatteryUsageStats" into tm-dev am: 1f90015283
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17088443

Change-Id: If93fa29ffc54d12506df2b84083da06850c7880e
2022-03-10 23:52:47 +00:00
Rambo Wang
01da996576 Merge "Introduce CarrierPrivilegesCallback to replace CarrierPrivilegesListener" into tm-dev 2022-03-10 23:26:08 +00:00
Dmitri Plotnikov
1f90015283 Merge "Exclude SDK Sandbox virtual UID from BatteryUsageStats" into tm-dev 2022-03-10 23:25:00 +00:00
Eric Biggers
6ab6ad829e Stop checking FDE password cache
Now that FDE is no longer supported, checking the FDE password cache
will never accomplish anything.  Remove this check from Keyguard, and
remove the supporting code from LockSettingsService.

Bug: 208476087
Change-Id: If1bb80dfcc015aeea19916a88c89a4067e6ada32
(cherry picked from commit e9b69111b2)
Merged-In: If1bb80dfcc015aeea19916a88c89a4067e6ada32
2022-03-10 23:04:38 +00:00
Steve Elliott
88f4dbce89 Defer MessagingMessage#recycle until bind ends
See ag/17158486 for context.

Fixes: 216202070
Test: manual
Change-Id: I924f917fbf757d2c3866fcd60de2fbfccae2eb6a
2022-03-10 16:18:43 -05:00
Julia Tuttle
f5d211c8ce Merge "Make IStatusBarService.clearInlineReplyUriPermissions oneway" into tm-dev am: 835b4f7d63
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17144161

Change-Id: I4cc77fb73b0de97e291d6ac031d06c7e0a6cd6f4
2022-03-10 21:05:31 +00:00
Fabian Kozynski
aed7ff46ca Merge changes from topics "172251878", "presubmit-am-7890421506ee474b9057d3c5d333e341" into tm-dev am: 82b2876457
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17124902

Change-Id: Ida0f9d3874fd53c4da4ac75c81d633598a1a68ce
2022-03-10 20:44:09 +00:00
Dmitri Plotnikov
347638ee5c Merge "Fold SDK Sandbox UID battery stats into parent UID stats" into tm-dev am: 27df8ca365
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17039352

Change-Id: Ic04cf8ebe7105e2074ac148e743ac6e1946b05e4
2022-03-10 20:36:42 +00:00
Derek Jedral
184a1e1e21 Merge "Change LockPatternUtils to return empty list" into tm-dev am: e20b057da5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17128134

Change-Id: I3d81fa5569281c55cb87522484a9d3b46b487ddc
2022-03-10 20:34:47 +00:00