Commit Graph

1918 Commits

Author SHA1 Message Date
Harry Zhang
2b09b23221 Merge "Create platformtestprotos." into sc-dev am: e76529cb29 am: 83603fb34d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14824140

Change-Id: I2ddd93b9a34f451e05285d396a392b3cdea293a3
2021-06-10 19:41:17 +00:00
Harry Zhang
d61699e86c Create platformtestprotos.
This target includes a subset of protos in platformprotos, and will
replace it in TradeFed. It is created as a separate file so that it can
have its own set of owners. The owners will be updated in AOSP, but this
change has to be submitted first due to this target requiring one
additional dependency compared to AOSP.

Bug: 181921006
Test: The target builds.
Change-Id: I82386a6c8a5e6ddf42d8377148001f4ede2f297f
2021-06-03 17:18:02 +00:00
Aaron Huang
94ce54fd30 Merge "Remove IntDef annotations from NetworkPolicyManager" into sc-dev am: 2debdb3ec2 am: b0409be590 am: e3b1213cfa
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14747451

Change-Id: Ifb9a79dfd875efc51651068451562d5c93676a63
2021-06-01 09:11:56 +00:00
Aaron Huang
fb2b21a167 Remove IntDef annotations from NetworkPolicyManager
@RestrictBackgroundStatus and @MultipathPreference are defined
in connectivity mainline module. Annotate these in non-updatable
platform is not going to be manageable long term. For example,
if the module gets updated and the annotation gets more values
then it's a problem in non-updatable platform. So, it should
not have IntDef cross module boundaries. The javadoc already
document the return type.

Bug: 183972925
Test: build
Change-Id: I371e61fc1ba4d6137139bcfbf1d57fdebe00a257
2021-05-27 15:00:24 +08:00
Anton Hansson
deefeb544e Merge "Add some warnings and notes about framework's jarjar rules" into sc-dev am: c886320500 am: a19d274877 am: 22a4cd5cf3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14703099

Change-Id: I5763ad3a611fbd2dbddf581514abd81ec52ccaf5
2021-05-26 07:58:22 +00:00
Anton Hansson
c886320500 Merge "Add some warnings and notes about framework's jarjar rules" into sc-dev 2021-05-26 07:30:23 +00:00
Anton Hansson
cb904bcdcb Merge "Revert "Inline usage of jarjar_rules.txt"" into sc-dev am: 23efb3ab75 am: eff53d0075 am: 43d664ae9a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14703098

Change-Id: Ifdc957f92bd26ca3951ca2b24276936188de242c
2021-05-25 13:27:32 +00:00
Anton Hansson
23efb3ab75 Merge "Revert "Inline usage of jarjar_rules.txt"" into sc-dev 2021-05-25 13:01:51 +00:00
Anton Hansson
524bf24977 Add some warnings and notes about framework's jarjar rules
These rules are explicitly recommended  to be depended on by other
libraries in the bootclasspath, that may depend on the framework's
copy of the hidl library.

Bug: 186804505
Test: presubmit
Change-Id: I09766423782d9bb9408f3d14169d7e5d8f1b5823
2021-05-25 12:48:58 +01:00
Anton Hansson
dffc59c12d Revert "Inline usage of jarjar_rules.txt"
This reverts commit 9c74c744fc

Reason for revert: b/186804505
Bug: 186804505
Test: presubmit
Change-Id: I055f4075ac7728dfed5877286624a9600c90a38f
2021-05-25 11:44:31 +00:00
Baligh Uddin
d65474f3e4 Remove packages/Connectivity.
It has moved to packages/modules/Connectivity.
Also adjust include_dir paths in frameworks/base/Android.bp

