@@ -628,16 +628,31 @@ public void onCreate() {
628628
629629 final IntentFilter newDictFilter = new IntentFilter ();
630630 newDictFilter .addAction (DictionaryPackConstants .NEW_DICTIONARY_INTENT_ACTION );
631- registerReceiver (mDictionaryPackInstallReceiver , newDictFilter );
631+ if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .TIRAMISU ) {
632+ registerReceiver (mDictionaryPackInstallReceiver , newDictFilter ,
633+ Context .RECEIVER_NOT_EXPORTED );
634+ } else {
635+ registerReceiver (mDictionaryPackInstallReceiver , newDictFilter );
636+ }
632637
633638 final IntentFilter dictDumpFilter = new IntentFilter ();
634639 dictDumpFilter .addAction (DictionaryDumpBroadcastReceiver .DICTIONARY_DUMP_INTENT_ACTION );
635- registerReceiver (mDictionaryDumpBroadcastReceiver , dictDumpFilter );
640+ if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .TIRAMISU ) {
641+ registerReceiver (mDictionaryDumpBroadcastReceiver , dictDumpFilter ,
642+ Context .RECEIVER_NOT_EXPORTED );
643+ } else {
644+ registerReceiver (mDictionaryDumpBroadcastReceiver , dictDumpFilter );
645+ }
636646
637647 final IntentFilter hideSoftInputFilter = new IntentFilter ();
638648 hideSoftInputFilter .addAction (ACTION_HIDE_SOFT_INPUT );
639- registerReceiver (mHideSoftInputReceiver , hideSoftInputFilter , PERMISSION_HIDE_SOFT_INPUT ,
640- null /* scheduler */ );
649+ if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .TIRAMISU ) {
650+ registerReceiver (mHideSoftInputReceiver , hideSoftInputFilter ,
651+ PERMISSION_HIDE_SOFT_INPUT , null /* scheduler */ , Context .RECEIVER_EXPORTED );
652+ } else {
653+ registerReceiver (mHideSoftInputReceiver , hideSoftInputFilter ,
654+ PERMISSION_HIDE_SOFT_INPUT , null /* scheduler */ );
655+ }
641656
642657 StatsUtils .onCreate (mSettings .getCurrent (), mRichImm );
643658 }
0 commit comments