-
Notifications
You must be signed in to change notification settings - Fork 582
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
Make RxBleConnectionState compile time constant, e.g. an enum. Otherwise I get "Constant expression required". #42
Comments
Hello, |
OK, enum was just an idea, you can also go Google style like https://developer.android.com/reference/android/bluetooth/BluetoothGatt.html#GATT_SUCCESS. |
Reviewers: michal.zielinski, pawel.urban Reviewed By: pawel.urban Differential Revision: https://phabricator.polidea.com/D2350
Finally done. |
I've used |
* upstream/master: (35 commits) Updated Changelog and Readmes. Release 1.2.3. Added changelog for `1.3.0-SNAPSHOT` Bumped Butterknife library to 8.6.0 Updated `RxJava` to 1.3.0 Added extracting of 32-bit UUIDs by UUIDUtil. dariuszseweryn#207 Extracted Radio Release Interface. Align to library usage to Observable contract. Issue template update. Added indication of `RxBleAdapterStateObservable` under `Helpers` section of the Readme page. dariuszseweryn#201 Checkstyle fix. Added annotations on `RxBleConnection` for lint checks and ease of use. Moving towards 1.2.3. Fixed readme code snippets indentation (now using 4 spaces instead of tabs everywhere) Fixed indenting in readme. Gradle bump. Added better description of UUID filtering for `.scanBleDevices(UUID…)`. Added `Observable behaviour` to Readme. dariuszseweryn#187 Extracted `NotificationAndIndicationManager`. Fixed tests running from the IDE. Changed `RxBleConnectionState` from a class to enum for convenience. dariuszseweryn#42 Refactored `RxBleDeviceServices` for much less memory pressure when using `RxBleConnection` `UUID`’s functions. Moving towards 1.3.0. ...
RxBleConnectionState can't be used in the switch-case statement because they are not compile time constant, see http://stackoverflow.com/questions/3827393/java-switch-statement-constant-expression-required-but-it-is-constant. Maybe make RxBleConnectionState an enum?
For example this is illegal:
because Android Studio complaints
Constant expression required
.The text was updated successfully, but these errors were encountered: