Allow getComponentName() to be used in tests
Add @TestApi annotation to AccessibilityServiceInfo.getComponentName(). Test: manual Bug: 169601090 Change-Id: I83f1fdfafd49ec7c625ed2ebad399b15df191dcb
This commit is contained in:
@@ -75,6 +75,10 @@ package android.accessibilityservice {
|
||||
field public static final int ACCESSIBILITY_TAKE_SCREENSHOT_REQUEST_INTERVAL_TIMES_MS = 1000; // 0x3e8
|
||||
}
|
||||
|
||||
public class AccessibilityServiceInfo implements android.os.Parcelable {
|
||||
method @NonNull public android.content.ComponentName getComponentName();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
package android.animation {
|
||||
|
||||
@@ -24,6 +24,7 @@ import android.annotation.IntDef;
|
||||
import android.annotation.IntRange;
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.Nullable;
|
||||
import android.annotation.TestApi;
|
||||
import android.compat.annotation.ChangeId;
|
||||
import android.compat.annotation.EnabledAfter;
|
||||
import android.compat.annotation.UnsupportedAppUsage;
|
||||
@@ -522,6 +523,7 @@ public class AccessibilityServiceInfo implements Parcelable {
|
||||
/**
|
||||
* The component name the accessibility service.
|
||||
*/
|
||||
@NonNull
|
||||
private ComponentName mComponentName;
|
||||
|
||||
/**
|
||||
@@ -772,13 +774,15 @@ public class AccessibilityServiceInfo implements Parcelable {
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
public void setComponentName(ComponentName component) {
|
||||
public void setComponentName(@NonNull ComponentName component) {
|
||||
mComponentName = component;
|
||||
}
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
@TestApi
|
||||
@NonNull
|
||||
public ComponentName getComponentName() {
|
||||
return mComponentName;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user