Commit Graph

8795 Commits

Author SHA1 Message Date
Lais Andrade
27225f685c Merge "Implement dump and vibrate cmds for Vibrator Manager" into sc-dev 2021-02-02 22:58:54 +00:00
Lais Andrade
14edd62216 Merge "Implement vibrate and cancelVibrate on VibratorManagerService" into sc-dev 2021-02-02 17:15:44 +00:00
Charles Chen
8e9c693813 Merge "Unhide IncorrectContextUseViolation" into sc-dev 2021-02-02 16:04:13 +00:00
Lais Andrade
5985ce1b13 Implement dump and vibrate cmds for Vibrator Manager
Keep previous vibrations to be reported in the dump method, similar to
VibratorService.

Implement some vibrate commands to test VibratorManager in the adb
shell.

Bug: 167946816
Test: VibratorManagerTest
Change-Id: Ie7dd89b0e3b2747454b32fe3cc2d8751daae9e19
2021-02-02 16:00:12 +00:00
Lais Andrade
502e1ae7b7 Implement vibrate and cancelVibrate on VibratorManagerService
Use the same VibrationThread to control combined vibrations on all
vibrators.

Bug: 167946816
Test: VibratorManagerTest
Change-Id: I40c9f235f05baf85e5ed15bf3bce41451283c7f2
2021-02-02 14:14:13 +00:00
Charles Chen
bc42978259 Unhide IncorrectContextUseViolation
As a feedback from API review, we should unhide the violation so that
the developers can perform instanceof check when writing their own
logging stacks.

fixes: 177707145
Test: atest StrictModeTest
Change-Id: I6fbf10c915b5b6a7c72aacc5882ef5e33551c6e8
2021-02-02 09:59:33 +08:00
Sean Stout
d43e5018a0 Update docs for PowerManager
Additionally, new "go to sleep" and "wake up" reasons have been added.

Bug: 138328918
Test: make
Change-Id: If3e8488264d461a7b1635bd80afac6bfd45ec778
2021-02-01 08:19:34 +00:00
Steven Moreland
435a2ef906 Merge "WatchDog: support dumping AIDL HALs" am: 4c0600b406 am: ac37ade768 am: 40b8fc37d4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1564415

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0ce40879a3dd677cd2a873d1b8bdf0c9392cd610
2021-01-30 00:52:26 +00:00
Steven Moreland
40b8fc37d4 Merge "WatchDog: support dumping AIDL HALs" am: 4c0600b406 am: ac37ade768
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1564415

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Icf6029ca6457bd3531b66dd816346ec69a533c5f
2021-01-29 23:53:23 +00:00
Alex Buynytskyy
07694ed49b Inherited installation support for Incremental.
Bug: 162345970
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest PackageManagerServiceTest ChecksumsTest
Change-Id: I360f44bc52e05553eacc448faa26f603d9eaae59
Merged-In: I360f44bc52e05553eacc448faa26f603d9eaae59
2021-01-29 11:16:02 -08:00
Songchun Fan
5f47bc6ba1 Revert "[pm/incremental] start monitoring progress on storage creation"
This reverts commit 31fa0fc9c1.

Reason for revert: Play data loader doesn't write data to incfs during "Downloading...", so we shouldn't use incfs progress to replace install progress. Reverting this, so that Launcher will display the install progress ring during "Downloading..." using the progress reported from Phonesky.

Change-Id: I124033d725fe488fd337b6ded0bdf319a764b6ca
Merged-In: I124033d725fe488fd337b6ded0bdf319a764b6ca

BUG: 178528778
(cherry picked from commit d0cec52acb)
Change-Id: Ib6637be489e36c78e5074c161d01ac510da5d045
2021-01-29 00:12:48 +00:00
Steven Moreland
f6fee67b6e WatchDog: support dumping AIDL HALs
Similar to how HIDL HALs are here, we don't know the commandline of the
service, so we can dump them based on service name prefixes.

Power stats and lights are added here, for parity w/ HIDL since these
hvae been converted to AIDL.

