|
|
@ -1,6 +1,7 @@ |
|
|
package qianmu.container.activity.H5; |
|
|
package qianmu.container.activity.H5; |
|
|
|
|
|
|
|
|
import android.app.smdt.SmdtManagerNew; |
|
|
import android.app.smdt.SmdtManagerNew; |
|
|
|
|
|
import android.content.ActivityNotFoundException; |
|
|
import android.content.Intent; |
|
|
import android.content.Intent; |
|
|
import android.net.Uri; |
|
|
import android.net.Uri; |
|
|
import android.os.Build; |
|
|
import android.os.Build; |
|
|
@ -272,13 +273,18 @@ public class UpdateFileActivity extends BaseActivity { |
|
|
} |
|
|
} |
|
|
Log.e("MainActivity: ",result); |
|
|
Log.e("MainActivity: ",result); |
|
|
} |
|
|
} |
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { |
|
|
|
|
|
if(!Environment.isExternalStorageManager()){ |
|
|
|
|
|
Intent intent = new Intent(Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION); |
|
|
|
|
|
intent.setData(Uri.parse("package:" + this.getPackageName())); // 设置要申请权限的应用包名
|
|
|
|
|
|
startActivity(intent); // 启动活动以请求用户授权
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try{ |
|
|
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { |
|
|
|
|
|
if(!Environment.isExternalStorageManager()){ |
|
|
|
|
|
Intent intent = new Intent(Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION); |
|
|
|
|
|
intent.setData(Uri.parse("package:" + this.getPackageName())); // 设置要申请权限的应用包名
|
|
|
|
|
|
startActivity(intent); // 启动活动以请求用户授权
|
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
}catch (ActivityNotFoundException e){ |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
//设置开机自启应用
|
|
|
//设置开机自启应用
|
|
|
if(Constant.androidBoardType.equals("smt")){ |
|
|
if(Constant.androidBoardType.equals("smt")){ |
|
|
|