diff --git a/.gradle/2.14.1/taskArtifacts/cache.properties.lock b/.gradle/2.14.1/taskArtifacts/cache.properties.lock
index d84f2e6..fb7be57 100644
Binary files a/.gradle/2.14.1/taskArtifacts/cache.properties.lock and b/.gradle/2.14.1/taskArtifacts/cache.properties.lock differ
diff --git a/.gradle/2.14.1/taskArtifacts/fileHashes.bin b/.gradle/2.14.1/taskArtifacts/fileHashes.bin
index 6c5eaef..09737cc 100644
Binary files a/.gradle/2.14.1/taskArtifacts/fileHashes.bin and b/.gradle/2.14.1/taskArtifacts/fileHashes.bin differ
diff --git a/.gradle/2.14.1/taskArtifacts/fileSnapshots.bin b/.gradle/2.14.1/taskArtifacts/fileSnapshots.bin
index d29b32c..df8ef27 100644
Binary files a/.gradle/2.14.1/taskArtifacts/fileSnapshots.bin and b/.gradle/2.14.1/taskArtifacts/fileSnapshots.bin differ
diff --git a/.gradle/2.14.1/taskArtifacts/fileSnapshotsToTreeSnapshotsIndex.bin b/.gradle/2.14.1/taskArtifacts/fileSnapshotsToTreeSnapshotsIndex.bin
index b647681..f374449 100644
Binary files a/.gradle/2.14.1/taskArtifacts/fileSnapshotsToTreeSnapshotsIndex.bin and b/.gradle/2.14.1/taskArtifacts/fileSnapshotsToTreeSnapshotsIndex.bin differ
diff --git a/.gradle/2.14.1/taskArtifacts/taskArtifacts.bin b/.gradle/2.14.1/taskArtifacts/taskArtifacts.bin
index afbfd69..0b91e13 100644
Binary files a/.gradle/2.14.1/taskArtifacts/taskArtifacts.bin and b/.gradle/2.14.1/taskArtifacts/taskArtifacts.bin differ
diff --git a/.gradle/2.14.1/tasks/_app_compileReleaseJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.bin b/.gradle/2.14.1/tasks/_app_compileReleaseJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.bin
index c68ae7f..6eba108 100644
Binary files a/.gradle/2.14.1/tasks/_app_compileReleaseJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.bin and b/.gradle/2.14.1/tasks/_app_compileReleaseJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.bin differ
diff --git a/.gradle/2.14.1/tasks/_app_compileReleaseJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock b/.gradle/2.14.1/tasks/_app_compileReleaseJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock
index 6f8f29e..f363deb 100644
Binary files a/.gradle/2.14.1/tasks/_app_compileReleaseJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock and b/.gradle/2.14.1/tasks/_app_compileReleaseJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock differ
diff --git a/.gradle/2.14.1/tasks/_app_compileReleaseJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock b/.gradle/2.14.1/tasks/_app_compileReleaseJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock
index 2768cc2..19b93ae 100644
Binary files a/.gradle/2.14.1/tasks/_app_compileReleaseJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock and b/.gradle/2.14.1/tasks/_app_compileReleaseJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock differ
diff --git a/.gradle/2.14.1/tasks/_testDemo_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock b/.gradle/2.14.1/tasks/_testDemo_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock
index 8eebccc..fdfaaff 100644
Binary files a/.gradle/2.14.1/tasks/_testDemo_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock and b/.gradle/2.14.1/tasks/_testDemo_compileDebugJavaWithJavac/localClassSetAnalysis/localClassSetAnalysis.lock differ
diff --git a/.gradle/2.14.1/tasks/_testDemo_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.bin b/.gradle/2.14.1/tasks/_testDemo_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.bin
index 2a8d2be..b55cdfc 100644
Binary files a/.gradle/2.14.1/tasks/_testDemo_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.bin and b/.gradle/2.14.1/tasks/_testDemo_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.bin differ
diff --git a/.gradle/2.14.1/tasks/_testDemo_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock b/.gradle/2.14.1/tasks/_testDemo_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock
index 627c6a6..821f881 100644
Binary files a/.gradle/2.14.1/tasks/_testDemo_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock and b/.gradle/2.14.1/tasks/_testDemo_compileDebugJavaWithJavac/localJarClasspathSnapshot/localJarClasspathSnapshot.lock differ
diff --git a/.idea/libraries/animated_vector_drawable_25_1_0.xml b/.idea/libraries/animated_vector_drawable_25_1_0.xml
index ba14674..37ae84a 100644
--- a/.idea/libraries/animated_vector_drawable_25_1_0.xml
+++ b/.idea/libraries/animated_vector_drawable_25_1_0.xml
@@ -7,7 +7,6 @@
-
\ No newline at end of file
diff --git a/.idea/libraries/appcompat_v7_25_1_0.xml b/.idea/libraries/appcompat_v7_25_1_0.xml
index 8b7b99b..311035c 100644
--- a/.idea/libraries/appcompat_v7_25_1_0.xml
+++ b/.idea/libraries/appcompat_v7_25_1_0.xml
@@ -1,9 +1,5 @@
-
-
-
-
@@ -11,7 +7,6 @@
-
\ No newline at end of file
diff --git a/.idea/libraries/espresso_core_2_2_2.xml b/.idea/libraries/espresso_core_2_2_2.xml
index 069f730..4e9c2df 100644
--- a/.idea/libraries/espresso_core_2_2_2.xml
+++ b/.idea/libraries/espresso_core_2_2_2.xml
@@ -7,7 +7,6 @@
-
\ No newline at end of file
diff --git a/.idea/libraries/espresso_idling_resource_2_2_2.xml b/.idea/libraries/espresso_idling_resource_2_2_2.xml
index 8594a50..51a0657 100644
--- a/.idea/libraries/espresso_idling_resource_2_2_2.xml
+++ b/.idea/libraries/espresso_idling_resource_2_2_2.xml
@@ -1,13 +1,12 @@
-
+
-
\ No newline at end of file
diff --git a/.idea/libraries/exposed_instrumentation_api_publish_0_5.xml b/.idea/libraries/exposed_instrumentation_api_publish_0_5.xml
index 76cbb42..bbda6ed 100644
--- a/.idea/libraries/exposed_instrumentation_api_publish_0_5.xml
+++ b/.idea/libraries/exposed_instrumentation_api_publish_0_5.xml
@@ -7,7 +7,6 @@
-
\ No newline at end of file
diff --git a/.idea/libraries/rules_0_5.xml b/.idea/libraries/rules_0_5.xml
index 091a270..219af33 100644
--- a/.idea/libraries/rules_0_5.xml
+++ b/.idea/libraries/rules_0_5.xml
@@ -1,9 +1,5 @@
-
-
-
-
@@ -11,7 +7,6 @@
-
\ No newline at end of file
diff --git a/.idea/libraries/runner_0_5.xml b/.idea/libraries/runner_0_5.xml
index 9fe4598..e8fe27f 100644
--- a/.idea/libraries/runner_0_5.xml
+++ b/.idea/libraries/runner_0_5.xml
@@ -1,9 +1,5 @@
-
-
-
-
@@ -11,7 +7,6 @@
-
\ No newline at end of file
diff --git a/.idea/libraries/support_compat_25_1_0.xml b/.idea/libraries/support_compat_25_1_0.xml
index 2ae7ec8..66817b4 100644
--- a/.idea/libraries/support_compat_25_1_0.xml
+++ b/.idea/libraries/support_compat_25_1_0.xml
@@ -1,17 +1,12 @@
-
-
-
-
-
+
-
\ No newline at end of file
diff --git a/.idea/libraries/support_core_ui_25_1_0.xml b/.idea/libraries/support_core_ui_25_1_0.xml
index 9090c98..c702b5e 100644
--- a/.idea/libraries/support_core_ui_25_1_0.xml
+++ b/.idea/libraries/support_core_ui_25_1_0.xml
@@ -1,9 +1,5 @@
-
-
-
-
@@ -11,7 +7,6 @@
-
\ No newline at end of file
diff --git a/.idea/libraries/support_core_utils_25_1_0.xml b/.idea/libraries/support_core_utils_25_1_0.xml
index fa6e05c..1484dbd 100644
--- a/.idea/libraries/support_core_utils_25_1_0.xml
+++ b/.idea/libraries/support_core_utils_25_1_0.xml
@@ -1,9 +1,5 @@
-
-
-
-
@@ -11,7 +7,6 @@
-
\ No newline at end of file
diff --git a/.idea/libraries/support_fragment_25_1_0.xml b/.idea/libraries/support_fragment_25_1_0.xml
index 5b583d5..51733e5 100644
--- a/.idea/libraries/support_fragment_25_1_0.xml
+++ b/.idea/libraries/support_fragment_25_1_0.xml
@@ -1,9 +1,5 @@
-
-
-
-
@@ -11,7 +7,6 @@
-
\ No newline at end of file
diff --git a/.idea/libraries/support_media_compat_25_1_0.xml b/.idea/libraries/support_media_compat_25_1_0.xml
index f8b5431..53d9055 100644
--- a/.idea/libraries/support_media_compat_25_1_0.xml
+++ b/.idea/libraries/support_media_compat_25_1_0.xml
@@ -1,9 +1,5 @@
-
-
-
-
@@ -11,7 +7,6 @@
-
\ No newline at end of file
diff --git a/.idea/libraries/support_vector_drawable_25_1_0.xml b/.idea/libraries/support_vector_drawable_25_1_0.xml
index 996cacc..2c45a47 100644
--- a/.idea/libraries/support_vector_drawable_25_1_0.xml
+++ b/.idea/libraries/support_vector_drawable_25_1_0.xml
@@ -7,7 +7,6 @@
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 9b47fba..748ec02 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -140,9 +140,6 @@
-
- $USER_HOME$/.subversion
-
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index d6ecb7a..c40e0c3 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -19,15 +19,28 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -38,7 +51,6 @@
-
@@ -60,51 +72,32 @@
-
-
+
+
-
-
+
+
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -123,6 +116,16 @@
+
+
@@ -2825,6 +2796,11 @@
+
+
+
+
+
@@ -2951,6 +2927,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -2983,11 +2985,6 @@
-
-
-
-
-
@@ -3003,6 +3000,7 @@
+
@@ -3013,6 +3011,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -3020,37 +3042,41 @@
-
-
+
+
+
+
+
+
+
+
-
-
@@ -3058,50 +3084,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -3133,31 +3115,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -3249,37 +3207,41 @@
-
-
+
+
+
+
+
+
+
+
-
-
@@ -3294,37 +3256,41 @@
-
-
+
+
+
+
+
+
+
+
-
-
@@ -3336,6 +3302,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -3352,6 +3362,9 @@
+
+ $USER_HOME$/.subversion
+
@@ -3367,28 +3380,24 @@
-
-
-
-
-
-
-
+
+
+
+
-
-
+
@@ -3396,10 +3405,17 @@
-
-
+
+
+
+
+
+
+
+
+
@@ -3408,13 +3424,13 @@
file://$PROJECT_DIR$/app/src/main/java/com/upgrade/channey/common_upgrade/UpgradeDialog.java
- 14
+ 16
file://$PROJECT_DIR$/app/src/main/java/com/upgrade/channey/common_upgrade/UpgradeDialog.java
- 88
+ 90
@@ -3428,133 +3444,10 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
+
@@ -3564,55 +3457,21 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -3620,186 +3479,40 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/app/app.iml b/app/app.iml
index 1b85f07..b729d37 100644
--- a/app/app.iml
+++ b/app/app.iml
@@ -9,7 +9,6 @@
-
@@ -20,7 +19,7 @@
-
+
@@ -48,7 +47,6 @@
-
@@ -56,7 +54,6 @@
-
@@ -64,25 +61,22 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/app/src/main/java/com/upgrade/channey/common_upgrade/UpgradeDialog.java b/app/src/main/java/com/upgrade/channey/common_upgrade/UpgradeDialog.java
index e8ac4ea..e83aeea 100644
--- a/app/src/main/java/com/upgrade/channey/common_upgrade/UpgradeDialog.java
+++ b/app/src/main/java/com/upgrade/channey/common_upgrade/UpgradeDialog.java
@@ -2,7 +2,9 @@
import android.app.Activity;
import android.content.DialogInterface;
+import android.content.Intent;
import android.graphics.drawable.ColorDrawable;
+import android.net.Uri;
import android.os.Build;
import android.os.Handler;
import android.os.Message;
@@ -126,46 +128,54 @@ public void onClick(View v) {
posBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
- bar.setVisibility(View.VISIBLE);
noticeTv.setVisibility(View.GONE);
if(mDownLoadStatus == DOWNLOAD_STATUS_START || mDownLoadStatus == DOWNLOAD_STATUS_DOWNLOADING){
Toast.makeText(activity,"下载已开始",Toast.LENGTH_LONG).show();
}else {
- UpdateUtil.downLoadApk(activity, new UpdateUtil.DownloadListener() {
- @Override
- public void startDownload() {
- mDownLoadStatus = DOWNLOAD_STATUS_START;
- Log.d("qian","startDownloading");
- }
-
- @Override
- public void downloadSuccess() {
- mDownLoadStatus = DOWNLOAD_STATUS_END;
- Log.d("qian","downloadSuccess");
- UpdateUtil.installApk(activity,authority);
- }
-
- @Override
- public void downloadFailure(Exception e) {
- mDownLoadStatus = DOWNLOAD_STATUS_END;
- Log.d("qian","downloadFailure"+e.getMessage());
- mHandler.sendEmptyMessage(DOWNLOAD_STATUS_FAILURE);
- }
-
- @Override
- public void onDownload(long totalSize, long current) {
- mDownLoadStatus = DOWNLOAD_STATUS_DOWNLOADING;
- int i = (int) (current*100 /totalSize);
- Message msg = Message.obtain();
- if(i == 100){
- mHandler.sendEmptyMessage(DOWNLOAD_STATUS_END);
- }else {
- msg.what = DOWNLOAD_STATUS_DOWNLOADING;
- msg.arg1 = i;
- mHandler.sendMessage(msg);
+ try {
+ Uri uri = Uri.parse("market://details?id=" + activity.getPackageName());
+ Intent intent = new Intent(Intent.ACTION_VIEW, uri);
+ intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+ activity.startActivity(intent);
+ } catch (Exception e) {
+ bar.setVisibility(View.VISIBLE);
+// Toast.makeText(activity,"未检测到应用市场,已通过浏览器下载",Toast.LENGTH_LONG).show();
+ UpdateUtil.downLoadApk(activity, new UpdateUtil.DownloadListener() {
+ @Override
+ public void startDownload() {
+ mDownLoadStatus = DOWNLOAD_STATUS_START;
+ Log.d("qian","startDownloading");
}
- }
- },apkLink);
+
+ @Override
+ public void downloadSuccess() {
+ mDownLoadStatus = DOWNLOAD_STATUS_END;
+ Log.d("qian","downloadSuccess");
+ UpdateUtil.installApk(activity,authority);
+ }
+
+ @Override
+ public void downloadFailure(Exception e) {
+ mDownLoadStatus = DOWNLOAD_STATUS_END;
+ Log.d("qian","downloadFailure"+e.getMessage());
+ mHandler.sendEmptyMessage(DOWNLOAD_STATUS_FAILURE);
+ }
+
+ @Override
+ public void onDownload(long totalSize, long current) {
+ mDownLoadStatus = DOWNLOAD_STATUS_DOWNLOADING;
+ int i = (int) (current*100 /totalSize);
+ Message msg = Message.obtain();
+ if(i == 100){
+ mHandler.sendEmptyMessage(DOWNLOAD_STATUS_END);
+ }else {
+ msg.what = DOWNLOAD_STATUS_DOWNLOADING;
+ msg.arg1 = i;
+ mHandler.sendMessage(msg);
+ }
+ }
+ },apkLink);
+ }
}
}
});
diff --git a/build/intermediates/dex-cache/cache.xml b/build/intermediates/dex-cache/cache.xml
index 0338a55..5ea262e 100644
--- a/build/intermediates/dex-cache/cache.xml
+++ b/build/intermediates/dex-cache/cache.xml
@@ -34,7 +34,7 @@
jumboMode="false"
optimize="true"
revision="25.0.2"
- sha1="bd8e402632d1e0463116d9b0b0cb33b43eeb2517">
+ sha1="d4b996061c1df591e3832417110e93c851362f43">
-
-
@@ -47,7 +46,6 @@
-
@@ -55,7 +53,6 @@
-
@@ -63,7 +60,6 @@
-
@@ -71,7 +67,6 @@
-
@@ -79,7 +74,6 @@
-
@@ -139,6 +133,5 @@
-
\ No newline at end of file