Commit Graph

8134 Commits

Author SHA1 Message Date
Todd Kennedy
a2991e1001 Add OWNERS for incremental
Change-Id: Id0acdfff82c625fe05c6966956d1478ce8355a71
2020-12-17 17:20:10 +00:00
Treehugger Robot
f35963cb77 Merge "Make a copy of libcore.util.ArraysUtils in framework" 2020-12-17 10:10:52 +00:00
Victor Chang
37c6b6deeb Make a copy of libcore.util.ArraysUtils in framework
It helps remove it from the @CorePlatformApi

Bug: 154796679
Test: ArrayUtilsTest
Merged-In: I0c8f194a74a16b2cc46f9eea4571d5fb674fbc28
Change-Id: I0c8f194a74a16b2cc46f9eea4571d5fb674fbc28
2020-12-17 00:07:23 +00:00
Tianjie
41afcdc45b Update the system API to support multi client RoR
Detailed design in http://go/multi-client-ror. We will reuse most of
the old APIs, and there are a few notable changes
1. Infer the package name from the existing context
2. Remove the unused update token
3. Add the REBOOT permission, so phonesky can hold it.
4. Add a new API for rebootAndApply, which takes a slotSwitch parameter

Bug: 170664917
Test: build

Change-Id: Icb012138bd1789ce03564aa255e5bd4e84374130
2020-12-16 23:40:28 +00:00
Tianjie Xu
fa7173b8ac Merge "Add multi client ror support" 2020-12-16 23:39:31 +00:00
Tianjie
acea5f3b54 Add multi client ror support
Detailed design in http://go/multi-client-ror. This cl adds internal
states in RecoverySystemService to keep track of multiple RoR
callers. The general principles works as:
1. Each client should call prepare before reboot
2. One client cannot clear the preparation of another client
3. If multiple clients have prepared the update, the subsequent
   reboot will be first come, first served.

Bug: 170664917
Test: atest FrameworksServicesTests:RecoverySystemServiceTest

Change-Id: Ic8c7438f8a0300870ceed8857c46425fc0d006b9
2020-12-15 21:12:12 -08:00
Peiyong Lin
3cb225dc74 [GraphicsEnvironment] Avoid null access.
Currently when debug layer apk is not installed, GraphicsEnvironment
logs the message and proceeds, which results in null pointer access
crash when later trying to access primaryAbi. Avoid null access by an
early return statement.

Bug: N/A
Test: specify not installed debug layer apk and no crash
Change-Id: I4f3b86b0a8cfff4fc608b3a59ebf0872db0465ff
Merged-In: I4f3b86b0a8cfff4fc608b3a59ebf0872db0465ff
(cherry picked from commit c5c17e66ba)
2020-12-15 10:22:53 -08:00
Tianjie
a809a05b92 Update the owner of recovery systems
Use the same owner file from the services.

Test: build
Change-Id: I976c90c2fd16efe20ca3b944c6e45c30550e3226
2020-12-14 16:24:12 -08:00
Tianjie
221cad235d Add OTA team as the owner of recovery systems
The RecoverySystem mostly handles OTA update and interactions with
the recovery mode. Add the ota team as the owner.

Test: build
Change-Id: I81bae46d919ea70f04729d34b62d4a569541d914
2020-12-14 15:23:42 -08:00
Gavin Corkery
d45d533b6e Merge "Replace broadcast with adding a method in BugreportCallback" 2020-12-14 18:55:55 +00:00
Treehugger Robot
9b432d22a4 Merge "Add another property for the ODM SKU (ro.boot.product.*)" 2020-12-14 14:58:20 +00:00
Chiachang Wang
c3806f72b7 Merge "Resolve UidRange dependency between NMS and CS module" 2020-12-14 02:55:41 +00:00
Jeff Sharkey
e2cc3f8bec Additional per-file OWNERS for shared directories.
Iteration based on areas of tree where detailed ownership was found
to be missing during routine code reviews.

