@@ -164,30 +164,26 @@ public void subscribe(final DataSubscriber<T> dataSubscriber, final Executor exe
164
164
}
165
165
166
166
if (shouldNotify ) {
167
- notifyDataSubscriber (dataSubscriber , executor , hasFailed (), wasCancelled () );
167
+ notifyDataSubscriber (dataSubscriber , executor );
168
168
}
169
169
}
170
170
171
171
private void notifyDataSubscribers () {
172
- final boolean isFailure = hasFailed ();
173
- final boolean isCancellation = wasCancelled ();
174
172
for (Pair <DataSubscriber <T >, Executor > pair : mSubscribers ) {
175
- notifyDataSubscriber (pair .first , pair .second , isFailure , isCancellation );
173
+ notifyDataSubscriber (pair .first , pair .second );
176
174
}
177
175
}
178
176
179
177
protected void notifyDataSubscriber (
180
178
final DataSubscriber <T > dataSubscriber ,
181
- final Executor executor ,
182
- final boolean isFailure ,
183
- final boolean isCancellation ) {
179
+ final Executor executor ) {
184
180
Runnable runnable =
185
181
new Runnable () {
186
182
@ Override
187
183
public void run () {
188
- if (isFailure ) {
184
+ if (AbstractDataSource . this . hasFailed () ) {
189
185
dataSubscriber .onFailure (AbstractDataSource .this );
190
- } else if (isCancellation ) {
186
+ } else if (AbstractDataSource . this . wasCancelled () ) {
191
187
dataSubscriber .onCancellation (AbstractDataSource .this );
192
188
} else {
193
189
dataSubscriber .onNewResult (AbstractDataSource .this );
0 commit comments