Commit Graph

1884 Commits

Author SHA1 Message Date
Aaron Huang
4a9f988934 Add ConnectivityAnnotations class
This change is to address API review, add respective
@IntDef for network policy API.

Typedef cannot be exposed as SystemApi so add
ConnectivityAnnotations class and add an annotation library
so that it can be used in module and platform.

Bug: 183972925
Test: m, build doc target framework-doc-stubs_annotations.zip
      and check the APIs have an attribute IntDef annotation
Change-Id: Ie3ec40cf48818edd422a4550377774eae387d3b2
2021-05-14 10:30:49 +08:00
Alexander Dorokhine
c0bf81a526 Link framework-appsearch against the module_current SDK.
This requires removal of all hidden APIs from the framework code.

Preconditions are jarjar'd into the jar.
Other APIs are replaced with system-visible equivalents.

Bug: 181787682
Bug: 146218515
Test: Presubmit
Change-Id: I6649bed3260ac08a0f66abd7a8ec545c401761fe
2021-05-12 11:34:51 -07:00
Anton Hansson
369bb74a97 Merge "Apply the same filtering for docstubs and jarstubs" am: 46dff8e09f am: 8f1928f4ca am: 9e8186aaaf
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1700027

Change-Id: I83b173302f75d5536e47fcbb221fe806c691536a
2021-05-11 12:59:34 +00:00
Anton Hansson
46dff8e09f Merge "Apply the same filtering for docstubs and jarstubs" 2021-05-11 11:24:14 +00:00
Anton Hansson
822d0ac2ba Merge "Inline two constants from CorePlatform" am: dbf1544b68 am: e3eefd6d2e am: 833e374197
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1699727

Change-Id: Ibac0caf69f17c8f003a4a197654c176448a9b7b9
2021-05-11 10:48:12 +00:00
Anton Hansson
dbf1544b68 Merge "Inline two constants from CorePlatform" 2021-05-11 09:00:57 +00:00
Anton Hansson
76ac4cc96f Apply the same filtering for docstubs and jarstubs
A package filter was previously applied to just the jarstubs package,
but not the docstubs. This lead to various internal classes appearing in
the public documentation. Fix that to apply the same filter for both.

This removes the following classes from the docs:
    android/telephony/PackageChangeReceiver
    com/android/net/module/util/CollectionUtils
    com/android/net/module/util/ConnectivityUtils
    com/android/net/module/util/NetworkCapabilitiesUtils
    com/android/net/module/util/NetworkIdentityUtils
    com/google/android/collect/Lists
    com/google/android/collect/Maps
    com/google/android/collect/Sets
    com/google/android/gles_jni/EGLConfigImpl
    com/google/android/gles_jni/EGLContextImpl
    com/google/android/gles_jni/EGLDisplayImpl
    com/google/android/gles_jni/EGLImpl
    com/google/android/gles_jni/EGLSurfaceImpl
    com/google/android/gles_jni/GLImpl
    com/google/android/util/AbstractMessageParser
    com/google/android/util/AbstractMessageParser$Acronym
    com/google/android/util/AbstractMessageParser$FlickrPhoto
    com/google/android/util/AbstractMessageParser$Format
    com/google/android/util/AbstractMessageParser$Html
    com/google/android/util/AbstractMessageParser$Link
    com/google/android/util/AbstractMessageParser$MusicTrack
    com/google/android/util/AbstractMessageParser$Part
    com/google/android/util/AbstractMessageParser$Photo
    com/google/android/util/AbstractMessageParser$Resources
    com/google/android/util/AbstractMessageParser$Smiley
    com/google/android/util/AbstractMessageParser$Token
    com/google/android/util/AbstractMessageParser$Token$Type
    com/google/android/util/AbstractMessageParser$TrieNode
    com/google/android/util/AbstractMessageParser$Video
    com/google/android/util/AbstractMessageParser$YouTubeVideo
    com/google/android/util/Procedure
    com/google/android/util/SmileyParser
    com/google/android/util/SmileyResources

Bug: 187386774
Test: diff framework-doc-stubs/../api-versions.xml before and after
Change-Id: I85b1485b4c5bc1b30a5d537e96d961382f298fb7
2021-05-10 17:06:04 +01:00
Anton Hansson
4e86dcad12 Inline two constants from CorePlatform
Inlining these constants allow the public api metalava run to depend on
ART's public API rather than the "internal" CorePlatform API, which
prevents picking up unintentional classes (such as annotations) from the
CorePlatform API in the public stubs.