Also add more detailed examples to OWNERS.md.

Bug: 174932174
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Change-Id: I46ccef33b34594181ae8dc62973d68020f827d6b
2020-12-10 08:37:23 -07:00
Chiachang Wang
c92383fd6d Resolve UidRange dependency between NMS and CS module
ConnectivityService is going to become a mainline module which
cannot access hidden APIs. Thus, replace the VPN uid range
controlling APIs from NMS to INetd directly.

Bug: 170598012
Test: atest FrameworksNetTests
Test: atest HostsideVpnTests
Test: manually test to connect to VPN and check the uid range
Change-Id: Ie6656ef36f54c2f14d5a2899e763a29b70a30f5d
2020-12-10 22:24:47 +08:00
Dmitri Plotnikov
d8a9268460 Merge "Add per-file OWNERS for BatteryStats" am: cac4499628
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1520758

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5d258d326af6662a7e8d1dcaa1bbbeffdc19da94
2020-12-09 03:06:09 +00:00
Dmitri Plotnikov
c5afcc503b Add per-file OWNERS for BatteryStats
Test: N/A

Change-Id: Ie9eef7eed7f097113074c3c5f3f7a7084a55f97b
2020-12-08 16:38:23 -08:00
Jeff Sharkey
9af6ac78b0 Merge changes from topic "dec5" am: c2793cf12b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519384

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifdc390f5ae046c515a30158f3f55b831be147547
2020-12-08 16:05:11 +00:00
Jeff Sharkey
c7c4a74a78 Improve OWNERS coverage across frameworks/base/. am: fab0ab3c9c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519383

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0211462ecbcd9ad66f66af87e31cf12e1582fc65
2020-12-08 16:01:16 +00:00
Jeff Sharkey
c2793cf12b Merge changes from topic "dec5"
* changes:
  Improve OWNERS coverage across frameworks/base/.
  Improve OWNERS coverage across frameworks/base/.
  Improve OWNERS coverage across frameworks/base/.
2020-12-08 15:39:59 +00:00
Jeff Sharkey
52b9862f87 Improve OWNERS coverage across frameworks/base/.
As general background, OWNERS files expedite code reviews by helping
code authors quickly find relevant reviewers, and they also ensure
that stakeholders are involved in code changes in their areas.

Some teams under frameworks/base/ have been using OWNERS files
successfully for many years, and we're ready to expand them to cover
more areas.  Here's the historical coverage statistics for the last
two years of changes before these new OWNERS changes land:

-- 56% of changes are fully covered by OWNERS
-- 17% of changes are partially covered by OWNERS
-- 25% of changes have no OWNERS coverage

Working closely with team leads, we've now identified clear OWNERS on
a per-package basis, and we're using "include" directives whenever
possible to to simplify future maintenance.  With this extensive
effort, we've now improved our coverage as follows:

-- 98% of changes are fully covered by OWNERS
-- 1% of changes are partially covered by OWNERS
-- 1% of changes have no OWNERS coverage

This specific change is automatically generated by a script that
identifies relevant "include" directives.

Bug: 174932174
Test: manual
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Merged-In: I3480ddf2fe7ba3dfb922b459d4da01fa17a2c813
Change-Id: I3480ddf2fe7ba3dfb922b459d4da01fa17a2c813
2020-12-08 08:36:28 -07:00
Jeff Sharkey
fab0ab3c9c Improve OWNERS coverage across frameworks/base/.
As general background, OWNERS files expedite code reviews by helping
code authors quickly find relevant reviewers, and they also ensure
that stakeholders are involved in code changes in their areas.

Some teams under frameworks/base/ have been using OWNERS files
successfully for many years, and we're ready to expand them to cover
more areas.  Here's the historical coverage statistics for the last
two years of changes before these new OWNERS changes land:

