From 25de7fc4775f3c1fa39f3910ffb679414c9eb7b8 Mon Sep 17 00:00:00 2001 From: zhl Date: Wed, 17 May 2023 11:42:44 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E4=B8=80=E4=BA=9B=E6=97=A0?= =?UTF-8?q?=E7=94=A8=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/cege/games/release/MainActivity.java | 43 ------------------- 1 file changed, 43 deletions(-) diff --git a/app/src/com/cege/games/release/MainActivity.java b/app/src/com/cege/games/release/MainActivity.java index 726374b..ea02bd0 100644 --- a/app/src/com/cege/games/release/MainActivity.java +++ b/app/src/com/cege/games/release/MainActivity.java @@ -1,7 +1,5 @@ package com.cege.games.release; -import static com.cege.games.release.dialog.QRCodeActivity.RC_SAVE_QR; - import android.Manifest; import android.content.Context; import android.content.Intent; @@ -119,8 +117,6 @@ public class MainActivity extends UnityPlayerActivity public static final int RC_READ_PHOTO = 0X012; - public static final int RC_LOAD_KEY = 0X013; - public static final int FILE_SELECTOR_CODE = 0X014; private String title; private String funId; @@ -324,8 +320,6 @@ public class MainActivity extends UnityPlayerActivity if ((requestCode == RC_CAMERA || requestCode == RC_READ_PHOTO) && null != funId && !"".equals(funId)) { JcSDK.nativeCb(funId, "User cancel", null); funId = ""; - } else if (requestCode == RC_LOAD_KEY) { - showQRScan(funId, "Scan QRCode for restore key."); } } @@ -347,43 +341,6 @@ public class MainActivity extends UnityPlayerActivity } } - @AfterPermissionGranted(RC_LOAD_KEY) - private void checkImagePermissions() { - String[] perms; - if (Build.VERSION.SDK_INT >= 33) { - perms = new String[] { "android.permission.READ_MEDIA_IMAGES" }; - } else { - perms = new String[] { Manifest.permission.READ_EXTERNAL_STORAGE }; - } - if (EasyPermissions.hasPermissions(this, perms)) { - Bitmap bitmap = FileUtils.loadImgData(this, oid); - if (bitmap != null) { - parsePhotoData(bitmap); - } else { - showQRScan(funId, "Scan QRCode for restore key."); - } - } else { - // Do not have permissions, request them now - EasyPermissions.requestPermissions(this, "Load Wallet restore key need read_media_images", - RC_LOAD_KEY, perms); - } - } - - @AfterPermissionGranted(RC_SAVE_QR) - private void checkSavePermissions() { - String[] perms = { Manifest.permission.WRITE_EXTERNAL_STORAGE }; - if (EasyPermissions.hasPermissions(this, perms)) { - if (qrCodeActivity != null) { - qrCodeActivity.saveAndClose(); - } - } else { - // Do not have permissions, request them now - EasyPermissions.requestPermissions(MainActivity.app, - "We need Write WRITE_EXTERNAL_STORAGE for backup Wallet Restore Key", - RC_SAVE_QR, perms); - } - } - /** * scan qrcode */