Because these constants get inlined in the API/stubs, and the constants
have been finalized for many years, they can never change. Because they
cannot change, reusing the constant is of limited value. I've added
some comments to point readers to other places the constant is used.

Bug: 154796679
Test: m checkapi
Change-Id: I0b347a2964cfe5a1206145fdc56934727b890469
2021-05-10 10:28:02 +01:00
Anton Hansson
ee95f486e5 Merge "Add targets to build doc-stubs for non-updatable" 2021-05-10 08:55:07 +00:00
Treehugger Robot
919348e6e2 Merge "Call apexd's API to allocate space before install non-AB package" am: 3736d7ac1b am: 259c28e935 am: 074175209a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1673927

Change-Id: Ib101cbb3f574780d6f34592340e9b67d493c3654
2021-05-08 23:08:19 +00:00
Treehugger Robot
3736d7ac1b Merge "Call apexd's API to allocate space before install non-AB package" 2021-05-08 21:44:57 +00:00
Anton Hansson
c7f5e7d439 Add targets to build doc-stubs for non-updatable
Like the jar stubs, the doc stubs need modularization to avoid depending
on module sources and instead being assembled by merging the doc stubs
of the constituent modules. This will allow generating e.g. the lint
database, annotation zips, and the documentation itself from prebuilts
(which in turn allows mixing e.g. non-updatable R with the latest
modules).

Move the defaults for the non-updatable jar stubs to the shared bp file
and reuse it for the non-updatable doc stubs, and add two targets for
the public and the system stubs.

Bug: 186197911
Test: m android-non-updatable-doc-stubs{,-system}
Merged-In: Ic2cef748c42c141ea42b8cd7b4afd7ee78a1399d
Change-Id: Ic2cef748c42c141ea42b8cd7b4afd7ee78a1399d
2021-05-07 13:51:28 +01:00
Anton Hansson
867f94c755 Add targets to build doc-stubs for non-updatable
Like the jar stubs, the doc stubs need modularization to avoid depending
on module sources and instead being assembled by merging the doc stubs
of the constituent modules. This will allow generating e.g. the lint
database, annotation zips, and the documentation itself from prebuilts
(which in turn allows mixing e.g. non-updatable R with the latest
modules).

Move the defaults for the non-updatable jar stubs to the shared bp file
and reuse it for the non-updatable doc stubs, and add two targets for
the public and the system stubs.

Bug: 186197911
Test: m android-non-updatable-doc-stubs{,-system}
Change-Id: Ic2cef748c42c141ea42b8cd7b4afd7ee78a1399d
2021-05-07 13:48:13 +01:00
Svetoslav Ganov
720add59c7 Merge "Prepare AttributionSource to expose to native" into sc-dev 2021-05-05 23:23:54 +00:00
Kelvin Zhang
a48c18e3df Call apexd's API to allocate space before install non-AB package
When installing a non-AB package, if the OS comtains compressed apexes,
we need to allocate space for these apexes so that they can be properly
decompressed on the next reboot.

Test: adb shell cmd recovery install-package /data/ota_package.zip
Change-Id: Ia40d0614e0e724cfb17e91720ec88a15795bd8ee
2021-05-04 15:07:56 -04:00
Svet Ganov
4bf102ae26 Prepare AttributionSource to expose to native
Separate the internal state of AttributionSource from the
class to make it a simple AIDL we can translate automatically
to native - keeping Java and native parts in sync. This
would allow writing a thin native lib for checking attribution
source permissions which would be used to teach camera and
audio about attributions.

Deinfe an AIDL interface for passing around an attribution
source and opr performing permission checker oprations allowing
native and Java permission checks on attribution chains to be
handled. The Java side permission checker functions are in a dedicated
permisison checker service on top of which sits the PermissionChecker.
We expose similar PermissionChecker native APIs sitting on top
of the same remote interface. The nice thing is that we have
native and Java permisison checkers in sync sharing remoting
code and being close in shape.

For now the PermissionChecker in Java is divorced from the
PermissionManager but in T we will consider how to unify them,
either by an extension object on the PermmissionManager or
APIs on the PermissionManager, or another approach, and then
migrate clients off the PermissionChecker APIs.

Sync app ops were not tracked across multiple binder calls which
prevents moving the permission checks in the system server as
this adds one more hop. Now sync ops are propagated backed the
call stack and only the ops for the package are dispatched to
it and the rest are propagated back to the caller, recursively.

