summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorAnton Hansson <hansson@google.com>2019-12-19 10:17:46 +0000
committerAnton Hansson <hansson@google.com>2020-05-05 12:18:11 +0100
commit0a3b7ad5bab540f884cfededc5ceb6a26d9de32c (patch)
treec21728f4db343cf137dbbec2f299c2d6fcf5c54c /core/java/android
parent10c8c2177795d069314a8023cd3a570222b2e9da (diff)
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 Merged-In: I7ce7dad8c02b094c565daf8c178bc6f89bb610ef (cherry picked from commit 791551a70fce9267626bb39aa03af80e269e5506)
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/annotation/CallbackExecutor.java10
-rw-r--r--core/java/android/annotation/RequiresPermission.java9
2 files changed, 9 insertions, 10 deletions
diff --git a/core/java/android/annotation/CallbackExecutor.java b/core/java/android/annotation/CallbackExecutor.java
index 5671a3d2b6d6..4258f730eb16 100644
--- a/core/java/android/annotation/CallbackExecutor.java
+++ b/core/java/android/annotation/CallbackExecutor.java
@@ -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)
diff --git a/core/java/android/annotation/RequiresPermission.java b/core/java/android/annotation/RequiresPermission.java
index e5c0654f8bbe..1d89e31b2b99 100644
--- a/core/java/android/annotation/RequiresPermission.java
+++ b/core/java/android/annotation/RequiresPermission.java
@@ -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>