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

Commit 1f8d933b authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add NonNull/Nullable annotations"

parents 3f03722c 63ff4646
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -491,12 +491,12 @@ package android.app {
    ctor public InstantAppResolverService();
    method public final void attachBaseContext(android.content.Context);
    method public final android.os.IBinder onBind(android.content.Intent);
    method @Deprecated public void onGetInstantAppIntentFilter(int[], String, android.app.InstantAppResolverService.InstantAppResolutionCallback);
    method @Deprecated public void onGetInstantAppIntentFilter(android.content.Intent, int[], String, android.app.InstantAppResolverService.InstantAppResolutionCallback);
    method public void onGetInstantAppIntentFilter(android.content.Intent, int[], android.os.UserHandle, String, android.app.InstantAppResolverService.InstantAppResolutionCallback);
    method @Deprecated public void onGetInstantAppResolveInfo(int[], String, android.app.InstantAppResolverService.InstantAppResolutionCallback);
    method @Deprecated public void onGetInstantAppResolveInfo(android.content.Intent, int[], String, android.app.InstantAppResolverService.InstantAppResolutionCallback);
    method public void onGetInstantAppResolveInfo(android.content.Intent, int[], android.os.UserHandle, String, android.app.InstantAppResolverService.InstantAppResolutionCallback);
    method @Deprecated public void onGetInstantAppIntentFilter(@Nullable int[], @NonNull String, @NonNull android.app.InstantAppResolverService.InstantAppResolutionCallback);
    method @Deprecated public void onGetInstantAppIntentFilter(@NonNull android.content.Intent, @Nullable int[], @NonNull String, @NonNull android.app.InstantAppResolverService.InstantAppResolutionCallback);
    method public void onGetInstantAppIntentFilter(@NonNull android.content.Intent, @Nullable int[], @NonNull android.os.UserHandle, @NonNull String, @NonNull android.app.InstantAppResolverService.InstantAppResolutionCallback);
    method @Deprecated public void onGetInstantAppResolveInfo(@Nullable int[], @NonNull String, @NonNull android.app.InstantAppResolverService.InstantAppResolutionCallback);
    method @Deprecated public void onGetInstantAppResolveInfo(@NonNull android.content.Intent, @Nullable int[], @NonNull String, @NonNull android.app.InstantAppResolverService.InstantAppResolutionCallback);
    method public void onGetInstantAppResolveInfo(@NonNull android.content.Intent, @Nullable int[], @NonNull android.os.UserHandle, @NonNull String, @NonNull android.app.InstantAppResolverService.InstantAppResolutionCallback);
  }
  public static final class InstantAppResolverService.InstantAppResolutionCallback {
+18 −12
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package android.app;

import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.content.Context;
import android.content.Intent;
@@ -61,8 +63,8 @@ public abstract class InstantAppResolverService extends Service {
     *             String, InstantAppResolutionCallback)}.
     */
    @Deprecated
    public void onGetInstantAppResolveInfo(
            int digestPrefix[], String token, InstantAppResolutionCallback callback) {
    public void onGetInstantAppResolveInfo(@Nullable int[] digestPrefix, @NonNull String token,
            @NonNull InstantAppResolutionCallback callback) {
        throw new IllegalStateException("Must define onGetInstantAppResolveInfo");
    }

@@ -75,8 +77,8 @@ public abstract class InstantAppResolverService extends Service {
     *             String, InstantAppResolutionCallback)}.
     */
    @Deprecated
    public void onGetInstantAppIntentFilter(
            int digestPrefix[], String token, InstantAppResolutionCallback callback) {
    public void onGetInstantAppIntentFilter(@Nullable int[] digestPrefix, @NonNull String token,
            @NonNull InstantAppResolutionCallback callback) {
        throw new IllegalStateException("Must define onGetInstantAppIntentFilter");
    }

@@ -105,8 +107,9 @@ public abstract class InstantAppResolverService extends Service {
     *             String, InstantAppResolutionCallback)}.
     */
    @Deprecated
    public void onGetInstantAppResolveInfo(Intent sanitizedIntent, int[] hostDigestPrefix,
            String token, InstantAppResolutionCallback callback) {
    public void onGetInstantAppResolveInfo(@NonNull Intent sanitizedIntent,
            @Nullable int[] hostDigestPrefix, @NonNull String token,
            @NonNull InstantAppResolutionCallback callback) {
        // if not overridden, forward to old methods and filter out non-web intents
        if (sanitizedIntent.isWebIntent()) {
            onGetInstantAppResolveInfo(hostDigestPrefix, token, callback);
@@ -135,8 +138,9 @@ public abstract class InstantAppResolverService extends Service {
     *             String, InstantAppResolutionCallback)}.
     */
    @Deprecated
    public void onGetInstantAppIntentFilter(Intent sanitizedIntent, int[] hostDigestPrefix,
            String token, InstantAppResolutionCallback callback) {
    public void onGetInstantAppIntentFilter(@NonNull Intent sanitizedIntent,
            @Nullable int[] hostDigestPrefix,
            @NonNull String token, @NonNull InstantAppResolutionCallback callback) {
        Log.e(TAG, "New onGetInstantAppIntentFilter is not overridden");
        // if not overridden, forward to old methods and filter out non-web intents
        if (sanitizedIntent.isWebIntent()) {
@@ -167,8 +171,9 @@ public abstract class InstantAppResolverService extends Service {
     *
     * @see InstantAppResolveInfo
     */
    public void onGetInstantAppResolveInfo(Intent sanitizedIntent, int[] hostDigestPrefix,
            UserHandle userHandle, String token, InstantAppResolutionCallback callback) {
    public void onGetInstantAppResolveInfo(@NonNull Intent sanitizedIntent,
            @Nullable int[] hostDigestPrefix, @NonNull UserHandle userHandle,
            @NonNull String token, @NonNull InstantAppResolutionCallback callback) {
        // If not overridden, forward to the old method.
        onGetInstantAppResolveInfo(sanitizedIntent, hostDigestPrefix, token, callback);
    }
@@ -189,8 +194,9 @@ public abstract class InstantAppResolverService extends Service {
     *              to the currently visible installer via {@link Intent#EXTRA_INSTANT_APP_TOKEN}.
     * @param callback The {@link InstantAppResolutionCallback} to provide results to.
     */
    public void onGetInstantAppIntentFilter(Intent sanitizedIntent, int[] hostDigestPrefix,
            UserHandle userHandle, String token, InstantAppResolutionCallback callback) {
    public void onGetInstantAppIntentFilter(@NonNull Intent sanitizedIntent,
            @Nullable int[] hostDigestPrefix, @NonNull UserHandle userHandle,
            @NonNull String token, @NonNull InstantAppResolutionCallback callback) {
        // If not overridden, forward to the old method.
        onGetInstantAppIntentFilter(sanitizedIntent, hostDigestPrefix, token, callback);
    }