remove header from kotlin files

the license will be specified in just one file at project's root
This commit is contained in:
dslul 2020-01-21 15:41:11 +01:00
parent 31fd9225c8
commit a57dc0ee19
6 changed files with 11 additions and 15 deletions

View file

@ -4,6 +4,6 @@ package org.dslul.openboard.inputmethod.dictionarypack
* Exception thrown when the metadata for the dictionary does not comply to a known format.
*/
class BadFormatException : Exception {
constructor() : super() {}
constructor(message: String?) : super(message) {}
constructor() : super()
constructor(message: String?) : super(message)
}

View file

@ -23,8 +23,8 @@ class ButtonSwitcher : FrameLayout {
private var mInterfaceState: DictionaryListInterfaceState? = null
private var mOnClickListener: OnClickListener? = null
constructor(context: Context?, attrs: AttributeSet?) : super(context!!, attrs) {}
constructor(context: Context?, attrs: AttributeSet?, defStyle: Int) : super(context!!, attrs, defStyle) {}
constructor(context: Context?, attrs: AttributeSet?) : super(context!!, attrs)
constructor(context: Context?, attrs: AttributeSet?, defStyle: Int) : super(context!!, attrs, defStyle)
fun reset(interfaceState: DictionaryListInterfaceState?) {
mStatus = NOT_INITIALIZED
@ -77,9 +77,9 @@ class ButtonSwitcher : FrameLayout {
if (null == mInstallButton) return
val width = width
// Set to out of the screen if that's not the currently displayed status
mInstallButton!!.setTranslationX(if (STATUS_INSTALL == status) 0F else width.toFloat())
mCancelButton!!.setTranslationX(if (STATUS_CANCEL == status) 0F else width.toFloat())
mDeleteButton!!.setTranslationX(if (STATUS_DELETE == status) 0F else width.toFloat())
mInstallButton!!.translationX = if (STATUS_INSTALL == status) 0F else width.toFloat()
mCancelButton!!.translationX = if (STATUS_CANCEL == status) 0F else width.toFloat()
mDeleteButton!!.translationX = if (STATUS_DELETE == status) 0F else width.toFloat()
}
// The helper method for {@link AnimatorListenerAdapter}.

View file

@ -302,7 +302,6 @@ class DictionaryProvider : ContentProvider() {
val context = context
val results: Cursor = MetadataDbHelper.Companion.queryInstalledOrDeletingOrAvailableDictionaryMetadata(context,
clientId)
?: return emptyList()
return try {
val dicts = HashMap<String, WordListInfo>()
val idIndex = results.getColumnIndex(MetadataDbHelper.Companion.WORDLISTID_COLUMN)

View file

@ -3,7 +3,6 @@ package org.dslul.openboard.inputmethod.dictionarypack
import android.annotation.TargetApi
import android.content.Intent
import android.os.Build
import android.os.Bundle
import android.preference.PreferenceActivity
import org.dslul.openboard.inputmethod.latin.utils.FragmentUtils

View file

@ -324,7 +324,7 @@ class MetadataDbHelper private constructor(private val mContext: Context?, priva
val values = ContentValues()
values.put(CLIENT_LAST_UPDATE_DATE_COLUMN, System.currentTimeMillis())
val defaultDb = getDb(context, null)
val cursor = queryClientIds(context) ?: return
val cursor = queryClientIds(context)
try {
if (!cursor.moveToFirst()) return
do {
@ -679,10 +679,8 @@ class MetadataDbHelper private constructor(private val mContext: Context?, priva
db.execSQL(METADATA_TABLE_CREATE)
// Remove this client's entry in the clients table
val defaultDb = getDb(context, "")
return if (0 == defaultDb.delete(CLIENT_TABLE_NAME,
"$CLIENT_CLIENT_ID_COLUMN = ?", arrayOf(clientId))) {
false
} else true
return 0 != defaultDb.delete(CLIENT_TABLE_NAME,
"$CLIENT_CLIENT_ID_COLUMN = ?", arrayOf(clientId))
}
/**

View file

@ -72,7 +72,7 @@ object MetadataHandler {
return try {
makeMetadataObject(results)
} finally {
results?.close()
results.close()
}
}