Skip to content

Commit 33a893d

Browse files
WhiredPlanckBambooin
authored andcommitted
utils: ShortcutUtils: mark new line; remove Function
1 parent 25c7b26 commit 33a893d

File tree

2 files changed

+4
-210
lines changed

2 files changed

+4
-210
lines changed

app/src/main/java/com/osfans/trime/util/Function.java

-207
This file was deleted.

app/src/main/java/com/osfans/trime/util/ShortcutUtils.kt

+4-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ import com.osfans.trime.Rime
1818
import com.osfans.trime.ime.core.Preferences
1919
import java.text.FieldPosition
2020
import java.text.SimpleDateFormat
21-
import java.util.*
21+
import java.util.Date
22+
import java.util.Locale
2223

2324
/**
2425
* Implementation to open/call specified application/function
@@ -97,7 +98,7 @@ object ShortcutUtils {
9798
val df = if (option.isEmpty()) {
9899
DateFormat.getDateInstance(DateFormat.LONG, ul)
99100
} else {
100-
android.icu.text.SimpleDateFormat(option, Locale(locale))
101+
android.icu.text.SimpleDateFormat(option, ul.toLocale())
101102
}
102103
df.format(cc, StringBuffer(256), FieldPosition(0)).toString()
103104
} else {
@@ -136,4 +137,4 @@ object ShortcutUtils {
136137
append(KeyEvent.KEYCODE_MUSIC, "android.intent.category.APP_MUSIC")
137138
append(KeyEvent.KEYCODE_CALCULATOR, "android.intent.category.APP_CALCULATOR")
138139
}
139-
}
140+
}

0 commit comments

Comments
 (0)