Commit Graph

18098 Commits

Author SHA1 Message Date
Frank Li
b1a5111269 Merge "[DU07]Remove BatteryStatsImpl NetworkStats.subtract dependences" am: a078c73c47 am: 991351f546 am: 3edf76ed6a am: c8e0e63e44
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1956076

Change-Id: Ideb09004826ade4184eb5bd3095ad72e862c725e
2022-01-21 10:33:21 +00:00
Frank Li
c8e0e63e44 Merge "[DU07]Remove BatteryStatsImpl NetworkStats.subtract dependences" am: a078c73c47 am: 991351f546 am: 3edf76ed6a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1956076

Change-Id: Ibe90f9f1baf1950b9095747b2515e1cc9ffd7fd0
2022-01-21 10:15:23 +00:00
Michael Wachenschwanz
90a6c03c8f Merge "Introduce modem element to power_profile.xml" 2022-01-21 10:08:12 +00:00
Frank Li
3edf76ed6a Merge "[DU07]Remove BatteryStatsImpl NetworkStats.subtract dependences" am: a078c73c47 am: 991351f546
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1956076

Change-Id: I24f6e08ce84fc4259dfe862f9958e88a2fc9b4df
2022-01-21 09:57:49 +00:00
Frank Li
a078c73c47 Merge "[DU07]Remove BatteryStatsImpl NetworkStats.subtract dependences" 2022-01-21 09:19:34 +00:00
Frank Li
1c85e6e600 Merge "[DU03-1]Remove INetworkStatsService from BatteryStatsImpl" am: acd0aef603 am: 9c737b782c am: 761a4eb36c am: c7e673cb90
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1948496

Change-Id: Ie58903de1d88367bced48dd4e79c51cfd49701b8
2022-01-21 09:12:55 +00:00
Frank Li
c7e673cb90 Merge "[DU03-1]Remove INetworkStatsService from BatteryStatsImpl" am: acd0aef603 am: 9c737b782c am: 761a4eb36c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1948496

Change-Id: I06e8e68ec621c70698eb464f36a770c361ae4c13
2022-01-21 09:06:50 +00:00
Frank Li
761a4eb36c Merge "[DU03-1]Remove INetworkStatsService from BatteryStatsImpl" am: acd0aef603 am: 9c737b782c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1948496

Change-Id: If2164db2bf7b8cc239a90341c68c623ac3a8518c
2022-01-21 08:43:37 +00:00
lifr
20689682e5 [DU03-1]Remove INetworkStatsService from BatteryStatsImpl
Expose systemapi NetworkStats.getDetailedUidStats for use by
BatteryStats.

BatteryStatsImpl is using INetworkStatsService APIs, which
cannot be accessed after moving into the mainline module. So, replace
and remove those hidden API usages.

Bug: 210066922
Test: atest BatteryStatsImplTest WifiPowerCalculatorTest
            MobileRadioPowerCalculatorTest NetworkStatsServiceTest
CTS-Coverage-Bug: 213437796
Change-Id: I40d713923278f4654d67bb4d12155cea85c10447
2022-01-21 13:52:41 +08:00
Michael Wachenschwanz
c72b58ae0d Merge "Add BatteryStats owners to PowerProfile ownership" 2022-01-21 02:23:55 +00:00
Kate Montgomery
fada8ebfe7 Merge "SysUi: Distinguish between location indicator for system app ops vs others." 2022-01-21 00:28:58 +00:00
Dmitri Plotnikov
802df78a0b Merge "Attribution of Bluetooth power per process state" 2022-01-21 00:01:02 +00:00
Michael Wachenschwanz
2f762f10ec Add BatteryStats owners to PowerProfile ownership
Bug: 194419357
Test: n/a
Change-Id: I088fb2513c906a4aee46791049a6bdb80f525a0f
Ignore-AOSP-First: fix merge conflict with master
2022-01-20 15:04:38 -08:00
Dmitri Plotnikov
c830547fd1 Merge "Add SparseLongArray.incrementValue()" 2022-01-20 22:35:55 +00:00
Frank
77fb00ddde [DU07]Remove BatteryStatsImpl NetworkStats.subtract dependences
BatteryStatsImpl is using INetworkStatsService APIs, which
cannot be accessed after moving into the mainline module. So, replace
and remove those hidden API usages.

Bug: 213523117
Test: atest BatteryStatsImplTest WifiPowerCalculatorTest
            MobileRadioPowerCalculatorTest
