Commit Graph

10194 Commits

Author SHA1 Message Date
Roopa Sattiraju
a070d18c3c Initialize FrameworkInitializer for Bluetooth
Bug: 195146428
Test: Compile and bring up
Change-Id: Ife478832ced506ff156c0a1f680952390e50d425
2022-01-23 18:17:34 -08:00
Dmitri Plotnikov
50f887b058 Add BatteryStatsManager.getBluetoothBatteryStats() API
Bug: 202876405
Test: atest FrameworksCoreTests:BatteryStatsImplTest
Change-Id: I4a7f880ddad7dc98e9919356859603b17a894705
2022-01-21 13:04:54 -08:00
Neharika Jali
e9605c6905 Merge "Makes constants related to cache configurable via DeviceConfig API" 2022-01-21 19:06:21 +00:00
Hao Ke
4f71cd3513 Merge "Changing readParcelable and readSerializable's method signatures." am: d5b3a5c4a9 am: 6c1f3fbcd2 am: 1ff8962b79 am: 70398d2001
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1953436

Change-Id: Iaef6f3bd68561b879bf0d1600b7296b5c39b225a
2022-01-21 18:10:05 +00:00
Hao Ke
70398d2001 Merge "Changing readParcelable and readSerializable's method signatures." am: d5b3a5c4a9 am: 6c1f3fbcd2 am: 1ff8962b79
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1953436

Change-Id: Idc81838d965832f5d97af67e0006565fe93a3a76
2022-01-21 17:51:42 +00:00
Hao Ke
1ff8962b79 Merge "Changing readParcelable and readSerializable's method signatures." am: d5b3a5c4a9 am: 6c1f3fbcd2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1953436

Change-Id: I24500f0428749baf7e1da43464982c1bd15c28f2
2022-01-21 17:33:28 +00:00
Hao Ke
d5b3a5c4a9 Merge "Changing readParcelable and readSerializable's method signatures." 2022-01-21 17:01:04 +00:00
Martijn Coenen
2283b7079c Merge changes I39c351f1,Ida90829a,I02aaaa1c
* changes:
  Make ProcessRecord.isolated more robust.
  Rename ServiceRecord.isolatedProc to isolationHostProc.
  Add a new UID range for supplemental processes.
2022-01-21 13:49:54 +00:00
Treehugger Robot
6eaf7224a3 Merge "[MS29] Remove Trace hidden API dependencies" am: be70a4353a am: 56da05be6c am: e987d6eb82 am: db6062fa8d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1952201

Change-Id: I290a73b4a8c8bf2ca3e40c1f23224a67ebccf603
2022-01-21 09:24:44 +00:00
Treehugger Robot
db6062fa8d Merge "[MS29] Remove Trace hidden API dependencies" am: be70a4353a am: 56da05be6c am: e987d6eb82
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1952201

Change-Id: I34899dff6aa29ef5940afce89d459d2585d97044
2022-01-21 09:07:35 +00:00
Treehugger Robot
e987d6eb82 Merge "[MS29] Remove Trace hidden API dependencies" am: be70a4353a am: 56da05be6c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1952201

Change-Id: I735fbe031bef57ecb7a4e0428bcd56484a9af116
2022-01-21 08:44:24 +00:00
Treehugger Robot
be70a4353a Merge "[MS29] Remove Trace hidden API dependencies" 2022-01-21 08:29:29 +00:00
Junyu Lai
c048d53e60 [MS29] Remove Trace hidden API dependencies
Since data usage related code is going to move to mainline module,
hidden classes and methods can no longer be accessed. Thus,
expose the needed system apis since there is no alternative.

Test: TH
Fix: 215152167
Bug: 204830222
Change-Id: I41046f90b9ff8f1755304e5d289584d39599fd13
2022-01-21 06:34:55 +00:00
Martijn Coenen
9c9045241a Add a new UID range for supplemental processes.
These are processes that are spawned alongside regular app processes.
They have their own UID range, such that they can be properly isolated
from applications.

Add some APIs in Process that allows the system and mainline
modules to verify that a particular UID belongs to a supplemental
process, and to map between the supplemental process and the
corresponding app process.