bug: 158792096

Test: atest CtsPermission5TestCases
      atest CtsAppOps2TestCases
      atest CtsPermissionTestCases
      atest CtsPermission2TestCases
      atest CtsPermission3TestCases
      atest CtsPermission4TestCases
      atest CtsPermission5TestCases

Change-Id: Ia5cbd2eb20a2da172a5960afdddd7e467f4bcb0d
2021-05-04 07:42:45 +00:00
Baligh Uddin
3b92756733 Remove annotations that have been relocated
These annotations have been relocated to frameworks/libs/modules-utils.
This CL removes the files and updates necessary build rules.

Bug: 183133670
Test: TH
Merged-In: I024252070bd806d50d54377190fdc5cd5b4445e1
Change-Id: I834b9f5320e0b6fe8cb9feb7194c82085b805e07
2021-05-01 18:56:12 +00:00
Chris Wailes
c6360dabab Remove annotations that have been relocated
These annotations have been relocated to frameworks/libs/modules-utils.
This CL removes the files and updates necessary build rules.

Bug: 183133670
Test: m
Merged-In: I834b9f5320e0b6fe8cb9feb7194c82085b805e07
Change-Id: I834b9f5320e0b6fe8cb9feb7194c82085b805e07
2021-04-30 13:36:40 +00:00
Adam Bookatz
33e17a9933 Revert "Prepare AttributionSource to expose to native"
Revert "Prepare AttributionSource to expose to native - native"

Revert submission 14225527-bug-158792096-04/16/21-1

Reason for revert: b/186467053
Reverted Changes:
I16740cc2d:Prepare AttributionSource to expose to native - na...
I4e050e78b:Prepare AttributionSource to expose to native

Change-Id: I83e4091231241c2211edf5745735f4ee993c6680
2021-04-26 23:20:46 +00:00
Svet Ganov
7b7ea938f5 Prepare AttributionSource to expose to native
Separate the internal state of AttributionSource from the
class to make it a simple AIDL we can translate automatically
to native - keeping Java and native parts in sync. This
would allow writing a thin native lib for checking attribution
source permissions which would be used to teach camera and
audio about attributions.

Deinfe an AIDL interface for passing around an attribution
source and opr performing permission checker oprations allowing
native and Java permission checks on attribution chains to be
handled. The Java side permission checker functions are in a dedicated
permisison checker service on top of which sits the PermissionChecker.
We expose similar PermissionChecker native APIs sitting on top
of the same remote interface. The nice thing is that we have
native and Java permisison checkers in sync sharing remoting
code and being close in shape.

For now the PermissionChecker in Java is divorced from the
PermissionManager but in T we will consider how to unify them,
either by an extension object on the PermmissionManager or
APIs on the PermissionManager, or another approach, and then
migrate clients off the PermissionChecker APIs.

bug: 158792096

Test: atest CtsPermission5TestCases

Change-Id: I4e050e78b2361cbf524cc213802e0fef5b487f67
2021-04-25 19:00:30 +00:00
TreeHugger Robot
7f0b426d3d Merge "Revert^2 "Remove framework-connectivity from the private API"" into sc-dev 2021-04-21 10:21:15 +00:00
Remi NGUYEN VAN
4306458c29 Revert^2 "Remove framework-connectivity from the private API"
No target should build against hidden symbols in framework-connectivity,
as it has been moved to a mainline module that only exposes a stable
API.

Change-Id: I7e98314ce58419d3dce4845cba9c2b1852690c36
Fixes: 182859030
Test: m
2021-04-21 01:13:53 +00:00
Remi NGUYEN VAN
36bae70378 Merge "Revert "Remove framework-connectivity from the private API"" into sc-dev 2021-04-21 01:08:54 +00:00
Remi NGUYEN VAN
fab0a766da Revert "Remove framework-connectivity from the private API"
This reverts commit 17045d956f.

Reason for revert: Broken build: b/185947883

Change-Id: Ia7e6af3b47540142b5ea511e825a9dc86c0680c6
2021-04-21 01:07:54 +00:00
Chiachang Wang
8aaa2bc109 Merge "Remove framework-connectivity from the private API" into sc-dev 2021-04-21 00:25:20 +00:00
Jeff Sharkey
6eed56ddd3 More Bluetooth API annotation updates.
This change adds a "BluetoothPermissionChecker" that ensures that
all Bluetooth permission annotations are consistent.  In addition, it
verifies that all Bluetooth public APIs have been audited to be
permission protected where relevant.