-- 56% of changes are fully covered by OWNERS
-- 17% of changes are partially covered by OWNERS
-- 25% of changes have no OWNERS coverage

Working closely with team leads, we've now identified clear OWNERS on
a per-package basis, and we're using "include" directives whenever
possible to to simplify future maintenance.  With this extensive
effort, we've now improved our coverage as follows:

-- 98% of changes are fully covered by OWNERS
-- 1% of changes are partially covered by OWNERS
-- 1% of changes have no OWNERS coverage

This specific change is automatically generated by a script from
detailed ownership information confirmed by team leads.

Bug: 174932174
Test: manual
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Merged-In: I9789c97c1de8e5d962b48c29c57d82fe83729eba
Change-Id: I9789c97c1de8e5d962b48c29c57d82fe83729eba
2020-12-08 08:36:27 -07:00
Anton Hansson
230a340757 Merge "Add VERSION_CODES constant for S" am: dfe33cb756
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1513731

Change-Id: Ib41868f0c19d300fbbf0f5cc3cbf922ef4ece5b8
2020-12-07 14:48:36 +00:00
Anton Hansson
dfe33cb756 Merge "Add VERSION_CODES constant for S" 2020-12-07 14:12:20 +00:00
Treehugger Robot
c661b70d60 Merge "Throw BadParcelableException from set/getParcelable" am: 294dd8f1da
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1503133

Change-Id: If26fbc900b82beeab1f68d6e68c7eb1903ee9db9
2020-12-07 08:13:58 +00:00
Treehugger Robot
294dd8f1da Merge "Throw BadParcelableException from set/getParcelable" 2020-12-07 07:32:29 +00:00
Robin Lee
5ecccda5fe Add another property for the ODM SKU (ro.boot.product.*)
The canonical SKU is set by the bootloader.
ODM SKU is set by vendor-init.

Change-Id: I41add97c53c0f09eb0058b78dd194a8b87cdea01
Test: atest android.os.cts.BuildTest
Bug: 155840001
Bug: 151157621
2020-12-04 17:10:53 +00:00
Xin Li
9e27e114af Merge "Merge rvc-qpr-dev-plus-aosp-without-vendor@6881855" into stage-aosp-master 2020-12-03 03:18:49 +00:00
Treehugger Robot
777d7d838a Merge "Update comment for new proto directory" 2020-12-02 13:08:47 +00:00
Xin Li
d31ee38811 Merge rvc-qpr-dev-plus-aosp-without-vendor@6881855
Bug: 172690556
Merged-In: I78222391b83a4add8e964340ec08bb8a1306e1c6
Change-Id: I28bbf40820674675ccf765c912aa8140d3f74ab2
2020-12-02 00:38:58 -08:00
Treehugger Robot
c0b44fca8b Merge "Deprecated UserManager.getUsers(excludeDying) / added getAliveUsers()" 2020-12-01 16:52:45 +00:00
Zimuzo Ezeozue
782ef476df Merge "Fixed a race contidion in StorageManagerService" 2020-12-01 10:52:23 +00:00
Felipe Leme
b0402e7bf3 Deprecated UserManager.getUsers(excludeDying) / added getAliveUsers()
The existing method is confusing (the argument used to be called
includeDying) and it puts the burden on the caller (which need to
understand what the parameter means).

Furthermore:

- The majority of calls are for getUsers(excludeDying=true).
- The calls for getUsers(excludeDying=false) are equivalent to
  calls to getUsers()

Test: m
Test: a VpnTest ConnectivityServiceTest PermissionMonitorTest

