Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ LeanType is available in two purpose-built flavors designed to match your exact
- **🔐 Granular Backup & Encrypted API Key Export**: Export preferences, layouts, custom wordlists, typing history, and text expander shortcuts separately, with optional AES-256 encrypted export for third-party AI and media API keys.
- **💾 Selective Category Backup & Restore**: Export and restore your data modularly with independent category checkboxes (**Layouts**, **Theme & Custom Backgrounds**, **Dictionaries & Typing History**, **Clipboard History**, and **General Settings**) without all-or-nothing overwrites.
- **🔎 In-Palette Emoji Search**: Search emojis instantly by name or keyword directly within the emoji palette view, powered by locale-aware emoji dictionaries.
- **✉️ Privacy-First OTP Auto-Fill**: Notification-based OTP verification code detection without sensitive SMS permissions, with customizable messaging app selection.
- **📚 Smart Learning & Session Boost**: Adaptive personal dictionary learning threshold (1 to 5 times) and dynamic session word boosting.
- **🚫 Blacklist & Regex Filtering**: Filter offensive words or unwanted suggestions with custom regex pattern support.
- **🔄 Google Dictionary Import**: Seamlessly import personal dictionary words exported from Gboard.
Expand Down
12 changes: 0 additions & 12 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,18 +73,6 @@ SPDX-License-Identifier: Apache-2.0 AND GPL-3.0-only
<meta-data android:name="android.view.im" android:resource="@xml/method_dummy" />
</service>

<!-- Disabled: BIND_NOTIFICATION_LISTENER_SERVICE triggers Google Play Protect Enhanced Fraud Protection blocking sideloads -->
<!--
<service android:name=".OtpNotificationListenerService"
android:label="@string/auto_read_otp"
android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"
android:exported="true">
<intent-filter>
<action android:name="android.service.notification.NotificationListenerService" />
</intent-filter>
</service>
-->

<service android:name=".spellcheck.AndroidSpellCheckerService"
android:label="@string/spell_checker_service_name"
android:permission="android.permission.BIND_TEXT_SERVICE"
Expand Down
3 changes: 0 additions & 3 deletions app/src/main/java/helium314/keyboard/latin/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import helium314.keyboard.keyboard.emoji.SupportedEmojis
import helium314.keyboard.latin.define.DebugFlags
import helium314.keyboard.latin.settings.Defaults
import helium314.keyboard.latin.settings.Settings
import helium314.keyboard.latin.permissions.PermissionsUtil
import helium314.keyboard.latin.utils.LayoutUtilsCustom
import helium314.keyboard.latin.utils.Log
import helium314.keyboard.latin.utils.SubtypeSettings
Expand Down Expand Up @@ -49,8 +48,6 @@ class App : Application(), Configuration.Provider {
Defaults.initDynamicDefaults(this)
LayoutUtilsCustom.removeMissingLayouts(this) // only after version upgrade
SupportedEmojis.load(this)
// Disabled: OtpNotificationListenerService removed to prevent Play Protect installation blocks
// PermissionsUtil.updateNotificationListenerComponent(this, prefs().getBoolean(Settings.PREF_AUTO_READ_OTP, false))
helium314.keyboard.latin.gif.GifPluginManager.get(this).start()

val packageInfo = packageManager.getPackageInfo(packageName, 0)
Expand Down
17 changes: 1 addition & 16 deletions app/src/main/java/helium314/keyboard/latin/LatinIME.kt
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ class LatinIME : InputMethodService(),

private var gestureConsumer: GestureConsumer = GestureConsumer.NULL_GESTURE_CONSUMER
val clipboardHistoryManager = ClipboardHistoryManager(this)
private val otpSuggestionManager = OtpSuggestionManager(this)
private val mathSuggestionManager = MathSuggestionManager(this)
var floatingKeyboardManager: FloatingKeyboardManager? = null
private val mTempLocation = IntArray(2)
Expand Down Expand Up @@ -429,7 +428,6 @@ class LatinIME : InputMethodService(),
handler.removeCallbacksAndMessages(null)
floatingKeyboardManager?.destroy()
clipboardHistoryManager.onDestroy()
otpSuggestionManager.stop()

ExecutorUtils.getBackgroundExecutor(ExecutorUtils.KEYBOARD).execute {
dictionaryFacilitator.closeDictionaries()
Expand Down Expand Up @@ -986,8 +984,6 @@ class LatinIME : InputMethodService(),
strip.setToolbarVisibility(defaultVisible, false)
}
}