Fixes: 175322136
Test: after `adb shell am hang`, we can verify the light service is
  dumped, when it wasn't before:

  vsoc_x86_64:/data/anr # cat anr_2021-01-28-22-42-44-969  | grep light
  Cmd line: /vendor/bin/hw/android.hardware.lights-service.example

Change-Id: I8c8b0cff0c102221875114015a5524c03cfb5b5c
2021-01-28 22:53:23 +00:00
TreeHugger Robot
f47f057530 Merge "Provide API to access Intent that triggered StrictMode violation" into sc-dev 2021-01-28 15:34:14 +00:00
TreeHugger Robot
e1127fccde Merge "Add javadoc for (Persistable)Bundle.EMPTY" into sc-dev 2021-01-28 15:12:17 +00:00
Adrian Roos
3dba833558 Add javadoc for (Persistable)Bundle.EMPTY
Bug: 152525509
Test: n/a
Change-Id: I5518433816f11a7c719531c60ffbcf4f4857aa87
2021-01-28 11:20:04 +00:00
Oliver Woodman
d58d038b1d Merge "API to get SOC manufacturer and model" am: a6b77e3294 am: 5fe83ca052 am: b5d864ee38
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1518117

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2877e0aa0be6621b17932056f7d2f686b7964676
2021-01-28 10:54:23 +00:00
Oliver Woodman
b5d864ee38 Merge "API to get SOC manufacturer and model" am: a6b77e3294 am: 5fe83ca052
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1518117

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I740131a0a906356582e6ab1264ec135bba2a788e
2021-01-28 10:27:01 +00:00
Oliver Woodman
a6b77e3294 Merge "API to get SOC manufacturer and model" 2021-01-28 09:07:56 +00:00
Michael Groover
a7d65cc983 Provide API to access Intent that triggered StrictMode violation
Android 12 introduces a StrictMode check to warn developers if they
are launching an unsafe Intent (one that has been unparceled from the
delivered Intent). This commit provides an API to allow a developer
to access the Intent that triggered the StrictMode violation.

Bug: 178029824
Test: atest StrictModeTest
Test: Manually verified serialized violation does not result in
      an Exception
Change-Id: I392df3f80487503bc8235700ecb17c51d930830c
2021-01-27 16:59:22 -08:00
Treehugger Robot
88b454286d Merge "Change order of owners." am: 0d72e983ce am: 81ff12d6c1 am: e364dc06c4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1556131

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If1f16db7fea5e1ac83482da6c3212e03ee4b3923
2021-01-27 07:55:01 +00:00
Treehugger Robot
e364dc06c4 Merge "Change order of owners." am: 0d72e983ce am: 81ff12d6c1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1556131

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ibae68c02d08e220852526e2ad5f89b84c9e85f78
2021-01-26 23:09:17 +00:00
Dmitri Plotnikov
3274f73e97 Merge "Remove redundant method Binder.getNativeTid()" 2021-01-26 19:16:33 +00:00
Dmitri Plotnikov
bf06ab10de Remove redundant method Binder.getNativeTid()
Bug: 177257934
Test: atest BinderCallsStatsTest
Change-Id: I797a580e7bf6bc3c7174d061c1cf86bccc5b1f3a
2021-01-26 19:08:36 +00:00
Oliver Woodman
be2de18471 API to get SOC manufacturer and model
BUG: 158284209
Test: atest android.os.cts.BuildTest
Change-Id: I9a2e1a4f667e7751252ac0f404d0d56c452718a5
2021-01-26 15:34:18 +00:00
Corina
911c2e8bed Change order of owners.
Some tools use the first owner as default assignee for automatically
file bugs.

Bug: no
Test: no
Change-Id: Iad216857e9b8de705a4a0c4f09389a0efe7aca18
2021-01-26 13:31:56 +00:00
Nicholas Ambur
4838c0051c add full battery saver runtime modification API
New system API added for privledged clients to modify the full battery
saver mode policy. This API is used to override static settings at
runtime, and any overridden settings are cleared when exiting full
battery saver mode.

