Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ddb043eb authored by Alex Salo's avatar Alex Salo
Browse files

Mark return value of onBind() as @Nullable

Also mark the argument as @NonNull

Bug: 126701378
Test: manually
Change-Id: Ib2689b1f9932df88d8c62c3d82960874d992fb6f
parent f163c211
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -6337,7 +6337,7 @@ package android.service.attention {
  public abstract class AttentionService extends android.app.Service {
    ctor public AttentionService();
    method public final android.os.IBinder onBind(android.content.Intent);
    method @Nullable public final android.os.IBinder onBind(@NonNull android.content.Intent);
    method public abstract void onCancelAttentionCheck(int);
    method public abstract void onCheckAttention(int, @NonNull android.service.attention.AttentionService.AttentionCallback);
    field public static final int ATTENTION_FAILURE_PREEMPTED = 2; // 0x2
+3 −1
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package android.service.attention;

import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.app.Service;
import android.content.Intent;
@@ -111,8 +112,9 @@ public abstract class AttentionService extends Service {
        }
    };

    @Nullable
    @Override
    public final IBinder onBind(Intent intent) {
    public final IBinder onBind(@NonNull Intent intent) {
        if (SERVICE_INTERFACE.equals(intent.getAction())) {
            return mBinder;
        }