Compare commits
13 commits
Author | SHA1 | Date | |
---|---|---|---|
|
12af6cda7c | ||
|
5306992469 | ||
|
5660176851 | ||
|
502d6fa4a5 | ||
|
ee56aca68b | ||
|
a15cedde21 | ||
|
a2015a2277 | ||
|
7352e9e7b0 | ||
|
0b263e371f | ||
|
07dd515e7a | ||
|
7c7ef42dbe | ||
|
446ed8ceb9 | ||
|
9065139d8b |
16 changed files with 55 additions and 52 deletions
|
@ -56,6 +56,10 @@ android {
|
|||
forPlay {
|
||||
dimension "distribution"
|
||||
}
|
||||
forAmazon {
|
||||
dimension "distribution"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
packagingOptions {
|
||||
|
@ -90,15 +94,15 @@ dependencies {
|
|||
compile "com.google.dagger:dagger:$dagger_version"
|
||||
kapt "com.google.dagger:dagger-compiler:$dagger_version"
|
||||
|
||||
compile 'com.github.hotchemi:permissionsdispatcher:2.3.1'
|
||||
kapt 'com.github.hotchemi:permissionsdispatcher-processor:2.3.1'
|
||||
compile 'com.github.hotchemi:permissionsdispatcher:2.3.2'
|
||||
kapt 'com.github.hotchemi:permissionsdispatcher-processor:2.3.2'
|
||||
|
||||
provided 'org.glassfish:javax.annotation:10.0-b28'
|
||||
|
||||
kaptAndroidTest "com.google.dagger:dagger-compiler:$dagger_version"
|
||||
androidTestCompile "com.android.support:support-annotations:$support_version"
|
||||
|
||||
androidTestCompile('com.github.ligi:trulesk:0.16') {
|
||||
androidTestCompile('com.github.ligi:trulesk:0.18') {
|
||||
// http://stackoverflow.com/questions/30578243/why-would-adding-espresso-contrib-cause-an-inflateexception
|
||||
exclude group: 'javax.inject'
|
||||
}
|
||||
|
@ -111,11 +115,6 @@ dependencies {
|
|||
exclude module: 'recyclerview-v7'
|
||||
}
|
||||
|
||||
androidTestCompile('com.android.support.test.espresso:espresso-web:2.2.2') {
|
||||
// http://stackoverflow.com/questions/30578243/why-would-adding-espresso-contrib-cause-an-inflateexception
|
||||
exclude group: 'javax.inject'
|
||||
}
|
||||
|
||||
androidTestCompile 'com.squareup.assertj:assertj-android:1.1.1'
|
||||
|
||||
androidTestCompile "org.mockito:mockito-core:$mockito_version"
|
||||
|
@ -144,23 +143,21 @@ dependencies {
|
|||
|
||||
compile 'net.i2p.android.ext:floatingactionbutton:1.10.1'
|
||||
|
||||
compile 'com.github.ligi:KAXT:0.15'
|
||||
compile 'com.github.ligi:KAXT:0.16'
|
||||
compile 'com.github.ligi:loadtoast:1.10.11'
|
||||
compile 'com.github.ligi:tracedroid:1.4'
|
||||
compile 'com.github.ligi:snackengage:0.9'
|
||||
|
||||
forPlayCompile 'com.github.ligi.snackengage:snackengage-playrate:0.10'
|
||||
forFDroidCompile 'com.github.ligi.snackengage:snackengage-playrate:0.10'
|
||||
forAmazonCompile 'com.github.ligi.snackengage:snackengage-amazonrate:0.10'
|
||||
|
||||
compile 'com.squareup.okhttp3:okhttp:3.6.0'
|
||||
compile 'com.larswerkman:HoloColorPicker:1.5'
|
||||
compile 'com.google.code.findbugs:jsr305:3.0.1'
|
||||
compile 'com.squareup.moshi:moshi:1.2.0'
|
||||
compile 'com.squareup.moshi:moshi:1.4.0'
|
||||
|
||||
compile("com.chibatching.kotpref:kotpref:2.0.0") {
|
||||
exclude group: 'org.jetbrains.kotlin'
|
||||
}
|
||||
|
||||
compile("com.chibatching.kotpref:initializer:2.0.0") {
|
||||
exclude group: 'org.jetbrains.kotlin'
|
||||
}
|
||||
compile "com.chibatching.kotpref:kotpref:2.1.0"
|
||||
compile "com.chibatching.kotpref:initializer:2.1.0"
|
||||
|
||||
testCompile "com.android.support:support-annotations:$support_version"
|
||||
testCompile 'com.squareup.assertj:assertj-android:1.1.1'
|
||||
|
|
5
android/src/forAmazon/res/values/strings.xml
Normal file
5
android/src/forAmazon/res/values/strings.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="market_url" translatable="false">amzn://apps/android?p=%s</string>
|
||||
<string name="nav_market" translatable="false">Play</string>
|
||||
</resources>
|
|
@ -18,7 +18,7 @@ fun tryAddDateToCalendar(pass: Pass, contextView: View, timeSpan: PassImpl.TimeS
|
|||
AlertDialog.Builder(contextView.context).setMessage(R.string.expiration_date_to_calendar_warning_message)
|
||||
.setTitle(R.string.expiration_date_to_calendar_warning_title)
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setPositiveButton(android.R.string.ok) { dialog, which -> reallyAddToCalendar(pass, contextView, timeSpan) }
|
||||
.setPositiveButton(android.R.string.ok) { _, _ -> reallyAddToCalendar(pass, contextView, timeSpan) }
|
||||
.show()
|
||||
} else {
|
||||
reallyAddToCalendar(pass, contextView, timeSpan)
|
||||
|
|
|
@ -17,7 +17,7 @@ internal class MoveToNewTopicUI(private val context: Activity, private val passS
|
|||
.setTitle(context.getString(R.string.move_to_new_topic))
|
||||
.setView(R.layout.dialog_move_to_new_topic)
|
||||
.setPositiveButton(android.R.string.ok, null)
|
||||
.setNegativeButton(android.R.string.cancel) { dialog, which -> passStore.notifyChange() }
|
||||
.setNegativeButton(android.R.string.cancel) { _, _ -> passStore.notifyChange() }
|
||||
.setOnCancelListener { passStore.notifyChange() }
|
||||
.show()
|
||||
|
||||
|
@ -48,7 +48,7 @@ internal class MoveToNewTopicUI(private val context: Activity, private val passS
|
|||
val button = Button(context)
|
||||
button.text = it
|
||||
suggestionButtonContainer.addView(button)
|
||||
button.setOnClickListener { view -> move(it) }
|
||||
button.setOnClickListener { _ -> move(it) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ fun Activity.showNavigateToLocationsDialog(pass: Pass, finishOnDone: Boolean) {
|
|||
locationDescriptions[i++] = loc.getNameWithFallback(pass)
|
||||
}
|
||||
AlertDialog.Builder(this).setTitle(this.getString(R.string.choose_location))
|
||||
.setItems(locationDescriptions) { dialog, which ->
|
||||
.setItems(locationDescriptions) { _, which ->
|
||||
startIntentForLocation(this, locations[which], pass)
|
||||
done(this, finishOnDone)
|
||||
}
|
||||
|
@ -60,13 +60,10 @@ private fun startIntentForLocation(activity: Activity, location: PassLocation, p
|
|||
|
||||
}
|
||||
|
||||
private fun getEncodedDescription(location: PassLocation, pass: Pass): String {
|
||||
try {
|
||||
return URLEncoder.encode(location.getNameWithFallback(pass), "UTF-8")
|
||||
} catch (e1: UnsupportedEncodingException) {
|
||||
// OK - no description
|
||||
return ""
|
||||
}
|
||||
|
||||
private fun getEncodedDescription(location: PassLocation, pass: Pass) = try {
|
||||
URLEncoder.encode(location.getNameWithFallback(pass), "UTF-8")
|
||||
} catch (e1: UnsupportedEncodingException) {
|
||||
// OK - no description
|
||||
""
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ open class PassAndroidActivity : AppCompatActivity() {
|
|||
override fun onResume() {
|
||||
super.onResume()
|
||||
|
||||
if (lastSetNightMode != null && lastSetNightMode !== settings.getNightMode()) {
|
||||
if (lastSetNightMode != null && lastSetNightMode != settings.getNightMode()) {
|
||||
recreateWhenPossible()
|
||||
}
|
||||
lastSetNightMode = settings.getNightMode()
|
||||
|
|
|
@ -58,7 +58,7 @@ class PassEditActivity : AppCompatActivity() {
|
|||
setContentView(R.layout.edit)
|
||||
|
||||
categoryView.setOnClickListener {
|
||||
AlertDialog.Builder(this).setItems(R.array.category_edit_options) { dialogInterface, i ->
|
||||
AlertDialog.Builder(this).setItems(R.array.category_edit_options) { _, i ->
|
||||
when (i) {
|
||||
0 -> showCategoryPickDialog(this@PassEditActivity, currentPass, bus)
|
||||
1 -> showColorPickDialog(this@PassEditActivity, currentPass, bus)
|
||||
|
|
|
@ -17,11 +17,11 @@ import android.support.v7.app.AlertDialog
|
|||
import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
import android.view.View
|
||||
import android.view.View.GONE
|
||||
import kotlinx.android.synthetic.main.pass_list.*
|
||||
import org.greenrobot.eventbus.Subscribe
|
||||
import org.greenrobot.eventbus.ThreadMode
|
||||
import org.ligi.kaxt.setButton
|
||||
import org.ligi.kaxt.setVisibility
|
||||
import org.ligi.kaxt.startActivityFromClass
|
||||
import org.ligi.kaxt.startActivityFromURL
|
||||
import org.ligi.passandroid.App
|
||||
|
@ -137,7 +137,6 @@ class PassListActivity : PassAndroidActivity() {
|
|||
|
||||
setSupportActionBar(toolbar)
|
||||
|
||||
fab_action_open_file.setVisibility(Build.VERSION.SDK_INT >= VERSION_STARTING_TO_SUPPORT_STORAGE_FRAMEWORK)
|
||||
|
||||
// don't want too many windows in worst case - so check for errors first
|
||||
if (TraceDroid.getStackTraceFiles().isNotEmpty()) {
|
||||
|
@ -189,7 +188,7 @@ class PassListActivity : PassAndroidActivity() {
|
|||
if (tab_layout.selectedTabPosition < 0) {
|
||||
newTitle = getString(R.string.topic_new)
|
||||
} else {
|
||||
newTitle = adapter.getPageTitle(tab_layout.selectedTabPosition).toString()
|
||||
newTitle = adapter.getPageTitle(tab_layout.selectedTabPosition)
|
||||
}
|
||||
|
||||
passStore.classifier.moveToTopic(pass, newTitle)
|
||||
|
@ -205,8 +204,12 @@ class PassListActivity : PassAndroidActivity() {
|
|||
fam.collapse()
|
||||
}
|
||||
|
||||
fab_action_open_file.setOnClickListener {
|
||||
onAddOpenFileClick()
|
||||
if (Build.VERSION.SDK_INT >= VERSION_STARTING_TO_SUPPORT_STORAGE_FRAMEWORK) {
|
||||
fab_action_open_file.setOnClickListener {
|
||||
onAddOpenFileClick()
|
||||
}
|
||||
} else {
|
||||
fab_action_open_file.visibility = GONE
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ class PassMenuOptions(val activity: Activity, val pass: Pass) {
|
|||
builder.setView(sourceDeleteCheckBoxView)
|
||||
}
|
||||
|
||||
builder.setPositiveButton(activity.getString(R.string.delete)) { dialog, which ->
|
||||
builder.setPositiveButton(activity.getString(R.string.delete)) { _, _ ->
|
||||
if (sourceDeleteCheckBoxView.sourceDeleteCheckbox.isChecked) {
|
||||
|
||||
File(source!!.replace("file://", "")).delete()
|
||||
|
|
|
@ -15,7 +15,7 @@ object UnzipPassDialog {
|
|||
private fun displayError(activity: Activity, title: String, err: String) {
|
||||
AlertDialog.Builder(activity).setTitle(title)
|
||||
.setMessage(err)
|
||||
.setPositiveButton(android.R.string.ok) { dialogInterface, i -> activity.finish() }
|
||||
.setPositiveButton(android.R.string.ok) { _, _ -> activity.finish() }
|
||||
.show()
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ fun showBarcodeEditDialog(context: AppCompatActivity, bus: EventBus, pass: Pass,
|
|||
AlertDialog.Builder(context).setView(view)
|
||||
.setTitle(R.string.edit_barcode_dialog_title)
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setPositiveButton(android.R.string.ok) { dialog, which ->
|
||||
.setPositiveButton(android.R.string.ok) { _, _ ->
|
||||
pass.barCode = barcodeEditController.getBarCode()
|
||||
bus.post(PassRefreshEvent(pass))
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ fun showCategoryPickDialog(context: Context, pass: Pass, bus: EventBus) {
|
|||
}
|
||||
|
||||
val builder = AlertDialog.Builder(context)
|
||||
builder.setAdapter(adapter) { dialog, position ->
|
||||
builder.setAdapter(adapter) { _, position ->
|
||||
pass.type = passTypes[position]
|
||||
bus.post(PassRefreshEvent(pass))
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
buildscript {
|
||||
ext {
|
||||
support_version = '25.2.0'
|
||||
dagger_version = '2.7'
|
||||
kotlin_version = '1.1.0'
|
||||
mockito_version = '2.7.9'
|
||||
support_version = '25.3.0'
|
||||
dagger_version = '2.10'
|
||||
kotlin_version = '1.1.1'
|
||||
mockito_version = '2.7.19'
|
||||
play_version = '10.0.1'
|
||||
}
|
||||
|
||||
|
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,6 +1,6 @@
|
|||
#Fri Mar 03 23:10:43 CET 2017
|
||||
#Mon Mar 06 23:47:44 CET 2017
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-3.4.1-all.zip
|
||||
|
|
11
gradlew
vendored
11
gradlew
vendored
|
@ -155,13 +155,14 @@ if $cygwin ; then
|
|||
fi
|
||||
|
||||
# Escape application args
|
||||
for s in "${@}" ; do
|
||||
s=\"$s\"
|
||||
APP_ARGS=$APP_ARGS" "$s
|
||||
done
|
||||
save ( ) {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=$(save "$@")
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- "$DEFAULT_JVM_OPTS" "$JAVA_OPTS" "$GRADLE_OPTS" "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||
|
|
Loading…
Reference in a new issue