Commit Graph

8949 Commits

Author SHA1 Message Date
TreeHugger Robot
957680b76f Merge "Fix Vibrator and VibratorManager public API docs" into sc-dev am: 1d55488df5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13671772

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I333321bad888df8c3760e6c3851a26b723e5422c
2021-02-23 19:18:13 +00:00
TreeHugger Robot
1d55488df5 Merge "Fix Vibrator and VibratorManager public API docs" into sc-dev 2021-02-23 19:00:43 +00:00
Lais Andrade
89d7a876fa Fix Vibrator and VibratorManager public API docs
Add information about value returned by Vibrator.getId, including a
description of what the default -1 value represents.

Fix description of CombinedVibrationEffect arguments to
VibratorManager methods.

Fix: 180962151
Fix: 180963421
Test: N/A
Change-Id: I3fab2d5fe299be5a951f32bd75eb2e5275ef6e56
2021-02-23 17:23:18 +00:00
Songchun Fan
ba6118561d Merge "[pm] smooth transition from install progress to incremental loading progress" into sc-dev am: df9c8ba64b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13619076

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I592fe868b17c4178ae391655680ab673de8b531d
2021-02-23 16:58:28 +00:00
Songchun Fan
a67a1a9841 [pm] smooth transition from install progress to incremental loading progress
Previously, regardless of the downloading progress reported by the client,
right before installation completion, we publish the install progress
as 0.9. For incremental installs, because we will publish the
incremnetal loading progress after the installation completion, we
might see the progress going backward, because the incremental loading
progress is likely less than 0.9.

For a smoother transition, we do not overwrite the client progress.
Instead, during committing, publish the incremental loading progress
while making sure the progress doesn't go backwards. After committing,
the launcher will keep showing the incremental loading progress.

+ Making sure the installer's incremental progress listener is
unregistered after session is committed.

See the demo video for an example. Notice that the progress is changed
during "Installing..." (around 00:35).

BUG: 180040329
Test: manual
Change-Id: I6c30b0dac6758fd103ed6a985ca39b6f8557ba8f
2021-02-22 22:25:51 +00:00
TreeHugger Robot
28a92fd4f8 Merge "Adds caller check to getAllPackages()" into sc-dev 2021-02-22 18:23:55 +00:00
Kweku Adams
e6904ada6a Merge "Remove unnecessary permission check." into sc-dev am: 0c89d4b843
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13616884

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I94103b01d0644395d15e400996924f89dd1719ae
2021-02-22 16:57:51 +00:00
Kweku Adams
0c89d4b843 Merge "Remove unnecessary permission check." into sc-dev 2021-02-22 16:55:01 +00:00
Kholoud Mohamed
222b5c70d9 Merge "Expose isUserKeyUnlocked as a TestAPI" into sc-dev am: bfe45b77f8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13567147

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iaa9ef78829cdc0420daf949ae97ee1fe97392333
2021-02-22 16:01:52 +00:00
Kholoud Mohamed
bfe45b77f8 Merge "Expose isUserKeyUnlocked as a TestAPI" into sc-dev 2021-02-22 15:46:21 +00:00
TreeHugger Robot
8a0a87003a Merge "Constrain scaled amplitude to valid values in [1,255]" into sc-dev am: 81c669d39b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13519387

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I19d177ad2adfdd918ff8d5f9b1f20cfb589fe43e
2021-02-22 03:33:18 +00:00
Lais Andrade
2356453306 Constrain scaled amplitude to valid values in [1,255]
Scaling down low amplitudes can lead to one-shot effects with amplitude
zero, which leads to an invalid VibrationEffect and causes
IllegalArgumentException to be thrown on an originally valid effect.