Bug: 215012578
Test: N/A
Change-Id: I02aaaa1c2bcf9d141ddc97747eb6d7edd52d7b92
2022-01-21 01:05:46 +00:00
Etienne Ruffieux
7f494cc901 Merge "Making Process.NFC_UID SystemApi for modules" am: 06580338e6 am: d086e8ee72 am: 0fcd2ed905 am: 26f9b5d78b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1945288

Change-Id: Ia7695f25f9bec9cd61c1743888cb8c8dd3b8ee04
2022-01-21 00:19:54 +00:00
Etienne Ruffieux
26f9b5d78b Merge "Making Process.NFC_UID SystemApi for modules" am: 06580338e6 am: d086e8ee72 am: 0fcd2ed905
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1945288

Change-Id: I7f153f5c39de361e5b65848792ad35d67dcd00e0
2022-01-21 00:18:44 +00:00
Dmitri Plotnikov
802df78a0b Merge "Attribution of Bluetooth power per process state" 2022-01-21 00:01:02 +00:00
Etienne Ruffieux
0fcd2ed905 Merge "Making Process.NFC_UID SystemApi for modules" am: 06580338e6 am: d086e8ee72
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1945288

Change-Id: I8adadb76c51aa37665ac9847c51e852bd7d933b8
2022-01-21 00:00:34 +00:00
Etienne Ruffieux
fe195c9b7e Making Process.NFC_UID SystemApi for modules
In order for Bluetooth to be a mainline module, we need to
remove all hidden APIs calls from and to it. NFC_UID is
used inside BluetoothManagerService so we need to be able
to access it.

Tag: #feature
Test: make
Bug: 211851706
Change-Id: Ie778c4467f5db1efa1f759c405373cc3e34747ca
2022-01-20 19:09:50 +00:00
TreeHugger Robot
ce65b04d56 Merge "Revert "Revert "Migrate unsafe parcel APIs in framework-minus-apex""" 2022-01-20 11:33:39 +00:00
Neharika Jali
f29cf7bbb5 Makes constants related to cache configurable via DeviceConfig API
Bug: 214343564
Test: atest installd_cache_test, atest StorageManagerBaseTest, atest
StorageManagerTest#testComputeStorageCacheBytes

Change-Id: Ie977b8798e7169471c407621535ca1ca8feb6fec
2022-01-20 10:42:36 +00:00
Allen Su
b0595af545 Merge "Export matchesLanguageAndScript() API in LocaleList" 2022-01-20 06:52:27 +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
allenwtsu
51dcd501ee Export matchesLanguageAndScript() API in LocaleList
Bug: 209729853
Test: atest LocaleListTest
Change-Id: I173fa6b525d3d265663e121c781b999ea573ea95
2022-01-20 03:56:13 +08:00
Hao Ke
9c4045f7c9 Changing readParcelable and readSerializable's method signatures.
Bug: 210800751
Test: atest -d android.os.cts.ParcelTest
Change-Id: Ie0a1deafc6e876ea01bfa5cee221ef81fecdfe59
2022-01-19 17:49:57 +00:00
Lais Andrade
41fd16dfb7 Merge "Deprecate boolean settings for haptic feedback and vibrate when ringing" 2022-01-19 17:24:40 +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
Marcin Oczeretko
38a2814667 Merge "Fix NPE in Binder#getTransactionName" 2022-01-18 19:12:40 +00: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
Marcin Oczeretko
28d940e33a Fix NPE in Binder#getTransactionName
Bug: 214053959
Test: manual

Change-Id: Ie77080d20f638e5e6e0a6ecb255d45bdb12f3c4d
2022-01-18 17:02:23 +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
TreeHugger Robot
7246a14cde Merge "Replaced removeUserOrSetEphemeral by removeUserWhenPossible" 2022-01-14 22:33:38 +00:00
Ashwini Oruganti
776b439703 Merge "Revert "Migrate unsafe parcel APIs in framework-minus-apex"" 2022-01-12 23:07:08 +00:00
Mayank Garg
42f0ac637e Replaced removeUserOrSetEphemeral by removeUserWhenPossible
Bug: 199446770
Test: m (successful build)
Change-Id: I5d46b168979b954921d99183db2362a77d7fa09f
2022-01-12 09:54:24 -08: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
Lais Andrade
3a4e97db5f Merge "Introduce media and alarm vibration intensity settings" 2022-01-11 15:16:28 +00:00
Santos Cordon
85949672f2 Merge "Treat changes in device-state as user-activity." 2022-01-11 14:02:26 +00:00
Mayank Garg
04832954db Merge "Added removeUserWhenPossible API as SystemAPI" 2022-01-11 00:23:08 +00:00
Lais Andrade
095b3d31db Introduce media and alarm vibration intensity settings
Introduce new setting keys for media and alarm vibration intensity.

