Merge Signal 4.41.0

This commit is contained in:
Niels Andriesse
2019-08-07 16:48:54 +10:00
584 changed files with 9504 additions and 1558 deletions

View File

@@ -34,12 +34,12 @@ class DrawingSession extends ElementEditSession {
}
@Override
public EditSession newPoint(Matrix newInverse, PointF point, int p) {
public EditSession newPoint(@NonNull Matrix newInverse, @NonNull PointF point, int p) {
return this;
}
@Override
public EditSession removePoint(Matrix newInverse, int p) {
public EditSession removePoint(@NonNull Matrix newInverse, int p) {
return this;
}
}

View File

@@ -31,7 +31,7 @@ final class ElementDragEditSession extends ElementEditSession {
}
@Override
public EditSession newPoint(@NonNull Matrix newInverse, PointF point, int p) {
public EditSession newPoint(@NonNull Matrix newInverse, @NonNull PointF point, int p) {
return ElementScaleEditSession.startScale(this, newInverse, point, p);
}

View File

@@ -13,7 +13,9 @@ import java.util.Stack;
* <p>
* Elements are mutable, so this stack serializes the element and keeps a stack of serialized data.
* <p>
* The stack has a {@link #limit} and if it exceeds that limit during a push the earliest item is removed.
* The stack has a {@link #limit} and if it exceeds that limit during a push the second to earliest item
* is removed so that it can always go back to the first state. Effectively collapsing the history for
* the start of the stack.
*/
final class ElementStack implements Parcelable {
@@ -35,6 +37,8 @@ final class ElementStack implements Parcelable {
/**
* Pushes an element to the stack iff the element's serialized value is different to any found at
* the top of the stack.
* <p>
* Removes the second to earliest item if it is overflowing.
*
* @param element new editor element state.
* @return true iff the pushed item was different to the top item.
@@ -46,7 +50,7 @@ final class ElementStack implements Parcelable {
if (push) {
stack.push(bytes);
if (stack.size() > limit) {
stack.remove(0);
stack.remove(1);
}
}
return push;