diff options
author | 2023-08-14 15:42:33 -0700 | |
---|---|---|
committer | 2023-08-14 15:42:33 -0700 | |
commit | 176fd72c0fd4c5e79daf015460a52865ed890bb2 (patch) | |
tree | 5e936bd778cbd4e7f9027628dc8f7b09aadeccb1 /java/src/com/android/inputmethod/latin/LatinIME.java | |
parent | d847619a2b48945465f840b8d81644fa455cc115 (diff) | |
parent | 64ce9427f8b45018f525eba6d86f6ce257cb5845 (diff) | |
download | latinime-176fd72c0fd4c5e79daf015460a52865ed890bb2.tar.gz latinime-176fd72c0fd4c5e79daf015460a52865ed890bb2.tar.xz latinime-176fd72c0fd4c5e79daf015460a52865ed890bb2.zip |
Merge Android U (ab/10368041)
Bug: 291102124
Merged-In: I7efbfd50628298c436cb86d5d84af6cbfa7918da
Change-Id: Ic95053849a83d3c13510c05d5fd03cc6863f3b65
Diffstat (limited to 'java/src/com/android/inputmethod/latin/LatinIME.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/LatinIME.java | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/latin/LatinIME.java b/java/src/com/android/inputmethod/latin/LatinIME.java index 8ed3a59bf..e68b43b39 100644 --- a/java/src/com/android/inputmethod/latin/LatinIME.java +++ b/java/src/com/android/inputmethod/latin/LatinIME.java @@ -628,16 +628,31 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen final IntentFilter newDictFilter = new IntentFilter(); newDictFilter.addAction(DictionaryPackConstants.NEW_DICTIONARY_INTENT_ACTION); - registerReceiver(mDictionaryPackInstallReceiver, newDictFilter); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + registerReceiver(mDictionaryPackInstallReceiver, newDictFilter, + Context.RECEIVER_NOT_EXPORTED); + } else { + registerReceiver(mDictionaryPackInstallReceiver, newDictFilter); + } final IntentFilter dictDumpFilter = new IntentFilter(); dictDumpFilter.addAction(DictionaryDumpBroadcastReceiver.DICTIONARY_DUMP_INTENT_ACTION); - registerReceiver(mDictionaryDumpBroadcastReceiver, dictDumpFilter); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + registerReceiver(mDictionaryDumpBroadcastReceiver, dictDumpFilter, + Context.RECEIVER_NOT_EXPORTED); + } else { + registerReceiver(mDictionaryDumpBroadcastReceiver, dictDumpFilter); + } final IntentFilter hideSoftInputFilter = new IntentFilter(); hideSoftInputFilter.addAction(ACTION_HIDE_SOFT_INPUT); - registerReceiver(mHideSoftInputReceiver, hideSoftInputFilter, PERMISSION_HIDE_SOFT_INPUT, - null /* scheduler */); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { + registerReceiver(mHideSoftInputReceiver, hideSoftInputFilter, + PERMISSION_HIDE_SOFT_INPUT, null /* scheduler */, Context.RECEIVER_EXPORTED); + } else { + registerReceiver(mHideSoftInputReceiver, hideSoftInputFilter, + PERMISSION_HIDE_SOFT_INPUT, null /* scheduler */); + } StatsUtils.onCreate(mSettings.getCurrent(), mRichImm); } |