We've currently standardized on saying that APIs that return device
or Bluetooth state information (without sharing details about any
particular remote Bluetooth device) do not need to be permission
protected.

This change is only annotations and has no behavior changes.

Bug: 183626724
Test: ./build/soong/soong_ui.bash --make-mode Bluetooth RUN_ERROR_PRONE=true
Change-Id: Ie80b15b058359bf1e9a6ee881b89cb3e5b584ca1
2021-04-16 13:31:22 -06:00
Anton Hansson
9c74c744fc Inline usage of jarjar_rules.txt
No need to have a filegroup for this. This also has the nice side-effect
of avoiding modules outside this directory depending on the file.

Bug: 185128417
Test: m
Change-Id: Idef6f2fd89116490c43427bba55202f46377a83d
2021-04-12 18:39:33 +01:00
Anton Hansson
e3d44e8b76 Move defaults closer to their targets
The top-level Android.bp is large and difficult to navigate. Move these
defaults closer to the targets that use them.

Bug: 185128417
Test: m
Change-Id: I7dd7a82837c9a0902aabd640e35ebb65c5f16c73
2021-04-12 18:39:24 +01:00
Anton Hansson
31fb58bd22 Move framework proto build rules to separate file
The proto build rules are quite large and makes the top-level Android.bp
file difficult to navigate. Move them to a separate file.

Bug: 185128417
Test: m
Change-Id: I5719ba0fa8e03dcfca0cc32dc30db3f87ea4e3cd
2021-04-12 18:39:20 +01:00
Anton Hansson
1461c6ef55 Inline usage of jarjar_rules.txt
No need to have a filegroup for this. This also has the nice side-effect
of avoiding modules outside this directory depending on the file.

Bug: 185128417
Test: m
Merged-In: Idef6f2fd89116490c43427bba55202f46377a83d
Change-Id: Idef6f2fd89116490c43427bba55202f46377a83d
2021-04-12 18:38:55 +01:00
Anton Hansson
92b6c725b0 Move framework proto build rules to separate file
The proto build rules are quite large and makes the top-level Android.bp
file difficult to navigate. Move them to a separate file.

Bug: 185128417
Test: m
Merged-In: I5719ba0fa8e03dcfca0cc32dc30db3f87ea4e3cd
Change-Id: I5719ba0fa8e03dcfca0cc32dc30db3f87ea4e3cd
2021-04-12 18:38:42 +01:00
Anton Hansson
9f9f90b260 Move font tool build rules to subdir
The top-level Android.bp file is very large, so move modules that can be
in subdirs.

Also rename the vague "base_defaults" module to something more suitable.

Bug: 185128417
Test: m
Change-Id: I5f3106b74edb91ac9db5b3e66cc61566d0f16e9b
2021-04-12 18:08:45 +01:00
Anton Hansson
55e59cbf48 Move build modules from top-level to core/java/
The top-level Android.bp is large and difficult to navigate. Move rules
that don't have any "top level" things in them down in the core/java
directory.

Bug: 185128417
Test: m
Change-Id: I3fd90c2d5140e5716474ff1f8c58cbc1b3319e5b
2021-04-12 18:08:37 +01:00
Anton Hansson
702aa95096 Move font tool build rules to subdir
The top-level Android.bp file is very large, so move modules that can be
in subdirs.

Also rename the vague "base_defaults" module to something more suitable.

Bug: 185128417
Test: m
Merged-In: I5f3106b74edb91ac9db5b3e66cc61566d0f16e9b
Change-Id: I5f3106b74edb91ac9db5b3e66cc61566d0f16e9b
2021-04-12 17:57:51 +01:00
Anton Hansson
84918d5674 Move build modules from top-level to core/java/
The top-level Android.bp is large and difficult to navigate. Move rules
that don't have any "top level" things in them down in the core/java
directory.

Bug: 185128417
Test: m
Merged-In: I3fd90c2d5140e5716474ff1f8c58cbc1b3319e5b
Change-Id: I3fd90c2d5140e5716474ff1f8c58cbc1b3319e5b
2021-04-12 17:57:38 +01:00
Remi NGUYEN VAN
17045d956f Remove framework-connectivity from the private API
No target should build against hidden symbols in framework-connectivity,
as it has been moved to a mainline module that only exposes a stable
API.