Bug: 157921703
Change-Id: Ife767a40b7b7790ba28b5377046de822ddbf275c
Merged-In: Ife767a40b7b7790ba28b5377046de822ddbf275c
(cherry picked from commit 6dc6d2b964)
2020-12-01 15:25:52 +08:00
Jeffrey Huang
ca10c36424 Update comment for new proto directory
Bug: 167962588
Test: m -j
Change-Id: I539212aa9f5fd86d58116e32abbe48190dd3ca16
2020-11-30 12:44:45 -08:00
Lais Andrade
cc8210d370 Fix documentation of delay param in VibrationEffect.Composition
Change-Id: I9aca87e8d804d39ad61b651cc7653c8ef57e13e3
Fix: 150715908
Test: N/A
2020-11-30 16:46:18 +00:00
Anton Hansson
b755b613ed Add VERSION_CODES constant for S
This is a subset of the commit ed460aa186
from internal master.

Note: The CL used for the Merged-in tag is irrelevant to this change but
achieves the desired automerging effects.

Test: No
Merged-In: If5c3b92063b8d9fb3f9b6272eb2cfef448065380
Change-Id: I205766a281eb3956c3d122f5358fe5c984803e6e
2020-11-30 16:14:29 +00:00
Olof Axelsson
ed2716dd24 Fixed a race contidion in StorageManagerService
StorageManagerService#onVolumeStateChanged passes on a mutable
object to onVolumeStateChangedLocked and onVolumeStateChangedAsync.
This causes a race since the state of the object being passed can
be updated while onVolumeStateChangedAsync is processing it.

To fix this, a clone of the object is passed instead.

Bug: 174056195
Test: atest AdoptableHostTest
Test: atest com.android.tests.fused.host.FuseDaemonHostTest
Change-Id: I4de32279ae740544bd3abe33d788ebdbef1eab00
2020-11-30 15:45:43 +00:00
Jeongik Cha
3f5ffa615a ParcelableHolder shouldn't write anything for empty case
If neither Parcel nor Parcelable exists, ParcelableHolder'd better
write nothing like NDK and C++ backend.

In the case of empty ParcelableHolder
As-is(Java):
 4 -> Size
 -1 -> Existence(empty string)

To-be(NDK, C++ now):
 0 -> Size

Test: atest CtsNdkBinderTestCases
Bug: 173682663
Change-Id: I816108fdc59170ea7408f0633295ba978f1ef9d5
2020-11-24 22:44:42 +09:00
Paul Chang
00dff9634c Replace broadcast with adding a method in BugreportCallback
BUG: 154298410
Test: BetterBug can work normally in bug report shortcut flow
Change-Id: Ibc1a5a8ac308c303399d28eb8c177096b805fdf9
Merged-In: Ibc1a5a8ac308c303399d28eb8c177096b805fdf9
(cherry picked from commit ec91d7700d)
2020-11-23 12:55:46 +00:00
Jeongik Cha
eaf5d14c1e Throw BadParcelableException from set/getParcelable
As-is: It returns false or null, so it could fail silently.
To-be: In exceptional cases, it throws Runtime exception

Test: atest aidl_integration_test
Bug: 171982001
Change-Id: Ia5902bc2d35d7e72b5f014722453b6d9e313f1ed
2020-11-23 19:42:43 +09:00
Treehugger Robot
00326a8902 Merge "Update UntaggedSocketViolation StrictMode message to reference TrafficStats.setThreadStatsTag instead of the erroneous TrafficStats.setThreadSocketTag." 2020-11-21 00:42:47 +00:00
Chiachang Wang
1b414d61b4 Merge changes from topic "move_BSCH"
* changes:
  Remove BasicShellCommandHandler from frameworks/base
  Move BasicShellCommandHandler to frameworks/lib/modules-utils
2020-11-20 07:29:56 +00:00
Chiachang Wang
a68fbfafb7 Remove BasicShellCommandHandler from frameworks/base
BasicShellCommandHandler is used by mainline modules and the
framwork. There is a new repo that was created for putting
this kind of utility class. Remove BasicShellCommandHandler
from frameworks/base to frameworks/lib/modules-utils.

