-
Notifications
You must be signed in to change notification settings - Fork 807
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix : Recording starts even when device not connected. #2295
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Always keep your branch updated
- Reformat code
- Fix issues reported by Codacy
Fixed the problems. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't edit (reshuffle) rest of the unrelated code.
Also there are several commits related to gradle fixes. Update the PR and squash commits into one. https://github.com/fossasia/pslab-android#how-to-git-squash |
@CloudyPadmal I tried to change the settings in my IDE and then reformat the code but I don't know why it is still shuffling some parts. The app is working fine though and the fixes I made are reflected there. |
@@ -316,9 +318,12 @@ public boolean onOptionsItemSelected(MenuItem item) { | |||
will fire up. If user declines to give permission, don't do anything. | |||
*/ | |||
case R.id.record_data: | |||
if (!isRecording) { | |||
if (!isRecording && (!sensorNotFound() || scienceLab.isConnected())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to this logic, if PSLab is connected, it doesn't check the sensor test right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It checks but user would be able to start the recording nevertheless since PSLab is connected.
Fixes #2093
Changes:
Checklist:
strings.xml
,dimens.xml
andcolors.xml
without hard-coding any value.strings.xml
,dimens.xml
orcolors.xml
.