Skip to content

Commit

Permalink
Various warning fixes for ProGuard build
Browse files Browse the repository at this point in the history
  • Loading branch information
outadoc committed Nov 18, 2016
1 parent 69cb95f commit 273e7b1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
8 changes: 4 additions & 4 deletions twistoast/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ android {
applicationId "fr.outadev.twistoast"
minSdkVersion 15
targetSdkVersion target_sdk
versionCode 35
versionName "3.0-beta2"
versionCode 36
versionName "3.0-beta3"
}

compileOptions {
Expand All @@ -44,8 +44,8 @@ android {

buildTypes {
release {
minifyEnabled false
proguardFiles 'proguard-rules.pro'
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

package fr.outadev.twistoast.background

import android.content.Context
import android.support.v4.app.NotificationCompat

/**
Expand All @@ -30,10 +29,9 @@ object NotificationSettings {
* Gets suitable notification defaults for the notifications of this receiver.
* Use them with NotificationCompat.Builder.setDefaults().
*
* @param context a context
* @return an integer to pass to the builder
*/
fun getNotificationDefaults(context: Context, vibrate: Boolean, ring: Boolean): Int {
fun getNotificationDefaults(vibrate: Boolean, ring: Boolean): Int {
var defaults = NotificationCompat.DEFAULT_LIGHTS

if (vibrate) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ class PebbleWatchReceiver : PebbleDataReceiver(PebbleWatchReceiver.PEBBLE_UUID)
}

private fun getOptionalShortDirection(schedule: TimeoSingleSchedule): String {
if (schedule.direction != null && schedule.direction!!.matches("(A|B) .+".toRegex())) {
return schedule.direction!![0].toString()
if (schedule.direction != null && (schedule.direction as String).matches("(A|B) .+".toRegex())) {
return (schedule.direction as String)[0].toString()
} else {
return " "
}
Expand Down

0 comments on commit 273e7b1

Please sign in to comment.