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

Commit cbb7188a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "API renaming asked by API Council" into stage-aosp-master am: d7cef086

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15934238

Change-Id: Ie556f989ac6ce680b7de6caf37d71c6632ac927b
parents 9ad5faa9 d7cef086
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ package android.app {
  }

  public static interface PendingIntent.CancelListener {
    method public void onCancelled(@NonNull android.app.PendingIntent);
    method public void onCanceled(@NonNull android.app.PendingIntent);
  }

  public class StatusBarManager {
+1 −1
Original line number Diff line number Diff line
@@ -321,7 +321,7 @@ package android.app {
  }

  public static interface PendingIntent.CancelListener {
    method public void onCancelled(@NonNull android.app.PendingIntent);
    method public void onCanceled(@NonNull android.app.PendingIntent);
  }

  public final class PictureInPictureParams implements android.os.Parcelable {
+8 −8
Original line number Diff line number Diff line
@@ -1081,12 +1081,12 @@ public final class PendingIntent implements Parcelable {
    public void registerCancelListener(@NonNull CancelListener cancelListener) {
        if (!addCancelListener(Runnable::run, cancelListener)) {
            // Call the callback right away synchronously, if the PI has been canceled already.
            cancelListener.onCancelled(this);
            cancelListener.onCanceled(this);
        }
    }

    /**
     * Register a listener to when this pendingIntent is cancelled.
     * Register a listener to when this pendingIntent is canceled.
     *
     * @return true if the listener has been set successfully. false if the {@link PendingIntent}
     * has already been canceled.
@@ -1138,7 +1138,7 @@ public final class PendingIntent implements Parcelable {
        int size = cancelListeners.size();
        for (int i = 0; i < size; i++) {
            final Pair<Executor, CancelListener> pair = cancelListeners.valueAt(i);
            pair.first.execute(() -> pair.second.onCancelled(this));
            pair.first.execute(() -> pair.second.onCanceled(this));
        }
    }

@@ -1152,7 +1152,7 @@ public final class PendingIntent implements Parcelable {
    }

    /**
     * Un-register a listener to when this pendingIntent is cancelled.
     * Un-register a listener to when this pendingIntent is canceled.
     *
     * @hide
     */
@@ -1462,7 +1462,7 @@ public final class PendingIntent implements Parcelable {
    }

    /**
     * A listener to when a pending intent is cancelled
     * A listener to when a pending intent is canceled
     *
     * @hide
     */
@@ -1470,11 +1470,11 @@ public final class PendingIntent implements Parcelable {
    @TestApi
    public interface CancelListener {
        /**
         * Called when a Pending Intent is cancelled.
         * Called when a Pending Intent is canceled.
         *
         * @param intent The intent that was cancelled.
         * @param intent The intent that was canceled.
         */
        void onCancelled(@NonNull PendingIntent intent);
        void onCanceled(@NonNull PendingIntent intent);
    }

    private PendingIntentInfo getCachedInfo() {
+1 −1
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ public abstract class PendingIntentListenerRegistration<TRequest, TListener> ext
    }

    @Override
    public void onCancelled(PendingIntent intent) {
    public void onCanceled(PendingIntent intent) {
        if (Log.isLoggable(getOwner().getTag(), Log.DEBUG)) {
            Log.d(getOwner().getTag(),
                    "pending intent registration " + getIdentity() + " canceled");
+2 −2
Original line number Diff line number Diff line
@@ -1089,9 +1089,9 @@ public class LocationProviderManager extends
        }

        @Override
        public void onCancelled(PendingIntent intent) {
        public void onCanceled(PendingIntent intent) {
            if (D) {
                Log.d(TAG, mName + " provider registration " + getIdentity() + " cancelled");
                Log.d(TAG, mName + " provider registration " + getIdentity() + " canceled");
            }

            synchronized (mLock) {