移除一些无用代码
This commit is contained in:
parent
8007015164
commit
25de7fc477
@ -1,7 +1,5 @@
|
|||||||
package com.cege.games.release;
|
package com.cege.games.release;
|
||||||
|
|
||||||
import static com.cege.games.release.dialog.QRCodeActivity.RC_SAVE_QR;
|
|
||||||
|
|
||||||
import android.Manifest;
|
import android.Manifest;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
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_READ_PHOTO = 0X012;
|
||||||
|
|
||||||
public static final int RC_LOAD_KEY = 0X013;
|
|
||||||
|
|
||||||
public static final int FILE_SELECTOR_CODE = 0X014;
|
public static final int FILE_SELECTOR_CODE = 0X014;
|
||||||
private String title;
|
private String title;
|
||||||
private String funId;
|
private String funId;
|
||||||
@ -324,8 +320,6 @@ public class MainActivity extends UnityPlayerActivity
|
|||||||
if ((requestCode == RC_CAMERA || requestCode == RC_READ_PHOTO) && null != funId && !"".equals(funId)) {
|
if ((requestCode == RC_CAMERA || requestCode == RC_READ_PHOTO) && null != funId && !"".equals(funId)) {
|
||||||
JcSDK.nativeCb(funId, "User cancel", null);
|
JcSDK.nativeCb(funId, "User cancel", null);
|
||||||
funId = "";
|
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
|
* scan qrcode
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user