Bug: 170598012
Test: m
Change-Id: I81e01ba097392e8fe6eb27c01212a8fa1e4cbfad
Merged-In: Ida30c877116090616d4bf3f87fdad835446dac84
2020-11-19 05:32:14 +00:00
Chiachang Wang
d5726c1916 Move BasicShellCommandHandler to frameworks/lib/modules-utils
BasicShellCommandHandler is used by mainline modules and the
framwork. There is a new repo that was created for putting
this kind of utility class. Move BasicShellCommandHandler for
the incoming ConnectivityService mainline and updating the
related usage.

Bug: 170598012
Test: m ; verify with adb shell cmd
Change-Id: I8a2873df6e7d8342b7a8b466bda155f74c807ee3
Merged-In: Ida30c877116090616d4bf3f87fdad835446dac84
2020-11-19 03:16:03 +00:00
Alexander Zlatin
739620f26f Update UntaggedSocketViolation StrictMode message to reference TrafficStats.setThreadStatsTag instead of the erroneous TrafficStats.setThreadSocketTag.
Bug: 143923100

Change-Id: I1a4f75d7e3fff538d418a956b8eead79bc0b3e55
2020-11-18 23:23:50 +00:00
Aurimas Liutikas
46a165215b Remove legacy style metalava suppression
@SuppressLint("Doclava125") is a legacy way of suppressing
RequiresPermission check. Updating to the new style of suppression
so metalava no longer has to support the legacy mode.

sed -i "s/@SuppressLint(\"Doclava125/@SuppressLint(\"RequiresPermission/" \
core/java/android/app/admin/DevicePolicyManager.java \
core/java/android/hardware/hdmi/HdmiControlManager.java \
core/java/android/hardware/location/ContextHubManager.java \
core/java/android/hardware/usb/UsbDeviceConnection.java \
core/java/android/net/TrafficStats.java \
core/java/android/os/RecoverySystem.java \
core/java/android/os/storage/StorageManager.java \
core/java/android/service/persistentdata/PersistentDataBlockManager.java \
location/java/android/location/LocationManager.java \
media/java/android/media/AudioManager.java \
telecomm/java/android/telecom/TelecomManager.java \
telephony/java/android/telephony/CarrierConfigManager.java \
telephony/java/android/telephony/TelephonyManager.java \
wifi/java/android/net/wifi/RttManager.java \
wifi/java/android/net/wifi/WifiScanner.java

Test: make
Exempt-From-Owner-Approval: No-op change
Merged-In: I6d5df95cfca2950ea86872d2f0afc1ba828841dc
Change-Id: I6d5df95cfca2950ea86872d2f0afc1ba828841dc
2020-11-12 18:30:12 -08:00
Steven Moreland
9910d9980e Merge "IBinder: support FLAG_CLEAR_BUF" 2020-11-11 16:17:20 +00:00
Mathew Inwood
fcdba12869 Derestrict PROP_NAME_MAX.
Turns out it is used afterall.

Change-Id: I1ba83a151b0ca6ba708b03b46106dfb29d8b592f
Fixes: 172649311
2020-11-09 16:32:33 +00:00
Mathew Inwood
f8abe13db4 Merge "Add maxTargetSdk restriction to unused APIs." 2020-11-09 14:41:20 +00:00
Bill Yi
f2d4156f5b Merge rvc-release RP1A.201105.002 to aosp-master - DO NOT MERGE
Merged-In: Ic1e07d28a41eea2ce59cc21702dae95d61adc24e
Change-Id: Ibc69b3e372167485bb70ae3277222bbe8ef7ff27
2020-11-04 13:57:54 -08:00
Mathew Inwood
5d123b6775 Add maxTargetSdk restriction to unused APIs.
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.

Bug: 170729553
Test: Treehugger
Merged-In: I626caf7c1fe46c5ab1f39c2895b42a34319f771a
Change-Id: I54e5ecd11e76ca1de3c5893e3a98b0108e735413
2020-11-04 09:45:53 +00:00