otpSuggestionManager.start()

if (CjkInputManager.getInstance(this).isCjkSubtypeActive(richImm.currentSubtype)) {
cjkCandidateStripView?.clear()
Expand Down Expand Up @@ -1131,7 +1127,6 @@ class LatinIME : InputMethodService(),
voiceInputManager?.cancelVoice()
updateVoiceKeepScreenOn(VoiceInputManager.VoiceState.IDLE)
releaseVoicePluginOnIdle(preserveExistingSchedule = true)
otpSuggestionManager.stop()
clipboardHistoryManager.onFinishInputView()
AudioAndHapticFeedbackManager.getInstance().onFinishInputView()
cjkCandidateStripView?.clear()
Expand Down Expand Up @@ -1884,16 +1879,6 @@ class LatinIME : InputMethodService(),
}
}

fun tryShowOtpSuggestion(): Boolean {
val strip = suggestionStripView ?: return false
val otpView = otpSuggestionManager.getOtpSuggestionView(strip)
if (otpView != null) {
strip.setExternalSuggestionView(otpView, false)
return true
}
return false
}

fun tryShowMathSuggestion(): Boolean {
val strip = suggestionStripView ?: return false
val mathView = mathSuggestionManager.getMathSuggestionView(strip)
Expand All @@ -1915,7 +1900,7 @@ class LatinIME : InputMethodService(),
}

fun tryShowExternalSuggestion(): Boolean {
return tryShowOtpSuggestion() || tryShowMathSuggestion() || tryShowClipboardSuggestion()
return tryShowMathSuggestion() || tryShowClipboardSuggestion()
}

override val isExternalSuggestionVisible: Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import helium314.keyboard.keyboard.internal.keyboard_parser.floris.KeyCode
import helium314.keyboard.latin.calculator.CalculatorHistoryManager
import helium314.keyboard.latin.calculator.MathEvaluator
import helium314.keyboard.latin.common.ColorType
import helium314.keyboard.latin.databinding.OtpSuggestionBinding
import helium314.keyboard.latin.databinding.InlineSuggestionBinding
import helium314.keyboard.latin.utils.ToolbarKey

class MathSuggestionManager(private val latinIME: LatinIME) {

private var mathSuggestionView: View? = null
private var cachedBinding: OtpSuggestionBinding? = null
private var cachedBinding: InlineSuggestionBinding? = null
private var lastDismissedExpression: String? = null
private val historyManager by lazy { CalculatorHistoryManager.getInstance(latinIME) }

Expand All @@ -35,10 +35,10 @@ class MathSuggestionManager(private val latinIME: LatinIME) {
val binding = cachedBinding?.also { b ->
(b.root.parent as? ViewGroup)?.removeView(b.root)
b.root.isGone = false
} ?: OtpSuggestionBinding.inflate(LayoutInflater.from(latinIME), parent, false).also {
} ?: InlineSuggestionBinding.inflate(LayoutInflater.from(latinIME), parent, false).also {
cachedBinding = it
}
val textView = binding.otpSuggestionText
val textView = binding.inlineSuggestionText
latinIME.mSettings.getCustomTypeface()?.let { textView.typeface = it }

textView.text = match.resultFormatted
Expand All @@ -57,7 +57,7 @@ class MathSuggestionManager(private val latinIME: LatinIME) {
lastDismissedExpression = match.expression
}

val closeButton = binding.otpSuggestionClose
val closeButton = binding.inlineSuggestionClose
closeButton.setImageDrawable(latinIME.mKeyboardSwitcher.keyboard?.mIconsSet?.getIconDrawable(ToolbarKey.CLOSE_HISTORY.name.lowercase()))
closeButton.setOnClickListener {
AudioAndHapticFeedbackManager.getInstance().performHapticAndAudioFeedback(KeyCode.NOT_SPECIFIED, it, HapticEvent.KEY_PRESS)
Expand Down

This file was deleted.

Loading
Loading