Merge all default vibration intensity getters into a helper class that
receives the VibrationAttributes usage int and applies the default logic
to all usages.

Also update the usage of boolean settings for haptic feedback and ringtone
to disable vibrations in VibrationSettings.

Bug: 198346559
Bug: 207477604
Test: VibratorTest & VibrationSettingsTest
Change-Id: I69ba05a8bc35657637b1f351f4c19d2d96efc9e3
2022-01-10 15:42:21 +00:00
Lais Andrade
0eebf348e4 Use absolute frequency in WaveformBuilder
Remove the concept of relative frequency and the mapping logic from
VibratorInfo and receive absolute frequency values, in hertz, from
WaveformBuilder.

The clipping logic to make all PWLE amplitudes fit the HAL bandwidth map
still remains.

Bug: 203785430
Test: com.android.server.vibrator.*
Change-Id: Ic01a08d84e66d88acad6db5c704251394afbf1f6
2022-01-10 14:38:20 +00:00
Mayank Garg
910c700b34 Added removeUserWhenPossible API as SystemAPI
Also converted following APIs to SystemAPI:
android.os.UserManager.REMOVE_RESULT_ALREADY_BEING_REMOVED
android.os.UserManager.REMOVE_RESULT_ERROR
android.os.UserManager.REMOVE_RESULT_DEFERRED
android.os.UserManager.REMOVE_RESULT_REMOVED

Remaining task: remove all occurance of UserManager.removeUserOrSetEphemeral

Bug: 197181121
Bug: 199446770
Bug: 199446810
CTS-Coverage-Bug: 199446770
Test: m system-api-stubs-docs-non-updatable-update-current-api
      m module-lib-api-stubs-docs-non-updatable-update-current-api
Change-Id: Iea7867268950050f90d8509d7f3d09725d850a5e
2022-01-09 22:19:54 -08:00
TreeHugger Robot
ba01101164 Merge "Rename StorageVolume.isStub as StorageVolume.isExternallyManaged" 2022-01-08 02:19:08 +00:00
Lee Shombert
9a686c07ba Merge "Prepare PropertyInvalidatedCache for SystemApi" 2022-01-06 23:14:05 +00:00
Mayank Garg
bb50683599 Merge "Converted NewUserResponse constructor to testAPI" 2022-01-06 22:22:58 +00:00
Dmitri Plotnikov
19196aff5c Merge "Add BatteryStatsManager.getWakeLockStats() API" 2022-01-06 18:05:14 +00:00
Junyu Lai
fb715a951d Merge changes from topics "ms34-tm", "ms40-clock" am: beb9fb3cc8 am: 08c51b04ca am: d312550ff8 am: f23caacaf1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1914533

Change-Id: I7db7bdf217c982ef6011a948b68d238c54e2a47e
2022-01-06 14:39:44 +00:00
Junyu Lai
f23caacaf1 Merge changes from topics "ms34-tm", "ms40-clock" am: beb9fb3cc8 am: 08c51b04ca am: d312550ff8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1914533

Change-Id: I13c1439933d33c81e3f8668ad0b86bea2b6b68a7
2022-01-06 14:23:37 +00:00
Junyu Lai
d312550ff8 Merge changes from topics "ms34-tm", "ms40-clock" am: beb9fb3cc8 am: 08c51b04ca
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1914533

Change-Id: I244779c19fab00eede1b7e9f3980679131e75cbb
2022-01-06 14:09:31 +00:00
Junyu Lai
beb9fb3cc8 Merge changes from topics "ms34-tm", "ms40-clock"
* changes:
  [MS09] Expose NetworkTemplate APIs which are needed by NetworkPolicy
  [MS34.1] Replace TelephonyManager#getSubscriberId(subId) with public API
  [MS40.1] Remove Clock dependencies from NetworkStatsService
  [MS27] Expose noteUntaggedSocket SystemApi
2022-01-06 13:56:39 +00:00