Bug: 179674498
Test: VibrationEffectTest
Change-Id: Ie653084d37f9bfed20aac25f8805ffdf40661e03
2021-02-22 01:08:18 +00:00
TreeHugger Robot
c1fd0badfc Merge "Measured energy for Ambient Display in BatteryUsageStats" into sc-dev am: 863e3fee2b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13556589

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia6c80f20a5ac02b2cc9c892bedfa78b5c479fb94
2021-02-21 20:12:50 +00:00
TreeHugger Robot
863e3fee2b Merge "Measured energy for Ambient Display in BatteryUsageStats" into sc-dev 2021-02-21 19:08:28 +00:00
Dmitri Plotnikov
5363df4157 Merge "Copy custom measured power to BatteryUsageStats" into sc-dev am: 919528f401
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13564227

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7c3c00c53721aaf0604cf718dbcb16961fe525c6
2021-02-21 18:35:11 +00:00
Dmitri Plotnikov
66a11604f5 Copy custom measured power to BatteryUsageStats
Bug: 158137862
Test: atest FrameworksCoreTests:com.android.internal.os.CustomMeasuredPowerCalculatorTest
Change-Id: I53a974baf773f35eb212f234755c553be45336ce
2021-02-20 13:38:48 -08:00
TreeHugger Robot
356c359096 Merge "Add discharge power estimates to BatteryUsageStats" into sc-dev am: 9fb89c22ca
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13538912

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I157de70b2b18f5c909712d575ebf8a64f59c2e7b
2021-02-20 21:13:34 +00:00
TreeHugger Robot
9fb89c22ca Merge "Add discharge power estimates to BatteryUsageStats" into sc-dev 2021-02-20 20:34:33 +00:00
Chiachang Wang
b56502c056 Merge changes I0a75c440,Ief9e8925,Ie03e8276,If0ac9a64,I716bd771 am: 63bc7bd3c2 am: 7fcc3efb9c am: 2540861d4f am: 6aca8c36e0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1573943

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2c067aee69645e23e31427b04c3b6a614993529b
2021-02-20 05:32:16 +00:00
Chiachang Wang
6aca8c36e0 Merge changes I0a75c440,Ief9e8925,Ie03e8276,If0ac9a64,I716bd771 am: 63bc7bd3c2 am: 7fcc3efb9c am: 2540861d4f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1573943

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I52c41154ae3364774e63376fbdd5a9f42727b65f
2021-02-20 05:04:03 +00:00
Chiachang Wang
2540861d4f Merge changes I0a75c440,Ief9e8925,Ie03e8276,If0ac9a64,I716bd771 am: 63bc7bd3c2 am: 7fcc3efb9c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1573943

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1e81aa264d988cc50f2d42f8b9592f050a01b69f
2021-02-20 04:22:17 +00:00
Chiachang Wang
63bc7bd3c2 Merge changes I0a75c440,Ief9e8925,Ie03e8276,If0ac9a64,I716bd771
* changes:
  [IT06]Move INetworkActivityListener into connectivity module
  [IT05] Remove the unused network activity logic out from NMS
  [IT4.7] Add network activity info into dumpsys for debugging
  [IT4.6] Unbundle NMS out from ConnectivityManager
  [IT4.5] Update radio power from CS directly
2021-02-20 02:02:46 +00:00
Robert Horvath
687865e87c Merge "Document behaviour of "quiescent" reboot reason" into sc-dev am: d34a5f6aab
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13453877

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ieedc975e9f3e8c8c34f9a23721d3e7c935465ea2
2021-02-19 16:38:34 +00:00
Robert Horvath
d34a5f6aab Merge "Document behaviour of "quiescent" reboot reason" into sc-dev 2021-02-19 16:14:14 +00:00
Dmitri Plotnikov
fc0ba64301 Add discharge power estimates to BatteryUsageStats
Bug: 158137862
Test: atest DischargedPowerCalculatorTest
Change-Id: I68e8ad491d92dca08bb7c49fadf663dd48ee2b90
2021-02-18 16:47:42 -08:00
Dmitri Plotnikov
8c2e375c1f Measured energy for Ambient Display in BatteryUsageStats
Bug: 178140704
Test: atest FrameworksCoreTests:com.android.internal.os.AmbientDisplayPowerCalculatorTest