BUG: 186628461
TEST: TH
Merged-In: I2727e13dbe051162f23ef279ca11cd5cca1fc761
Change-Id: I2a7a181e65be8952f8044df845efa80b6134d416
2021-05-24 04:39:18 +00:00
Baligh Uddin
f33ffa14ae packages/Connectivity moved to packages/modules/Connectivity
BUG: 186628461
TEST: TH
Change-Id: I2727e13dbe051162f23ef279ca11cd5cca1fc761
2021-05-24 01:11:31 +00:00
Aaron Huang
b4c70e6032 Merge "Add ConnectivityAnnotations class" into sc-dev am: d2d8fa6c17 am: 329aede902
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14186142

Change-Id: I45df58f58e096f27fa6bb2e1b359c514e68206fe
2021-05-19 22:51:15 +00:00
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
fc253d847e Merge "Link framework-appsearch against the module_current SDK." into sc-dev am: c09e57ce61
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14348119

Change-Id: Id94e6ac58bed00cd7bef5b3e983978b5e4a1cabb
2021-05-13 20:10:36 +00: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
0f644e413f Merge "Apply the same filtering for docstubs and jarstubs" am: 46dff8e09f am: 8f1928f4ca am: 9e8186aaaf am: 369bb74a97
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1700027

Change-Id: I8807e0187e91e8a00a128df8e9464624e2808898
2021-05-11 13:18:52 +00: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
19e9c30ca4 Merge "Inline two constants from CorePlatform" am: dbf1544b68 am: e3eefd6d2e am: 833e374197 am: 822d0ac2ba
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1699727

Change-Id: I2faa672e8c01056e5fe276dc871bae3211312c0c
2021-05-11 11:02:49 +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
cfd17fdd13 Merge "Call apexd's API to allocate space before install non-AB package" am: 3736d7ac1b am: 259c28e935 am: 074175209a am: 919348e6e2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1673927

Change-Id: Ief3d0057325170f960872468b6784b68cf4ee18e
2021-05-08 23:22:44 +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
62fda9f139 Merge "Add targets to build doc-stubs for non-updatable" into sc-dev am: 714f840a8d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14467998

Change-Id: Id557f811a0e97eecab12c2416d8f490d815726f7
2021-05-07 15:05:36 +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
8fb897acef Merge "Prepare AttributionSource to expose to native" into sc-dev am: 720add59c7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14381260

Change-Id: I14f40269541872bf807f669283da9a6f3d722f97
2021-05-05 23:44:49 +00: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
Baligh Uddin
4938aed9ec Merge "Remove annotations that have been relocated" 2021-04-29 14:01:59 +00:00
Svetoslav Ganov
180f5ab24e Merge "Revert "Prepare AttributionSource to expose to native"" into sc-dev am: b9b8524f38
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14315965

Change-Id: Ie3634408b2393594a914c582140f69b9c665ac20
2021-04-27 02:25:16 +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
Chris Wailes
68f38b2feb 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
Change-Id: I834b9f5320e0b6fe8cb9feb7194c82085b805e07
2021-04-26 14:06:34 -07:00
TreeHugger Robot
6197966364 Merge "Prepare AttributionSource to expose to native" into sc-dev am: a095d6b2b7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14190127

Change-Id: I36a035b2bd484d4901ebcdf08dbc4960ca5d4306
2021-04-26 17:02:34 +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
7737e5672b Merge "Revert^2 "Remove framework-connectivity from the private API"" into sc-dev am: 7f0b426d3d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14254552

Change-Id: I41fc5c2021533c8ddf2d1a338ce8cecf325750a4
2021-04-21 10:25:34 +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
70ddc2308f Merge "Revert "Remove framework-connectivity from the private API"" into sc-dev am: 36bae70378
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14254551

Change-Id: Id5eae31a47d24fdc91c81dd95b8213ed7db7dd4a
2021-04-21 01:13:06 +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
bb8c4f9b89 Merge "Remove framework-connectivity from the private API" into sc-dev am: 8aaa2bc109
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14109865

Change-Id: If1fd34da00b39dc91ef74c7da9d168c72f375820
2021-04-21 00:30:08 +00:00