|
69 | 69 | */ |
70 | 70 | @RestrictTo(RestrictTo.Scope.LIBRARY) |
71 | 71 | public class LifecycleManager extends BaseLifecycleManager { |
72 | | - private static final int RESPONSE_WAIT_TIME = 2000; |
73 | 72 | private ISdlServiceListener videoServiceListener; |
74 | | - private boolean videoServiceStartResponseReceived = false; //FIXME these statuses should be improved |
| 73 | + private boolean videoServiceStartResponseReceived = false; |
75 | 74 | private boolean videoServiceStartResponse = false; |
76 | | - private boolean videoServiceEndResponseReceived = false; |
77 | | - private boolean videoServiceEndResponse = false; |
78 | | - private boolean audioServiceEndResponseReceived = false; |
79 | | - private boolean audioServiceEndResponse = false; |
80 | 75 | private WeakReference<Context> contextWeakReference; |
81 | 76 |
|
82 | 77 | public LifecycleManager(AppConfig appConfig, BaseTransportConfig config, LifecycleListener listener) { |
@@ -181,30 +176,6 @@ void onStartServiceNACKed(SessionType sessionType) { |
181 | 176 | } |
182 | 177 | } |
183 | 178 |
|
184 | | - @Override |
185 | | - void onServiceEnded(SessionType sessionType) { |
186 | | - super.onServiceEnded(sessionType); |
187 | | - if (sessionType.eq(SessionType.NAV)) { |
188 | | - videoServiceEndResponseReceived = true; |
189 | | - videoServiceEndResponse = true; |
190 | | - } else if (sessionType.eq(SessionType.PCM)) { |
191 | | - audioServiceEndResponseReceived = true; |
192 | | - audioServiceEndResponse = true; |
193 | | - } |
194 | | - } |
195 | | - |
196 | | - @Override |
197 | | - void onStopServiceNACKed(SessionType sessionType) { |
198 | | - super.onStopServiceNACKed(sessionType); |
199 | | - if (sessionType.eq(SessionType.NAV)) { |
200 | | - videoServiceEndResponseReceived = true; |
201 | | - videoServiceEndResponse = false; |
202 | | - } else if (sessionType.eq(SessionType.PCM)) { |
203 | | - audioServiceEndResponseReceived = true; |
204 | | - audioServiceEndResponse = false; |
205 | | - } |
206 | | - } |
207 | | - |
208 | 179 | /** |
209 | 180 | * This method will try to start the video service with the requested parameters. |
210 | 181 | * When it returns it will attempt to store the accepted parameters if available. |
@@ -311,10 +282,7 @@ void endVideoStream() { |
311 | 282 | return; |
312 | 283 | } |
313 | 284 |
|
314 | | - videoServiceEndResponseReceived = false; |
315 | | - videoServiceEndResponse = false; |
316 | 285 | session.stopVideoStream(); |
317 | | - |
318 | 286 | } |
319 | 287 |
|
320 | 288 | @Override |
@@ -346,8 +314,6 @@ void endAudioStream() { |
346 | 314 | return; |
347 | 315 | } |
348 | 316 |
|
349 | | - audioServiceEndResponseReceived = false; |
350 | | - audioServiceEndResponse = false; |
351 | 317 | session.stopAudioStream(); |
352 | 318 | } |
353 | 319 | } |
0 commit comments