aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/src/androidTest/kotlin/com/pitchedapps/frost/db/BaseDbTest.kt18
-rw-r--r--app/src/androidTest/kotlin/com/pitchedapps/frost/db/CacheDbTest.kt18
-rw-r--r--app/src/androidTest/kotlin/com/pitchedapps/frost/db/CookieDbTest.kt18
-rw-r--r--app/src/androidTest/kotlin/com/pitchedapps/frost/db/DatabaseTest.kt18
-rw-r--r--app/src/androidTest/kotlin/com/pitchedapps/frost/db/GenericDbTest.kt18
-rw-r--r--app/src/androidTest/kotlin/com/pitchedapps/frost/db/NotificationDbTest.kt18
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/activities/TabCustomizerActivity.kt1
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/db/CacheDb.kt2
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/db/CookiesDb.kt2
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/db/Database.kt18
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/db/FbTabsDb.kt2
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/db/GenericDb.kt2
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/db/NotificationDb.kt2
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/utils/L.kt1
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt1
15 files changed, 123 insertions, 16 deletions
diff --git a/app/src/androidTest/kotlin/com/pitchedapps/frost/db/BaseDbTest.kt b/app/src/androidTest/kotlin/com/pitchedapps/frost/db/BaseDbTest.kt
index 6621ea95..bae56e2f 100644
--- a/app/src/androidTest/kotlin/com/pitchedapps/frost/db/BaseDbTest.kt
+++ b/app/src/androidTest/kotlin/com/pitchedapps/frost/db/BaseDbTest.kt
@@ -1,3 +1,19 @@
+/*
+ * Copyright 2019 Allan Wang
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
package com.pitchedapps.frost.db
import android.content.Context
@@ -29,4 +45,4 @@ abstract class BaseDbTest {
fun after() {
db.close()
}
-} \ No newline at end of file
+}
diff --git a/app/src/androidTest/kotlin/com/pitchedapps/frost/db/CacheDbTest.kt b/app/src/androidTest/kotlin/com/pitchedapps/frost/db/CacheDbTest.kt
index 1fe7bbc4..417c6678 100644
--- a/app/src/androidTest/kotlin/com/pitchedapps/frost/db/CacheDbTest.kt
+++ b/app/src/androidTest/kotlin/com/pitchedapps/frost/db/CacheDbTest.kt
@@ -1,3 +1,19 @@
+/*
+ * Copyright 2019 Allan Wang
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
package com.pitchedapps.frost.db
import kotlinx.coroutines.runBlocking
@@ -29,4 +45,4 @@ class CacheDbTest : BaseDbTest() {
)
}
}
-} \ No newline at end of file
+}
diff --git a/app/src/androidTest/kotlin/com/pitchedapps/frost/db/CookieDbTest.kt b/app/src/androidTest/kotlin/com/pitchedapps/frost/db/CookieDbTest.kt
index 122e3205..327ead86 100644
--- a/app/src/androidTest/kotlin/com/pitchedapps/frost/db/CookieDbTest.kt
+++ b/app/src/androidTest/kotlin/com/pitchedapps/frost/db/CookieDbTest.kt
@@ -1,3 +1,19 @@
+/*
+ * Copyright 2019 Allan Wang
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
package com.pitchedapps.frost.db
import kotlinx.coroutines.runBlocking
@@ -66,4 +82,4 @@ class CookieDbTest : BaseDbTest() {
assertNull(dao.selectById(cookie.id + 1), "Inexistent cookie selection failed")
}
}
-} \ No newline at end of file
+}
diff --git a/app/src/androidTest/kotlin/com/pitchedapps/frost/db/DatabaseTest.kt b/app/src/androidTest/kotlin/com/pitchedapps/frost/db/DatabaseTest.kt
index 1f1a201b..c79d212e 100644
--- a/app/src/androidTest/kotlin/com/pitchedapps/frost/db/DatabaseTest.kt
+++ b/app/src/androidTest/kotlin/com/pitchedapps/frost/db/DatabaseTest.kt
@@ -1,3 +1,19 @@
+/*
+ * Copyright 2019 Allan Wang
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
package com.pitchedapps.frost.db
import androidx.test.ext.junit.runners.AndroidJUnit4
@@ -35,4 +51,4 @@ class DatabaseTest : KoinTest {
val missingKoins = (members + FrostDatabase::class).filter { !hasKoin(it) }
assertTrue(missingKoins.isEmpty(), "Missing koins: $missingKoins")
}
-} \ No newline at end of file
+}
diff --git a/app/src/androidTest/kotlin/com/pitchedapps/frost/db/GenericDbTest.kt b/app/src/androidTest/kotlin/com/pitchedapps/frost/db/GenericDbTest.kt
index 9979eca4..add9f509 100644
--- a/app/src/androidTest/kotlin/com/pitchedapps/frost/db/GenericDbTest.kt
+++ b/app/src/androidTest/kotlin/com/pitchedapps/frost/db/GenericDbTest.kt
@@ -1,3 +1,19 @@
+/*
+ * Copyright 2019 Allan Wang
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
package com.pitchedapps.frost.db
import com.pitchedapps.frost.facebook.FbItem
@@ -43,4 +59,4 @@ class GenericDbTest : BaseDbTest() {
)
}
}
-} \ No newline at end of file
+}
diff --git a/app/src/androidTest/kotlin/com/pitchedapps/frost/db/NotificationDbTest.kt b/app/src/androidTest/kotlin/com/pitchedapps/frost/db/NotificationDbTest.kt
index 25c29db4..9167c7bf 100644
--- a/app/src/androidTest/kotlin/com/pitchedapps/frost/db/NotificationDbTest.kt
+++ b/app/src/androidTest/kotlin/com/pitchedapps/frost/db/NotificationDbTest.kt
@@ -1,3 +1,19 @@
+/*
+ * Copyright 2019 Allan Wang
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
package com.pitchedapps.frost.db
import com.pitchedapps.frost.services.NOTIF_CHANNEL_GENERAL
@@ -125,4 +141,4 @@ class NotificationDbTest : BaseDbTest() {
)
}
}
-} \ No newline at end of file
+}
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/TabCustomizerActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/TabCustomizerActivity.kt
index a380157f..6ad7d3f2 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/activities/TabCustomizerActivity.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/TabCustomizerActivity.kt
@@ -84,7 +84,6 @@ class TabCustomizerActivity : BaseActivity() {
bindSwapper(adapter, tab_recycler)
adapter.withOnClickListener { view, _, _, _ -> view!!.wobble(); true }
-
}
setResult(Activity.RESULT_CANCELED)
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/db/CacheDb.kt b/app/src/main/kotlin/com/pitchedapps/frost/db/CacheDb.kt
index 8c3c9c6b..4906f60a 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/db/CacheDb.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/db/CacheDb.kt
@@ -74,4 +74,4 @@ suspend fun CacheDao.save(id: Long, type: String, contents: String): Boolean =
} catch (e: Exception) {
L.e(e) { "Cache save failed for $type" }
false
- } \ No newline at end of file
+ }
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/db/CookiesDb.kt b/app/src/main/kotlin/com/pitchedapps/frost/db/CookiesDb.kt
index 7e929370..5aadbb02 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/db/CookiesDb.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/db/CookiesDb.kt
@@ -82,4 +82,4 @@ data class CookieModel(@PrimaryKey var id: Long = -1L, var name: String? = null,
BaseModel(), Parcelable {
override fun toString(): String = "CookieModel(${hashCode()})"
-} \ No newline at end of file
+}
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/db/Database.kt b/app/src/main/kotlin/com/pitchedapps/frost/db/Database.kt
index 0c009634..e1b1d4c4 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/db/Database.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/db/Database.kt
@@ -1,11 +1,25 @@
+/*
+ * Copyright 2019 Allan Wang
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
package com.pitchedapps.frost.db
import android.content.Context
import androidx.room.Database
import androidx.room.Room
import androidx.room.RoomDatabase
-import androidx.room.TypeConverters
-import org.koin.core.Koin
import org.koin.dsl.module.module
import org.koin.standalone.StandAloneContext
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/db/FbTabsDb.kt b/app/src/main/kotlin/com/pitchedapps/frost/db/FbTabsDb.kt
index c63be794..a704ce82 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/db/FbTabsDb.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/db/FbTabsDb.kt
@@ -35,4 +35,4 @@ object FbTabsDb {
}
@Table(database = FbTabsDb::class, allFields = true)
-data class FbTabModel(@PrimaryKey var position: Int = -1, var tab: FbItem = FbItem.FEED) : BaseModel() \ No newline at end of file
+data class FbTabModel(@PrimaryKey var position: Int = -1, var tab: FbItem = FbItem.FEED) : BaseModel()
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/db/GenericDb.kt b/app/src/main/kotlin/com/pitchedapps/frost/db/GenericDb.kt
index c1f05092..4177ae86 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/db/GenericDb.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/db/GenericDb.kt
@@ -68,4 +68,4 @@ suspend fun GenericDao.getTabs(): List<FbItem> {
?.mapNotNull { allTabs[it] }
?.takeIf { it.isNotEmpty() }
?: defaultTabs()
-} \ No newline at end of file
+}
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/db/NotificationDb.kt b/app/src/main/kotlin/com/pitchedapps/frost/db/NotificationDb.kt
index 01baa43e..afeeefcd 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/db/NotificationDb.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/db/NotificationDb.kt
@@ -194,4 +194,4 @@ data class NotificationModel(
private fun lastNotificationTime(id: Long): NotificationModel =
(select from NotificationModel::class where (NotificationModel_Table.id eq id)).querySingle()
- ?: NotificationModel(id = id) \ No newline at end of file
+ ?: NotificationModel(id = id)
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/utils/L.kt b/app/src/main/kotlin/com/pitchedapps/frost/utils/L.kt
index 7d2e0e08..7c8c1895 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/utils/L.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/utils/L.kt
@@ -20,7 +20,6 @@ import android.util.Log
import ca.allanwang.kau.logging.KauLogger
import com.bugsnag.android.Bugsnag
import com.pitchedapps.frost.BuildConfig
-import java.lang.Exception
/**
* Created by Allan Wang on 2017-05-28.
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt
index 75b80ae1..4d88ad3d 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/views/FrostVideoViewer.kt
@@ -104,7 +104,6 @@ class FrostVideoViewer @JvmOverloads constructor(
val cookie = FrostDatabase.get().cookieDao().currentCookie() ?: return@launchMain
context.frostDownload(cookie, video.videoUri)
}
-
}
true
}