Commit Graph

8027 Commits

Author SHA1 Message Date
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
Rick Yiu
fe6160ab9c Merge "Revert "Refine documentation for Process.setThreadPriority"" 2020-10-02 12:23:53 +00:00
Treehugger Robot
e80c7cb69a Merge "FileBridge: fix fd ownership mismanagement." 2020-10-01 22:35:55 +00:00
Steven Moreland
414da7912c Parcel interface token methods @NonNull.
These functions have always aborted when there is a null argument
(before, because they used GetStringCritical). Noticed while working
on b/169674485.

Bug: N/A
Test: N/A
Change-Id: Ic24bd26b4c0323fa3ebee78ccf60bbba4627b565
2020-10-01 19:36:14 +00:00
Dieter Hsu
59a1d2b4aa Add BugreportManagerTestCases to bugreport presubmit
Bug: 159590499
Test: atest --test-mapping --dry-run \
                 services/core/java/com/android/server/os:presubmit
Test: atest --test-mapping --dry-run core/java/android/os:presubmit

Change-Id: Ib6ec81570d5000ae3c7cb76da0e8e0eed98c425e
Merged-In: Ib6ec81570d5000ae3c7cb76da0e8e0eed98c425e
(cherry picked from commit f7f4f62850)
2020-09-29 18:54:37 +01:00
Dieter Hsu
6765448386 Enable bug report tests in pre/postsubmit
Bug: 155604488
Test: atest --test-mapping --dry-run \
          services/core/java/com/android/server/os:presubmit
Test: atest --test-mapping --dry-run core/java/android/os:presubmit
Change-Id: I054d05d4fa8ff02f1c404d0883c382a2d5911f88
Merged-In: I054d05d4fa8ff02f1c404d0883c382a2d5911f88
(cherry picked from commit 848113e595)
2020-09-29 18:54:32 +01:00
Rick Yiu
b551e63ea7 Revert "Refine documentation for Process.setThreadPriority"
This reverts commit c3648a82f1.

Reason for revert: will cause lock contention

Bug: 139521784
Test: build pass
Change-Id: Ic10951493ec8dda4e5a5adcbd1c3cb3be3b64782
2020-09-27 03:09:54 +00:00
Steven Moreland
9ff2444ba7 Merge "ServiceManager: add getDeclaredInstances" 2020-09-25 18:25:55 +00:00
Treehugger Robot
8b6aa74d6b Merge "Fix unique identifiers best practices links in device ID API docs" 2020-09-25 04:32:42 +00:00
Michael Groover
a73539128d Fix unique identifiers best practices links in device ID API docs
Bug: 168447060
Test: m docs
Change-Id: I483e0cf4915862254461200deb5d3dc7302bafb4
Merged-In: I483e0cf4915862254461200deb5d3dc7302bafb4
2020-09-24 17:36:32 -07:00
Steven Moreland
d243d23f84 ServiceManager: add getDeclaredInstances
Corresponding to change in IServiceManager API, for finding out what
instances of a VINTF service are installed.

