Browse Source

修改

授权码生成工具
liup 1 month ago
parent
commit
e8b8be9786
2 changed files with 12 additions and 26 deletions
  1. +4
    -26
      app/src/main/java/com/bonait/bnframework/common/helper/SdCart.java
  2. +8
    -0
      app/src/main/java/com/bonait/bnframework/modules/welcome/activity/WelcomeActivity.java

+ 4
- 26
app/src/main/java/com/bonait/bnframework/common/helper/SdCart.java View File

@@ -76,32 +76,10 @@ public class SdCart {
{
Log.i("日志","初始化数据库:文件不存在准备新建!");

//复制文件
if(!ConfigName.getInstance().isHighVersion){

File sdDir = null;
String dbPath = "";
boolean sdCardExist = Environment.getExternalStorageState().equals(
Environment.MEDIA_MOUNTED);
if (sdCardExist) {
sdDir = Environment.getExternalStorageDirectory();
dbPath = sdDir.toString()+ConfigName.dataPath;
}
File file2 = new File(dbPath);
if(file2.exists()){
copyDirectory(dbPath,ConfigName.getInstance().appResRoot);
}else{
//1.复制本地文件到SD卡
// copyFilesFassets(ConfigName.getInstance().dishesCon, ConfigName.getInstance().dbPath);
//2.创建数据库结构
DBHelper.getInstance(ConfigName.getInstance().dishesCon).CreateTables();
}
}else {
//1.复制本地文件到SD卡
// copyFilesFassets(ConfigName.getInstance().dishesCon, ConfigName.getInstance().dbPath);
//2.创建数据库结构
DBHelper.getInstance(ConfigName.getInstance().dishesCon).CreateTables();
}
//1.复制本地文件到SD卡
copyFilesFassets(ConfigName.getInstance().dishesCon, ConfigName.getInstance().dbPath);
//2.创建数据库结构
DBHelper.getInstance(ConfigName.getInstance().dishesCon).CreateTables();
}

ConfigName.getInstance(). AuthorizeCodePath=ConfigName.getInstance().appResRoot + "/AuthorizeCode.aes";


+ 8
- 0
app/src/main/java/com/bonait/bnframework/modules/welcome/activity/WelcomeActivity.java View File

@@ -2,6 +2,7 @@ package com.bonait.bnframework.modules.welcome.activity;

import android.Manifest;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;

@@ -14,6 +15,7 @@ import android.view.KeyEvent;
import android.view.MotionEvent;

import com.apkfuns.logutils.LogUtils;
import com.bonait.bnframework.BuildConfig;
import com.bonait.bnframework.MainApplication;
import com.bonait.bnframework.R;
import com.bonait.bnframework.business.MainInit;
@@ -69,6 +71,12 @@ public class WelcomeActivity extends BaseActivity {
if(ConfigName.getInstance().isPhoneVersion){
ConfigName.getInstance().scale = (double) miDisplayWidth /800;
}
int sdkInt = Build.VERSION.SDK_INT;
if (sdkInt >= Build.VERSION_CODES.O) {
// 针对Android 8.0(API级别26)及以上版本执行的代码
ConfigName.getInstance().isPhoneVersion = true;
}
LogUtils.d("ConfigName.getInstance().isPhoneVersion="+ConfigName.getInstance().isPhoneVersion);
initScaleViewDefaultValue();
initWelcome();
}


Loading…
Cancel
Save