Commit Graph

8118 Commits

Author SHA1 Message Date
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
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
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
Steven Moreland
fbe1254709 IBinder: support FLAG_CLEAR_BUF
This is @hide and it isn't expected to be very useful in Java, since,
for instance, we would need a corresponding way to clear the data
associated with a Java String object. However, it's here for symmetry.

Bug: 171501998
Test: aidl_integration_test
Change-Id: I9d81f6138c74561b934630a95e86e7e670da5f06
2020-10-29 18:10:55 +00:00
Mathew Inwood
0f9429be41 Add trackingBug to SharedMemory.getFd()
Bug: 171971817
Change-Id: Ib8367f9b310903d63eb000e4cce238693c1544b2
2020-10-29 15:52:51 +00:00
Mathew Inwood
4c2bef7b71 Add trackingBug to Process.myPpid.
Bug: 171962076
Change-Id: Id2e731f471199a368b5a22046e0899d7b37f7337
2020-10-29 13:43:18 +00:00
Treehugger Robot
d8288fe344 Merge "Replace hidden NMS permission control API" 2020-10-29 07:03:37 +00:00
Chiachang Wang
b524e17519 Merge changes I6a51d803,I162fae5c
* changes:
  Replace hidden NMS API for setting MTU
  Replace hidden NMS default network configuration API
2020-10-29 05:03:43 +00:00
Chiachang Wang
2a40529747 Merge "Replace hidden NMS interface to network API" 2020-10-29 05:02:21 +00:00
Chiachang Wang
6513fcdc61 Replace hidden NMS permission control API
Replace the hidden setNetworkPermission NMS APIs with accessing
INetd directly for the incoming ConnectivityService mainline.

Bug: 170598012
Test: atest FrameworksNetTests CtsNetTestCasesLatestSdk
Change-Id: I37ed1003355677b98cbb741f774ba0fa4d193572
2020-10-28 14:38:18 +08:00
Chiachang Wang
8d39f189d5 Replace hidden NMS API for setting MTU
Replace the hidden NMS setMtu API with calling INetd directly
for incoming ConnectivityService mainline.

Bug: 170598012
Test: atest FrameworksNetTests
Test: manually connect and disconnect network
Change-Id: I6a51d8033b3354824d4cfb953c2bbe3055d00102
2020-10-28 14:38:18 +08:00
Chiachang Wang
1ee4a7485c Replace hidden NMS interface to network API
Replace the hidden NMS addInterfaceToNetwork and
removeInterfaceFromNetwork with calling INetd directly for
incoming ConnectivityService mainline.

Bug: 170598012
Test: atest FrameworksNetTests
Test: manually connect and disconnect network
Change-Id: I0f1f866be2f8084b992b340aeabfb5d62420686b
2020-10-28 14:38:18 +08:00
Chiachang Wang
ffa7b2f12c Replace hidden NMS default network configuration API
Replace the hidden setDefaultNetId and clearDefaultNetId NMS
APIs with accessing INetd directly for the incoming
ConnectivityService mainline.

Bug: 170598012
Test: atest FrameworksNetTests
Test: manually connect and disconnect wifi
Change-Id: I162fae5ca444207a037e5ac4bf8fa0a77a648ca1
2020-10-28 14:38:18 +08:00
Gavin Corkery
8fafabfed1 Merge changes from topic "bugreporting-aosp-sync"
* changes:
  Fix consent timed out to sharing bugreport data
  Add BugreportManagerTestCases to bugreport presubmit
  Enable bug report tests in pre/postsubmit
  Run bugreport unit test without script
2020-10-21 11:48:11 +00:00
Jeongik Cha
135efb0b73 Merge "Expose 'ParcelableHolder' as SystemApi" 2020-10-21 00:42:09 +00:00
Anton Hansson
d2d4637685 Merge "Remove @TestApi from @SystemApi symbols" 2020-10-20 13:45:13 +00:00
Jeongik Cha
d6018d5984 Expose 'ParcelableHolder' as SystemApi
ParcelableHolder is the way to extend already defined parcelables. So,
it's supposed to be used by OEM's modules.

For Parcelable to be used by the OEM's module, it should be exposed as
SystemApi

Bug: 146611855
Test: atest aidl_unittests aidl_integration_test CtsNdkBinderTest
Change-Id: I3d3e3d6b22ffd128dcfc8281d998ee3f55a398c5
2020-10-20 11:59:45 +09:00
Anton Hansson
dd7d52f963 Remove @TestApi from @SystemApi symbols
I ran these commands:
    cd frameworks/base
    grep -rl '@TestApi' --include '*.java' | xargs perl -i -p0e \
        's/\@SystemApi[\s\n]+(\@\w+[\s\n]+)?\@TestApi/\@SystemApi\1/gs'
    grep -rl '@TestApi' --include '*.java' | xargs perl -i -p0e \
        's/\@TestApi[\s\n]+(\@\w+[\s\n]+)?\@SystemApi/\1\@SystemApi/gs'

Bug: 171179806
Test: m checkapi
Change-Id: I772790b783b0a8730b8bf680c9e569a886b8d789
Merged-In: I772790b783b0a8730b8bf680c9e569a886b8d789
2020-10-19 16:41:01 +01:00
Xin Li
986e6eeddf Merge ab/6749736 in stage.
Bug: 167233921
Merged-In: Iecef31f7bf10ad97b7e0075cf302ae94e248474a
Change-Id: I9e9c873bc2e05a0cfe3af0bf74725500f3f108db
2020-10-10 20:38:57 -07:00