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

Commit 3facfed9 authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android Git Automerger
Browse files

am a7a8cdfa: am 7f71206d: Merge "Fix issue #10461600: KLP API Review: UndoManager" into klp-dev

* commit 'a7a8cdfa':
  Fix issue #10461600: KLP API Review: UndoManager
parents 4918e7ad a7a8cdfa
Loading
Loading
Loading
Loading
+0 −55
Original line number Diff line number Diff line
@@ -6918,59 +6918,6 @@ package android.content {
    method public abstract void onStatusChanged(int);
  }
  public class UndoManager {
    ctor public UndoManager();
    method public void addOperation(android.content.UndoOperation<?>, int);
    method public void beginUpdate(java.lang.CharSequence);
    method public int commitState(android.content.UndoOwner);
    method public int countRedos(android.content.UndoOwner[]);
    method public int countUndos(android.content.UndoOwner[]);
    method public void endUpdate();
    method public int forgetRedos(android.content.UndoOwner[], int);
    method public int forgetUndos(android.content.UndoOwner[], int);
    method public int getHistorySize();
    method public android.content.UndoOperation<?> getLastOperation(int);
    method public android.content.UndoOperation<?> getLastOperation(android.content.UndoOwner, int);
    method public T getLastOperation(java.lang.Class<T>, android.content.UndoOwner, int);
    method public android.content.UndoOwner getOwner(java.lang.String, java.lang.Object);
    method public java.lang.CharSequence getRedoLabel(android.content.UndoOwner[]);
    method public java.lang.CharSequence getUndoLabel(android.content.UndoOwner[]);
    method public int getUpdateNestingLevel();
    method public boolean hasOperation(android.content.UndoOwner);
    method public boolean isInUndo();
    method public boolean isInUpdate();
    method public int redo(android.content.UndoOwner[], int);
    method public void restoreInstanceState(android.os.Parcelable);
    method public android.os.Parcelable saveInstanceState();
    method public void setHistorySize(int);
    method public void setUndoLabel(java.lang.CharSequence);
    method public void suggestUndoLabel(java.lang.CharSequence);
    method public boolean uncommitState(int, android.content.UndoOwner);
    method public int undo(android.content.UndoOwner[], int);
    field public static final int MERGE_MODE_ANY = 2; // 0x2
    field public static final int MERGE_MODE_NONE = 0; // 0x0
    field public static final int MERGE_MODE_UNIQUE = 1; // 0x1
  }
  public abstract class UndoOperation implements android.os.Parcelable {
    ctor public UndoOperation(android.content.UndoOwner);
    ctor protected UndoOperation(android.os.Parcel, java.lang.ClassLoader);
    method public boolean allowMerge();
    method public abstract void commit();
    method public int describeContents();
    method public android.content.UndoOwner getOwner();
    method public DATA getOwnerData();
    method public boolean hasData();
    method public boolean matchOwner(android.content.UndoOwner);
    method public abstract void redo();
    method public abstract void undo();
  }
  public class UndoOwner {
    method public java.lang.Object getData();
    method public java.lang.String getTag();
  }
  public class UriMatcher {
    ctor public UriMatcher(int);
    method public void addURI(java.lang.String, java.lang.String, int);
@@ -32479,7 +32426,6 @@ package android.widget {
    method public int getTotalPaddingTop();
    method public final android.text.method.TransformationMethod getTransformationMethod();
    method public android.graphics.Typeface getTypeface();
    method public final android.content.UndoManager getUndoManager();
    method public android.text.style.URLSpan[] getUrls();
    method public boolean hasSelection();
    method public boolean isCursorVisible();
@@ -32578,7 +32524,6 @@ package android.widget {
    method public final void setTransformationMethod(android.text.method.TransformationMethod);
    method public void setTypeface(android.graphics.Typeface, int);
    method public void setTypeface(android.graphics.Typeface);
    method public final void setUndoManager(android.content.UndoManager, java.lang.String);
    method public void setWidth(int);
  }
+2 −0
Original line number Diff line number Diff line
@@ -50,6 +50,8 @@ import java.util.HashMap;
 * undo/redo them without needing to impact edits in other objects; while
 * within the larger document, all edits can be seen and the user must
 * undo/redo them as a single stream.</p>
 *
 * @hide
 */
public class UndoManager {
    private final HashMap<String, UndoOwner> mOwners = new HashMap<String, UndoOwner>();
+2 −0
Original line number Diff line number Diff line
@@ -23,6 +23,8 @@ import android.os.Parcelable;
 * A single undoable operation.  You must subclass this to implement the state
 * and behavior for your operation.  Instances of this class are placed and
 * managed in an {@link UndoManager}.
 *
 * @hide
 */
public abstract class UndoOperation<DATA> implements Parcelable {
    UndoOwner mOwner;
+2 −0
Original line number Diff line number Diff line
@@ -18,6 +18,8 @@ package android.content;

/**
 * Representation of an owner of {@link UndoOperation} objects in an {@link UndoManager}.
 *
 * @hide
 */
public class UndoOwner {
    final String mTag;
+4 −0
Original line number Diff line number Diff line
@@ -1519,6 +1519,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
     * with this TextView.  By default there is no associated UndoManager, so null
     * is returned.  One can be associated with the TextView through
     * {@link #setUndoManager(android.content.UndoManager, String)}
     *
     * @hide
     */
    public final UndoManager getUndoManager() {
        return mEditor == null ? null : mEditor.mUndoManager;
@@ -1535,6 +1537,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
     * @param tag String tag identifying this particular TextView owner in the
     * UndoManager.  This is used to keep the correct association with the
     * {@link android.content.UndoOwner} of any operations inside of the UndoManager.
     *
     * @hide
     */
    public final void setUndoManager(UndoManager undoManager, String tag) {
        if (undoManager != null) {