Skip to content

Commit

Permalink
Remove @testAPI from @Systemapi symbols
Browse files Browse the repository at this point in the history
I ran these commands:
    cd frameworks/base
    grep -rl '@testAPI' --include '*.java' | xargs perl -i -p0e \
        's/\@Systemapi[\s\n]+(\@\w+[\s\n]+)?\@TestApi/\@Systemapi\1/gs'
    grep -rl '@testAPI' --include '*.java' | xargs perl -i -p0e \
        's/\@testAPI[\s\n]+(\@\w+[\s\n]+)?\@SystemApi/\1\@SystemApi/gs'

Bug: 171179806
Test: m checkapi
Change-Id: I772790b783b0a8730b8bf680c9e569a886b8d789
Merged-In: I772790b783b0a8730b8bf680c9e569a886b8d789
  • Loading branch information
Anton Hansson committed Oct 19, 2020
1 parent 20a3234 commit dd7d52f
Show file tree
Hide file tree
Showing 204 changed files with 153 additions and 4,100 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import android.annotation.RequiresPermission;
import android.annotation.SystemApi;
import android.annotation.SystemService;
import android.annotation.TestApi;
import android.content.Context;

import java.lang.annotation.Retention;
Expand All @@ -35,7 +34,6 @@
* @hide
*/
@SystemApi
@TestApi
@SystemService(Context.POWER_WHITELIST_MANAGER)
public class PowerWhitelistManager {
private final Context mContext;
Expand Down
3,224 changes: 0 additions & 3,224 deletions api/test-current.txt

Large diffs are not rendered by default.

9 changes: 0 additions & 9 deletions api/test-removed.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
// Signature format: 2.0
package android.app.prediction {

public static final class AppTarget.Builder {
method @Deprecated @NonNull public android.app.prediction.AppTarget.Builder setTarget(@NonNull String, @NonNull android.os.UserHandle);
method @Deprecated @NonNull public android.app.prediction.AppTarget.Builder setTarget(@NonNull android.content.pm.ShortcutInfo);
}

}

15 changes: 7 additions & 8 deletions core/java/android/app/ActivityManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -3757,7 +3757,7 @@ public static boolean isLowMemoryKillReportSupported() {
* running its code, {@link RunningAppProcessInfo#IMPORTANCE_GONE} is returned.
* @hide
*/
@SystemApi @TestApi
@SystemApi
@RequiresPermission(Manifest.permission.PACKAGE_USAGE_STATS)
public @RunningAppProcessInfo.Importance int getPackageImportance(String packageName) {
try {
Expand All @@ -3777,7 +3777,7 @@ public static boolean isLowMemoryKillReportSupported() {
* running its code, {@link RunningAppProcessInfo#IMPORTANCE_GONE} is returned.
* @hide
*/
@SystemApi @TestApi
@SystemApi
@RequiresPermission(Manifest.permission.PACKAGE_USAGE_STATS)
public @RunningAppProcessInfo.Importance int getUidImportance(int uid) {
try {
Expand All @@ -3794,7 +3794,7 @@ public static boolean isLowMemoryKillReportSupported() {
* {@link #addOnUidImportanceListener}.
* @hide
*/
@SystemApi @TestApi
@SystemApi
public interface OnUidImportanceListener {
/**
* The importance if a given uid has changed. Will be one of the importance
Expand Down Expand Up @@ -3825,7 +3825,7 @@ public interface OnUidImportanceListener {
* {@link android.Manifest.permission#PACKAGE_USAGE_STATS}.
* @hide
*/
@SystemApi @TestApi
@SystemApi
@RequiresPermission(Manifest.permission.PACKAGE_USAGE_STATS)
public void addOnUidImportanceListener(OnUidImportanceListener listener,
@RunningAppProcessInfo.Importance int importanceCutpoint) {
Expand Down Expand Up @@ -3854,7 +3854,7 @@ public void addOnUidImportanceListener(OnUidImportanceListener listener,
* @throws IllegalArgumentException If the listener is not registered.
* @hide
*/
@SystemApi @TestApi
@SystemApi
@RequiresPermission(Manifest.permission.PACKAGE_USAGE_STATS)
public void removeOnUidImportanceListener(OnUidImportanceListener listener) {
synchronized (this) {
Expand Down Expand Up @@ -3996,7 +3996,7 @@ public void forceStopPackageAsUser(String packageName, int userId) {
* @see #forceStopPackageAsUser(String, int)
* @hide
*/
@SystemApi @TestApi
@SystemApi
@RequiresPermission(Manifest.permission.FORCE_STOP_PACKAGES)
public void forceStopPackage(String packageName) {
forceStopPackageAsUser(packageName, mContext.getUserId());
Expand Down Expand Up @@ -4335,7 +4335,6 @@ public boolean switchUser(int userid) {
* @hide
*/
@SystemApi
@TestApi
@RequiresPermission(android.Manifest.permission.MANAGE_USERS)
public boolean switchUser(@NonNull UserHandle user) {
if (user == null) {
Expand Down Expand Up @@ -4768,7 +4767,7 @@ public boolean isProfileForeground(@NonNull UserHandle userHandle) {
*
* @hide
*/
@SystemApi @TestApi
@SystemApi
@RequiresPermission(Manifest.permission.FORCE_STOP_PACKAGES)
public void killProcessesWhenImperceptible(@NonNull int[] pids, @NonNull String reason) {
try {
Expand Down
Loading

0 comments on commit dd7d52f

Please sign in to comment.