Pass Nullable to ActivityInterceptorInfo.Builder setters
ActivityInterceptorInfo.Builder setters should take nullable params since the getters of these fields return nullable. Bug: 267312646 Test: atest com.android.server.wm.ActivityInterceptorCallbackTest Change-Id: I933a64665227732148cd5a995cb49c75a233cb17
This commit is contained in:
@@ -299,11 +299,11 @@ package com.android.server.wm {
|
||||
public static final class ActivityInterceptorCallback.ActivityInterceptorInfo.Builder {
|
||||
ctor public ActivityInterceptorCallback.ActivityInterceptorInfo.Builder(int, int, int, int, int, @NonNull android.content.Intent, @NonNull android.content.pm.ResolveInfo, @NonNull android.content.pm.ActivityInfo);
|
||||
method @NonNull public com.android.server.wm.ActivityInterceptorCallback.ActivityInterceptorInfo build();
|
||||
method @NonNull public com.android.server.wm.ActivityInterceptorCallback.ActivityInterceptorInfo.Builder setCallingFeatureId(@NonNull String);
|
||||
method @NonNull public com.android.server.wm.ActivityInterceptorCallback.ActivityInterceptorInfo.Builder setCallingPackage(@NonNull String);
|
||||
method @NonNull public com.android.server.wm.ActivityInterceptorCallback.ActivityInterceptorInfo.Builder setCheckedOptions(@NonNull android.app.ActivityOptions);
|
||||
method @NonNull public com.android.server.wm.ActivityInterceptorCallback.ActivityInterceptorInfo.Builder setClearOptionsAnimationRunnable(@NonNull Runnable);
|
||||
method @NonNull public com.android.server.wm.ActivityInterceptorCallback.ActivityInterceptorInfo.Builder setResolvedType(@NonNull String);
|
||||
method @NonNull public com.android.server.wm.ActivityInterceptorCallback.ActivityInterceptorInfo.Builder setCallingFeatureId(@Nullable String);
|
||||
method @NonNull public com.android.server.wm.ActivityInterceptorCallback.ActivityInterceptorInfo.Builder setCallingPackage(@Nullable String);
|
||||
method @NonNull public com.android.server.wm.ActivityInterceptorCallback.ActivityInterceptorInfo.Builder setCheckedOptions(@Nullable android.app.ActivityOptions);
|
||||
method @NonNull public com.android.server.wm.ActivityInterceptorCallback.ActivityInterceptorInfo.Builder setClearOptionsAnimationRunnable(@Nullable Runnable);
|
||||
method @NonNull public com.android.server.wm.ActivityInterceptorCallback.ActivityInterceptorInfo.Builder setResolvedType(@Nullable String);
|
||||
}
|
||||
|
||||
public class ActivityInterceptorCallbackRegistry {
|
||||
|
||||
@@ -266,7 +266,7 @@ public interface ActivityInterceptorCallback {
|
||||
* @param resolvedType the resolved type.
|
||||
*/
|
||||
@NonNull
|
||||
public Builder setResolvedType(@NonNull String resolvedType) {
|
||||
public Builder setResolvedType(@Nullable String resolvedType) {
|
||||
mResolvedType = resolvedType;
|
||||
return this;
|
||||
}
|
||||
@@ -276,7 +276,7 @@ public interface ActivityInterceptorCallback {
|
||||
* @param callingPackage the calling package.
|
||||
*/
|
||||
@NonNull
|
||||
public Builder setCallingPackage(@NonNull String callingPackage) {
|
||||
public Builder setCallingPackage(@Nullable String callingPackage) {
|
||||
mCallingPackage = callingPackage;
|
||||
return this;
|
||||
}
|
||||
@@ -286,7 +286,7 @@ public interface ActivityInterceptorCallback {
|
||||
* @param callingFeatureId the calling feature id.
|
||||
*/
|
||||
@NonNull
|
||||
public Builder setCallingFeatureId(@NonNull String callingFeatureId) {
|
||||
public Builder setCallingFeatureId(@Nullable String callingFeatureId) {
|
||||
mCallingFeatureId = callingFeatureId;
|
||||
return this;
|
||||
}
|
||||
@@ -296,7 +296,7 @@ public interface ActivityInterceptorCallback {
|
||||
* @param checkedOptions the {@link ActivityOptions}.
|
||||
*/
|
||||
@NonNull
|
||||
public Builder setCheckedOptions(@NonNull ActivityOptions checkedOptions) {
|
||||
public Builder setCheckedOptions(@Nullable ActivityOptions checkedOptions) {
|
||||
mCheckedOptions = checkedOptions;
|
||||
return this;
|
||||
}
|
||||
@@ -306,7 +306,7 @@ public interface ActivityInterceptorCallback {
|
||||
* @param clearOptionsAnimationRunnable the calling package.
|
||||
*/
|
||||
@NonNull
|
||||
public Builder setClearOptionsAnimationRunnable(@NonNull
|
||||
public Builder setClearOptionsAnimationRunnable(@Nullable
|
||||
Runnable clearOptionsAnimationRunnable) {
|
||||
mClearOptionsAnimation = clearOptionsAnimationRunnable;
|
||||
return this;
|
||||
|
||||
Reference in New Issue
Block a user