Bug: 168715768
Test: manual
Change-Id: Ic54b0cfd1bd42e45dc66858dbd614db7ba22083f
2020-09-24 00:46:56 +00:00
Suren Baghdasaryan
193da6e642 Report ION usage event when ION heap size is 0
In a situation when ION heap size is 0 dumpsys meminfo will not report
ION memory usage. Fix this by differentiating 0-size ION heap or pool
from the cases when /sys/kernel/ion/* do not exist or not readable.

Bug: 168942451
Test: emulate 0-size ION heap and run dumpsys meminfo
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I66624c9e3c73a59462cce8830a36323677db0029
2020-09-23 16:09:08 +00:00
Josh Gao
4c392e8057 FileBridge: fix fd ownership mismanagement.
This patch switches everything over to ParcelFileDescriptor, but the
important part of the change is changing FileBridge.getClientSocket to
return a ParcelFileDescriptor. Previously, it returned a raw
FileDescriptor that was closed by FileBridge, and the only non-test
caller of that function was taking it and constructing a
ParcelFileDescriptor from it, which would also attempt to close the fd,
leading to an fdsan abort.

Bug: http://b/162811367
Test: atest FileBridgeTest
Test: treehugger
Change-Id: I724ea7601bb072c98895f68abc08bb0e339d1db0
2020-09-21 14:47:56 -07:00
Seigo Nonaka
d3a2b5832f Accept repeated locale as an input of LocaleList construction.
Repeated locale has not been accepted and IllegalArgumentException
is thrown. Instead of throwing exception, dropping repeated locale
instead.

Bug: 152410253
Test: atest LocaleListTest
Change-Id: I80f243678ac3024eaeb0349f770cff897df7f332
(cherry picked from commit 7ee68787cc)
2020-09-16 23:28:48 +00:00
Jeff Sharkey
16dd960d6f Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: Id1a0f2a38e41badee3a34bd71af240511f273a7b
2020-09-14 10:00:05 -06:00
Jeff Sharkey
6516a83886 Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: Ifce5239991e3b78dd4757712e3b88093ad7161f0
2020-09-14 10:00:02 -06:00
Jeff Sharkey
705f6bec2d Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Test: none
Bug: 168334533
Exempt-From-Owner-Approval: docs updates
Change-Id: I53003332717baf57dc088b2f6b969cdb1863f65e
2020-09-14 09:59:01 -06:00
Treehugger Robot
e98c205ba8 Merge "android.os.Binder: remove unused getFinalizer" am: c59758ab41
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1418956

Change-Id: Ia8f7da7e819eaa5080412efe86b7c9d96bb7b971
2020-09-08 15:45:15 +00:00
Treehugger Robot
c59758ab41 Merge "android.os.Binder: remove unused getFinalizer" 2020-09-08 15:26:56 +00:00
Steven Moreland
2e4e636f87 android.os.Binder: remove unused getFinalizer
This native method is unimplemented, and it is never called.

Bug: N/A
Test: N/A
Change-Id: I6da9da9dc47051bd7d1591a8e88272739e06cf4c
2020-09-04 00:30:55 +00:00
Xin Li
c8c8e8e8be Merge RP1A.200720.011
Bug: 167588565
Merged-In: Iec7a26ecd68aca9c7a38cc8f441197a8237b0c8c
Change-Id: Ia8f5f008bc1f77115b644ab996aedc892fab68e7
2020-09-02 12:34:37 -07:00
Yo Chiang
73d5afb2cb Merge "Check error status after installing each DSU partition" am: fbd85db85d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1404669

Change-Id: I1ebc08ebf05815ea17c8bbdca5cb745fa3aca40f
2020-09-02 04:10:14 +00:00
Xin Li
628590d7ec Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I3d92a6de21a938f6b352ec26dc23420c0fe02b27
Change-Id: Ifdb80563ef042738778ebb8a7581a97c4e3d96e2
2020-08-31 21:21:38 -07:00
Yo Chiang
55668c1a49 Check error status after installing each DSU partition
Add DynamicSystemManager.closePartition() that closes a partition
installation and returns its error status.
InstallationAsyncTask may call this method to do error checking.

Bug: 165471299
Test: Observe the logcat of a failed DSU installation
Change-Id: I9d155c70c6e490899a4acfd35c8096549af005d4
2020-08-25 07:48:16 +00:00
Bowgo Tsai
34750c7c5a Add systrace tag for system property
Introduce a new systrace tag, TRACE_TAG_SYSPROP, for use with
system property.

Bug: 147275573
Test: build
Change-Id: Id78992d238a73257bb9b80bfaa6bbfeb16f477d8
Merged-In: Id78992d238a73257bb9b80bfaa6bbfeb16f477d8
(cherry picked from commit 98d0d4ba03)
2020-08-19 13:10:36 +08:00
Sudheer Shanka
bdfb45d841 Merge "Update language to comply with Android’s inclusive language guidance." 2020-08-13 19:46:49 +00:00
Treehugger Robot
e3b0b6d007 Merge "Parcelable getStability SystemApi MODULE_LIBRARIES" 2020-08-10 20:22:05 +00:00
Sudheer Shanka
d7be375cf1 Update language to comply with Android’s inclusive language guidance.
See https://source.android.com/setup/contribute/respectful-code for reference

Leaving the power save whitelists as is for now. These will be handled
in a follow-up cl.

Bug: 161896447
Test: atest ./hostsidetests/net/src/com/android/cts/net/HostsideRestrictBackgroundNetworkTests.java
Test: atest ./services/tests/servicestests/src/com/android/server/net/NetworkPolicyManagerServiceTest.java
Change-Id: I5059d8362a02a7b4622c71fdf15297af87c5a3dd
Merged-In: I5059d8362a02a7b4622c71fdf15297af87c5a3dd
2020-08-10 04:13:11 +00:00
Santos Cordon
69603f319e Merge "Allow Power-button to temporarily ignore proximity sensor." into rvc-d1-dev am: fdc35a2491
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12282513

Change-Id: I4913d33ac3e20e97ebdc524189e40f772f4dbbe3
2020-08-07 09:46:31 +00:00