Commit Graph

8783 Commits

Author SHA1 Message Date
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
Marco Ballesio
80a05232a0 ActivityManager: don't freeze processes holding file locks
As a temporary measure waiting for the more robust b/176927978 to be
implemented, query the file lock status of processes prior freezing
them, and skip freeze if any locks are held.

Test: verified form the logs that processes holding file locks are not
frozen
Bug: 176928302

Change-Id: Ib7e1715effb63c1b304ce22a9451294fd9f7b10d
Merged-In: Ib7e1715effb63c1b304ce22a9451294fd9f7b10d
2021-01-20 22:33:20 +00:00
Jeff Sharkey
6728d4f92c Add StrictMode check for unsafe intent launching
Exported components that are not guarded by a signature permission
can receive Intents from any other app on a device. If an app unparcels
and launches an Intent from the Intent delivered to this unprotected
component then a malicious actor can potentially craft an Intent that
could launch hidden components, grant URI permissions, etc. This
commit adds a StrictMode check to report if a component launches an
Intent unparceled from the delivered Intent.

Bug: 160796858
Test: atest StrictModeTest
Change-Id: I763b8a965f91f5b433ce2f4b619e10ef12f5c296
2021-01-20 13:05:09 -08:00
TreeHugger Robot
dbc2f45b54 Merge "Cache result from VibratorService.hasVibrator in SystemVibrator" 2021-01-20 14:11:15 +00:00
Lais Andrade
e69b5f4177 Cache result from VibratorService.hasVibrator in SystemVibrator
The existing implementation of performHapticFeedback in
PhoneWindowManager uses both hasVibrator and vibrate methods from
Vibrator class. The implementation of VibratorService.hasVibrator is
already constant, returning true if the device has a built in vibrator.

This adds a cache for this value to SystemVibrator, to avoid binder
calls to system_server after the first one.

Bug: 170127981
Test: manual
Change-Id: I68934a41068f4388449321d08a42d8bf890ea91e
2021-01-20 11:35:13 +00:00
TreeHugger Robot
eecc5b5020 Merge "[pm/incremental] start monitoring progress on storage creation" 2021-01-19 19:21:36 +00:00
Lais Andrade
fc0659bb76 Merge "Create single thread to play any Vibration" 2021-01-19 14:25:17 +00:00
Iavor-Valentin Iftime
1b4a41b7c7 Merge "Start HOME intent when waking up TV device" 2021-01-19 12:33:35 +00:00
Lais Andrade
d6fae9a1e8 Create single thread to play any Vibration
This thread takes in a CombinedVibrationEffect and plays all vibrations.

The Prebaked effect now also holds a fallback VibrationEffect, which is
resolved and scaled together with the original effect and is passed on
to the VibrateThread. All class attributes are not final, making this
effect immutable as all the others.

The Vibration now takes in a CombinedVibrationEffect, in preparation to
be used by the VibratorManagerService in multiple vibrators.

The new thread is replacing all vibration from VibratorService, which
means they are all triggering the HAL asynchronously.

Bug: 167946816
Bug: 131311651
Test: VibrationThreadTest, VibratorServiceTest, VibrationEffectTest, VibrationScalerTest
Change-Id: Ic27b35e63ca35ad47083f94da9ca7bd75b683d43
2021-01-19 11:48:34 +00:00
Zimuzo Ezeozue
c042f1bfcb Merge "Fix convertToModernFd to support /mnt/user paths" 2021-01-19 09:15:35 +00:00
Zim
94a7b819fe Fix convertToModernFd to support /mnt/user paths
Since I72f39d3e35b975f0a386c055cbb10b4d21c21c86, the MediaProvider
now always opens FUSE paths when transcoding is required. Those paths
start with /mnt/user/ but apps can't access those paths directly so we
make the following changes:

1. Call readlink(2) directly (without stat as
ParcelFileDescriptor#getFile currently does).
2. Replace /mnt/user/<userid> with /storage paths and use the new
/storage path for scanning

This also fixes some failing CTS

Test: Apps don't ANR when calling MediaMetadataRetriever#setDataSource
Test: atest android.appsecurity.cts.ExternalStorageHostTest#testMediaNone29
Bug: 174655855
Fixes: 177860000

Change-Id: Iec48dcb714a47b147e16eae39df783de748960f4
2021-01-19 08:48:09 +00:00
Treehugger Robot
37f4ebb9e1 Merge "Make BugreportManager a public API that respects carrier privileges." am: 0dcf4de7df am: 6d6c5ec5cd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1552883

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib26fe91f828ca6d39f19f7893f2f3c76da6e9738
2021-01-19 01:34:32 +00:00
Treehugger Robot
0dcf4de7df Merge "Make BugreportManager a public API that respects carrier privileges." 2021-01-19 00:21:25 +00:00