Commit Graph

10168 Commits

Author SHA1 Message Date
Lais Andrade
41fd16dfb7 Merge "Deprecate boolean settings for haptic feedback and vibrate when ringing" 2022-01-19 17:24:40 +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
Neharika Jali
1d55f7bf2d Merge "Fix numerical overflow in result in computeStorageCacheBytes" 2022-01-06 11:23:19 +00:00
Junyu Lai
2aa7b9ec4d [MS40.1] Remove Clock dependencies from NetworkStatsService
This includes:
1. Re-implement the BestClock in the static library.
2. Expose SystemClock#currentNetworkTimeClock as public Api

Test: TH
Bug: 204830222
CTS-Coverage-Bug: 213393821
Exempt-From-Owner-Approval: 1. Owner approved the change with
  explicitly granted submission after adderessing the
  straight-forward comment. 2. Owner is OOO for 3 months.
Change-Id: I08c0162a7101cc6184f3eca3d4a59211183fb843
2022-01-06 08:49:59 +00:00
Junyu Lai
0cf9e87c79 [MS27] Expose noteUntaggedSocket SystemApi
While Data usage related codes are moving to mainline module,
StrictMode#vmUntaggedSocketEnabled() and onUntaggedSocket()
can no longer be accessed from NetworkManagementSocketTagger.

Thus, expose alternative SystemApi to allow invocations from
the module.

Test: TH
Bug: 204830222
Exempt-From-Owner-Approval: 1. Owner approved the change with
  explicitly granted submission after adderessing the
  straight-forward comment. 2. Owner is OOO for 3 months.
Change-Id: Ib54ff54ce3617ae0d04080a1740e78b086bbb039
2022-01-06 08:49:46 +00:00
Neharika Jali
4bf22b5e9a Fix numerical overflow in result in computeStorageCacheBytes
Bug: 211756656
Test: atest atest
frameworks/base/core/tests/coretests/src/android/os/storage/StorageManagerBaseTest#testGetStorageCacheBytesUnderModerateStorage

Change-Id: I89fd358536708389d33e3077dcd0928332f5182f
2022-01-06 08:01:42 +00:00
Youkichi Hosoi
426518dadd Rename StorageVolume.isStub as StorageVolume.isExternallyManaged
To make it more developer friendly.

Bug: 210622224
Test: m
Test: atest StorageManagerTest#testGetPrimaryVolume
Change-Id: I023d91b5940a8dabff15d53401529f1be43697f3
2022-01-06 16:25:33 +09:00
Dmitri Plotnikov
e07408d447 Include saved battery history buffers into BatteryUsageStats parcel
Bug: 209297031
Test: atest FrameworksCoreTests:BatteryUsageStatsTest FrameworksCoreTests:BatteryUsageStatsProviderTest
Change-Id: I369d863b6f6fd488030aa031cc465bef6ce99ab8
2022-01-05 19:45:43 +00:00
Dmitri Plotnikov
42fec8dfa2 Merge "Add BATTERY_STATS_OWNERS to all *Stats files" am: 884e5d8456 am: b759da54a3 am: c8eaba313f am: 5ae5ccf9e3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1936287

Change-Id: I909ed3369c4b28e5dfe709e0cff333dcd665d87a
2022-01-05 19:39:28 +00:00
Dmitri Plotnikov
5ae5ccf9e3 Merge "Add BATTERY_STATS_OWNERS to all *Stats files" am: 884e5d8456 am: b759da54a3 am: c8eaba313f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1936287

Change-Id: I7a4e5bb0afdfbee2de431bb17b161225909bb5fc
2022-01-05 19:09:53 +00:00
Santos Cordon
1142053fb7 Treat changes in device-state as user-activity.
PowerManager will now treat changes in the device state from
DeviceStateManager as user-activity for the purposes of calculating
idle timeouts.

Bug: 199993642
Test: Check logs to verify that user-activity is updated when
      changing device states.
Test: atest PowerManagerServiceMockingTest
Change-Id: Ib5e543dd502d6b9b8ef1fef7e1b0f8a188f3cf1e
2022-01-05 14:24:13 +00:00
Dmitri Plotnikov
c8eaba313f Merge "Add BATTERY_STATS_OWNERS to all *Stats files" am: 884e5d8456 am: b759da54a3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1936287