Bug: 172294448
Test: atest PowerManagerTest
Test: atest PowerManagerServiceTest
Test: atest BatterySaverPolicyTest
Test: build and boot ensuring SoundTrigger service behavior is not
changed

Change-Id: I41f968799b184a5dac702553379294795614be0a
2021-01-25 09:43:51 -08:00
Narayan Kamath
d9c361bebd Merge "StorageManager: Properly convert FAT volume identifiers." 2021-01-25 16:47:38 +00:00
Yurii Zubrytskyi
a2a7ffcfeb Merge "Incfs: Add the new .blocks_written control file" 2021-01-25 16:47:22 +00:00
Narayan Kamath
a1dba65675 StorageManager: Properly convert FAT volume identifiers.
FAT volume identifiers are randomly generated 32-bit identifiers
that are not UUIDs as per the spec. However, we need to coerce
them into UUIDs because several storage APIs are defined in terms
of UUIDs.

We need a follow up change to properly return UUIDs for public
volumes in order to complete developer support.

Test: atest StorageManagerTest
Bug: 166129035

Change-Id: Icaa4f3485af698ab7163031c540aa2b27d1e1f16
2021-01-25 16:45:35 +00:00
Nicholas Ambur
c0a3c8c5f8 add SoundTrigger service modes in battery saver
Control over the SoundTrigger service behavior in battery saver mode is
expanded to from a boolean to multiple modes. Modes include enabled,
disabled, and privileged. Adding the privedged mode allows for the
SoundTrigger service to selectively control clients which are deemed
esential to the Android system.

Bug: 172294448
Test: atest BatterySaverPolicyTest
Test: atest CtsBatterySavingTestCases
Test: atest PowerManagerTest
Test: build and verify backward compatibility with SoundTrigger system
service behavior

Change-Id: Ib701963b07b205e5902ef265198b390a9850cb88
2021-01-22 18:24:39 -08:00
Kelvin Zhang
b074f7a0a3 Merge "Revert "PM#goToSleep and PM#wakeUp only affects default display group"" 2021-01-22 23:20:53 +00:00
Kelvin Zhang
1431b8c32e Revert "PM#goToSleep and PM#wakeUp only affects default display group"
This reverts commit e2f209d260.

Reason for revert: b/178215050

Change-Id: Ie2de678eda2cc633a5f18cc14b155c56b8c633ca
2021-01-22 20:05:01 +00:00
Dmitri Plotnikov
d23c73f017 Merge "Convert SensorPowerCalculator to work with BatteryUsageStats" 2021-01-22 19:10:33 +00:00
Corina Grigoras
1744f3021f Merge "Add all storage team to owners." am: d17c69bccb am: 552bdafa3a am: 2baff21819
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1558549

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5f2185e68fde92fa65708765faa1e5be4be9b73f
2021-01-22 17:53:46 +00:00
Corina Grigoras
2baff21819 Merge "Add all storage team to owners." am: d17c69bccb am: 552bdafa3a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1558549

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7f9bdaf72fc875a0949d897558f0e1dd07a853d0
2021-01-22 17:39:39 +00:00
Corina Grigoras
d17c69bccb Merge "Add all storage team to owners." 2021-01-22 16:57:22 +00:00
Felipe Leme
7dc7910d9a Merge "Added evenWhenDisallowed param to removeUserOrSetEphemeral()." 2021-01-22 16:31:03 +00:00
Corina
6915543849 Add all storage team to owners.
Bug: no
Test: no
Change-Id: Ib4fba7af30cec8efd5fb9115fec9bd354e07a2fc
2021-01-22 14:10:07 +00:00
Paul Hu
6d5681b753 Merge "Expose Build.VERSION.FIRST_SDK_INT as module-lib API" am: 64625e9706 am: 7126f9404b am: f369634aae
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1540865

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie9adc3def53e7708c715af665718669ff8e4c954
2021-01-22 13:10:21 +00:00
Paul Hu
f369634aae Merge "Expose Build.VERSION.FIRST_SDK_INT as module-lib API" am: 64625e9706 am: 7126f9404b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1540865

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia8cb0ca497e0cbaea24d9e7c376f8f3f0ded69a2
2021-01-22 12:39:19 +00:00
paulhu
69f79b0aca Expose Build.VERSION.FIRST_SDK_INT as module-lib API
Connectivity service is going to become a mainline module which
will not be able to access hidden APIs. But PermissionMonitor
needs know Build.VERSION.FIRST_SDK_INT for granting network
restricted permission to system packages. Thus, expose the value
as module-lib API to support the usage.

