39 lines
948 B
Java
39 lines
948 B
Java
package c.f.e;
|
|
|
|
import com.facebook.datasource.DataSource;
|
|
/* compiled from: BaseDataSubscriber */
|
|
public abstract class d<T> implements f<T> {
|
|
@Override // c.f.e.f
|
|
public void onCancellation(DataSource<T> dataSource) {
|
|
}
|
|
|
|
@Override // c.f.e.f
|
|
public void onFailure(DataSource<T> dataSource) {
|
|
try {
|
|
onFailureImpl(dataSource);
|
|
} finally {
|
|
dataSource.close();
|
|
}
|
|
}
|
|
|
|
public abstract void onFailureImpl(DataSource<T> dataSource);
|
|
|
|
@Override // c.f.e.f
|
|
public void onNewResult(DataSource<T> dataSource) {
|
|
boolean c2 = dataSource.c();
|
|
try {
|
|
onNewResultImpl(dataSource);
|
|
} finally {
|
|
if (c2) {
|
|
dataSource.close();
|
|
}
|
|
}
|
|
}
|
|
|
|
public abstract void onNewResultImpl(DataSource<T> dataSource);
|
|
|
|
@Override // c.f.e.f
|
|
public void onProgressUpdate(DataSource<T> dataSource) {
|
|
}
|
|
}
|