Change-Id: I5fc46af02882bd65a5359705e67240809731d4f5
2022-01-05 00:09:15 +00:00
Dmitri Plotnikov
884e5d8456 Merge "Add BATTERY_STATS_OWNERS to all *Stats files" 2022-01-04 23:42:08 +00:00
Dmitri Plotnikov
5e85751023 Add BATTERY_STATS_OWNERS to all *Stats files
Test: N/A
Change-Id: Ifb1865b2db902bf0cca1bde48a7381903dca229c
2022-01-04 15:31:01 -08:00
Lee Shombert
0cece3898b Prepare PropertyInvalidatedCache for SystemApi
Bug: 152453213
Tag: #refactor

This commit prepares PropertyInvalidatedCache to function as a system
api.  Specifically, the methods recompute() and bypass() which may be
overridden by clients are now public (instead of protected).  This
forces an update to all existing clients, to accommodate the change in
method visibility.

Two small changes have been made as cleanup:

 1. The awkwardly named debugCompareQueryResults() is now
    resultEquals(), which is more or less consistent with how other
    equality tests are named in Android.  This name change affects two
    clients.

 2. PackageManager has changed to use resultEquals() instead of
    maybeCheckConsistency().  This provides a simpler and more
    consistent use of the APIs.  maybeCheckConsistency() has been made
    private.

Test: atest PropertyInvalidatedCacheTests

Change-Id: I4110f8e887a4fd8c784141e8892557a9d1b80a94
2022-01-04 08:13:59 -08:00
Mayank Garg
59a27ff1ed Converted NewUserResponse constructor to testAPI
Bug: 199446283
Test: m
Change-Id: I550c05a3c1e35adba911b1fcf48cc6c072280c14
2021-12-21 10:13:34 -08:00
Treehugger Robot
ec1801d37e Merge "Fix for run cts-on-gsi -m CtsOsTestCases -t android.os.cts.VibratorTest" am: c9ed425df2 am: 1b148ed131 am: 130599d186 am: 15ccd2c588
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1918645

Change-Id: I8ca688eaeb2f3f4a34a5bcffa40fca88051e341c
2021-12-20 16:04:13 +00:00
Treehugger Robot
15ccd2c588 Merge "Fix for run cts-on-gsi -m CtsOsTestCases -t android.os.cts.VibratorTest" am: c9ed425df2 am: 1b148ed131 am: 130599d186
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1918645

Change-Id: Ib3847acbafea7e24c97d4577ff1dc1de0b4dfed6
2021-12-20 15:47:39 +00:00
Treehugger Robot
130599d186 Merge "Fix for run cts-on-gsi -m CtsOsTestCases -t android.os.cts.VibratorTest" am: c9ed425df2 am: 1b148ed131
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1918645

Change-Id: I0260a0c7e994d4186dda7553fe5fa44b39c7de2e
2021-12-20 15:15:33 +00:00
Treehugger Robot
c9ed425df2 Merge "Fix for run cts-on-gsi -m CtsOsTestCases -t android.os.cts.VibratorTest" 2021-12-20 14:33:41 +00:00
Dmitri Plotnikov
a633941cec Add BatteryStatsManager.getWakeLockStats() API
Bug: 200753927
Test: atest FrameworksCoreTests:BatteryStatsImplTest
Change-Id: Iafb216250e26b93cec5106d1305fa68c6f20282f
2021-12-17 23:14:36 +00:00
Yasin Kilicdere
5f8f93b97e Merge "Add settings entrypoint to add a supervised user" 2021-12-16 19:45:24 +00:00
Dmitri Plotnikov
553429ae39 Merge "Attribution of modem power per process state" 2021-12-16 18:59:50 +00:00
Steven Moreland
dc63dc4d57 Merge "Binder: recycle Parcel in finally block" am: 8581d27415 am: 0c1dac2572 am: b4f0710e19 am: 2cc9570c3b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1926857

Change-Id: Ibeb6d54f6be510c6800c57c28a32398f084be89a
2021-12-16 18:25:52 +00:00
Steven Moreland
2cc9570c3b Merge "Binder: recycle Parcel in finally block" am: 8581d27415 am: 0c1dac2572 am: b4f0710e19
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1926857

Change-Id: I83621e2ea9fbb09dfea582c81516dc6ebc1118bf
2021-12-16 18:02:12 +00:00
Steven Moreland
b4f0710e19 Merge "Binder: recycle Parcel in finally block" am: 8581d27415 am: 0c1dac2572
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1926857

Change-Id: I822c72fb027da80e39762c03b228e7c966bbe253
2021-12-16 17:46:12 +00:00
Steven Moreland
8581d27415 Merge "Binder: recycle Parcel in finally block" 2021-12-16 17:16:31 +00:00
Neharika Jali
fa21499347 Merge "Change reserved cache space as sum of cache quotas of all uids" 2021-12-16 05:57:46 +00:00