Stop building against core_platform where possible
This is not a stable API surface, so modules shouldn't be building against it. Compiling against core_platform also disables link-checking, which can hide other problems. Bug: 137191822 Test: m Change-Id: I7ce7dad8c02b094c565daf8c178bc6f89bb610ef
This commit is contained in:
@@ -605,7 +605,7 @@ filegroup {
|
||||
java_library {
|
||||
name: "framework-annotations-lib",
|
||||
srcs: [ ":framework-annotations" ],
|
||||
sdk_version: "current",
|
||||
sdk_version: "core_current",
|
||||
}
|
||||
|
||||
filegroup {
|
||||
@@ -699,7 +699,7 @@ java_library {
|
||||
"core/proto/android/privacy.proto",
|
||||
"core/proto/android/section.proto",
|
||||
],
|
||||
sdk_version: "current",
|
||||
sdk_version: "9",
|
||||
srcs: [
|
||||
"core/proto/**/*.proto",
|
||||
"libs/incident/proto/android/os/**/*.proto",
|
||||
@@ -722,6 +722,7 @@ java_library {
|
||||
"core/proto/android/privacy.proto",
|
||||
"core/proto/android/section.proto",
|
||||
],
|
||||
sdk_version: "core_current",
|
||||
// Protos have lots of MissingOverride and similar.
|
||||
errorprone: {
|
||||
javacflags: ["-XepDisableAllChecks"],
|
||||
|
||||
@@ -24,7 +24,7 @@ java_library {
|
||||
name: "framework-statsd",
|
||||
installable: true,
|
||||
// TODO(b/146209659): Use system_current instead.
|
||||
sdk_version: "core_platform",
|
||||
sdk_version: "core_current",
|
||||
srcs: [
|
||||
":framework-statsd-sources",
|
||||
],
|
||||
|
||||
@@ -409,7 +409,7 @@ cc_benchmark {
|
||||
// ==== java proto device library (for test only) ==============================
|
||||
java_library {
|
||||
name: "statsdprotolite",
|
||||
sdk_version: "core_platform",
|
||||
sdk_version: "core_current",
|
||||
proto: {
|
||||
type: "lite",
|
||||
include_dirs: ["external/protobuf/src"],
|
||||
|
||||
@@ -19,9 +19,6 @@ package android.annotation;
|
||||
import static java.lang.annotation.ElementType.PARAMETER;
|
||||
import static java.lang.annotation.RetentionPolicy.SOURCE;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.AsyncTask;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Target;
|
||||
import java.util.concurrent.Executor;
|
||||
@@ -30,9 +27,10 @@ import java.util.concurrent.Executor;
|
||||
* @paramDoc Callback and listener events are dispatched through this
|
||||
* {@link Executor}, providing an easy way to control which thread is
|
||||
* used. To dispatch events through the main thread of your
|
||||
* application, you can use {@link Context#getMainExecutor()}. To
|
||||
* dispatch events through a shared thread pool, you can use
|
||||
* {@link AsyncTask#THREAD_POOL_EXECUTOR}.
|
||||
* application, you can use
|
||||
* {@link android.content.Context#getMainExecutor() Context.getMainExecutor()}.
|
||||
* To dispatch events through a shared thread pool, you can use
|
||||
* {@link android.os.AsyncTask#THREAD_POOL_EXECUTOR AsyncTask#THREAD_POOL_EXECUTOR}.
|
||||
* @hide
|
||||
*/
|
||||
@Retention(SOURCE)
|
||||
|
||||
@@ -15,9 +15,6 @@
|
||||
*/
|
||||
package android.annotation;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
|
||||
import static java.lang.annotation.ElementType.CONSTRUCTOR;
|
||||
import static java.lang.annotation.ElementType.FIELD;
|
||||
@@ -25,6 +22,9 @@ import static java.lang.annotation.ElementType.METHOD;
|
||||
import static java.lang.annotation.ElementType.PARAMETER;
|
||||
import static java.lang.annotation.RetentionPolicy.SOURCE;
|
||||
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Denotes that the annotated element requires (or may require) one or more permissions.
|
||||
* <p/>
|
||||
@@ -55,7 +55,8 @@ import static java.lang.annotation.RetentionPolicy.SOURCE;
|
||||
* <p>
|
||||
* When specified on a parameter, the annotation indicates that the method requires
|
||||
* a permission which depends on the value of the parameter. For example, consider
|
||||
* {@link android.app.Activity#startActivity(android.content.Intent)}:
|
||||
* {@link android.app.Activity#startActivity(android.content.Intent)
|
||||
* Activity#startActivity(Intent)}:
|
||||
* <pre>{@code
|
||||
* public void startActivity(@RequiresPermission Intent intent) { ... }
|
||||
* }</pre>
|
||||
|
||||
@@ -26,7 +26,8 @@ java_library {
|
||||
|
||||
installable: true,
|
||||
|
||||
// Make sure that the implementaion only relies on SDK or system APIs.
|
||||
// TODO: build against stable API surface. Use core_platform for now to avoid
|
||||
// link-check failure with exoplayer building against "current".
|
||||
sdk_version: "core_platform",
|
||||
libs: [
|
||||
// The order matters. android_system_* library should come later.
|
||||
@@ -101,6 +102,7 @@ java_library {
|
||||
name: "framework_media_annotation",
|
||||
srcs: [":framework-media-annotation-srcs"],
|
||||
installable: false,
|
||||
sdk_version: "core_current",
|
||||
}
|
||||
|
||||
aidl_interface {
|
||||
|
||||
Reference in New Issue
Block a user