@@ -97,8 +97,7 @@ public class VideoStreamManager extends BaseVideoStreamManager {
9797 private IVideoStreamListener streamListener ;
9898 private boolean isTransportAvailable = false ;
9999 private boolean hasStarted ;
100- private List <HMILevel > streamableLevels = new ArrayList <>(Arrays .asList (HMILevel .HMI_FULL , HMILevel .HMI_LIMITED ));
101- private List <HMILevel > nonStreamableLevels = new ArrayList <>(Arrays .asList (HMILevel .HMI_NONE , HMILevel .HMI_BACKGROUND ));
100+ private List <HMILevel > streamableLevels = Arrays .asList (HMILevel .HMI_FULL , HMILevel .HMI_LIMITED );
102101
103102 // INTERNAL INTERFACES
104103
@@ -158,7 +157,7 @@ public void onNotified(RPCNotification notification) {
158157 if (streamableLevels .contains (hmiLevel )) {
159158 checkState ();
160159 }
161- if (hasStarted && (streamableLevels .contains (prevHMILevel )) && (nonStreamableLevels .contains (hmiLevel ))) {
160+ if (hasStarted && (streamableLevels .contains (prevHMILevel )) && (! streamableLevels .contains (hmiLevel ))) {
162161 internalInterface .stopVideoService ();
163162 }
164163 }
@@ -307,7 +306,7 @@ public void onError(String info) {
307306 */
308307 protected void startStreaming (VideoStreamingParameters parameters , boolean encrypted ){
309308 this .parameters = parameters ;
310- if (nonStreamableLevels .contains (hmiLevel )) {
309+ if (! streamableLevels .contains (hmiLevel )) {
311310 Log .e (TAG , "Cannot start video service if HMILevel is not FULL or LIMITED." );
312311 return ;
313312 }
@@ -411,7 +410,7 @@ public boolean isStreaming(){
411410 * @return boolean (true = not paused, false = paused)
412411 */
413412 public boolean isPaused (){
414- return (hasStarted && stateMachine .getState () == StreamingStateMachine .STOPPED ) || (nonStreamableLevels .contains (hmiLevel ));
413+ return (hasStarted && stateMachine .getState () == StreamingStateMachine .STOPPED ) || (! streamableLevels .contains (hmiLevel ));
415414 }
416415
417416 /**
0 commit comments