fixed network chage state issues.
authorTrillGates <williamtrillgates@gmail.com>
Mon, 8 Mar 2021 02:44:14 +0000 (10:44 +0800)
committerTrillGates <williamtrillgates@gmail.com>
Mon, 8 Mar 2021 02:44:14 +0000 (10:44 +0800)
app/FotaBrand8541e/release/FotaBrand8541e_V1_202102031807_release.apk [deleted file]
app/FotaBrand8541e/release/output-metadata.json [deleted file]
app/src/main/java/com/ic/icfotaclient/presenter/OtaViewModel.kt
app/src/main/java/com/ic/icfotaclient/view/SystemUpdateActivity.kt
app/src/main/res/layout/dialog_tips.xml

diff --git a/app/FotaBrand8541e/release/FotaBrand8541e_V1_202102031807_release.apk b/app/FotaBrand8541e/release/FotaBrand8541e_V1_202102031807_release.apk
deleted file mode 100644 (file)
index 9688da4..0000000
Binary files a/app/FotaBrand8541e/release/FotaBrand8541e_V1_202102031807_release.apk and /dev/null differ
diff --git a/app/FotaBrand8541e/release/output-metadata.json b/app/FotaBrand8541e/release/output-metadata.json
deleted file mode 100644 (file)
index 2b7bdab..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-{
-  "version": 2,
-  "artifactType": {
-    "type": "APK",
-    "kind": "Directory"
-  },
-  "applicationId": "com.ic.icfotaclient",
-  "variantName": "processFotaBrand8541eReleaseResources",
-  "elements": [
-    {
-      "type": "SINGLE",
-      "filters": [],
-      "versionCode": 1,
-      "versionName": "1.0",
-      "outputFile": "FotaBrand8541e_V1_202102031807_release.apk"
-    }
-  ]
-}
\ No newline at end of file
index acc139d..e65e2c6 100644 (file)
@@ -81,9 +81,12 @@ class OtaViewModel : ViewModel() {
             Log.d(TAG, "mobile net is connected == > $isNetConnected")
             isNetConnected
         }
+        Log.d(TAG, "result == > $result")
         if (!result) {
             //无网络
             currentActionState.postValue(UpdateActionState.NO_NETWORK)
+        } else {
+            currentActionState.postValue(UpdateActionState.NONE)
         }
         return result
     }
index 1fd851f..c09364c 100644 (file)
@@ -179,4 +179,9 @@ class SystemUpdateActivity : AppCompatActivity() {
         }
 
     }
+
+    override fun onDestroy() {
+        super.onDestroy()
+        Log.d("SystemUpdateActivity", "onDestroy...")
+    }
 }
\ No newline at end of file
index 61eb176..4666ad9 100644 (file)
@@ -9,7 +9,6 @@
     android:paddingLeft="20dp"
     android:paddingRight="20dp">
 
-
     <TextView
         android:id="@+id/notify"
         android:layout_width="wrap_content"
@@ -21,7 +20,6 @@
         android:textColor="@color/white"
         android:textIsSelectable="true" />
 
-
     <ScrollView
         android:layout_width="match_parent"
         android:layout_height="wrap_content"