Skip to content

Commit

Permalink
utils: ShortcutUtils: mark new line; remove Function
Browse files Browse the repository at this point in the history
  • Loading branch information
WhiredPlanck authored and Bambooin committed Sep 8, 2021
1 parent 25c7b26 commit 33a893d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 210 deletions.
207 changes: 0 additions & 207 deletions app/src/main/java/com/osfans/trime/util/Function.java

This file was deleted.

7 changes: 4 additions & 3 deletions app/src/main/java/com/osfans/trime/util/ShortcutUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ import com.osfans.trime.Rime
import com.osfans.trime.ime.core.Preferences
import java.text.FieldPosition
import java.text.SimpleDateFormat
import java.util.*
import java.util.Date
import java.util.Locale

/**
* Implementation to open/call specified application/function
Expand Down Expand Up @@ -97,7 +98,7 @@ object ShortcutUtils {
val df = if (option.isEmpty()) {
DateFormat.getDateInstance(DateFormat.LONG, ul)
} else {
android.icu.text.SimpleDateFormat(option, Locale(locale))
android.icu.text.SimpleDateFormat(option, ul.toLocale())
}
df.format(cc, StringBuffer(256), FieldPosition(0)).toString()
} else {
Expand Down Expand Up @@ -136,4 +137,4 @@ object ShortcutUtils {
append(KeyEvent.KEYCODE_MUSIC, "android.intent.category.APP_MUSIC")
append(KeyEvent.KEYCODE_CALCULATOR, "android.intent.category.APP_CALCULATOR")
}
}
}

0 comments on commit 33a893d

Please sign in to comment.