Change-Id: I1a573c3e380777637b7c0466aa78a4cab4c05887
2021-02-18 14:25:50 -08:00
Primiano Tucci
306022aebf Merge "Do not check for debuggable / profilable for app tracing." am: 355753053c am: c8def00f9f am: 8bc9d1cd8e am: bf4a20e4c9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1587412

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If3f40a46884d03589a7f602cb9126a7d2cba3105
2021-02-18 21:11:21 +00:00
Primiano Tucci
bf4a20e4c9 Merge "Do not check for debuggable / profilable for app tracing." am: 355753053c am: c8def00f9f am: 8bc9d1cd8e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1587412

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iaa74e243082c0b66148d53e8123c34ee25010242
2021-02-18 20:54:38 +00:00
Primiano Tucci
8bc9d1cd8e Merge "Do not check for debuggable / profilable for app tracing." am: 355753053c am: c8def00f9f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1587412

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I11c3344dc0a6e735040822aa52f93d13961dd1e9
2021-02-18 20:12:19 +00:00
Songchun Fan
2f0abc13a8 Merge "Revert "Revert "[pm/incremental] start monitoring progress on storage creation""" into sc-dev am: 1f535786c7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13585238

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8889820831c6771137eb4ee112e74b4aea5eb4d2
2021-02-18 19:47:15 +00:00
Kweku Adams
e57d5ac376 Remove unnecessary permission check.
There's no reason for getPowerSaveModeTrigger to require the POWER_SAVER
permission. The API is only marked as a SystemApi because it was designed
for a specific use case and 3rd party apps don't need to know the
information, but there's no problem if they get the value. All the value
tells you is whether the device will turn on battery saver automatically
based on the percentage level or if it'll turn on automatically based on
a different dynamic signal.

Bug: 174241855
Test: atest android.os.cts.PowerManagerTest
Test: atest android.permission.cts.PowerManagerServicePermissionTest
Test: atest CtsPermission2TestCases
Test: atest SettingsProviderTest
Change-Id: I3146a681d9c5da9c68a7e6b38b50314b293dc924
2021-02-18 10:53:12 -08:00
Songchun Fan
1f535786c7 Merge "Revert "Revert "[pm/incremental] start monitoring progress on storage creation""" into sc-dev 2021-02-18 18:33:50 +00:00
yawanng
1ea4f56c3d Adds caller check to getAllPackages()
This change enforces that only system, root or shell may call
getAllPackages(), a hidden API that shares all package names regardless
of user, instant app or package visibility rules.

The only exception is the uid of iorapd. iorapd needs the package info
to prefetch the right data.

Bug: 179618216
Bug: 174661955
Test: run iorapd and check it works well.
Change-Id: I77460ae19a4d41151577646441f11e2eddbb741a
Merged-In: I77460ae19a4d41151577646441f11e2eddbb741a
(cherry picked from commit 8124efd57b)
2021-02-18 18:15:21 +00:00
Primiano Tucci
355753053c Merge "Do not check for debuggable / profilable for app tracing." 2021-02-18 17:52:31 +00:00
TreeHugger Robot
918ade453d Merge "Remove unused method" into sc-dev am: c1d7c4d6ab
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13593505

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8d1b73c89f2c2ebab13a4871dd3a93a00aea8536
2021-02-18 04:36:53 +00:00
TreeHugger Robot
c1d7c4d6ab Merge "Remove unused method" into sc-dev 2021-02-18 04:25:02 +00:00
Chiachang Wang
6080999ebe [IT06]Move INetworkActivityListener into connectivity module
INetworkActivityListener is hidden and the only usage is inside
the connectivity module. Thus, move this into module scope.

Bug: 170598012
Test: atest FrameworksNetTests
Change-Id: I0a75c440c1daa773217bbd362b212fda4d07ec64
2021-02-18 12:03:21 +08:00
lucaslin
be5d09359c [IT05] Remove the unused network activity logic out from NMS
The network activity logic is moved to ConnectivityService.
CS is no longer setting the idle timer via NMS to netd. The
idle timer should only set from CS, so remove the network
activity logic out from NMS.

