MycroftAI / Mycroft-Android

Android companion app, sends commands from your Android device to your Mycroft system and returns the output as speech or other medium to the Android device.
GNU General Public License v3.0
352 stars 131 forks source link

fix at least one reason for issue #55 #60

Closed gjpc closed 6 years ago

gjpc commented 6 years ago

There are other problems that may cause crashes at startup. I am unhappy that beacon scanning starts before permission is actually granted. However this commit fixes the case where onRequestPermissionResult assumes a return in grantResults.

Cliabhach commented 6 years ago

Wow, thanks for catching that. One quick nit before I merge: the parentheses should be flush with the if condition, as if (grantResults.length == 0)

gjpc commented 6 years ago

LoL, I never understood the necessity of squishing the white space out of code; my tendency since working with K&R at Bell in the '70's, is to add white space, bucking today's trend to eliminate it :) Easier for these old eyes to scan it.

But you are very welcome! I am intrigued by Mycroft project.

Cliabhach commented 6 years ago

@gjpc Eh, it's not a real necessity? I guess? Anyway, we can easily change the project-wide code style down the road (the .idea config file and Android Studio autoformat make that a breeze).

Btw, are you on the mattermost chat?

gjpc commented 6 years ago

@Cliabhach I agree today's tools can be setup to auto-format the editor window into anyone's preference.

I just joined your chat.

Cliabhach commented 6 years ago

....you know what, I'm not holding up a merge request over a simple whitespace issue. I'm going to merge this as is and we can sort that later