Fixes: 182859030
Test: m
Change-Id: I376531cb34696aac9fa2d278f0698565937bea65
2021-04-07 13:34:42 +09:00
Paul Duffin
8c7e28c9b4 Merge "Remove framework-atb-backward-compatibility" am: 9f82ba21f1 am: 4f48fa4d6f am: 87827b5eb3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1663339

Change-Id: I61bcf109ebcc8a746fde814fbd9dc5fe69e9dfca
2021-04-06 15:27:40 +00:00
Anton Hansson
7071e29172 Merge "Remove hwbinder" am: 1bf83b28d9 am: 2f3ad490b1 am: bf856b1aa1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1658059

Change-Id: Iae9a0ce89f495f9aa15d21c68790cd5d310bebea
2021-04-06 15:26:02 +00:00
Paul Duffin
9f82ba21f1 Merge "Remove framework-atb-backward-compatibility" 2021-04-06 14:09:30 +00:00
Anton Hansson
1bf83b28d9 Merge "Remove hwbinder" 2021-04-06 13:08:56 +00:00
Paul Duffin
20c056dacb Remove framework-atb-backward-compatibility
The class in this library no longer needs to be conditionally included
on the bootclasspath based on the REMOVE_ATB_FROM_BCP flag so is being
built as part of framework-minus-apex.

Bug: 184331423
Test: m nothing
Change-Id: If7c2ec51be0670ffda22e18ce1e028783a1513e7
2021-04-06 11:41:49 +01:00
Janis Danisevskis
9ba0f37f8a Merge "Keystore 2.0: Remove Keystore 1.0 SPI with all remaining references" am: a8b1b1a2e6 am: 08945c21ef am: 66ead4fb0b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1624872

Change-Id: I08fcf329e59c309d9292edc846653b02e7a60f21
2021-04-03 02:02:03 +00:00
Janis Danisevskis
a6dcf091f5 Keystore 2.0: Remove Keystore 1.0 SPI with all remaining references
Bug: 171305684
Test: CtsKeystoreTestCases
Change-Id: I337515dadc9e45b909bff058d4e13371b4fa843c
2021-04-01 17:06:41 -07:00
Steven Moreland
bd32be9d25 Merge "Partial: ActivityManager: use proc state from compiled aidl" 2021-04-01 18:33:54 +00:00
Steven Moreland
42c6e93fde Partial: ActivityManager: use proc state from compiled aidl
In order to fix divergence in libbinder Android.bp file, adding an
empty file group corresponding to an internal file group.

This is needed to easily manipulate where source files are included
in libbinder without having to land patches internally and externally.

Bug: 183654927
Test: N/A

Merged-In: I3dafe7a75b2dae561583a7821284027a1896b9a5
Change-Id: I8821242efdc0a27daddf30368f948855062f2d14
2021-04-01 18:30:28 +00:00
Aaron Huang
e427565991 Merge "Move some constants from TrafficStatsConstants to NetworkStackConstants" 2021-04-01 15:59:39 +00:00
Aaron Huang
42951ddb37 Move some constants from TrafficStatsConstants to NetworkStackConstants
Keep the constants are only used by framework in TrafficStatsConstants
and move the others to NetworkStackConstants which is in libs/net.

Bug: 182349970
Test: FrameworksNetTests
      NetworkStackTests
      TetheringTests
Change-Id: Ib667c115e5f1e01237d88b77bba753363da309cc
Merged-In: Ib667c115e5f1e01237d88b77bba753363da309cc
2021-04-01 05:10:03 +00:00
Anton Hansson
5013902a24 Merge changes I97086e30,Ic55df4cf,I81a08c29 am: 4199ef90b9 am: 4bc578052d am: ec1f981309
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1655736

Change-Id: I5d242cf5b18c4b556105cfcfe78df2ac18a8544e
2021-03-31 18:01:32 +00:00
Anton Hansson
4199ef90b9 Merge changes I97086e30,Ic55df4cf,I81a08c29
* changes:
  Move framework java filegroups into subdirectories
  Partial cp of "Move Tuner resource updating from Tuner java into Tuner client"
  Partial cp of "Initial boilerplate for an updatable graphics jar"
2021-03-31 16:13:13 +00:00
Anton Hansson
9a7ad7fa85 Merge "Delete framework-updatable-sources filegroup" 2021-03-31 14:33:20 +00:00