Bug: 170598012
Test: atest FrameworksNetTests
Change-Id: Ief9e892586aaee8e9542b9313088fa50d1d411e5
2021-02-18 12:02:02 +08:00
Jiashen Wang
61487dface Merge "Add the immutable flag to EuiccManager calls in RecoverySystem" am: 822856bcaf am: 24162e1679
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1562338

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia24b0b2e7a1155670aa7b0e0fbe4c805f2f77eae
2021-02-18 02:18:23 +00:00
Jiashen Wang
6851cf0c51 Add the immutable flag to EuiccManager calls in RecoverySystem
Bug: 170432460
Test: refactoring CL. Existing unit tests still pass
Change-Id: Ibce939eec341cb9f572d13a33762cc5bc6e2ef42
Merged-In: Ibce939eec341cb9f572d13a33762cc5bc6e2ef42
2021-02-17 22:04:23 +00:00
TreeHugger Robot
d68b017580 Merge "New API: UserManager.isUserForeground()." into sc-dev am: 0d831306f8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13521520

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5da0710c8e48e8e012878772da3b444a335c1e96
2021-02-17 20:44:35 +00:00
TreeHugger Robot
0d831306f8 Merge "New API: UserManager.isUserForeground()." into sc-dev 2021-02-17 20:27:56 +00:00
Songchun Fan
3296a301a0 Revert "Revert "[pm/incremental] start monitoring progress on storage creation""
This reverts commit 5f47bc6ba1.

Reason for revert: We still need part of this CL that starts monitoring progress on storage creation. This helps detect the kernel selinux issue where the security context of a file was assigned wrongly.

BUG: 180514262
Test: builds
Change-Id: I33fca8f9be27f3f2dfab089feaf3c241ae7d5d49
2021-02-17 18:45:20 +00:00
Dmitri Plotnikov
0b80f8437a Remove unused method
Bug: 158137862
Test: N/A
Change-Id: I819a9c25d1bc9f99c5206603a1172d4e847f54cf
2021-02-16 18:54:23 -08:00
Kweku Adams
554590beb3 Merge "Introduce BATTERY_PREDICTION permission." into sc-dev am: be9701bfeb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13480413

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7553a294763671b3edd79052680af2a9a2b0ceb1
2021-02-16 23:59:15 +00:00
TreeHugger Robot
d7359a464b Merge "Adds caller check to getAllPackages()" 2021-02-16 21:18:57 +00:00
Treehugger Robot
c4bd236e22 Merge "dumpsys: Print total DMA-BUFs exported from the DMA-BUF heaps framework" am: 2a2456d3a4 am: 2d4714ec65
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1584522

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6884503e2df2b28465443d7cea2393d39ffbffcd
2021-02-16 18:51:21 +00:00
yawanng
8124efd57b Adds caller check to getAllPackages()
This change enforces that only system, root or shell may call
getAllPackages(), a hidden API that shares all package names regardless
of user, instant app or package visibility rules.

The only exception is the uid of iorapd. iorapd needs the package info
to prefetch the right data.

Bug: 179618216
Bug: 174661955
Test: run iorapd and check it works well.
Change-Id: I77460ae19a4d41151577646441f11e2eddbb741a
2021-02-16 18:48:49 +00:00
Treehugger Robot
2a2456d3a4 Merge "dumpsys: Print total DMA-BUFs exported from the DMA-BUF heaps framework" 2021-02-16 17:58:25 +00:00
Kweku Adams
9f730a8307 Introduce BATTERY_PREDICTION permission.
DEVICE_POWER is very powerful, so introduce the BATTERY_PREDICTION
permission to allow privileged apps with the permission to provide the
system with battery predictions.

Bug: 139413884
Test: atest android.os.cts.PowerManagerTest
Test: atest android.permission.cts.PowerManagerServicePermissionTest
Test: atest CtsPermission2TestCases
Test: atest SettingsProviderTest
Change-Id: Ib52f20b5145785a5fc363601757ad9c57f40e254
2021-02-16 09:09:08 -08:00