pull/10/head
AriaLyy 8 years ago
parent 212d635f85
commit 01ae7e2e5f
  1. 2
      .idea/misc.xml
  2. 17
      Aria/src/main/java/com/arialyy/aria/util/SSLContextUtil.java
  3. 7
      app/src/main/java/com/arialyy/simple/single_task/SingleTaskActivity.java

@ -37,7 +37,7 @@
<ConfirmationsSetting value="0" id="Add" /> <ConfirmationsSetting value="0" id="Add" />
<ConfirmationsSetting value="0" id="Remove" /> <ConfirmationsSetting value="0" id="Remove" />
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" /> <output url="file://$PROJECT_DIR$/build/classes" />
</component> </component>
<component name="ProjectType"> <component name="ProjectType">

@ -1,3 +1,18 @@
/*
* Copyright (C) 2016 AriaLyy(https://github.com/AriaLyy/Aria)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.arialyy.aria.util; package com.arialyy.aria.util;
import android.text.TextUtils; import android.text.TextUtils;
@ -38,7 +53,7 @@ public class SSLContextUtil {
* @param caPath 保存在assets目录下的CA证书完整路径 * @param caPath 保存在assets目录下的CA证书完整路径
*/ */
public static SSLContext getSSLContext(String caAlias, String caPath) { public static SSLContext getSSLContext(String caAlias, String caPath) {
if (TextUtils.isEmpty(caAlias) || TextUtils.isEmpty(caPath)){ if (TextUtils.isEmpty(caAlias) || TextUtils.isEmpty(caPath)) {
return null; return null;
} }
// Load CAs from an InputStream // Load CAs from an InputStream

@ -119,11 +119,6 @@ public class SingleTaskActivity extends BaseActivity<ActivitySingleBinding> {
mStart.setText("重新开始?"); mStart.setText("重新开始?");
mCancel.setEnabled(false); mCancel.setEnabled(false);
setBtState(true); setBtState(true);
//String path = Environment.getExternalStorageDirectory().getPath() + "/test.jpg";
//Bitmap bm = BitmapFactory.decodeFile(path);
//mImg.setImageBitmap(bm);
break; break;
} }
} }
@ -201,8 +196,6 @@ public class SingleTaskActivity extends BaseActivity<ActivitySingleBinding> {
.load(DOWNLOAD_URL) .load(DOWNLOAD_URL)
.setDownloadPath(Environment.getExternalStorageDirectory().getPath() + "/test.apk") .setDownloadPath(Environment.getExternalStorageDirectory().getPath() + "/test.apk")
.setDownloadName("test.apk") .setDownloadName("test.apk")
//.setDownloadPath(Environment.getExternalStorageDirectory().getPath() + "/test.jpg")
//.setDownloadName("test.jpg")
.start(); .start();
} }

Loading…
Cancel
Save