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

This commit is contained in:
TreeHugger Robot
2021-09-29 16:49:50 +00:00
committed by Android (Google) Code Review
5 changed files with 13 additions and 13 deletions

View File

@@ -42,7 +42,7 @@ package android.app {
} }
public static interface PendingIntent.CancelListener { public static interface PendingIntent.CancelListener {
method public void onCancelled(@NonNull android.app.PendingIntent); method public void onCanceled(@NonNull android.app.PendingIntent);
} }
public class StatusBarManager { public class StatusBarManager {

View File

@@ -321,7 +321,7 @@ package android.app {
} }
public static interface PendingIntent.CancelListener { 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 { public final class PictureInPictureParams implements android.os.Parcelable {

View File

@@ -1081,12 +1081,12 @@ public final class PendingIntent implements Parcelable {
public void registerCancelListener(@NonNull CancelListener cancelListener) { public void registerCancelListener(@NonNull CancelListener cancelListener) {
if (!addCancelListener(Runnable::run, cancelListener)) { if (!addCancelListener(Runnable::run, cancelListener)) {
// Call the callback right away synchronously, if the PI has been canceled already. // 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} * @return true if the listener has been set successfully. false if the {@link PendingIntent}
* has already been canceled. * has already been canceled.
@@ -1138,7 +1138,7 @@ public final class PendingIntent implements Parcelable {
int size = cancelListeners.size(); int size = cancelListeners.size();
for (int i = 0; i < size; i++) { for (int i = 0; i < size; i++) {
final Pair<Executor, CancelListener> pair = cancelListeners.valueAt(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 * @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 * @hide
*/ */
@@ -1470,11 +1470,11 @@ public final class PendingIntent implements Parcelable {
@TestApi @TestApi
public interface CancelListener { 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() { private PendingIntentInfo getCachedInfo() {

View File

@@ -80,7 +80,7 @@ public abstract class PendingIntentListenerRegistration<TRequest, TListener> ext
} }
@Override @Override
public void onCancelled(PendingIntent intent) { public void onCanceled(PendingIntent intent) {
if (Log.isLoggable(getOwner().getTag(), Log.DEBUG)) { if (Log.isLoggable(getOwner().getTag(), Log.DEBUG)) {
Log.d(getOwner().getTag(), Log.d(getOwner().getTag(),
"pending intent registration " + getIdentity() + " canceled"); "pending intent registration " + getIdentity() + " canceled");

View File

@@ -1089,9 +1089,9 @@ public class LocationProviderManager extends
} }
@Override @Override
public void onCancelled(PendingIntent intent) { public void onCanceled(PendingIntent intent) {
if (D) { if (D) {
Log.d(TAG, mName + " provider registration " + getIdentity() + " cancelled"); Log.d(TAG, mName + " provider registration " + getIdentity() + " canceled");
} }
synchronized (mLock) { synchronized (mLock) {