use autovalue for BenchmarkInputParcel
This commit is contained in:
parent
f1cf759e0a
commit
81bceb9e16
|
@ -19,36 +19,16 @@
|
|||
|
||||
package org.sufficientlysecure.keychain.service;
|
||||
|
||||
import android.os.Parcel;
|
||||
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.google.auto.value.AutoValue;
|
||||
|
||||
public class BenchmarkInputParcel implements Parcelable {
|
||||
|
||||
public BenchmarkInputParcel() {
|
||||
@AutoValue
|
||||
public abstract class BenchmarkInputParcel implements Parcelable {
|
||||
|
||||
public static BenchmarkInputParcel newInstance() {
|
||||
return new AutoValue_BenchmarkInputParcel();
|
||||
}
|
||||
|
||||
protected BenchmarkInputParcel(Parcel in) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel dest, int flags) {
|
||||
}
|
||||
|
||||
public static final Creator<BenchmarkInputParcel> CREATOR = new Creator<BenchmarkInputParcel>() {
|
||||
@Override
|
||||
public BenchmarkInputParcel createFromParcel(Parcel in) {
|
||||
return new BenchmarkInputParcel(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BenchmarkInputParcel[] newArray(int size) {
|
||||
return new BenchmarkInputParcel[size];
|
||||
}
|
||||
};
|
||||
}
|
|
@ -586,7 +586,7 @@ public class KeyListFragment extends RecyclerFragment<KeySectionedListAdapter>
|
|||
|
||||
@Override
|
||||
public BenchmarkInputParcel createOperationInput() {
|
||||
return new BenchmarkInputParcel(); // we want to perform a full consolidate
|
||||
return BenchmarkInputParcel.newInstance(); // we want to perform a full consolidate
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -49,7 +49,7 @@ public class BenchmarkOperationTest {
|
|||
BenchmarkOperation op = new BenchmarkOperation(RuntimeEnvironment.application,
|
||||
KeyWritableRepository.createDatabaseReadWriteInteractor(RuntimeEnvironment.application), null);
|
||||
|
||||
op.execute(new BenchmarkInputParcel(), null);
|
||||
op.execute(BenchmarkInputParcel.newInstance(), null);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue