Skip to content

Commit

Permalink
update code #70461
Browse files Browse the repository at this point in the history
  • Loading branch information
tonlion committed Oct 25, 2019
1 parent 3c4d1e7 commit 23bbfbd
Show file tree
Hide file tree
Showing 17 changed files with 24 additions and 6 deletions.
Binary file modified HBuilder-SourceTool-as/app/libs/dev-tools-base-release.aar
Binary file not shown.
Binary file modified HBuilder-SourceTool-as/app/libs/uniapp-release.aar
Binary file not shown.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Android平台5+App/uni-app运行环境开源项目

**重要:请使用HBuilderX2.3.6-20191020生成本地打包App资源,否则uni-app项目可能提示“运行环境版本和编译器版本不一致”,详情参考[https://ask.dcloud.net.cn/article/35627](https://ask.dcloud.net.cn/article/35627)**
**重要:请使用HBuilderX2.3.7-20191024生成本地打包App资源,否则uni-app项目可能提示“运行环境版本和编译器版本不一致”,详情参考[https://ask.dcloud.net.cn/article/35627](https://ask.dcloud.net.cn/article/35627)**

## 说明
此次更新梳理了工程结构,现在开发者可以直接修改引擎中的代码,自主编译出新的引擎。
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed feature/map-amap/libs/x86/libAMapSDK_MAP_v6_4_1.so
Binary file not shown.
Binary file removed feature/oauth-qq/libs/qq_sdk_v3.1.0.jar
Binary file not shown.
Binary file removed feature/oauth-sina/libs/openDefault-4.3.9.aar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed feature/share-qq/libs/qq_sdk_v3.1.0.jar
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,17 @@
import android.graphics.Bitmap;
import android.graphics.Bitmap.CompressFormat;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.Display;
import android.widget.Toast;

import com.nostra13.dcloudimageloader.core.DisplayImageOptions;
import com.nostra13.dcloudimageloader.core.ImageLoaderL;
import com.nostra13.dcloudimageloader.core.assist.ImageScaleType;
import com.tencent.mm.opensdk.modelbase.BaseResp;
import com.tencent.mm.opensdk.modelbiz.WXLaunchMiniProgram;
import com.tencent.mm.opensdk.modelmsg.SendMessageToWX;
Expand Down Expand Up @@ -829,7 +833,7 @@ private static Bitmap cpBitmap(Bitmap orgBitmap) {
Bitmap tmp;
while (orgBitmap.getHeight() * orgBitmap.getRowBytes() >= 32 * 1024) {
tmp = Bitmap.createScaledBitmap(orgBitmap, orgBitmap.getWidth() * 2 / 3, orgBitmap.getHeight() * 2 / 3, true);
orgBitmap.recycle();
orgBitmap.recycle();
orgBitmap = tmp;

}
Expand All @@ -844,7 +848,10 @@ private byte[] buildThumbData(IWebview pWebViewImpl, String thumeImgPath) {
try {
// The thumeImg size should be within 32KB * 1024 = 32768
if (PdrUtil.isNetPath(thumeImgPath)) {//是网络地址
bitmap=ImageLoaderL.getInstance().loadImageSync(thumeImgPath);
DisplayImageOptions displayImageOptions = new DisplayImageOptions.Builder()
.cacheOnDisc(false).cacheInMemory(false).imageScaleType(ImageScaleType.NONE).bitmapConfig(Bitmap.Config.RGB_565)
.showImageOnLoading(new ColorDrawable(Color.TRANSPARENT)).build();
bitmap=ImageLoaderL.getInstance().loadImageSync(thumeImgPath, displayImageOptions);
// try {
// is = new URL(thumeImgPath).openStream();
// if(is != null){
Expand Down
17 changes: 14 additions & 3 deletions feature/uploader/src/io/dcloud/net/UploadNetWork.java
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ private void initUploadData() throws Exception{
mRequest.setRequestProperty("Charset", "UTF-8");
mRequest.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + boundary);
mRequest.setUseCaches(false);
int maxBufferSize = 10 * 1024;
mRequest.setChunkedStreamingMode(maxBufferSize);
/*int maxBufferSize = 10 * 1024;
mRequest.setChunkedStreamingMode(maxBufferSize);*/
initContentLength();
DataOutputStream ds = new DataOutputStream(mRequest.getOutputStream());
//设置所有应该上传的数据
Expand All @@ -198,7 +198,7 @@ private void initUploadData() throws Exception{
ds.write(contentType.getBytes());
ds.writeBytes(end);
FileInputStream fStream = ((UploadFile) ui).mFileInputS;
int bytesAvailable = fStream.available();
/*int bytesAvailable = fStream.available();
int bufferSize = Math.min(bytesAvailable, maxBufferSize);
byte[] buffer = new byte[bufferSize];
long curbytes = 0;
Expand All @@ -212,6 +212,17 @@ private void initUploadData() throws Exception{
bytesAvailable = fStream.available();
bufferSize = Math.min(bytesAvailable, maxBufferSize);
bytesRead = fStream.read(buffer, 0, bufferSize);
}*/
int bufferSize = 1024*10;
byte[] buffer = new byte[bufferSize];
int length = -1;
long curbytes = 0;
while ((length = fStream.read(buffer)) != -1) {
curbytes += length;
mUploadedSize = curbytes;
Log.e("UploadNetWort", "initUploadData: mUploadedSize=="+mUploadedSize );
mReqListener.onNetStateChanged(NetState.NET_HANDLE_ING,isAbort);
ds.write(buffer, 0, length);
}
ds.writeBytes(end);
fStream.close();
Expand Down

0 comments on commit 23bbfbd

Please sign in to comment.