Change-Id: I9e8d94259ad9845d94bfd78d971ff1a2cd7bb38e
2022-01-20 20:08:19 +08:00
TreeHugger Robot
ce65b04d56 Merge "Revert "Revert "Migrate unsafe parcel APIs in framework-minus-apex""" 2022-01-20 11:33:39 +00:00
Vania Desmonda
2ad9fe6296 Merge "Add wallpaper dimming SystemAPI and implementation for handling dimming set by multiple applications." 2022-01-20 08:55:45 +00:00
Shan Huang
5b44dd8b79 Merge changes from topic "shanh-back-api"
* changes:
  Provide OnBackInvokedDispatcher from Activity, View and Dialog
  Introduce IOnBackInvokedCallback and OnBackInvokedDispatcher
2022-01-20 07:20:51 +00:00
Junyu Lai
6f9d537049 Merge "[MS24] Remove FileUtils.sync dependencies" am: f1245786d6 am: ff3bbac2a1 am: dba45b947a am: cff87d506b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1934457

Change-Id: I28aad189a51ce5d3e9deab3d9f9b39b5e113177f
2022-01-20 06:06:43 +00:00
Junyu Lai
cff87d506b Merge "[MS24] Remove FileUtils.sync dependencies" am: f1245786d6 am: ff3bbac2a1 am: dba45b947a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1934457

Change-Id: I2b477e6da025fd53577733c8e8894f67a68ba70f
2022-01-20 05:47:13 +00:00
Junyu Lai
dba45b947a Merge "[MS24] Remove FileUtils.sync dependencies" am: f1245786d6 am: ff3bbac2a1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1934457

Change-Id: I0c921d46aec1ffde844c91fc95edb8b18331198d
2022-01-20 05:35:28 +00:00
Dmitri Plotnikov
bb925fb034 Add SparseLongArray.incrementValue()
This method is used for accumulation of long values: if
the key does not exist, one is created.  If one already exists,
the passed value is added to the previous value.

This method is similar to the existing
SparseDoubleArray.incrementValue() method

Bug: 215427055
Test: atest FrameworksCoreTests:SparseLongArrayTest
Change-Id: I771d9bc2bdd12ca4260b20186ced70f5862b6f56
2022-01-19 18:20:29 -08:00
Shan Huang
c0999600ee Provide OnBackInvokedDispatcher from Activity, View and Dialog
Test: mp core sysuig services
Bug: 195946584

Change-Id: Ia882ec621154ea1daa780c8976b900e4c8f44a7d
2022-01-20 01:33:56 +00:00
Dmitri Plotnikov
4cd04a2549 Attribution of Bluetooth power per process state
Bug: 191921016
Test: atest FrameworksCoreTests:BatteryStatsTests
Change-Id: Ibcda229824a2966bd6adf8db7b9168050d77fe96
2022-01-19 16:02:15 -08:00
Beverly Tai
d3f44e7094 Merge "Update UIEventLogger" 2022-01-19 17:53:43 +00:00
Lais Andrade
41fd16dfb7 Merge "Deprecate boolean settings for haptic feedback and vibrate when ringing" 2022-01-19 17:24:40 +00:00
Kate Montgomery
18c46bc0f2 SysUi: Distinguish between location indicator for system app ops vs others.
This change allows controlling via flag whether or not to show the location
indicator for system app location accesses.

Bug: 191503437
Test: atest SystemUITests
Test: manual
Change-Id: I1d3f29d07f340b1ef331c2eba8cedc0d66ba415e
2022-01-19 16:45:41 +00:00
TreeHugger Robot
c6cc4639d1 Merge "Enable nested scrolling for locale picker" into sc-v2-dev am: 67e26d7469 am: 4e3b453baf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16636785

Change-Id: Id5310dbc54ff4c797362982d0641fbda6d23a6bc
2022-01-19 14:56:10 +00:00
TreeHugger Robot
4e3b453baf Merge "Enable nested scrolling for locale picker" into sc-v2-dev am: 67e26d7469
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16636785

Change-Id: Id0a594a3f00e9a2cafdced22c62ab9d8238d494b
2022-01-19 14:49:46 +00:00
TreeHugger Robot
67e26d7469 Merge "Enable nested scrolling for locale picker" into sc-v2-dev 2022-01-19 14:46:19 +00:00
Bernardo Rufino
1a5cb387d6 Revert "Revert "Migrate unsafe parcel APIs in framework-minus-apex""
This reverts commit 331be9a643.

