File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed
app/src/main/java/com/osfans/trime/ime/keyboard Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -208,19 +208,20 @@ class CommonKeyboardActionListener(
208
208
}
209
209
" commit" -> service.commitText(arg)
210
210
" date" -> service.commitText(customFormatDateTime(arg))
211
- " run" ->
212
- service.startActivity(
213
- buildIntentFromArgument(arg)?.apply {
214
- flags = Intent .FLAG_ACTIVITY_NEW_TASK or Intent .FLAG_ACTIVITY_NO_HISTORY
215
- },
216
- )
211
+ " run" -> {
212
+ val intent = buildIntentFromArgument(arg)
213
+ if (intent != null ) {
214
+ intent.flags = Intent .FLAG_ACTIVITY_NEW_TASK or Intent .FLAG_ACTIVITY_NO_HISTORY
215
+ service.startActivity(intent)
216
+ }
217
+ }
217
218
" share_text" -> service.shareText()
218
219
else -> {
219
- service.startActivity(
220
- buildIntentFromAction(action.command, arg)?. apply {
221
- flags = Intent .FLAG_ACTIVITY_NEW_TASK or Intent .FLAG_ACTIVITY_NO_HISTORY
222
- },
223
- )
220
+ val intent = buildIntentFromAction(action.command, arg)
221
+ if (intent != null ) {
222
+ intent. flags = Intent .FLAG_ACTIVITY_NEW_TASK or Intent .FLAG_ACTIVITY_NO_HISTORY
223
+ service.startActivity(intent)
224
+ }
224
225
}
225
226
}
226
227
}
You can’t perform that action at this time.
0 commit comments