3333import com .surcumference .fingerprint .util .drawable .XDrawable ;
3434import com .surcumference .fingerprint .util .log .L ;
3535import com .surcumference .fingerprint .view .AlipayPayView ;
36+ import com .surcumference .fingerprint .view .DialogFrameLayout ;
3637import com .surcumference .fingerprint .view .SettingsView ;
3738import com .wei .android .lib .fingerprintidentify .FingerprintIdentify ;
3839import com .wei .android .lib .fingerprintidentify .base .BaseFingerprint ;
@@ -113,8 +114,9 @@ protected void onActivityCreated(Activity activity) {
113114 }
114115 activity .getWindow ().getDecorView ().setAlpha (0 );
115116 Task .onMain (1500 , () -> {
116- final String modulePackageName = "com.alipay.android.phone.safepaybase" ;
117- View key1View = ViewUtils .findViewByName (activity , modulePackageName , "key_num_1" );
117+ int versionCode = getAlipayVersionCode (activity );
118+ AlipayVersionControl .DigitPasswordKeyPad digitPasswordKeyPad = AlipayVersionControl .getDigitPasswordKeyPad (versionCode );
119+ View key1View = ViewUtils .findViewByName (activity , digitPasswordKeyPad .modulePackageName , digitPasswordKeyPad .key1 );
118120 if (key1View != null ) {
119121 showFingerPrintDialog (activity );
120122 return ;
@@ -180,8 +182,6 @@ public void showFingerPrintDialog(final Activity activity) {
180182 try {
181183 if (getAlipayVersionCode (activity ) >= 224 ) {
182184 if (activity .getClass ().getName ().contains (".MspContainerActivity" )) {
183- ViewUtils .recursiveLoopChildren (activity .getWindow ().getDecorView ());
184-
185185 View payTextView = ViewUtils .findViewByText (activity .getWindow ().getDecorView (), "支付宝支付密码" , "支付寶支付密碼" , "Alipay Payment Password" );
186186 L .d ("payTextView" , payTextView );
187187 if (payTextView == null ) {
@@ -238,7 +238,7 @@ public void showFingerPrintDialog(final Activity activity) {
238238 }
239239 onCompleteRunnable .run ();
240240 });
241- AlertDialog dialog = new AlipayPayView (context ).withOnCloseImageClickListener (v -> {
241+ DialogFrameLayout alipayPayView = new AlipayPayView (context ).withOnCloseImageClickListener (v -> {
242242 mPwdActivityDontShowFlag = true ;
243243 AlertDialog dialog1 = mFingerPrintAlertDialog ;
244244 if (dialog1 != null ) {
@@ -253,9 +253,8 @@ public void showFingerPrintDialog(final Activity activity) {
253253 if (!mPwdActivityDontShowFlag ) {
254254 Task .onMain (mPwdActivityReShowDelayTimeMsec , () -> activity .getWindow ().getDecorView ().setAlpha (1 ));
255255 }
256- }).showInDialog ();
257- mFingerPrintAlertDialog = dialog ;
258- Task .onMain (100 , dialog ::show );
256+ });
257+ Task .onMain (100 , () -> mFingerPrintAlertDialog = alipayPayView .showInDialog ());
259258 } catch (OutOfMemoryError e ) {
260259 }
261260 }
0 commit comments