mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 01:16:49 +00:00
Keeping task list stable across multiple task switches
Change-Id: I3b334a8c8fb13ad54bc19e782cae016fe3c78ff6
This commit is contained in:
@@ -99,6 +99,14 @@ public class IntArray implements Cloneable {
|
||||
mSize += count;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the array to be same as {@param other}
|
||||
*/
|
||||
public void copyFrom(IntArray other) {
|
||||
clear();
|
||||
addAll(other);
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensures capacity to append at least <code>count</code> values.
|
||||
*/
|
||||
@@ -127,6 +135,25 @@ public class IntArray implements Cloneable {
|
||||
return wrap(toArray());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (obj instanceof IntArray) {
|
||||
IntArray arr = (IntArray) obj;
|
||||
if (mSize == arr.mSize) {
|
||||
for (int i = 0; i < mSize; i++) {
|
||||
if (arr.mValues[i] != mValues[i]) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value at the specified position in this array.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user