Commit Graph

17938 Commits

Author SHA1 Message Date
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
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
Treehugger Robot
95d57bdc9d Merge "[DU03]Remove INetworkStatsService from BatteryStatsImpl" am: 296fbccd6e am: 33695e7a4f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1931589

Change-Id: Iec474f98457ca27366ff19cd7c840e421d343921
2022-01-12 19:59:56 +00:00
Treehugger Robot
296fbccd6e Merge "[DU03]Remove INetworkStatsService from BatteryStatsImpl" 2022-01-12 19:33:52 +00:00
Taran Singh
94324080af Revert "Revert "Scribe in IMF: startStylusHandwriting & lifecycl..."
Revert^2 "CTS for Stylus Handwriting lifecycle"

493b8d7d3b4d43e483c03b155d38057e3eacd3c9

Reason: Fix API signature related issues by making newly introduced
 methods in InputMethod.java default

Bug: 213976598
Bug: 203086136
Test: atest StylusHandwritingTest
Test: atest SignatureTest#testSignature

Change-Id: Idfd5d1f84e66e3a19ef384589b4892adb91f8066
2022-01-12 19:23:47 +00:00
Bernardo Rufino
331be9a643 Revert "Migrate unsafe parcel APIs in framework-minus-apex"
This reverts commit 90bb3709dc.

Reason for revert: b/214053959

Change-Id: Ic271bab1d3eaf677a5989dda9deb944ee2ad6850
2022-01-12 17:44:44 +00:00
Miranda Kephart
f2df8963ed Add clipboard overlay prototype
Adds a floating window/overlay (similar to screenshots) when
something is copied to the clipboard. Opens Markup or a lightweight
test editing activity (as appropriate) when edit is tapped.

Bug: 195554988
Test: manual (tested copying text/images, and interactions with
screenshots)

Change-Id: I02aff237a1245ed2fed130d5e43112472d320a9c
2022-01-12 11:19:54 -05:00
Taras Antoshchuk
739eaf1cb9 Merge "Revert "Revert "Revert "Revert "Add APIs that allow to exclude r..."" am: bc8f256721 am: 8c3fa67bbd am: 3dafac7b7c am: 0b4f3bd970
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1938732

Change-Id: Ie70c2e45055fbc85d083c94f510e6c223ac8dcf1
2022-01-12 16:15:15 +00:00
Taras Antoshchuk
0b4f3bd970 Merge "Revert "Revert "Revert "Revert "Add APIs that allow to exclude r..."" am: bc8f256721 am: 8c3fa67bbd am: 3dafac7b7c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1938732

Change-Id: Ie87d82fb28e48aa8a7ed7c0dcad669ddffd4097e
2022-01-12 16:14:35 +00:00
Taras Antoshchuk
3dafac7b7c Merge "Revert "Revert "Revert "Revert "Add APIs that allow to exclude r..."" am: bc8f256721 am: 8c3fa67bbd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1938732

Change-Id: Ib2087b4e20b7b92c3c26ed9f8edb1c57555ce6e6
2022-01-12 16:03:09 +00:00
Nicolo' Mazzucato
caf468dce4 Add Jank test for unfold transition
A new TransitionProgressListener is added to start and stop the jank monitor during the transition. This is a no-op if the jank monitor is disabled.

The reason why it is added in StatusBarWindowController is that InteractionJankMonitor needs an attached to begin, and the status bar should always be present during the animation.

Bug: 213862831
Test: Running test suite in forrest with config in g3
Change-Id: I99dcd4e879b9c2c47611096b29b164881e8714c7
2022-01-12 16:40:00 +01:00
Taras Antoshchuk
bc8f256721 Merge "Revert "Revert "Revert "Revert "Add APIs that allow to exclude r..."" 2022-01-12 15:27:30 +00:00