Skip to content

Commit

Permalink
Improve implementation of the Video Config Error Popup (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChainReaction31 authored Sep 11, 2021
1 parent 92216c6 commit 10d44e0
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -448,20 +448,17 @@ public void onClick(DialogInterface dialog, int whichButton)
updateConfig(PreferenceManager.getDefaultSharedPreferences(MainActivity.this), runName);

AndroidSensorsConfig androidSensorConfig = (AndroidSensorsConfig) sensorhubConfig.get("ANDROID_SENSORS");
Log.d("OSH-DEBUG", androidSensorConfig.toString());
VideoEncoderConfig videoConfig = androidSensorConfig.videoConfig;

if(videoConfig.selectedPreset >= 0 && videoConfig.selectedPreset < videoConfig.presets.length){
Log.d("OSH-DEBUG", "TEST MESSAGE...");

if ((androidSensorConfig.activateBackCamera || androidSensorConfig.activateFrontCamera) && videoConfig.selectedPreset < 0 || videoConfig.selectedPreset >= videoConfig.presets.length) {
showVideoConfigErrorPopup();
newStatusMessage("Video Config Error: Check Settings");
} else {
sostClients.clear();
boundService.startSensorHub(sensorhubConfig, showVideo, MainActivity.this);

if (boundService.hasVideo())
mainInfoArea.setBackgroundColor(0x80FFFFFF);
}else{
showVideoConfigErrorPopup();
newStatusMessage("Video Config Error: Check Settings");
}

}
Expand Down

0 comments on commit 10d44e0

Please sign in to comment.