Bug: 170598012
Test: make update-api
Change-Id: Id0ae42120f69faee43eeb7ebd35cae9e26cb7561
2021-01-22 15:30:07 +08:00
Felipe Leme
6ad393d896 Added evenWhenDisallowed param to removeUserOrSetEphemeral().
UserManager.removeUserOrSetEphemeral() was added primarily to
be used by CarDevicePolicyManager, in which case it should ignore
the no_remove_user restriction. But as it's also used in other
places, it needs a new parameter to define this behavior.

Test: atest FrameworksServicesTests:com.android.server.pm.UserManagerTest#testRemoveUserOrSetEphemeral_evenWhenRestricted
Test: atest FrameworksServicesTests:com.android.server.pm.UserManagerTest # to make sure it didn't break anything
Test: atest android.car.apitest.CarDevicePolicyManagerTest#testRemoveUser_whenDisallowed # on automotive

Bug: 170887769

Change-Id: If797ace64c0fa0262116f649212bbcb1d61e2046
2021-01-22 04:43:22 +00:00
Dmitri Plotnikov
9a8a94c10c Convert SensorPowerCalculator to work with BatteryUsageStats
Test: atest FrameworksCoreTests:com.android.internal.os.GnssPowerCalculatorTest
Test: atest FrameworksCoreTests:com.android.internal.os.SensorPowerCalculatorTest
Bug: 175644968
Bug: 173546795

Change-Id: I97cc3f75836bdcc719428dc2bb8d8464a609bf14
2021-01-21 18:47:12 -08:00
Dmitri Plotnikov
dfce528997 Convert MobileRadioPowerCalculator to work with BatteryUsageStats
Test: atest FrameworksCoreTests:com.android.internal.os.MobileRadioPowerCalculatorTest
Bug: 175644968
Change-Id: Iea088a14adde4255767ca76d8ec4c40b404cb33c
2021-01-21 13:19:21 -08:00
Sean Stout
99170bffd3 Merge "PM#goToSleep and PM#wakeUp only affects default display group" 2021-01-21 21:04:58 +00:00
Josh Tsuji
fd577558f6 Merge "Adds the power button unlock animation and plumbs detailed wake/sleep reason to System UI." 2021-01-21 18:55:52 +00:00
Sean Stout
e2f209d260 PM#goToSleep and PM#wakeUp only affects default display group
This CL changes the behavior of PM#goToSleep to instead turn off the
power for the default display group. PM#wakeUp turns on the default
display group.

If all display groups are turned off, the device will go to sleep. If
any display group is on, the device will remain interactive.

This results in no behavior change if there is a single display group.
However if there are multiple display groups then it will be possible to
interact with ones that are on while others are off.

Bug: 138328918
Bug: 170935083
Bug: 175919649
Test: atest PowerManagerServiceTest
Change-Id: I8b475c38886eda3e43d6e8da7e68102a25da1584
2021-01-21 10:17:02 -08:00
Marco Ballesio
64459e591b ActivityManager: don't freeze processes holding file locks am: 80a05232a0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13376527

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I393a094a76fe2ffff831a1f34f0c5b39725cd137
2021-01-21 03:07:26 +00:00
Josh Tsuji
cb27bd1a83 Adds the power button unlock animation and plumbs detailed wake/sleep reason to System UI.
Test: unlock the phone using either the power button or lifting it
Bug: 169693662
Change-Id: I567555e6ee04f369ce7f4b32744639be70583112
2021-01-20 20:08:37 -05:00
Michael Groover
af1fafe936 Merge "Add StrictMode check for unsafe intent launching" 2021-01-21 01:06:20 +00:00