diff --git a/core/api/module-lib-current.txt b/core/api/module-lib-current.txt index f72c3a7c8af1..b574d0441258 100644 --- a/core/api/module-lib-current.txt +++ b/core/api/module-lib-current.txt @@ -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 { diff --git a/core/api/test-current.txt b/core/api/test-current.txt index 8a4c8db0cd7e..d64746c66323 100644 --- a/core/api/test-current.txt +++ b/core/api/test-current.txt @@ -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 { diff --git a/core/java/android/app/PendingIntent.java b/core/java/android/app/PendingIntent.java index 9b9eed46db02..2c0f98380ffe 100644 --- a/core/java/android/app/PendingIntent.java +++ b/core/java/android/app/PendingIntent.java @@ -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 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() { diff --git a/services/core/java/com/android/server/location/listeners/PendingIntentListenerRegistration.java b/services/core/java/com/android/server/location/listeners/PendingIntentListenerRegistration.java index 0aafb2929d56..240ac0144293 100644 --- a/services/core/java/com/android/server/location/listeners/PendingIntentListenerRegistration.java +++ b/services/core/java/com/android/server/location/listeners/PendingIntentListenerRegistration.java @@ -80,7 +80,7 @@ public abstract class PendingIntentListenerRegistration 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"); diff --git a/services/core/java/com/android/server/location/provider/LocationProviderManager.java b/services/core/java/com/android/server/location/provider/LocationProviderManager.java index 8955c288391f..d882705c1835 100644 --- a/services/core/java/com/android/server/location/provider/LocationProviderManager.java +++ b/services/core/java/com/android/server/location/provider/LocationProviderManager.java @@ -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) {