Reintroducing ag/16366278 since it seems unrelated to b/214053959 (more details on b/214053959#comment55).

Original commit message:

Migrate unsafe parcel APIs in framework-minus-apex

Migrate the following unsafe parcel APIs in framework-minus-apex:
* Parcel.readSerializable()
* Parcel.readArrayList()
* Parcel.readList()
* Parcel.readParcelable()
* Parcel.readParcelableList()
* Parcel.readSparseArray()

This CL was generated by applying lint fixes that infer the expected
type from the caller code and provide that as the type parameter
(ag/16365240).

A few observations:
* In some classes we couldn't migrate because the class also belonged to
another build module whose min SDK wasn't current (as is the case for
framework-minus-apex), hence I suppressed the lint check
(since I'll eventually submit the lint check to the tree).
* In some cases, I needed to do the cast in
https://stackoverflow.com/a/1080525/5765705 to make the compiler happy
since there isn't another way of providing a class of type
Class<MyClassWithGenerics<T>>.
* In the readSerializable() case, the new API also requires the class
loader, that was inferred to by InferredClass.class.getClassLoader().
* Note that automatic formatting and import rely on running hooked up
to the IDE, which wasn't the case here.

Bug: 195622897
Change-Id: I272432e6e082a973f7a50492ec35d79c2b577c93
Test: TH passes
2022-01-19 11:13:18 +00:00
Vania Desmonda
dde365777a Add wallpaper dimming SystemAPI and implementation for handling dimming
set by multiple applications.

Handle lock screen dimming regardless if it shares the same wallpaper
with the system to apply composite keyguard + additional dimming.

Test: manual testing and unit tests
Bug: 202841384
Change-Id: Iabd665e9a8e377185b123494eac2198a4436b0c6
CTS-Coverage-Bug: 213426781
2022-01-19 10:08:21 +00:00
Junyu Lai
57c59fba4c [MS24] Remove FileUtils.sync dependencies
FileRotator will be built with Connectivity mainline module
while the file location will be kept inside platform.
Thus, hidden api usage needs to be addressed.

This change removes some dependencies by inlining the content
of FileUtils.sync to remove the dependency, and change the
Slog to Log.

Test: TH
Bug: 204830222
Change-Id: I6105850dd8311072fd8de2e2864d11fdb052f061
2022-01-19 07:07:34 +00:00
Winson
efbb319630 Move package parsing to services.jar
This facilitates exposing the Parsed_ classes as
@SystemApi(client = SYSTEM_SERVER) while keeping everything inside
services.jar rather than having it split across both jars.

This reverts getPackageArchiveInfo to use legacy PackageParser, since
framework.jar can no longer access the moved classes.

Bug: 214038417

Test: presubmit, no logic changes

Change-Id: I152d70fb4f643d32efb012cfb20b0fbc5f88f2d8
2022-01-18 12:47:45 -08:00
Lais Andrade
a01a1f6993 Deprecate boolean settings for haptic feedback and vibrate when ringing
Deprecate HAPTIC_FEEDBACK_ENABLED in favor or HAPTIC_FEEDBACK_INTENSITY,
and VIBRATE_WHEN_RINGING in favor or RING_VIBRATION_INTENSITY.

Introduce hidden flag
VibrationAttributes.FLAG_BYPASS_USER_VIBRATION_INTENSITY_OFF
to represent HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING in the
vibrator service. This is applied by:

- PhoneWindowManager, that converts HapticFeedbackConstants into
(VibrationEffect, VibrationAttributes).

- CellBroadcastAlertAudio, that triggers alerts using AudioAttributes
with flags FLAG_BYPASS_INTERRUPTION_POLICY (that translates to same flag
in VibratorManager, to bypass DnD) and FLAG_BYPASS_MUTE (that translates
to this new flag, to bypass the new alarm intensity settings).

The new flag is erased from request that are not from privileged apps,
similar to the other bypass flag. The public
HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING has also been
deprecated in T with a documentation explaining the removal of platform
support.

Remove SysUI dependencies on the deprecated settings, it should use the
USAGE_TOUCH attribute and rely on the vibrator service to apply the user
settings.

Keep other SysUI dependencies that needs to run in older Android
versions (like Launcher3).

Bug: 185351540
Test: VibrationSettingsTest + manual
Change-Id: I0372e4db19e09523795d7e79b9f7a15ae48a8cd9
2022-01-18 18:57:10 +00:00
Dmitri Plotnikov
538db821cd Merge "Attribution of WiFi power per process state" 2022-01-18 00:38:53 +00:00
Dmitri Plotnikov
d6cfe1ed83 Attribution of WiFi power per process state
Bug: 191921016
Bug: 182845426
Test: atest FrameworksCoreTests:BatteryStatsTests

Change-Id: I7dada3593dba59a8a0731e463bd18e67db7cd608
2022-01-14 16:00:05 -08:00
Kalesh Singh
17a6606ec1 Add system_server to readtracefs group
This allows system_server to search/read tracefs entries. It is needed
for attaching cpu timeinstate bpf programs to tracepoints.

Bug: 208892266
Bug: 209513178
Bug: 214061655
Test: libtimeinstate_test
Change-Id: I4139605eb7c5277887092b3d6a3fb26bf4f8f171
Merged-In: I4139605eb7c5277887092b3d6a3fb26bf4f8f171
2022-01-14 18:50:40 +00:00
Felipe Leme
07cf25574b Merge "Creates a generic mechanism to dump app-side information." 2022-01-14 17:43:28 +00:00
Beverly
7f9b6a6ca7 Update UIEventLogger
To log an instanceId with the EventId without
needing to provide package and uid.

Test: manually log and check unbuffered log with
  adb shell cmd stats print-logs && adb logcat -s statsd:I
Bug: 213483562
Change-Id: Idddf899c94a79e828acb80fe6da21a03468dcae2
2022-01-14 17:25:15 +00:00
Nicolò Mazzucato
5355b68962 Merge "Add Jank test for unfold transition" 2022-01-14 10:59:12 +00:00
Mill Chen
fa861a6b5d Enable nested scrolling for locale picker
This change is to make the locale picker list enable the nested
scrolling feature. It is necessay to enable this feature to be able to
work with CollapsingToolbarLayout.

Fixes: 207318265
Fixes: 213036789
Test: manual test
1. Verify the locale picker works with Activity
2. Verify the locale picker works with SettingsBaseActivity

Change-Id: Iaf90211da640cd265fc2b23dd34b3149c4406891
2022-01-14 09:25:49 +00:00
Felipe Leme
bcafba3a1f Creates a generic mechanism to dump app-side information.
Currently, 'dumpsys activity' can dump the state of some managers:
 - AutofillManager
 - ContentCapturemaanger
 - UiTranslationController

But the support for these custom dumping is hardcoded into
Activity itself, which makes it harder to extend. For example,
automotive builds provide an app-side Car object, which currently
cannot be dumped.

This CL makes the mechanism more flexible by providing a couple new
public / SystemAPIs that let Automotive (or other mainline modules)
extend it.

Examples:

$ adb shell dumpsys activity com.android.car.carlauncher/.CarLauncher --list-dumpables
$ adb shell dumpsys activity com.android.car.carlauncher/.CarLauncher --dump-dumpable CarUserManager
$ adb shell dumpsys activity service com.android.systemui/.SystemUIService CarUserManager

NOTE: this CL only adds the new APIs; a follow-up CL will change the
existing managers to use them.

Test: see above
Test: m update-api

Bug: 149254050
CTS-Coverage-Bug: 149254050

Change-Id: I6920ff3542d3d75edd667c2c7658e9d0a7af534f
2022-01-13 11:43:13 -08:00
TreeHugger Robot
3804b2c7c8 Merge "Remove broadcast cuj events logic" 2022-01-13 18:49:12 +00:00
Erin Yan
86f682fd2f Merge "Add weak escrow token APIs" 2022-01-13 18:25:37 +00:00
Miranda Kephart
d07c63b45b Merge "Add clipboard overlay prototype" 2022-01-13 17:02:25 +00:00
TreeHugger Robot
01d195c67c Merge "Revert "Revert "Scribe in IMF: startStylusHandwriting & lifecycl..."" 2022-01-13 16:54:42 +00:00
Ashwini Oruganti
776b439703 Merge "Revert "Migrate unsafe parcel APIs in framework-minus-apex"" 2022-01-12 23:07:08 +00:00
Erin Yan
459f61152e Add weak escrow token APIs
Bug: 206485383
Test: atest LockPatternUtilsTest WeakEscrowTokenTests
Change-Id: I24cdf9af6c8f29db03ef214a1a0f8effad394264
2022-01-12 21:59:10 +00:00
Treehugger Robot
c5e2547ecd Merge "[DU03]Remove INetworkStatsService from BatteryStatsImpl" am: 296fbccd6e am: 33695e7a4f am: 95d57bdc9d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1931589

Change-Id: I0dd29dd55ec9e71f53ab32d59440fde638bb592d
2022-01-12 20:25:58 +00:00