@@ -507,26 +507,26 @@ object ActionUtils {
507507 ActionId .TOGGLE_DND_MODE ,
508508 ActionId .ENABLE_DND_MODE ,
509509 ActionId .DISABLE_DND_MODE ,
510- -> Build .VERSION_CODES .M
510+ -> Build .VERSION_CODES .M
511511
512512 ActionId .DISABLE_FLASHLIGHT ,
513513 ActionId .ENABLE_FLASHLIGHT ,
514514 ActionId .TOGGLE_FLASHLIGHT ,
515- -> Build .VERSION_CODES .M
515+ -> Build .VERSION_CODES .M
516516
517517 ActionId .CHANGE_FLASHLIGHT_STRENGTH ,
518- -> Build .VERSION_CODES .TIRAMISU
518+ -> Build .VERSION_CODES .TIRAMISU
519519
520520 ActionId .TOGGLE_KEYBOARD ,
521521 ActionId .SHOW_KEYBOARD ,
522522 ActionId .HIDE_KEYBOARD ,
523- -> Build .VERSION_CODES .N
523+ -> Build .VERSION_CODES .N
524524
525525 ActionId .TEXT_CUT ,
526526 ActionId .TEXT_COPY ,
527527 ActionId .TEXT_PASTE ,
528528 ActionId .SELECT_WORD_AT_CURSOR ,
529- -> Build .VERSION_CODES .JELLY_BEAN_MR2
529+ -> Build .VERSION_CODES .JELLY_BEAN_MR2
530530
531531 ActionId .SHOW_POWER_MENU -> Build .VERSION_CODES .LOLLIPOP
532532 ActionId .DEVICE_CONTROLS -> Build .VERSION_CODES .S
@@ -551,22 +551,28 @@ object ActionUtils {
551551 ActionId .END_PHONE_CALL ,
552552 ActionId .ANSWER_PHONE_CALL ,
553553 ActionId .PHONE_CALL ,
554+ -> listOf (PackageManager .FEATURE_TELEPHONY )
555+
554556 ActionId .SEND_SMS ,
555557 ActionId .COMPOSE_SMS ,
556- -> listOf (PackageManager .FEATURE_TELEPHONY )
558+ -> if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .TIRAMISU ) {
559+ listOf (PackageManager .FEATURE_TELEPHONY_MESSAGING )
560+ } else {
561+ listOf (PackageManager .FEATURE_TELEPHONY )
562+ }
557563
558564 ActionId .SECURE_LOCK_DEVICE ,
559- -> listOf (PackageManager .FEATURE_DEVICE_ADMIN )
565+ -> listOf (PackageManager .FEATURE_DEVICE_ADMIN )
560566
561567 ActionId .TOGGLE_WIFI ,
562568 ActionId .ENABLE_WIFI ,
563569 ActionId .DISABLE_WIFI ,
564- -> listOf (PackageManager .FEATURE_WIFI )
570+ -> listOf (PackageManager .FEATURE_WIFI )
565571
566572 ActionId .TOGGLE_MOBILE_DATA ,
567573 ActionId .ENABLE_MOBILE_DATA ,
568574 ActionId .DISABLE_MOBILE_DATA ,
569- -> if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .TIRAMISU ) {
575+ -> if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .TIRAMISU ) {
570576 listOf (PackageManager .FEATURE_TELEPHONY_DATA )
571577 } else {
572578 listOf (PackageManager .FEATURE_TELEPHONY )
@@ -575,18 +581,18 @@ object ActionUtils {
575581 ActionId .TOGGLE_NFC ,
576582 ActionId .ENABLE_NFC ,
577583 ActionId .DISABLE_NFC ,
578- -> listOf (PackageManager .FEATURE_NFC )
584+ -> listOf (PackageManager .FEATURE_NFC )
579585
580586 ActionId .TOGGLE_BLUETOOTH ,
581587 ActionId .ENABLE_BLUETOOTH ,
582588 ActionId .DISABLE_BLUETOOTH ,
583- -> listOf (PackageManager .FEATURE_BLUETOOTH )
589+ -> listOf (PackageManager .FEATURE_BLUETOOTH )
584590
585591 ActionId .TOGGLE_FLASHLIGHT ,
586592 ActionId .ENABLE_FLASHLIGHT ,
587593 ActionId .DISABLE_FLASHLIGHT ,
588594 ActionId .CHANGE_FLASHLIGHT_STRENGTH ,
589- -> listOf (PackageManager .FEATURE_CAMERA_FLASH )
595+ -> listOf (PackageManager .FEATURE_CAMERA_FLASH )
590596
591597 else -> emptyList()
592598 }
@@ -597,27 +603,27 @@ object ActionUtils {
597603 ActionId .ENABLE_WIFI ,
598604 ActionId .DISABLE_WIFI ,
599605 ActionId .TOGGLE_WIFI ,
600- -> true
606+ -> true
601607
602608 ActionId .TOGGLE_MOBILE_DATA ,
603609 ActionId .ENABLE_MOBILE_DATA ,
604610 ActionId .DISABLE_MOBILE_DATA ,
605- -> true
611+ -> true
606612
607613 ActionId .ENABLE_NFC ,
608614 ActionId .DISABLE_NFC ,
609615 ActionId .TOGGLE_NFC ,
610- -> true
616+ -> true
611617
612618 ActionId .TOGGLE_AIRPLANE_MODE ,
613619 ActionId .ENABLE_AIRPLANE_MODE ,
614620 ActionId .DISABLE_AIRPLANE_MODE ,
615- -> true
621+ -> true
616622
617623 ActionId .TOGGLE_BLUETOOTH ,
618624 ActionId .ENABLE_BLUETOOTH ,
619625 ActionId .DISABLE_BLUETOOTH ,
620- -> Build .VERSION .SDK_INT >= Build .VERSION_CODES .S_V2
626+ -> Build .VERSION .SDK_INT >= Build .VERSION_CODES .S_V2
621627
622628 ActionId .POWER_ON_OFF_DEVICE -> true
623629
@@ -632,7 +638,7 @@ object ActionUtils {
632638 ActionId .TOGGLE_MOBILE_DATA ,
633639 ActionId .ENABLE_MOBILE_DATA ,
634640 ActionId .DISABLE_MOBILE_DATA ,
635- -> return if (isSystemBridgeSupported) {
641+ -> return if (isSystemBridgeSupported) {
636642 emptyList()
637643 } else {
638644 listOf (Permission .ROOT )
@@ -645,7 +651,7 @@ object ActionUtils {
645651 ActionId .PREVIOUS_TRACK_PACKAGE ,
646652 ActionId .FAST_FORWARD_PACKAGE ,
647653 ActionId .REWIND_PACKAGE ,
648- -> return listOf (Permission .NOTIFICATION_LISTENER )
654+ -> return listOf (Permission .NOTIFICATION_LISTENER )
649655
650656 ActionId .VOLUME_UP ,
651657 ActionId .VOLUME_DOWN ,
@@ -661,7 +667,7 @@ object ActionUtils {
661667 ActionId .TOGGLE_DND_MODE ,
662668 ActionId .DISABLE_DND_MODE ,
663669 ActionId .ENABLE_DND_MODE ,
664- -> return listOf (Permission .ACCESS_NOTIFICATION_POLICY )
670+ -> return listOf (Permission .ACCESS_NOTIFICATION_POLICY )
665671
666672 ActionId .TOGGLE_AUTO_ROTATE ,
667673 ActionId .ENABLE_AUTO_ROTATE ,
@@ -670,25 +676,25 @@ object ActionUtils {
670676 ActionId .LANDSCAPE_MODE ,
671677 ActionId .SWITCH_ORIENTATION ,
672678 ActionId .CYCLE_ROTATIONS ,
673- -> return listOf (Permission .WRITE_SETTINGS )
679+ -> return listOf (Permission .WRITE_SETTINGS )
674680
675681 ActionId .TOGGLE_AUTO_BRIGHTNESS ,
676682 ActionId .ENABLE_AUTO_BRIGHTNESS ,
677683 ActionId .DISABLE_AUTO_BRIGHTNESS ,
678684 ActionId .INCREASE_BRIGHTNESS ,
679685 ActionId .DECREASE_BRIGHTNESS ,
680- -> return listOf (Permission .WRITE_SETTINGS )
686+ -> return listOf (Permission .WRITE_SETTINGS )
681687
682688 ActionId .TOGGLE_FLASHLIGHT ,
683689 ActionId .ENABLE_FLASHLIGHT ,
684690 ActionId .DISABLE_FLASHLIGHT ,
685691 ActionId .CHANGE_FLASHLIGHT_STRENGTH ,
686- -> return listOf (Permission .CAMERA )
692+ -> return listOf (Permission .CAMERA )
687693
688694 ActionId .ENABLE_NFC ,
689695 ActionId .DISABLE_NFC ,
690696 ActionId .TOGGLE_NFC ,
691- -> return if (isSystemBridgeSupported) {
697+ -> return if (isSystemBridgeSupported) {
692698 emptyList()
693699 } else {
694700 listOf (Permission .ROOT )
@@ -706,7 +712,7 @@ object ActionUtils {
706712 ActionId .TOGGLE_AIRPLANE_MODE ,
707713 ActionId .ENABLE_AIRPLANE_MODE ,
708714 ActionId .DISABLE_AIRPLANE_MODE ,
709- -> return if (isSystemBridgeSupported) {
715+ -> return if (isSystemBridgeSupported) {
710716 emptyList()
711717 } else {
712718 listOf (Permission .ROOT )
@@ -729,17 +735,17 @@ object ActionUtils {
729735
730736 ActionId .DISMISS_ALL_NOTIFICATIONS ,
731737 ActionId .DISMISS_MOST_RECENT_NOTIFICATION ,
732- -> return listOf (Permission .NOTIFICATION_LISTENER )
738+ -> return listOf (Permission .NOTIFICATION_LISTENER )
733739
734740 ActionId .ANSWER_PHONE_CALL ,
735741 ActionId .END_PHONE_CALL ,
736- -> return listOf (Permission .ANSWER_PHONE_CALL )
742+ -> return listOf (Permission .ANSWER_PHONE_CALL )
737743
738744 ActionId .PHONE_CALL -> return listOf (Permission .CALL_PHONE )
739745
740746 ActionId .SEND_SMS ,
741747 ActionId .COMPOSE_SMS ,
742- -> return listOf (Permission .SEND_SMS )
748+ -> return listOf (Permission .SEND_SMS )
743749
744750 ActionId .ENABLE_BLUETOOTH , ActionId .DISABLE_BLUETOOTH , ActionId .TOGGLE_BLUETOOTH ->
745751 // On S_V2 and newer, the system bridge is used which means no permissions are required
@@ -920,7 +926,7 @@ fun ActionData.isEditable(): Boolean = when (this) {
920926 is ActionData .HttpRequest ,
921927 is ActionData .InteractUiElement ,
922928 is ActionData .MoveCursor ,
923- -> true
929+ -> true
924930
925931 else -> false
926932}
0 commit comments