Merge "Allow adding framework and service java code into permission APEX."
This commit is contained in:
committed by
Android (Google) Code Review
commit
bcfc753b22
@@ -268,6 +268,7 @@ filegroup {
|
||||
":framework-tethering-srcs",
|
||||
":updatable-media-srcs",
|
||||
":framework-mediaprovider-sources",
|
||||
":framework-permission-sources",
|
||||
":framework-wifi-updatable-sources",
|
||||
":ike-srcs",
|
||||
]
|
||||
@@ -440,6 +441,7 @@ java_library {
|
||||
"framework-appsearch-stubs",
|
||||
// TODO(b/146167933): Use framework-statsd-stubs
|
||||
"framework-statsd",
|
||||
"framework-permission-stubs",
|
||||
"framework-wifi-stubs",
|
||||
"ike-stubs",
|
||||
],
|
||||
@@ -465,6 +467,7 @@ java_library {
|
||||
"//frameworks/base/apex/appsearch/framework",
|
||||
"//frameworks/base/apex/blobstore/framework",
|
||||
"//frameworks/base/apex/jobscheduler/framework",
|
||||
"//frameworks/base/apex/permission/framework",
|
||||
"//frameworks/base/apex/statsd/service",
|
||||
"//frameworks/base/wifi",
|
||||
"//frameworks/opt/net/wifi/service",
|
||||
@@ -489,6 +492,7 @@ java_library {
|
||||
"updatable_media_stubs",
|
||||
"framework_mediaprovider_stubs",
|
||||
"framework-appsearch", // TODO(b/146218515): should be framework-appsearch-stubs
|
||||
"framework-permission-stubs",
|
||||
"framework-sdkextensions-stubs-systemapi",
|
||||
// TODO(b/146167933): Use framework-statsd-stubs instead.
|
||||
"framework-statsd",
|
||||
|
||||
@@ -22,6 +22,10 @@ apex_defaults {
|
||||
name: "com.android.permission-defaults",
|
||||
key: "com.android.permission.key",
|
||||
certificate: ":com.android.permission.certificate",
|
||||
java_libs: [
|
||||
"framework-permission",
|
||||
"service-permission",
|
||||
],
|
||||
apps: ["PermissionController"],
|
||||
}
|
||||
|
||||
|
||||
60
apex/permission/framework/Android.bp
Normal file
60
apex/permission/framework/Android.bp
Normal file
@@ -0,0 +1,60 @@
|
||||
// Copyright (C) 2020 The Android Open Source Project
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
filegroup {
|
||||
name: "framework-permission-sources",
|
||||
srcs: [
|
||||
"java/**/*.java",
|
||||
"java/**/*.aidl",
|
||||
],
|
||||
path: "java",
|
||||
}
|
||||
|
||||
java_library {
|
||||
name: "framework-permission",
|
||||
srcs: [
|
||||
":framework-permission-sources",
|
||||
],
|
||||
sdk_version: "system_current",
|
||||
apex_available: [
|
||||
"com.android.permission",
|
||||
"test_com.android.permission",
|
||||
],
|
||||
hostdex: true,
|
||||
installable: true,
|
||||
visibility: [
|
||||
"//frameworks/base/apex/permission:__subpackages__",
|
||||
],
|
||||
}
|
||||
|
||||
droidstubs {
|
||||
name: "framework-permission-stubs-sources",
|
||||
srcs: [
|
||||
":framework-annotations",
|
||||
":framework-permission-sources",
|
||||
],
|
||||
sdk_version: "system_current",
|
||||
defaults: [
|
||||
"framework-module-stubs-defaults-systemapi",
|
||||
],
|
||||
}
|
||||
|
||||
java_library {
|
||||
name: "framework-permission-stubs",
|
||||
srcs: [
|
||||
":framework-permission-stubs-sources",
|
||||
],
|
||||
sdk_version: "system_current",
|
||||
installable: false,
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright (C) 2020 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package android.permission;
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
public class PermissionState {}
|
||||
29
apex/permission/service/Android.bp
Normal file
29
apex/permission/service/Android.bp
Normal file
@@ -0,0 +1,29 @@
|
||||
// Copyright (C) 2020 The Android Open Source Project
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
java_library {
|
||||
name: "service-permission",
|
||||
srcs: [
|
||||
"java/**/*.java",
|
||||
],
|
||||
sdk_version: "system_current",
|
||||
libs: [
|
||||
"framework-permission",
|
||||
],
|
||||
apex_available: [
|
||||
"com.android.permission",
|
||||
"test_com.android.permission",
|
||||
],
|
||||
installable: true,
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright (C) 2020 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.server.permission;
|
||||
|
||||
/**
|
||||
* Persistence for runtime permissions.
|
||||
*/
|
||||
public class RuntimePermissionPersistence {}
|
||||
@@ -39,6 +39,7 @@ static const char* kPathWhitelist[] = {
|
||||
"/apex/com.android.media/javalib/updatable-media.jar",
|
||||
"/apex/com.android.mediaprovider/javalib/framework-mediaprovider.jar",
|
||||
"/apex/com.android.os.statsd/javalib/framework-statsd.jar",
|
||||
"/apex/com.android.permission/javalib/framework-permission.jar",
|
||||
"/apex/com.android.sdkext/javalib/framework-sdkextensions.jar",
|
||||
"/apex/com.android.wifi/javalib/framework-wifi.jar",
|
||||
"/apex/com.android.tethering/javalib/framework-tethering.jar",
|
||||
|
||||
@@ -21,6 +21,7 @@ android_test {
|
||||
"services.core",
|
||||
"services.net",
|
||||
"service-jobscheduler",
|
||||
"service-permission",
|
||||
"androidx.test.runner",
|
||||
"mockito-target-extended-minus-junit4",
|
||||
"platform-test-annotations",
|
||||
|
||||
@@ -44,6 +44,7 @@ android_test {
|
||||
"servicestests-utils",
|
||||
"service-appsearch",
|
||||
"service-jobscheduler",
|
||||
"service-permission",
|
||||
// TODO: remove once Android migrates to JUnit 4.12,
|
||||
// which provides assertThrows
|
||||
"testng",
|
||||
|
||||
Reference in New Issue
Block a user