API renaming asked by API Council
Renamed all "cancelled" to "canceled" for PendingIntent. Tag: #feature Bug: 201405682 Test: atest android.app.cts.PendingIntentTest#testCancelListener Change-Id: I0f5457f58836c6e80845dcd4d874a810008a320e
This commit is contained in:
parent
310bf06da5
commit
4c70432d82
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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() {
|
||||
|
@ -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");
|
||||
|
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user