mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-14 14:02:44 +00:00
remove header from kotlin files
the license will be specified in just one file at project's root
This commit is contained in:
parent
31fd9225c8
commit
a57dc0ee19
6 changed files with 11 additions and 15 deletions
|
@ -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.
|
* Exception thrown when the metadata for the dictionary does not comply to a known format.
|
||||||
*/
|
*/
|
||||||
class BadFormatException : Exception {
|
class BadFormatException : Exception {
|
||||||
constructor() : super() {}
|
constructor() : super()
|
||||||
constructor(message: String?) : super(message) {}
|
constructor(message: String?) : super(message)
|
||||||
}
|
}
|
|
@ -23,8 +23,8 @@ class ButtonSwitcher : FrameLayout {
|
||||||
private var mInterfaceState: DictionaryListInterfaceState? = null
|
private var mInterfaceState: DictionaryListInterfaceState? = null
|
||||||
private var mOnClickListener: OnClickListener? = null
|
private var mOnClickListener: OnClickListener? = null
|
||||||
|
|
||||||
constructor(context: Context?, attrs: AttributeSet?) : super(context!!, attrs) {}
|
constructor(context: Context?, attrs: AttributeSet?) : super(context!!, attrs)
|
||||||
constructor(context: Context?, attrs: AttributeSet?, defStyle: Int) : super(context!!, attrs, defStyle) {}
|
constructor(context: Context?, attrs: AttributeSet?, defStyle: Int) : super(context!!, attrs, defStyle)
|
||||||
|
|
||||||
fun reset(interfaceState: DictionaryListInterfaceState?) {
|
fun reset(interfaceState: DictionaryListInterfaceState?) {
|
||||||
mStatus = NOT_INITIALIZED
|
mStatus = NOT_INITIALIZED
|
||||||
|
@ -77,9 +77,9 @@ class ButtonSwitcher : FrameLayout {
|
||||||
if (null == mInstallButton) return
|
if (null == mInstallButton) return
|
||||||
val width = width
|
val width = width
|
||||||
// Set to out of the screen if that's not the currently displayed status
|
// Set to out of the screen if that's not the currently displayed status
|
||||||
mInstallButton!!.setTranslationX(if (STATUS_INSTALL == status) 0F else width.toFloat())
|
mInstallButton!!.translationX = if (STATUS_INSTALL == status) 0F else width.toFloat()
|
||||||
mCancelButton!!.setTranslationX(if (STATUS_CANCEL == status) 0F else width.toFloat())
|
mCancelButton!!.translationX = if (STATUS_CANCEL == status) 0F else width.toFloat()
|
||||||
mDeleteButton!!.setTranslationX(if (STATUS_DELETE == status) 0F else width.toFloat())
|
mDeleteButton!!.translationX = if (STATUS_DELETE == status) 0F else width.toFloat()
|
||||||
}
|
}
|
||||||
|
|
||||||
// The helper method for {@link AnimatorListenerAdapter}.
|
// The helper method for {@link AnimatorListenerAdapter}.
|
||||||
|
|
|
@ -302,7 +302,6 @@ class DictionaryProvider : ContentProvider() {
|
||||||
val context = context
|
val context = context
|
||||||
val results: Cursor = MetadataDbHelper.Companion.queryInstalledOrDeletingOrAvailableDictionaryMetadata(context,
|
val results: Cursor = MetadataDbHelper.Companion.queryInstalledOrDeletingOrAvailableDictionaryMetadata(context,
|
||||||
clientId)
|
clientId)
|
||||||
?: return emptyList()
|
|
||||||
return try {
|
return try {
|
||||||
val dicts = HashMap<String, WordListInfo>()
|
val dicts = HashMap<String, WordListInfo>()
|
||||||
val idIndex = results.getColumnIndex(MetadataDbHelper.Companion.WORDLISTID_COLUMN)
|
val idIndex = results.getColumnIndex(MetadataDbHelper.Companion.WORDLISTID_COLUMN)
|
||||||
|
|
|
@ -3,7 +3,6 @@ package org.dslul.openboard.inputmethod.dictionarypack
|
||||||
import android.annotation.TargetApi
|
import android.annotation.TargetApi
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.Bundle
|
|
||||||
import android.preference.PreferenceActivity
|
import android.preference.PreferenceActivity
|
||||||
import org.dslul.openboard.inputmethod.latin.utils.FragmentUtils
|
import org.dslul.openboard.inputmethod.latin.utils.FragmentUtils
|
||||||
|
|
||||||
|
|
|
@ -324,7 +324,7 @@ class MetadataDbHelper private constructor(private val mContext: Context?, priva
|
||||||
val values = ContentValues()
|
val values = ContentValues()
|
||||||
values.put(CLIENT_LAST_UPDATE_DATE_COLUMN, System.currentTimeMillis())
|
values.put(CLIENT_LAST_UPDATE_DATE_COLUMN, System.currentTimeMillis())
|
||||||
val defaultDb = getDb(context, null)
|
val defaultDb = getDb(context, null)
|
||||||
val cursor = queryClientIds(context) ?: return
|
val cursor = queryClientIds(context)
|
||||||
try {
|
try {
|
||||||
if (!cursor.moveToFirst()) return
|
if (!cursor.moveToFirst()) return
|
||||||
do {
|
do {
|
||||||
|
@ -679,10 +679,8 @@ class MetadataDbHelper private constructor(private val mContext: Context?, priva
|
||||||
db.execSQL(METADATA_TABLE_CREATE)
|
db.execSQL(METADATA_TABLE_CREATE)
|
||||||
// Remove this client's entry in the clients table
|
// Remove this client's entry in the clients table
|
||||||
val defaultDb = getDb(context, "")
|
val defaultDb = getDb(context, "")
|
||||||
return if (0 == defaultDb.delete(CLIENT_TABLE_NAME,
|
return 0 != defaultDb.delete(CLIENT_TABLE_NAME,
|
||||||
"$CLIENT_CLIENT_ID_COLUMN = ?", arrayOf(clientId))) {
|
"$CLIENT_CLIENT_ID_COLUMN = ?", arrayOf(clientId))
|
||||||
false
|
|
||||||
} else true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -72,7 +72,7 @@ object MetadataHandler {
|
||||||
return try {
|
return try {
|
||||||
makeMetadataObject(results)
|
makeMetadataObject(results)
|
||||||
} finally {
|
} finally {
|
||||||
results?.close()
|
results.close()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue