@@ -78,6 +78,7 @@ public class TouchHelperServiceImpl {
7878 private static final int PACKAGE_POSITION_CLICK_FIRST_DELAY = 300 ;
7979 private static final int PACKAGE_POSITION_CLICK_RETRY_INTERVAL = 500 ;
8080 private static final int PACKAGE_POSITION_CLICK_RETRY = 6 ;
81+ private boolean isShow = false ;
8182
8283 public TouchHelperServiceImpl (AccessibilityService service ) {
8384 this .service = service ;
@@ -693,6 +694,9 @@ private void updatePackage() {
693694 // display activity customization dialog, and allow users to pick widget or positions
694695 @ SuppressLint ("ClickableViewAccessibility" )
695696 private void showActivityCustomizationDialog () {
697+ if (isShow ){
698+ return ;
699+ }
696700 // show activity customization window
697701 final WindowManager windowManager = (WindowManager ) service .getSystemService (AccessibilityService .WINDOW_SERVICE );
698702 final DisplayMetrics metrics = new DisplayMetrics ();
@@ -967,11 +971,13 @@ public void onClick(View v) {
967971 windowManager .removeViewImmediate (viewTarget );
968972 windowManager .removeViewImmediate (viewCustomization );
969973 windowManager .removeViewImmediate (imageTarget );
974+ isShow = false ;
970975 }
971976 });
972977 windowManager .addView (viewTarget , outlineParams );
973978 windowManager .addView (viewCustomization , customizationParams );
974979 windowManager .addView (imageTarget , targetParams );
980+ isShow = true ;
975981 }
976982
977983 public void ShowToastInIntentService (final String sText ) {
0 commit comments