@@ -148,7 +148,8 @@ public void onViewFounded(ActivityViewObserver observer, View view) {
148148 ActivityViewObserver .IActivityViewListener l = this ;
149149 ActivityViewObserverHolder .stop (observer );
150150 L .d ("onViewFounded:" , view , " rootView: " , view .getRootView ());
151- view .post (() -> onPayDialogShown (activity , (ViewGroup ) view .getRootView ()));
151+ ViewGroup rootView = (ViewGroup ) view .getRootView ();
152+ view .post (() -> onPayDialogShown (activity , rootView ));
152153
153154 View .OnAttachStateChangeListener listener = mView2OnAttachStateChangeListenerMap .get (view );
154155 if (listener != null ) {
@@ -165,7 +166,7 @@ public void onViewAttachedToWindow(View v) {
165166 public void onViewDetachedFromWindow (View v ) {
166167 L .d ("onViewDetachedFromWindow:" , view );
167168 Context context = v .getContext ();
168- onPayDialogDismiss (context );
169+ onPayDialogDismiss (context , rootView );
169170 if (Config .from (context ).isVolumeDownMonitorEnabled ()) {
170171 ViewUtils .unregisterVolumeKeyDownEventListener (activity .getWindow ());
171172 }
@@ -193,7 +194,7 @@ public void onActivityPaused(Activity activity) {
193194 || activityClzName .contains (".UIPageFragmentActivity" )) {
194195 ActivityViewObserverHolder .stop (ActivityViewObserverHolder .Key .WeChatPayView );
195196 ActivityViewObserverHolder .stop (ActivityViewObserverHolder .Key .WeChatPaymentMethodView );
196- onPayDialogDismiss (activity );
197+ onPayDialogDismiss (activity , activity . getWindow (). getDecorView () );
197198 } else if (getVersionCode (activity ) >= Constant .WeChat .WECHAT_VERSION_CODE_8_0_20 && activityClzName .contains ("com.tencent.mm.ui.LauncherUI" )) {
198199 stopFragmentObserver (activity );
199200 }
@@ -513,12 +514,17 @@ private boolean isSmallPayDialogFloating(ViewGroup passwordLayout) {
513514 return location [0 ] > 0 || floatRootView .getChildCount () > 1 ;
514515 }
515516
516- protected void onPayDialogDismiss (Context context ) {
517+ protected void onPayDialogDismiss (Context context , View rootView ) {
517518 L .d ("PayDialog dismiss" );
518- if (Config .from (context ).isOn ()) {
519- cancelFingerprintIdentify ();
520- mMockCurrentUser = false ;
519+ if (!Config .from (context ).isOn ()) {
520+ return ;
521+ }
522+ cancelFingerprintIdentify ();
523+ View fingerPrintLayoutLast = rootView .findViewWithTag ("fingerPrintLayout" );
524+ if (fingerPrintLayoutLast != null ) {
525+ ViewUtils .removeFromSuperView (fingerPrintLayoutLast );
521526 }
527+ mMockCurrentUser = false ;
522528 }
523529
524530 private void cancelFingerprintIdentify () {
0 commit comments